|
@@ -59,11 +59,11 @@ THREE.Camera=function(a,d,e,f){this.fov=a;this.aspect=d;this.near=e;this.far=f;t
|
|
|
this.translateZ=function(h){this.tmpVec.sub(this.target.position,this.position).normalize().multiplyScalar(h);this.position.subSelf(this.tmpVec);this.target.position.subSelf(this.tmpVec)};this.updateMatrix=function(){this.matrix.lookAt(this.position,this.target.position,this.up)};this.updateProjectionMatrix=function(){this.projectionMatrix=THREE.Matrix4.makePerspective(this.fov,this.aspect,this.near,this.far)};this.updateProjectionMatrix()};
|
|
|
THREE.Camera.prototype={toString:function(){return"THREE.Camera ( "+this.position+", "+this.target.position+" )"}};THREE.Light=function(a){this.color=new THREE.Color(a)};THREE.AmbientLight=function(a){THREE.Light.call(this,a)};THREE.AmbientLight.prototype=new THREE.Light;THREE.AmbientLight.prototype.constructor=THREE.AmbientLight;THREE.DirectionalLight=function(a,d){THREE.Light.call(this,a);this.position=new THREE.Vector3(0,1,0);this.intensity=d||1};THREE.DirectionalLight.prototype=new THREE.Light;
|
|
|
THREE.DirectionalLight.prototype.constructor=THREE.DirectionalLight;THREE.PointLight=function(a,d){THREE.Light.call(this,a);this.position=new THREE.Vector3;this.intensity=d||1};THREE.DirectionalLight.prototype=new THREE.Light;THREE.DirectionalLight.prototype.constructor=THREE.PointLight;
|
|
|
-THREE.Object3D=function(){this.id=THREE.Object3DCounter.value++;this.position=new THREE.Vector3;this.rotation=new THREE.Vector3;this.scale=new THREE.Vector3(1,1,1);this.matrix=new THREE.Matrix4;this.tmpMatrix=new THREE.Matrix4;this.screen=new THREE.Vector3;this.visible=this.autoUpdateMatrix=true};
|
|
|
-THREE.Object3D.prototype={updateMatrix:function(){var a=this.position,d=this.rotation,e=this.scale,f=this.tmpMatrix;this.matrix.setTranslation(a.x,a.y,a.z);if(d.x!=0){f.setRotX(d.x);this.matrix.multiplySelf(f)}if(d.y!=0){f.setRotY(d.y);this.matrix.multiplySelf(f)}if(d.z!=0){f.setRotZ(d.z);this.matrix.multiplySelf(f)}if(e.x!=0||e.y!=0||e.z!=0){f.setScale(e.x,e.y,e.z);this.matrix.multiplySelf(f)}}};THREE.Object3DCounter={value:0};
|
|
|
-THREE.Particle=function(a){THREE.Object3D.call(this);this.materials=a instanceof Array?a:[a];this.autoUpdateMatrix=false};THREE.Particle.prototype=new THREE.Object3D;THREE.Particle.prototype.constructor=THREE.Particle;THREE.ParticleSystem=function(a,d){THREE.Object3D.call(this);this.geometry=a;this.materials=d instanceof Array?d:[d];this.autoUpdateMatrix=false};THREE.ParticleSystem.prototype=new THREE.Object3D;THREE.ParticleSystem.prototype.constructor=THREE.ParticleSystem;
|
|
|
-THREE.Line=function(a,d,e){THREE.Object3D.call(this);this.geometry=a;this.materials=d instanceof Array?d:[d];this.type=e!=undefined?e:THREE.LineStrip};THREE.LineStrip=0;THREE.LinePieces=1;THREE.Line.prototype=new THREE.Object3D;THREE.Line.prototype.constructor=THREE.Line;THREE.Mesh=function(a,d){THREE.Object3D.call(this);this.geometry=a;this.materials=d instanceof Array?d:[d];this.overdraw=this.doubleSided=this.flipSided=false;this.geometry.boundingSphere||this.geometry.computeBoundingSphere()};
|
|
|
-THREE.Mesh.prototype=new THREE.Object3D;THREE.Mesh.prototype.constructor=THREE.Mesh;THREE.FlatShading=0;THREE.SmoothShading=1;THREE.NormalBlending=0;THREE.AdditiveBlending=1;THREE.SubtractiveBlending=2;
|
|
|
+THREE.Object3D=function(){this.id=THREE.Object3DCounter.value++;this.position=new THREE.Vector3;this.rotation=new THREE.Vector3;this.scale=new THREE.Vector3(1,1,1);this.matrix=new THREE.Matrix4;this.rotationMatrix=new THREE.Matrix4;this.tmpMatrix=new THREE.Matrix4;this.screen=new THREE.Vector3;this.visible=this.autoUpdateMatrix=true};
|
|
|
+THREE.Object3D.prototype={updateMatrix:function(){var a=this.position,d=this.rotation,e=this.scale,f=this.tmpMatrix;this.matrix.setTranslation(a.x,a.y,a.z);this.rotationMatrix.identity();if(d.x!=0){f.setRotX(d.x);this.matrix.multiplySelf(f);this.rotationMatrix.multiplySelf(f)}if(d.y!=0){f.setRotY(d.y);this.matrix.multiplySelf(f);this.rotationMatrix.multiplySelf(f)}if(d.z!=0){f.setRotZ(d.z);this.matrix.multiplySelf(f);this.rotationMatrix.multiplySelf(f)}if(e.x!=0||e.y!=0||e.z!=0){f.setScale(e.x,e.y,
|
|
|
+e.z);this.matrix.multiplySelf(f)}}};THREE.Object3DCounter={value:0};THREE.Particle=function(a){THREE.Object3D.call(this);this.materials=a instanceof Array?a:[a];this.autoUpdateMatrix=false};THREE.Particle.prototype=new THREE.Object3D;THREE.Particle.prototype.constructor=THREE.Particle;THREE.ParticleSystem=function(a,d){THREE.Object3D.call(this);this.geometry=a;this.materials=d instanceof Array?d:[d];this.autoUpdateMatrix=false};THREE.ParticleSystem.prototype=new THREE.Object3D;
|
|
|
+THREE.ParticleSystem.prototype.constructor=THREE.ParticleSystem;THREE.Line=function(a,d,e){THREE.Object3D.call(this);this.geometry=a;this.materials=d instanceof Array?d:[d];this.type=e!=undefined?e:THREE.LineStrip};THREE.LineStrip=0;THREE.LinePieces=1;THREE.Line.prototype=new THREE.Object3D;THREE.Line.prototype.constructor=THREE.Line;
|
|
|
+THREE.Mesh=function(a,d){THREE.Object3D.call(this);this.geometry=a;this.materials=d instanceof Array?d:[d];this.overdraw=this.doubleSided=this.flipSided=false;this.geometry.boundingSphere||this.geometry.computeBoundingSphere()};THREE.Mesh.prototype=new THREE.Object3D;THREE.Mesh.prototype.constructor=THREE.Mesh;THREE.FlatShading=0;THREE.SmoothShading=1;THREE.NormalBlending=0;THREE.AdditiveBlending=1;THREE.SubtractiveBlending=2;
|
|
|
THREE.LineBasicMaterial=function(a){this.color=new THREE.Color(16777215);this.opacity=1;this.blending=THREE.NormalBlending;this.linewidth=1;this.linejoin=this.linecap="round";if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.blending!==undefined)this.blending=a.blending;if(a.linewidth!==undefined)this.linewidth=a.linewidth;if(a.linecap!==undefined)this.linecap=a.linecap;if(a.linejoin!==undefined)this.linejoin=a.linejoin}};
|
|
|
THREE.LineBasicMaterial.prototype={toString:function(){return"THREE.LineBasicMaterial (<br/>color: "+this.color+"<br/>opacity: "+this.opacity+"<br/>blending: "+this.blending+"<br/>linewidth: "+this.linewidth+"<br/>linecap: "+this.linecap+"<br/>linejoin: "+this.linejoin+"<br/>)"}};
|
|
|
THREE.MeshBasicMaterial=function(a){this.id=THREE.MeshBasicMaterialCounter.value++;this.color=new THREE.Color(16777215);this.env_map=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refraction_ratio=0.98;this.fog=true;this.opacity=1;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.wireframe=false;this.wireframe_linewidth=1;this.wireframe_linejoin=this.wireframe_linecap="round";if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.map!==undefined)this.map=
|