|
@@ -140,11 +140,11 @@ a=0.0010*(b-this.oldTime);this.oldTime=b;this.elapsedTime+=a}return a}};THREE.Ev
|
|
THREE.EventDispatcher.prototype={constructor:THREE.EventDispatcher,apply:function(a){a.addEventListener=THREE.EventDispatcher.prototype.addEventListener;a.hasEventListener=THREE.EventDispatcher.prototype.hasEventListener;a.removeEventListener=THREE.EventDispatcher.prototype.removeEventListener;a.dispatchEvent=THREE.EventDispatcher.prototype.dispatchEvent},addEventListener:function(a,b){void 0===this._listeners&&(this._listeners={});var c=this._listeners;void 0===c[a]&&(c[a]=[]);-1===c[a].indexOf(b)&&
|
|
THREE.EventDispatcher.prototype={constructor:THREE.EventDispatcher,apply:function(a){a.addEventListener=THREE.EventDispatcher.prototype.addEventListener;a.hasEventListener=THREE.EventDispatcher.prototype.hasEventListener;a.removeEventListener=THREE.EventDispatcher.prototype.removeEventListener;a.dispatchEvent=THREE.EventDispatcher.prototype.dispatchEvent},addEventListener:function(a,b){void 0===this._listeners&&(this._listeners={});var c=this._listeners;void 0===c[a]&&(c[a]=[]);-1===c[a].indexOf(b)&&
|
|
c[a].push(b)},hasEventListener:function(a,b){if(void 0===this._listeners)return!1;var c=this._listeners;return void 0!==c[a]&&-1!==c[a].indexOf(b)?!0:!1},removeEventListener:function(a,b){if(void 0!==this._listeners){var c=this._listeners,d=c[a].indexOf(b);-1!==d&&c[a].splice(d,1)}},dispatchEvent:function(a){if(void 0!==this._listeners){var b=this._listeners[a.type];if(void 0!==b){a.target=this;for(var c=0,d=b.length;c<d;c++)b[c].call(this,a)}}}};(function(a){a.Raycaster=function(b,c,d,e){this.ray=new a.Ray(b,c);this.near=d||0;this.far=e||Infinity};var b=new a.Sphere,c=new a.Ray;new a.Plane;new a.Vector3;var d=new a.Vector3,e=new a.Matrix4,f=function(a,b){return a.distance-b.distance},h=new a.Vector3,g=new a.Vector3,i=new a.Vector3,k=function(f,m,s){if(f instanceof a.Particle){d.getPositionFromMatrix(f.matrixWorld);var q=m.ray.distanceToPoint(d);if(q>f.scale.x)return s;s.push({distance:q,point:f.position,face:null,object:f})}else if(f instanceof
|
|
c[a].push(b)},hasEventListener:function(a,b){if(void 0===this._listeners)return!1;var c=this._listeners;return void 0!==c[a]&&-1!==c[a].indexOf(b)?!0:!1},removeEventListener:function(a,b){if(void 0!==this._listeners){var c=this._listeners,d=c[a].indexOf(b);-1!==d&&c[a].splice(d,1)}},dispatchEvent:function(a){if(void 0!==this._listeners){var b=this._listeners[a.type];if(void 0!==b){a.target=this;for(var c=0,d=b.length;c<d;c++)b[c].call(this,a)}}}};(function(a){a.Raycaster=function(b,c,d,e){this.ray=new a.Ray(b,c);this.near=d||0;this.far=e||Infinity};var b=new a.Sphere,c=new a.Ray;new a.Plane;new a.Vector3;var d=new a.Vector3,e=new a.Matrix4,f=function(a,b){return a.distance-b.distance},h=new a.Vector3,g=new a.Vector3,i=new a.Vector3,k=function(f,m,s){if(f instanceof a.Particle){d.getPositionFromMatrix(f.matrixWorld);var q=m.ray.distanceToPoint(d);if(q>f.scale.x)return s;s.push({distance:q,point:f.position,face:null,object:f})}else if(f instanceof
|
|
a.LOD)d.getPositionFromMatrix(f.matrixWorld),q=m.ray.origin.distanceTo(d),k(f.getObjectForDistance(q),m,s);else if(f instanceof a.Mesh){var p=f.geometry;d.getPositionFromMatrix(f.matrixWorld);null===p.boundingSphere&&p.computeBoundingSphere();b.set(d,p.boundingSphere.radius*f.matrixWorld.getMaxScaleOnAxis());if(!1===m.ray.isIntersectionSphere(b))return s;e.getInverse(f.matrixWorld);c.copy(m.ray).applyMatrix4(e);if(null!==p.boundingBox&&!1===c.isIntersectionBox(p.boundingBox))return s;var r=p.vertices;
|
|
a.LOD)d.getPositionFromMatrix(f.matrixWorld),q=m.ray.origin.distanceTo(d),k(f.getObjectForDistance(q),m,s);else if(f instanceof a.Mesh){var p=f.geometry;d.getPositionFromMatrix(f.matrixWorld);null===p.boundingSphere&&p.computeBoundingSphere();b.set(d,p.boundingSphere.radius*f.matrixWorld.getMaxScaleOnAxis());if(!1===m.ray.isIntersectionSphere(b))return s;e.getInverse(f.matrixWorld);c.copy(m.ray).applyMatrix4(e);if(null!==p.boundingBox&&!1===c.isIntersectionBox(p.boundingBox))return s;var r=p.vertices;
|
|
-if(p instanceof a.BufferGeometry){var t=f.material;if(void 0===t||!1===p.dynamic)return s;var u,w,F=m.precision,B,r=!1;p.attributes.index&&(r=!0);B=p.offsets;for(var z=p.attributes.index.array,G=p.attributes.position.array,E=p.offsets.length,v=0;v<E;++v)for(var q=B[v].start,O=B[v].index,p=q,A=q+B[v].count;p<A;p+=3)if(r?(q=O+z[p],u=O+z[p+1],w=O+z[p+2]):(q=O,u=O+1,w=O+2),h.set(G[3*q],G[3*q+1],G[3*q+2]),g.set(G[3*u],G[3*u+1],G[3*u+2]),i.set(G[3*w],G[3*w+1],G[3*w+2]),u=c.intersectTriangle(h,g,i,t.side!==
|
|
|
|
-a.DoubleSide))u.applyMatrix4(f.matrixWorld),q=m.ray.origin.distanceTo(u),q<F||q<m.near||q>m.far||s.push({distance:q,point:u,face:null,faceIndex:null,object:f})}else if(p instanceof a.Geometry){z=f.material instanceof a.MeshFaceMaterial;G=!0===z?f.material.materials:null;F=m.precision;E=0;for(B=p.faces.length;E<B;E++)if(v=p.faces[E],t=!0===z?G[v.materialIndex]:f.material,void 0!==t&&(q=r[v.a],u=r[v.b],w=r[v.c],u=c.intersectTriangle(q,u,w,t.side!==a.DoubleSide)))u.applyMatrix4(f.matrixWorld),q=m.ray.origin.distanceTo(u),
|
|
|
|
-q<F||q<m.near||q>m.far||s.push({distance:q,point:u,face:v,faceIndex:E,object:f})}}else if(f instanceof a.Line){F=m.linePrecision;t=F*F;p=f.geometry;null===p.boundingSphere&&p.computeBoundingSphere();d.getPositionFromMatrix(f.matrixWorld);b.set(d,p.boundingSphere.radius*f.matrixWorld.getMaxScaleOnAxis());if(!1===m.ray.isIntersectionSphere(b))return s;e.getInverse(f.matrixWorld);c.copy(m.ray).applyMatrix4(e);r=p.vertices;F=r.length;u=new a.Vector3;w=new a.Vector3;B=f.type===a.LineStrip?1:2;for(p=0;p<
|
|
|
|
-F-1;p+=B)c.distanceSqToSegment(r[p],r[p+1],w,u)<=t&&(q=c.origin.distanceTo(w),m.near<=q&&q<=m.far&&s.push({distance:q,point:u.clone().applyMatrix4(f.matrixWorld),face:null,faceIndex:null,object:f}))}},m=function(a,b,c){for(var a=a.getDescendants(),d=0,e=a.length;d<e;d++)k(a[d],b,c)};a.Raycaster.prototype.precision=1E-4;a.Raycaster.prototype.linePrecision=1;a.Raycaster.prototype.set=function(a,b){this.ray.set(a,b)};a.Raycaster.prototype.intersectObject=function(a,b){var c=[];!0===b&&m(a,this,c);k(a,
|
|
|
|
-this,c);c.sort(f);return c};a.Raycaster.prototype.intersectObjects=function(a,b){for(var c=[],d=0,e=a.length;d<e;d++)k(a[d],this,c),!0===b&&m(a[d],this,c);c.sort(f);return c}})(THREE);THREE.Object3D=function(){this.id=THREE.Object3DIdCount++;this.uuid=THREE.Math.generateUUID();this.name="";this.parent=void 0;this.children=[];this.up=new THREE.Vector3(0,1,0);this.position=new THREE.Vector3;this.rotation=new THREE.Euler;this.quaternion=new THREE.Quaternion;this.scale=new THREE.Vector3(1,1,1);this.rotation._quaternion=this.quaternion;this.quaternion._euler=this.rotation;this.renderDepth=null;this.rotationAutoUpdate=!0;this.matrix=new THREE.Matrix4;this.matrixWorld=new THREE.Matrix4;
|
|
|
|
|
|
+if(p instanceof a.BufferGeometry){var t=f.material;if(void 0===t||!1===p.dynamic)return s;var u,w,F=m.precision,B,r=!1;p.attributes.index&&(r=!0);B=p.offsets;for(var z=p.attributes.index.array,G=p.attributes.position.array,E=p.offsets.length,v=0;v<E;++v)for(var q=B[v].start,O=B[v].index,p=q,A=q+B[v].count;p<A;p+=3)r?(q=O+z[p],u=O+z[p+1],w=O+z[p+2]):(q=O,u=O+1,w=O+2),h.set(G[3*q],G[3*q+1],G[3*q+2]),g.set(G[3*u],G[3*u+1],G[3*u+2]),i.set(G[3*w],G[3*w+1],G[3*w+2]),u=c.intersectTriangle(h,g,i,t.side!==
|
|
|
|
+a.DoubleSide),null!==u&&(u.applyMatrix4(f.matrixWorld),q=m.ray.origin.distanceTo(u),q<F||q<m.near||q>m.far||s.push({distance:q,point:u,face:null,faceIndex:null,object:f}))}else if(p instanceof a.Geometry){z=f.material instanceof a.MeshFaceMaterial;G=!0===z?f.material.materials:null;F=m.precision;E=0;for(B=p.faces.length;E<B;E++)v=p.faces[E],t=!0===z?G[v.materialIndex]:f.material,void 0!==t&&(q=r[v.a],u=r[v.b],w=r[v.c],u=c.intersectTriangle(q,u,w,t.side!==a.DoubleSide),null!==u&&(u.applyMatrix4(f.matrixWorld),
|
|
|
|
+q=m.ray.origin.distanceTo(u),q<F||q<m.near||q>m.far||s.push({distance:q,point:u,face:v,faceIndex:E,object:f})))}}else if(f instanceof a.Line){F=m.linePrecision;t=F*F;p=f.geometry;null===p.boundingSphere&&p.computeBoundingSphere();d.getPositionFromMatrix(f.matrixWorld);b.set(d,p.boundingSphere.radius*f.matrixWorld.getMaxScaleOnAxis());if(!1===m.ray.isIntersectionSphere(b))return s;e.getInverse(f.matrixWorld);c.copy(m.ray).applyMatrix4(e);r=p.vertices;F=r.length;u=new a.Vector3;w=new a.Vector3;B=f.type===
|
|
|
|
+a.LineStrip?1:2;for(p=0;p<F-1;p+=B)c.distanceSqToSegment(r[p],r[p+1],w,u)<=t&&(q=c.origin.distanceTo(w),m.near<=q&&q<=m.far&&s.push({distance:q,point:u.clone().applyMatrix4(f.matrixWorld),face:null,faceIndex:null,object:f}))}},m=function(a,b,c){for(var a=a.getDescendants(),d=0,e=a.length;d<e;d++)k(a[d],b,c)};a.Raycaster.prototype.precision=1E-4;a.Raycaster.prototype.linePrecision=1;a.Raycaster.prototype.set=function(a,b){this.ray.set(a,b)};a.Raycaster.prototype.intersectObject=function(a,b){var c=
|
|
|
|
+[];!0===b&&m(a,this,c);k(a,this,c);c.sort(f);return c};a.Raycaster.prototype.intersectObjects=function(a,b){for(var c=[],d=0,e=a.length;d<e;d++)k(a[d],this,c),!0===b&&m(a[d],this,c);c.sort(f);return c}})(THREE);THREE.Object3D=function(){this.id=THREE.Object3DIdCount++;this.uuid=THREE.Math.generateUUID();this.name="";this.parent=void 0;this.children=[];this.up=new THREE.Vector3(0,1,0);this.position=new THREE.Vector3;this.rotation=new THREE.Euler;this.quaternion=new THREE.Quaternion;this.scale=new THREE.Vector3(1,1,1);this.rotation._quaternion=this.quaternion;this.quaternion._euler=this.rotation;this.renderDepth=null;this.rotationAutoUpdate=!0;this.matrix=new THREE.Matrix4;this.matrixWorld=new THREE.Matrix4;
|
|
this.visible=this.matrixWorldNeedsUpdate=this.matrixAutoUpdate=!0;this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.userData={}};
|
|
this.visible=this.matrixWorldNeedsUpdate=this.matrixAutoUpdate=!0;this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.userData={}};
|
|
THREE.Object3D.prototype={constructor:THREE.Object3D,get eulerOrder(){console.warn("DEPRECATED: Object3D's .eulerOrder has been moved to Object3D's .rotation.order.");return this.rotation.order},set eulerOrder(a){console.warn("DEPRECATED: Object3D's .eulerOrder has been moved to Object3D's .rotation.order.");this.rotation.order=a},get useQuaternion(){console.warn("DEPRECATED: Object3D's .useQuaternion has been removed. The library now uses quaternions by default.")},set useQuaternion(a){console.warn("DEPRECATED: Object3D's .useQuaternion has been removed. The library now uses quaternions by default.")},
|
|
THREE.Object3D.prototype={constructor:THREE.Object3D,get eulerOrder(){console.warn("DEPRECATED: Object3D's .eulerOrder has been moved to Object3D's .rotation.order.");return this.rotation.order},set eulerOrder(a){console.warn("DEPRECATED: Object3D's .eulerOrder has been moved to Object3D's .rotation.order.");this.rotation.order=a},get useQuaternion(){console.warn("DEPRECATED: Object3D's .useQuaternion has been removed. The library now uses quaternions by default.")},set useQuaternion(a){console.warn("DEPRECATED: Object3D's .useQuaternion has been removed. The library now uses quaternions by default.")},
|
|
applyMatrix:function(){var a=new THREE.Matrix4;return function(b){this.matrix.multiplyMatrices(b,this.matrix);this.position.getPositionFromMatrix(this.matrix);this.scale.getScaleFromMatrix(this.matrix);a.extractRotation(this.matrix);this.quaternion.setFromRotationMatrix(a)}}(),setRotationFromAxisAngle:function(a,b){this.quaternion.setFromAxisAngle(a,b)},setRotationFromEuler:function(a){this.quaternion.setFromEuler(a,!0)},setRotationFromMatrix:function(a){this.quaternion.setFromRotationMatrix(a)},
|
|
applyMatrix:function(){var a=new THREE.Matrix4;return function(b){this.matrix.multiplyMatrices(b,this.matrix);this.position.getPositionFromMatrix(this.matrix);this.scale.getScaleFromMatrix(this.matrix);a.extractRotation(this.matrix);this.quaternion.setFromRotationMatrix(a)}}(),setRotationFromAxisAngle:function(a,b){this.quaternion.setFromAxisAngle(a,b)},setRotationFromEuler:function(a){this.quaternion.setFromEuler(a,!0)},setRotationFromMatrix:function(a){this.quaternion.setFromRotationMatrix(a)},
|