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

Updated builds.

上级 05b19654
......@@ -7646,7 +7646,7 @@ THREE.Object3D = function () {
return position;
},
set: function ( value ) {
console.warn( 'THREE.Object3D: .position = new THREE.Vector3() pattern no longer works. Use .position.set() instead.' );
console.warn( 'THREE.Object3D: .position = new THREE.Vector3() pattern no longer works. Use .position.copy() instead.' );
position.copy( value );
}
},
......@@ -7656,7 +7656,7 @@ THREE.Object3D = function () {
return rotation;
},
set: function ( value ) {
console.warn( 'THREE.Object3D: .rotation = new THREE.Euler() pattern no longer works. Use .rotation.set() instead.' );
console.warn( 'THREE.Object3D: .rotation = new THREE.Euler() pattern no longer works. Use .rotation.copy() instead.' );
rotation.copy( value );
}
},
......@@ -7666,7 +7666,7 @@ THREE.Object3D = function () {
return quaternion;
},
set: function ( value ) {
console.warn( 'THREE.Object3D: .quaternion = new THREE.Quaternion() pattern no longer works. Use .quaternion.set() instead.' );
console.warn( 'THREE.Object3D: .quaternion = new THREE.Quaternion() pattern no longer works. Use .quaternion.copy() instead.' );
quaternion.copy( value );
}
},
......@@ -7676,7 +7676,7 @@ THREE.Object3D = function () {
return scale;
},
set: function ( value ) {
console.warn( 'THREE.Object3D: .scale = new THREE.Vector3() pattern no longer works. Use .scale.set() instead.' );
console.warn( 'THREE.Object3D: .scale = new THREE.Vector3() pattern no longer works. Use .scale.copy() instead.' );
scale.copy( value );
}
}
......
......@@ -152,8 +152,8 @@ D+2]),M=v.side===a.BackSide?c.intersectTriangle(k,h,g,!0):c.intersectTriangle(g,
void 0!==v){n=u[E.a];C=u[E.b];D=u[E.c];if(!0===v.morphTargets){B=s.morphTargets;M=f.morphTargetInfluences;g.set(0,0,0);h.set(0,0,0);k.set(0,0,0);for(var G=0,N=B.length;G<N;G++){var I=M[G];if(0!==I){var z=B[G].vertices;g.x+=(z[E.a].x-n.x)*I;g.y+=(z[E.a].y-n.y)*I;g.z+=(z[E.a].z-n.z)*I;h.x+=(z[E.b].x-C.x)*I;h.y+=(z[E.b].y-C.y)*I;h.z+=(z[E.b].z-C.z)*I;k.x+=(z[E.c].x-D.x)*I;k.y+=(z[E.c].y-D.y)*I;k.z+=(z[E.c].z-D.z)*I}}g.add(n);h.add(C);k.add(D);n=g;C=h;D=k}M=v.side===a.BackSide?c.intersectTriangle(D,C,
n,!0):c.intersectTriangle(n,C,D,v.side!==a.DoubleSide);null!==M&&(M.applyMatrix4(f.matrixWorld),B=p.ray.origin.distanceTo(M),B<w||B<p.near||B>p.far||t.push({distance:B,point:M,face:E,faceIndex:A,object:f}))}}else if(f instanceof a.Line){w=p.linePrecision;n=w*w;s=f.geometry;null===s.boundingSphere&&s.computeBoundingSphere();b.copy(s.boundingSphere);b.applyMatrix4(f.matrixWorld);if(!1===p.ray.isIntersectionSphere(b))return t;e.getInverse(f.matrixWorld);c.copy(p.ray).applyMatrix4(e);if(s instanceof a.Geometry)for(u=
s.vertices,v=u.length,w=new a.Vector3,C=new a.Vector3,D=f.type===a.LineStrip?1:2,s=0;s<v-1;s+=D)c.distanceSqToSegment(u[s],u[s+1],C,w)>n||(B=c.origin.distanceTo(C),B<p.near||B>p.far||t.push({distance:B,point:w.clone().applyMatrix4(f.matrixWorld),face:null,faceIndex:null,object:f}))}},p=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&&p(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&&p(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=THREE.Object3D.DefaultUp.clone();var a=new THREE.Vector3,b=new THREE.Euler,c=new THREE.Quaternion,d=new THREE.Vector3(1,1,1);b.onChange(function(){c.setFromEuler(b,!1)});c.onChange(function(){b.setFromQuaternion(c,void 0,!1)});Object.defineProperties(this,{position:{enumerable:!0,get:function(){return a},set:function(b){console.warn("THREE.Object3D: .position = new THREE.Vector3() pattern no longer works. Use .position.set() instead.");
a.copy(b)}},rotation:{enumerable:!0,get:function(){return b},set:function(a){console.warn("THREE.Object3D: .rotation = new THREE.Euler() pattern no longer works. Use .rotation.set() instead.");b.copy(a)}},quaternion:{enumerable:!0,get:function(){return c},set:function(a){console.warn("THREE.Object3D: .quaternion = new THREE.Quaternion() pattern no longer works. Use .quaternion.set() instead.");c.copy(a)}},scale:{enumerable:!0,get:function(){return d},set:function(a){console.warn("THREE.Object3D: .scale = new THREE.Vector3() pattern no longer works. Use .scale.set() instead.");
a.Raycaster.prototype.intersectObject=function(a,b){var c=[];!0===b&&p(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&&p(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=THREE.Object3D.DefaultUp.clone();var a=new THREE.Vector3,b=new THREE.Euler,c=new THREE.Quaternion,d=new THREE.Vector3(1,1,1);b.onChange(function(){c.setFromEuler(b,!1)});c.onChange(function(){b.setFromQuaternion(c,void 0,!1)});Object.defineProperties(this,{position:{enumerable:!0,get:function(){return a},set:function(b){console.warn("THREE.Object3D: .position = new THREE.Vector3() pattern no longer works. Use .position.copy() instead.");
a.copy(b)}},rotation:{enumerable:!0,get:function(){return b},set:function(a){console.warn("THREE.Object3D: .rotation = new THREE.Euler() pattern no longer works. Use .rotation.copy() instead.");b.copy(a)}},quaternion:{enumerable:!0,get:function(){return c},set:function(a){console.warn("THREE.Object3D: .quaternion = new THREE.Quaternion() pattern no longer works. Use .quaternion.copy() instead.");c.copy(a)}},scale:{enumerable:!0,get:function(){return d},set:function(a){console.warn("THREE.Object3D: .scale = new THREE.Vector3() pattern no longer works. Use .scale.copy() instead.");
d.copy(a)}}});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.DefaultUp=new THREE.Vector3(0,1,0);
THREE.Object3D.prototype={constructor:THREE.Object3D,get eulerOrder(){console.warn("THREE.Object3D: .eulerOrder has been moved to .rotation.order.");return this.rotation.order},set eulerOrder(a){console.warn("THREE.Object3D: .eulerOrder has been moved to .rotation.order.");this.rotation.order=a},get useQuaternion(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set useQuaternion(a){console.warn("THREE.Object3D: .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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册