|
@@ -717,8 +717,8 @@ THREE.FaceNormalsHelper.prototype.update=function(){var a=this.geometry.vertices
|
|
THREE.GridHelper.prototype.setColors=function(a,b){this.color1.set(a);this.color2.set(b);this.geometry.colorsNeedUpdate=!0};THREE.HemisphereLightHelper=function(a,b,c,d){THREE.Object3D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrixWorld=a.matrixWorld;this.matrixAutoUpdate=!1;this.colors=[new THREE.Color,new THREE.Color];a=new THREE.SphereGeometry(b,4,2);a.applyMatrix((new THREE.Matrix4).makeRotationX(-Math.PI/2));for(b=0;8>b;b++)a.faces[b].color=this.colors[4>b?0:1];b=new THREE.MeshBasicMaterial({vertexColors:THREE.FaceColors,wireframe:!0});this.lightSphere=new THREE.Mesh(a,b);this.add(this.lightSphere);
|
|
THREE.GridHelper.prototype.setColors=function(a,b){this.color1.set(a);this.color2.set(b);this.geometry.colorsNeedUpdate=!0};THREE.HemisphereLightHelper=function(a,b,c,d){THREE.Object3D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrixWorld=a.matrixWorld;this.matrixAutoUpdate=!1;this.colors=[new THREE.Color,new THREE.Color];a=new THREE.SphereGeometry(b,4,2);a.applyMatrix((new THREE.Matrix4).makeRotationX(-Math.PI/2));for(b=0;8>b;b++)a.faces[b].color=this.colors[4>b?0:1];b=new THREE.MeshBasicMaterial({vertexColors:THREE.FaceColors,wireframe:!0});this.lightSphere=new THREE.Mesh(a,b);this.add(this.lightSphere);
|
|
this.update()};THREE.HemisphereLightHelper.prototype=Object.create(THREE.Object3D.prototype);THREE.HemisphereLightHelper.prototype.dispose=function(){this.lightSphere.geometry.dispose();this.lightSphere.material.dispose()};
|
|
this.update()};THREE.HemisphereLightHelper.prototype=Object.create(THREE.Object3D.prototype);THREE.HemisphereLightHelper.prototype.dispose=function(){this.lightSphere.geometry.dispose();this.lightSphere.material.dispose()};
|
|
THREE.HemisphereLightHelper.prototype.update=function(){var a=new THREE.Vector3;return function(){this.colors[0].copy(this.light.color).multiplyScalar(this.light.intensity);this.colors[1].copy(this.light.groundColor).multiplyScalar(this.light.intensity);this.lightSphere.lookAt(a.setFromMatrixPosition(this.light.matrixWorld).negate());this.lightSphere.geometry.colorsNeedUpdate=!0}}();THREE.PointLightHelper=function(a,b){this.light=a;this.light.updateMatrixWorld();var c=new THREE.SphereGeometry(b,4,2),d=new THREE.MeshBasicMaterial({wireframe:!0,fog:!1});d.color.copy(this.light.color).multiplyScalar(this.light.intensity);THREE.Mesh.call(this,c,d);this.matrixWorld=this.light.matrixWorld;this.matrixAutoUpdate=!1};THREE.PointLightHelper.prototype=Object.create(THREE.Mesh.prototype);THREE.PointLightHelper.prototype.dispose=function(){this.geometry.dispose();this.material.dispose()};
|
|
THREE.HemisphereLightHelper.prototype.update=function(){var a=new THREE.Vector3;return function(){this.colors[0].copy(this.light.color).multiplyScalar(this.light.intensity);this.colors[1].copy(this.light.groundColor).multiplyScalar(this.light.intensity);this.lightSphere.lookAt(a.setFromMatrixPosition(this.light.matrixWorld).negate());this.lightSphere.geometry.colorsNeedUpdate=!0}}();THREE.PointLightHelper=function(a,b){this.light=a;this.light.updateMatrixWorld();var c=new THREE.SphereGeometry(b,4,2),d=new THREE.MeshBasicMaterial({wireframe:!0,fog:!1});d.color.copy(this.light.color).multiplyScalar(this.light.intensity);THREE.Mesh.call(this,c,d);this.matrixWorld=this.light.matrixWorld;this.matrixAutoUpdate=!1};THREE.PointLightHelper.prototype=Object.create(THREE.Mesh.prototype);THREE.PointLightHelper.prototype.dispose=function(){this.geometry.dispose();this.material.dispose()};
|
|
-THREE.PointLightHelper.prototype.update=function(){this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)};THREE.SkeletonHelper=function(a,b,c){THREE.Object3D.call(this);this.scaleRatio=void 0!==c?c:1;this.skeleton=a;void 0===b&&(b=1);c=b*this.scaleRatio;for(var d=0;d<a.bones.length;++d){var e=a.bones[d],f=new THREE.BoxGeometry(c,c,c),g=new THREE.MeshBasicMaterial;e.helper={};e.helper.box=new THREE.Mesh(f,g);e.helper.axes=new THREE.AxisHelper(3*b);this.add(e.helper.box);this.add(e.helper.axes);e.parent instanceof THREE.Bone&&(f=new THREE.LineBasicMaterial,g=new THREE.Geometry,f.vertexColors=!0,g.vertices.push(new THREE.Vector3),
|
|
|
|
-g.vertices.push(new THREE.Vector3),g.colors.push(new THREE.Color(1,1,0)),g.colors.push(new THREE.Color(0,0,0)),e.helper.line=new THREE.Line(g,f),this.add(e.helper.line))}this.update()};THREE.SkeletonHelper.prototype=Object.create(THREE.Object3D.prototype);
|
|
|
|
|
|
+THREE.PointLightHelper.prototype.update=function(){this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)};THREE.SkeletonHelper=function(a,b,c){THREE.Object3D.call(this);this.scaleRatio=void 0!==c?c:1;this.skeleton=a;void 0===b&&(b=1);c=b*this.scaleRatio;for(var d=0;d<a.bones.length;++d){var e=a.bones[d],f=new THREE.BoxGeometry(c,c,c),g=new THREE.MeshBasicMaterial({depthTest:!1,depthWrite:!1});e.helper={};e.helper.box=new THREE.Mesh(f,g);e.helper.axes=new THREE.AxisHelper(3*b);this.add(e.helper.box);this.add(e.helper.axes);e.parent instanceof THREE.Bone&&(f=new THREE.LineBasicMaterial({vertexColors:!0,
|
|
|
|
+depthTest:!1,depthWrite:!1}),g=new THREE.Geometry,g.vertices.push(new THREE.Vector3),g.vertices.push(new THREE.Vector3),g.colors.push(new THREE.Color(1,1,0)),g.colors.push(new THREE.Color(0,0,0)),e.helper.line=new THREE.Line(g,f),this.add(e.helper.line))}this.update()};THREE.SkeletonHelper.prototype=Object.create(THREE.Object3D.prototype);
|
|
THREE.SkeletonHelper.prototype.update=function(){for(var a=0;a<this.skeleton.bones.length;++a){var b=this.skeleton.bones[a];this.visible&&b.parent instanceof THREE.Bone&&(b.skinMatrix.decompose(b.helper.box.position,b.helper.box.quaternion,b.helper.box.scale),b.helper.box.position.multiplyScalar(this.scaleRatio),b.helper.axes.quaternion=b.helper.box.quaternion,b.helper.axes.position=b.helper.box.position,b.helper.axes.scale=b.helper.box.scale,b.helper.line.geometry.vertices[0].setFromMatrixPosition(b.skinMatrix),
|
|
THREE.SkeletonHelper.prototype.update=function(){for(var a=0;a<this.skeleton.bones.length;++a){var b=this.skeleton.bones[a];this.visible&&b.parent instanceof THREE.Bone&&(b.skinMatrix.decompose(b.helper.box.position,b.helper.box.quaternion,b.helper.box.scale),b.helper.box.position.multiplyScalar(this.scaleRatio),b.helper.axes.quaternion=b.helper.box.quaternion,b.helper.axes.position=b.helper.box.position,b.helper.axes.scale=b.helper.box.scale,b.helper.line.geometry.vertices[0].setFromMatrixPosition(b.skinMatrix),
|
|
b.helper.line.geometry.vertices[0].multiplyScalar(this.scaleRatio),b.helper.line.geometry.vertices[1].setFromMatrixPosition(b.parent.skinMatrix),b.helper.line.geometry.vertices[1].multiplyScalar(this.scaleRatio),b.helper.line.geometry.verticesNeedUpdate=!0)}};
|
|
b.helper.line.geometry.vertices[0].multiplyScalar(this.scaleRatio),b.helper.line.geometry.vertices[1].setFromMatrixPosition(b.parent.skinMatrix),b.helper.line.geometry.vertices[1].multiplyScalar(this.scaleRatio),b.helper.line.geometry.verticesNeedUpdate=!0)}};
|
|
THREE.SkeletonHelper.prototype.setVisible=function(a){for(var b=0;b<this.skeleton.bones.length;++b){var c=this.skeleton.bones[b];c.helper&&(c.helper.box.visible=a,c.helper.axes.visible=a,c.parent instanceof THREE.Bone&&(c.helper.line.visible=a))}};THREE.SpotLightHelper=function(a){THREE.Object3D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrixWorld=a.matrixWorld;this.matrixAutoUpdate=!1;a=new THREE.CylinderGeometry(0,1,1,8,1,!0);a.applyMatrix((new THREE.Matrix4).makeTranslation(0,-0.5,0));a.applyMatrix((new THREE.Matrix4).makeRotationX(-Math.PI/2));var b=new THREE.MeshBasicMaterial({wireframe:!0,fog:!1});this.cone=new THREE.Mesh(a,b);this.add(this.cone);this.update()};THREE.SpotLightHelper.prototype=Object.create(THREE.Object3D.prototype);
|
|
THREE.SkeletonHelper.prototype.setVisible=function(a){for(var b=0;b<this.skeleton.bones.length;++b){var c=this.skeleton.bones[b];c.helper&&(c.helper.box.visible=a,c.helper.axes.visible=a,c.parent instanceof THREE.Bone&&(c.helper.line.visible=a))}};THREE.SpotLightHelper=function(a){THREE.Object3D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrixWorld=a.matrixWorld;this.matrixAutoUpdate=!1;a=new THREE.CylinderGeometry(0,1,1,8,1,!0);a.applyMatrix((new THREE.Matrix4).makeTranslation(0,-0.5,0));a.applyMatrix((new THREE.Matrix4).makeRotationX(-Math.PI/2));var b=new THREE.MeshBasicMaterial({wireframe:!0,fog:!1});this.cone=new THREE.Mesh(a,b);this.add(this.cone);this.update()};THREE.SpotLightHelper.prototype=Object.create(THREE.Object3D.prototype);
|