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

Updated builds.

上级 35e18100
......@@ -7530,27 +7530,25 @@ THREE.Object3D = function () {
this.up = new THREE.Vector3( 0, 1, 0 );
this.position = new THREE.Vector3();
var scope = this;
Object.defineProperties( this, {
position: {
enumerable: true,
value: new THREE.Vector3()
},
rotation: {
enumerable: true,
enumerable: true,
value: new THREE.Euler().onChange( function () {
scope.quaternion.setFromEuler( scope.rotation, false );
} )
},
quaternion: {
enumerable: true,
enumerable: true,
value: new THREE.Quaternion().onChange( function () {
scope.rotation.setFromQuaternion( scope.quaternion, undefined, false );
} )
},
scale: {
enumerable: true,
enumerable: true,
value: new THREE.Vector3( 1, 1, 1 )
}
} );
......
......@@ -152,8 +152,8 @@ u<E||u<n.near||u>n.far||s.push({distance:u,point:B,indices:[v,t,y],face:null,fac
B[G];if(0!==J){var F=u[G].vertices;g.x+=(F[z.a].x-v.x)*J;g.y+=(F[z.a].y-v.y)*J;g.z+=(F[z.a].z-v.z)*J;h.x+=(F[z.b].x-t.x)*J;h.y+=(F[z.b].y-t.y)*J;h.z+=(F[z.b].z-t.z)*J;k.x+=(F[z.c].x-y.x)*J;k.y+=(F[z.c].y-y.y)*J;k.z+=(F[z.c].z-y.z)*J}}g.add(v);h.add(t);k.add(y);v=g;t=h;y=k}B=w.side===a.BackSide?c.intersectTriangle(y,t,v,!0):c.intersectTriangle(v,t,y,w.side!==a.DoubleSide);null!==B&&(B.applyMatrix4(f.matrixWorld),u=n.ray.origin.distanceTo(B),u<E||u<n.near||u>n.far||s.push({distance:u,point:B,face:z,
faceIndex:D,object:f}))}}else if(f instanceof a.Line){E=n.linePrecision;w=E*E;q=f.geometry;null===q.boundingSphere&&q.computeBoundingSphere();b.copy(q.boundingSphere);b.applyMatrix4(f.matrixWorld);if(!1===n.ray.isIntersectionSphere(b))return s;e.getInverse(f.matrixWorld);c.copy(n.ray).applyMatrix4(e);if(q instanceof a.Geometry)for(x=q.vertices,E=x.length,v=new a.Vector3,t=new a.Vector3,y=f.type===a.LineStrip?1:2,q=0;q<E-1;q+=y)c.distanceSqToSegment(x[q],x[q+1],t,v)>w||(u=c.origin.distanceTo(t),u<
n.near||u>n.far||s.push({distance:u,point:v.clone().applyMatrix4(f.matrixWorld),face:null,faceIndex:null,object:f}))}},n=function(a,b,c){a=a.getDescendants();for(var d=0,e=a.length;d<e;d++)l(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&&n(a,this,c);l(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++)l(a[d],this,c),!0===b&&n(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);var a=this;Object.defineProperties(this,{position:{enumerable:!0,value:new THREE.Vector3},rotation:{enumerable:!0,value:(new THREE.Euler).onChange(function(){a.quaternion.setFromEuler(a.rotation,!1)})},quaternion:{enumerable:!0,value:(new THREE.Quaternion).onChange(function(){a.rotation.setFromQuaternion(a.quaternion,void 0,
!1)})},scale:{enumerable:!0,value:new THREE.Vector3(1,1,1)}});this.renderDepth=null;this.rotationAutoUpdate=!0;this.matrix=new THREE.Matrix4;this.matrixWorld=new THREE.Matrix4;this.matrixAutoUpdate=!0;this.matrixWorldNeedsUpdate=!1;this.visible=!0;this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.userData={}};
[],d=0,e=a.length;d<e;d++)l(a[d],this,c),!0===b&&n(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;var a=this;Object.defineProperties(this,{rotation:{enumerable:!0,value:(new THREE.Euler).onChange(function(){a.quaternion.setFromEuler(a.rotation,!1)})},quaternion:{enumerable:!0,value:(new THREE.Quaternion).onChange(function(){a.rotation.setFromQuaternion(a.quaternion,void 0,!1)})},scale:{enumerable:!0,
value:new THREE.Vector3(1,1,1)}});this.renderDepth=null;this.rotationAutoUpdate=!0;this.matrix=new THREE.Matrix4;this.matrixWorld=new THREE.Matrix4;this.matrixAutoUpdate=!0;this.matrixWorldNeedsUpdate=!1;this.visible=!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.")},
applyMatrix:function(a){this.matrix.multiplyMatrices(a,this.matrix);this.matrix.decompose(this.position,this.quaternion,this.scale)},setRotationFromAxisAngle:function(a,b){this.quaternion.setFromAxisAngle(a,b)},setRotationFromEuler:function(a){this.quaternion.setFromEuler(a,!0)},setRotationFromMatrix:function(a){this.quaternion.setFromRotationMatrix(a)},setRotationFromQuaternion:function(a){this.quaternion.copy(a)},rotateOnAxis:function(){var a=new THREE.Quaternion;return function(b,c){a.setFromAxisAngle(b,
c);this.quaternion.multiply(a);return this}}(),rotateX:function(){var a=new THREE.Vector3(1,0,0);return function(b){return this.rotateOnAxis(a,b)}}(),rotateY:function(){var a=new THREE.Vector3(0,1,0);return function(b){return this.rotateOnAxis(a,b)}}(),rotateZ:function(){var a=new THREE.Vector3(0,0,1);return function(b){return this.rotateOnAxis(a,b)}}(),translateOnAxis:function(){var a=new THREE.Vector3;return function(b,c){a.copy(b);a.applyQuaternion(this.quaternion);this.position.add(a.multiplyScalar(c));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册