提交 4a733a9c 编写于 作者: M Mr.doob

Fixed helpers so they work with the new Scene behaviour.

上级 e348084d
......@@ -94,7 +94,7 @@ THREE.BoxHelper.prototype.update = function ( object ) {
this.geometry.computeBoundingSphere();
this.matrix = object.matrixWorld;
this.matrixAutoUpdate = false;
this.matrixWorld = object.matrixWorld;
};
......@@ -94,7 +94,7 @@ THREE.CameraHelper = function ( camera ) {
THREE.Line.call( this, geometry, material, THREE.LinePieces );
this.camera = camera;
this.matrixWorld = camera.matrixWorld;
this.matrix = camera.matrixWorld;
this.matrixAutoUpdate = false;
this.pointMap = pointMap;
......
......@@ -11,7 +11,7 @@ THREE.DirectionalLightHelper = function ( light, size ) {
this.light = light;
this.light.updateMatrixWorld();
this.matrixWorld = light.matrixWorld;
this.matrix = light.matrixWorld;
this.matrixAutoUpdate = false;
size = size || 1;
......
......@@ -76,8 +76,8 @@ THREE.EdgesHelper = function ( object, hex ) {
THREE.Line.call( this, geometry, new THREE.LineBasicMaterial( { color: color } ), THREE.LinePieces );
this.matrix = object.matrixWorld;
this.matrixAutoUpdate = false;
this.matrixWorld = object.matrixWorld;
};
......
......@@ -10,7 +10,7 @@ THREE.HemisphereLightHelper = function ( light, sphereSize, arrowLength, domeSiz
this.light = light;
this.light.updateMatrixWorld();
this.matrixWorld = light.matrixWorld;
this.matrix = light.matrixWorld;
this.matrixAutoUpdate = false;
this.colors = [ new THREE.Color(), new THREE.Color() ];
......@@ -55,4 +55,3 @@ THREE.HemisphereLightHelper.prototype.update = function () {
}
}();
......@@ -14,7 +14,7 @@ THREE.PointLightHelper = function ( light, sphereSize ) {
THREE.Mesh.call( this, geometry, material );
this.matrixWorld = this.light.matrixWorld;
this.matrix = this.light.matrixWorld;
this.matrixAutoUpdate = false;
/*
......@@ -44,7 +44,7 @@ THREE.PointLightHelper = function ( light, sphereSize ) {
THREE.PointLightHelper.prototype = Object.create( THREE.Mesh.prototype );
THREE.PointLightHelper.prototype.dispose = function () {
this.geometry.dispose();
this.material.dispose();
};
......@@ -69,4 +69,3 @@ THREE.PointLightHelper.prototype.update = function () {
*/
};
......@@ -32,7 +32,7 @@ THREE.SkeletonHelper = function ( object ) {
this.root = object;
this.matrixWorld = object.matrixWorld;
this.matrix = object.matrixWorld;
this.matrixAutoUpdate = false;
this.update();
......
......@@ -11,7 +11,7 @@ THREE.SpotLightHelper = function ( light ) {
this.light = light;
this.light.updateMatrixWorld();
this.matrixWorld = light.matrixWorld;
this.matrix = light.matrixWorld;
this.matrixAutoUpdate = false;
var geometry = new THREE.CylinderGeometry( 0, 1, 1, 8, 1, true );
......@@ -20,7 +20,7 @@ THREE.SpotLightHelper = function ( light ) {
geometry.applyMatrix( new THREE.Matrix4().makeRotationX( - Math.PI / 2 ) );
var material = new THREE.MeshBasicMaterial( { wireframe: true, fog: false } );
this.cone = new THREE.Mesh( geometry, material );
this.add( this.cone );
......
......@@ -162,8 +162,8 @@ THREE.WireframeHelper = function ( object, hex ) {
THREE.Line.call( this, geometry, new THREE.LineBasicMaterial( { color: color } ), THREE.LinePieces );
this.matrix = object.matrixWorld;
this.matrixAutoUpdate = false;
this.matrixWorld = object.matrixWorld;
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册