提交 01ff9bd7 编写于 作者: W WestLangley

Keep front of helper facing direction of normal

上级 3aff5401
......@@ -9,6 +9,7 @@ import { MeshBasicMaterial } from '../materials/MeshBasicMaterial.js';
import { Float32BufferAttribute } from '../core/BufferAttribute.js';
import { BufferGeometry } from '../core/BufferGeometry.js';
import { Object3D } from '../core/Object3D.js';
import { FrontSide, BackSide } from '../constants.js';
function PlaneHelper( plane, size, hex ) {
......@@ -51,6 +52,8 @@ PlaneHelper.prototype.updateMatrixWorld = function ( force ) {
this.scale.set( 0.5 * this.size, 0.5 * this.size, scale );
this.children[ 0 ].material.side = ( scale < 0 ) ? BackSide : FrontSide; // renderer flips side when determinant < 0; flipping not wanted here
this.lookAt( this.plane.normal );
Object3D.prototype.updateMatrixWorld.call( this, force );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册