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

Updated builds.

上级 55151412
......@@ -185,7 +185,7 @@
} );
var REVISION = '102';
var REVISION = '103dev';
var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
var CullFaceNone = 0;
var CullFaceBack = 1;
......@@ -40190,8 +40190,7 @@
for ( var i = 0; i < 6; i ++ ) {
renderTarget.activeCubeFace = i;
renderer.setRenderTarget( renderTarget );
renderer.setRenderTarget( renderTarget, i );
renderer.clear( color, depth, stencil );
......@@ -178,7 +178,7 @@ b){a.opacity.value=b.opacity;b.color&&(a.diffuse.value=b.color);b.emissive&&a.em
b.lightMap,a.lightMapIntensity.value=b.lightMapIntensity);b.aoMap&&(a.aoMap.value=b.aoMap,a.aoMapIntensity.value=b.aoMapIntensity);if(b.map)var c=b.map;else b.specularMap?c=b.specularMap:b.displacementMap?c=b.displacementMap:b.normalMap?c=b.normalMap:b.bumpMap?c=b.bumpMap:b.roughnessMap?c=b.roughnessMap:b.metalnessMap?c=b.metalnessMap:b.alphaMap?c=b.alphaMap:b.emissiveMap&&(c=b.emissiveMap);void 0!==c&&(c.isWebGLRenderTarget&&(c=c.texture),!0===c.matrixAutoUpdate&&c.updateMatrix(),a.uvTransform.value.copy(c.matrix))}
function r(a,b){a.specular.value=b.specular;a.shininess.value=Math.max(b.shininess,1E-4);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,1===b.side&&(a.bumpScale.value*=-1));b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale),1===b.side&&a.normalScale.value.negate());b.displacementMap&&(a.displacementMap.value=b.displacementMap,a.displacementScale.value=b.displacementScale,a.displacementBias.value=
b.displacementBias)}function u(a,b){a.roughness.value=b.roughness;a.metalness.value=b.metalness;b.roughnessMap&&(a.roughnessMap.value=b.roughnessMap);b.metalnessMap&&(a.metalnessMap.value=b.metalnessMap);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,1===b.side&&(a.bumpScale.value*=-1));b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale),1===b.side&&a.normalScale.value.negate());b.displacementMap&&
(a.displacementMap.value=b.displacementMap,a.displacementScale.value=b.displacementScale,a.displacementBias.value=b.displacementBias);b.envMap&&(a.envMapIntensity.value=b.envMapIntensity)}console.log("THREE.WebGLRenderer","102");a=a||{};var w=void 0!==a.canvas?a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),z=void 0!==a.context?a.context:null,x=void 0!==a.alpha?a.alpha:!1,D=void 0!==a.depth?a.depth:!0,y=void 0!==a.stencil?a.stencil:!0,Q=void 0!==a.antialias?a.antialias:
(a.displacementMap.value=b.displacementMap,a.displacementScale.value=b.displacementScale,a.displacementBias.value=b.displacementBias);b.envMap&&(a.envMapIntensity.value=b.envMapIntensity)}console.log("THREE.WebGLRenderer","103dev");a=a||{};var w=void 0!==a.canvas?a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),z=void 0!==a.context?a.context:null,x=void 0!==a.alpha?a.alpha:!1,D=void 0!==a.depth?a.depth:!0,y=void 0!==a.stencil?a.stencil:!0,Q=void 0!==a.antialias?a.antialias:
!1,fa=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,A=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,F=void 0!==a.powerPreference?a.powerPreference:"default",E=null,C=null;this.domElement=w;this.context=null;this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1;this.toneMappingWhitePoint=this.toneMappingExposure=
this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var X=this,J=!1,L=null,G=null,K=null,P=-1;var U=b=null;var ta=!1;var Pb=null,R=null,V=new ba,W=new ba,ca=null,ia=0,S=w.width,N=w.height,T=1,ea=new ba(0,0,S,N),aa=new ba(0,0,S,N),pa=!1,sa=new ud,Y=new bg,xd=!1,ge=!1,Dc=new M,ib=new n;try{x={alpha:x,depth:D,stencil:y,antialias:Q,premultipliedAlpha:fa,preserveDrawingBuffer:A,powerPreference:F};w.addEventListener("webglcontextlost",d,!1);w.addEventListener("webglcontextrestored",e,!1);var O=
z||w.getContext("webgl",x)||w.getContext("experimental-webgl",x);if(null===O){if(null!==w.getContext("webgl"))throw Error("Error creating WebGL context with your selected attributes.");throw Error("Error creating WebGL context.");}void 0===O.getShaderPrecisionFormat&&(O.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(tf){throw console.error("THREE.WebGLRenderer: "+tf.message),tf;}var la,za,Z,ha,Da,da,ra,ua,oa,ma,va,qa,na,xa,Aa,Ba,ja;c();var ka=null;"undefined"!==
......@@ -190,8 +190,8 @@ this.setScissor=function(a,b,c,d){a.isVector4?aa.set(a.x,a.y,a.z,a.w):aa.set(a,b
Da.get(a);a.hasPositions&&!c.position&&(c.position=O.createBuffer());a.hasNormals&&!c.normal&&(c.normal=O.createBuffer());a.hasUvs&&!c.uv&&(c.uv=O.createBuffer());a.hasColors&&!c.color&&(c.color=O.createBuffer());b=b.getAttributes();a.hasPositions&&(O.bindBuffer(34962,c.position),O.bufferData(34962,a.positionArray,35048),Z.enableAttribute(b.position),O.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(O.bindBuffer(34962,c.normal),O.bufferData(34962,a.normalArray,35048),Z.enableAttribute(b.normal),
O.vertexAttribPointer(b.normal,3,5126,!1,0,0));a.hasUvs&&(O.bindBuffer(34962,c.uv),O.bufferData(34962,a.uvArray,35048),Z.enableAttribute(b.uv),O.vertexAttribPointer(b.uv,2,5126,!1,0,0));a.hasColors&&(O.bindBuffer(34962,c.color),O.bufferData(34962,a.colorArray,35048),Z.enableAttribute(b.color),O.vertexAttribPointer(b.color,3,5126,!1,0,0));Z.disableUnusedAttributes();O.drawArrays(4,0,a.count);a.count=0};this.renderBufferDirect=function(a,c,d,e,f,g){var h=f.isMesh&&0>f.matrixWorld.determinant();Z.setMaterial(e,
h);var k=l(a,c,e,f),m=!1;if(b!==d.id||U!==k.id||ta!==(!0===e.wireframe))b=d.id,U=k.id,ta=!0===e.wireframe,m=!0;f.morphTargetInfluences&&(xa.update(f,d,e,k),m=!0);h=d.index;var p=d.attributes.position;c=1;!0===e.wireframe&&(h=ua.getWireframeAttribute(d),c=2);a=Aa;if(null!==h){var q=ra.get(h);a=Ba;a.setIndex(q)}if(m){if(d&&d.isInstancedBufferGeometry&&!za.isWebGL2&&null===la.get("ANGLE_instanced_arrays"))console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");
else{Z.initAttributes();m=d.attributes;k=k.getAttributes();var v=e.defaultAttributeValues;for(A in k){var r=k[A];if(0<=r){var t=m[A];if(void 0!==t){var u=t.normalized,n=t.itemSize,w=ra.get(t);if(void 0!==w){var x=w.buffer,z=w.type;w=w.bytesPerElement;if(t.isInterleavedBufferAttribute){var y=t.data,D=y.stride;t=t.offset;y&&y.isInstancedInterleavedBuffer?(Z.enableAttributeAndDivisor(r,y.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=y.meshPerAttribute*y.count)):Z.enableAttribute(r);
O.bindBuffer(34962,x);O.vertexAttribPointer(r,n,z,u,D*w,t*w)}else t.isInstancedBufferAttribute?(Z.enableAttributeAndDivisor(r,t.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=t.meshPerAttribute*t.count)):Z.enableAttribute(r),O.bindBuffer(34962,x),O.vertexAttribPointer(r,n,z,u,0,0)}}else if(void 0!==v&&(u=v[A],void 0!==u))switch(u.length){case 2:O.vertexAttrib2fv(r,u);break;case 3:O.vertexAttrib3fv(r,u);break;case 4:O.vertexAttrib4fv(r,u);break;default:O.vertexAttrib1fv(r,u)}}}Z.disableUnusedAttributes()}null!==
else{Z.initAttributes();m=d.attributes;k=k.getAttributes();var v=e.defaultAttributeValues;for(A in k){var r=k[A];if(0<=r){var t=m[A];if(void 0!==t){var n=t.normalized,u=t.itemSize,w=ra.get(t);if(void 0!==w){var x=w.buffer,z=w.type;w=w.bytesPerElement;if(t.isInterleavedBufferAttribute){var y=t.data,D=y.stride;t=t.offset;y&&y.isInstancedInterleavedBuffer?(Z.enableAttributeAndDivisor(r,y.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=y.meshPerAttribute*y.count)):Z.enableAttribute(r);
O.bindBuffer(34962,x);O.vertexAttribPointer(r,u,z,n,D*w,t*w)}else t.isInstancedBufferAttribute?(Z.enableAttributeAndDivisor(r,t.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=t.meshPerAttribute*t.count)):Z.enableAttribute(r),O.bindBuffer(34962,x),O.vertexAttribPointer(r,u,z,n,0,0)}}else if(void 0!==v&&(n=v[A],void 0!==n))switch(n.length){case 2:O.vertexAttrib2fv(r,n);break;case 3:O.vertexAttrib3fv(r,n);break;case 4:O.vertexAttrib4fv(r,n);break;default:O.vertexAttrib1fv(r,n)}}}Z.disableUnusedAttributes()}null!==
h&&O.bindBuffer(34963,q.buffer)}q=Infinity;null!==h?q=h.count:void 0!==p&&(q=p.count);h=d.drawRange.start*c;p=null!==g?g.start*c:0;var A=Math.max(h,p);g=Math.max(0,Math.min(q,h+d.drawRange.count*c,p+(null!==g?g.count*c:Infinity))-1-A+1);if(0!==g){if(f.isMesh)if(!0===e.wireframe)Z.setLineWidth(e.wireframeLinewidth*(null===G?T:1)),a.setMode(1);else switch(f.drawMode){case 0:a.setMode(4);break;case 1:a.setMode(5);break;case 2:a.setMode(6)}else f.isLine?(e=e.linewidth,void 0===e&&(e=1),Z.setLineWidth(e*
(null===G?T:1)),f.isLineSegments?a.setMode(1):f.isLineLoop?a.setMode(2):a.setMode(3)):f.isPoints?a.setMode(0):f.isSprite&&a.setMode(4);d&&d.isInstancedBufferGeometry?0<d.maxInstancedCount&&a.renderInstances(d,A,g):a.render(A,g)}};this.compile=function(a,b){C=qa.get(a,b);C.init();a.traverse(function(a){a.isLight&&(C.pushLight(a),a.castShadow&&C.pushShadow(a))});C.setupLights(b);a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var c=0;c<b.material.length;c++)q(b.material[c],a.fog,
b);else q(b.material,a.fog,b)})};var ya=null,wa=new $d;wa.setAnimationLoop(function(a){ka.isPresenting()||ya&&ya(a)});"undefined"!==typeof window&&wa.setContext(window);this.setAnimationLoop=function(a){ya=a;ka.setAnimationLoop(a);wa.start()};this.render=function(a,c,d,e){if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");var f=d}if(void 0!==e){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");
......@@ -288,9 +288,9 @@ a?a:Ba;this.textures={}}function qe(a){this.manager=void 0!==a?a:Ba}function re(
"Font";this.data=a}function Ff(a){this.manager=void 0!==a?a:Ba}function kd(){}function ve(a){this.manager=void 0!==a?a:Ba}function Gf(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new S;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new S;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1}function ld(a,b,c,d){E.call(this);this.type="CubeCamera";var e=new S(90,1,a,b);e.up.set(0,-1,0);e.lookAt(new n(1,0,0));this.add(e);var f=new S(90,
1,a,b);f.up.set(0,-1,0);f.lookAt(new n(-1,0,0));this.add(f);var g=new S(90,1,a,b);g.up.set(0,0,1);g.lookAt(new n(0,1,0));this.add(g);var h=new S(90,1,a,b);h.up.set(0,0,-1);h.lookAt(new n(0,-1,0));this.add(h);var k=new S(90,1,a,b);k.up.set(0,-1,0);k.lookAt(new n(0,0,1));this.add(k);var m=new S(90,1,a,b);m.up.set(0,-1,0);m.lookAt(new n(0,0,-1));this.add(m);d=d||{format:1022,magFilter:1006,minFilter:1006};this.renderTarget=new mb(c,c,d);this.renderTarget.texture.name="CubeCamera";this.update=function(a,
b){null===this.parent&&this.updateMatrixWorld();var c=a.getRenderTarget(),d=this.renderTarget,p=d.texture.generateMipmaps;d.texture.generateMipmaps=!1;a.setRenderTarget(d,0);a.render(b,e);a.setRenderTarget(d,1);a.render(b,f);a.setRenderTarget(d,2);a.render(b,g);a.setRenderTarget(d,3);a.render(b,h);a.setRenderTarget(d,4);a.render(b,k);d.texture.generateMipmaps=p;a.setRenderTarget(d,5);a.render(b,m);a.setRenderTarget(c)};this.clear=function(a,b,c,d){for(var e=a.getRenderTarget(),f=this.renderTarget,
g=0;6>g;g++)f.activeCubeFace=g,a.setRenderTarget(f),a.clear(b,c,d);a.setRenderTarget(e)}}function we(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function xe(){E.call(this);this.type="AudioListener";this.context=ye.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0}function lc(a){E.call(this);this.type="Audio";this.listener=a;this.context=a.context;this.gain=this.context.createGain();
this.gain.connect(a.getInput());this.autoplay=!1;this.buffer=null;this.detune=0;this.loop=!1;this.offset=this.startTime=0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this.filters=[]}function ze(a){lc.call(this,a);this.panner=this.context.createPanner();this.panner.connect(this.gain)}function Ae(a,b){this.analyser=a.context.createAnalyser();this.analyser.fftSize=void 0!==b?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);a.getOutput().connect(this.analyser)}
function Be(a,b,c){this.binding=a;this.valueSize=c;a=Float64Array;switch(b){case "quaternion":b=this._slerp;break;case "string":case "bool":a=Array;b=this._select;break;default:b=this._lerp}this.buffer=new a(4*c);this._mixBufferRegion=b;this.referenceCount=this.useCount=this.cumulativeWeight=0}function Hf(a,b,c){c=c||ma.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function ma(a,b,c){this.path=b;this.parsedPath=c||ma.parseTrackName(b);this.node=ma.findNode(a,this.parsedPath.nodeName)||
g=0;6>g;g++)a.setRenderTarget(f,g),a.clear(b,c,d);a.setRenderTarget(e)}}function we(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function xe(){E.call(this);this.type="AudioListener";this.context=ye.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0}function lc(a){E.call(this);this.type="Audio";this.listener=a;this.context=a.context;this.gain=this.context.createGain();this.gain.connect(a.getInput());
this.autoplay=!1;this.buffer=null;this.detune=0;this.loop=!1;this.offset=this.startTime=0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this.filters=[]}function ze(a){lc.call(this,a);this.panner=this.context.createPanner();this.panner.connect(this.gain)}function Ae(a,b){this.analyser=a.context.createAnalyser();this.analyser.fftSize=void 0!==b?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);a.getOutput().connect(this.analyser)}function Be(a,
b,c){this.binding=a;this.valueSize=c;a=Float64Array;switch(b){case "quaternion":b=this._slerp;break;case "string":case "bool":a=Array;b=this._select;break;default:b=this._lerp}this.buffer=new a(4*c);this._mixBufferRegion=b;this.referenceCount=this.useCount=this.cumulativeWeight=0}function Hf(a,b,c){c=c||ma.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function ma(a,b,c){this.path=b;this.parsedPath=c||ma.parseTrackName(b);this.node=ma.findNode(a,this.parsedPath.nodeName)||
a;this.rootNode=a}function If(){this.uuid=H.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;var a={};this._indicesByUUID=a;for(var b=0,c=arguments.length;b!==c;++b)a[arguments[b].uuid]=b;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};var d=this;this.stats={objects:{get total(){return d._objects.length},get inUse(){return this.total-d.nCachedObjects_}},get bindingsPerObject(){return d._bindings.length}}}function Jf(a,b,
c){this._mixer=a;this._clip=b;this._localRoot=c||null;a=b.tracks;b=a.length;c=Array(b);for(var d={endingStart:2400,endingEnd:2400},e=0;e!==b;++e){var f=a[e].createInterpolant(null);c[e]=f;f.settings=d}this._interpolantSettings=d;this._interpolants=c;this._propertyBindings=Array(b);this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null;this.loop=2201;this._loopCount=-1;this._startTime=null;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=
this.timeScale=1;this.repetitions=Infinity;this.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function Ce(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function Ud(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function De(){C.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function Ee(a,b,c){ub.call(this,a,b);this.meshPerAttribute=
......@@ -602,8 +602,8 @@ a.clipping;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphN
value:d.toArray()}:d&&d.isMatrix3?{type:"m3",value:d.toArray()}:d&&d.isMatrix4?{type:"m4",value:d.toArray()}:{value:d}}0<Object.keys(this.defines).length&&(b.defines=this.defines);b.vertexShader=this.vertexShader;b.fragmentShader=this.fragmentShader;a={};for(var e in this.extensions)!0===this.extensions[e]&&(a[e]=!0);0<Object.keys(a).length&&(b.extensions=a);return b};Object.assign(tb.prototype,{set:function(a,b){this.origin.copy(a);this.direction.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},
copy:function(a){this.origin.copy(a.origin);this.direction.copy(a.direction);return this},at:function(a,b){void 0===b&&(console.warn("THREE.Ray: .at() target is now required"),b=new n);return b.copy(this.direction).multiplyScalar(a).add(this.origin)},lookAt:function(a){this.direction.copy(a).sub(this.origin).normalize();return this},recast:function(){var a=new n;return function(b){this.origin.copy(this.at(b,a));return this}}(),closestPointToPoint:function(a,b){void 0===b&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),
b=new n);b.subVectors(a,this.origin);a=b.dot(this.direction);return 0>a?b.copy(this.origin):b.copy(this.direction).multiplyScalar(a).add(this.origin)},distanceToPoint:function(a){return Math.sqrt(this.distanceSqToPoint(a))},distanceSqToPoint:function(){var a=new n;return function(b){var c=a.subVectors(b,this.origin).dot(this.direction);if(0>c)return this.origin.distanceToSquared(b);a.copy(this.direction).multiplyScalar(c).add(this.origin);return a.distanceToSquared(b)}}(),distanceSqToSegment:function(){var a=
new n,b=new n,c=new n;return function(d,e,f,g){a.copy(d).add(e).multiplyScalar(.5);b.copy(e).sub(d).normalize();c.copy(this.origin).sub(a);var h=.5*d.distanceTo(e),k=-this.direction.dot(b),m=c.dot(this.direction),l=-c.dot(b),q=c.lengthSq(),n=Math.abs(1-k*k);if(0<n){d=k*l-m;e=k*m-l;var t=h*n;0<=d?e>=-t?e<=t?(h=1/n,d*=h,e*=h,k=d*(d+k*e+2*m)+e*(k*d+e+2*l)+q):(e=h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*l)+q):(e=-h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*l)+q):e<=-t?(d=Math.max(0,-(-k*h+m)),e=0<d?-h:Math.min(Math.max(-h,
-l),h),k=-d*d+e*(e+2*l)+q):e<=t?(d=0,e=Math.min(Math.max(-h,-l),h),k=e*(e+2*l)+q):(d=Math.max(0,-(k*h+m)),e=0<d?h:Math.min(Math.max(-h,-l),h),k=-d*d+e*(e+2*l)+q)}else e=0<k?-h:h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*l)+q;f&&f.copy(this.direction).multiplyScalar(d).add(this.origin);g&&g.copy(b).multiplyScalar(e).add(a);return k}}(),intersectSphere:function(){var a=new n;return function(b,c){a.subVectors(b.center,this.origin);var d=a.dot(this.direction),e=a.dot(a)-d*d;b=b.radius*b.radius;if(e>b)return null;
new n,b=new n,c=new n;return function(d,e,f,g){a.copy(d).add(e).multiplyScalar(.5);b.copy(e).sub(d).normalize();c.copy(this.origin).sub(a);var h=.5*d.distanceTo(e),k=-this.direction.dot(b),m=c.dot(this.direction),l=-c.dot(b),n=c.lengthSq(),v=Math.abs(1-k*k);if(0<v){d=k*l-m;e=k*m-l;var t=h*v;0<=d?e>=-t?e<=t?(h=1/v,d*=h,e*=h,k=d*(d+k*e+2*m)+e*(k*d+e+2*l)+n):(e=h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*l)+n):(e=-h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*l)+n):e<=-t?(d=Math.max(0,-(-k*h+m)),e=0<d?-h:Math.min(Math.max(-h,
-l),h),k=-d*d+e*(e+2*l)+n):e<=t?(d=0,e=Math.min(Math.max(-h,-l),h),k=e*(e+2*l)+n):(d=Math.max(0,-(k*h+m)),e=0<d?h:Math.min(Math.max(-h,-l),h),k=-d*d+e*(e+2*l)+n)}else e=0<k?-h:h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*l)+n;f&&f.copy(this.direction).multiplyScalar(d).add(this.origin);g&&g.copy(b).multiplyScalar(e).add(a);return k}}(),intersectSphere:function(){var a=new n;return function(b,c){a.subVectors(b.center,this.origin);var d=a.dot(this.direction),e=a.dot(a)-d*d;b=b.radius*b.radius;if(e>b)return null;
b=Math.sqrt(b-e);e=d-b;d+=b;return 0>e&&0>d?null:0>e?this.at(d,c):this.at(e,c)}}(),intersectsSphere:function(a){return this.distanceSqToPoint(a.center)<=a.radius*a.radius},distanceToPlane:function(a){var b=a.normal.dot(this.direction);if(0===b)return 0===a.distanceToPoint(this.origin)?0:null;a=-(this.origin.dot(a.normal)+a.constant)/b;return 0<=a?a:null},intersectPlane:function(a,b){a=this.distanceToPlane(a);return null===a?null:this.at(a,b)},intersectsPlane:function(a){var b=a.distanceToPoint(this.origin);
return 0===b||0>a.normal.dot(this.direction)*b?!0:!1},intersectBox:function(a,b){var c=1/this.direction.x;var d=1/this.direction.y;var e=1/this.direction.z,f=this.origin;if(0<=c){var g=(a.min.x-f.x)*c;c*=a.max.x-f.x}else g=(a.max.x-f.x)*c,c*=a.min.x-f.x;if(0<=d){var h=(a.min.y-f.y)*d;d*=a.max.y-f.y}else h=(a.max.y-f.y)*d,d*=a.min.y-f.y;if(g>d||h>c)return null;if(h>g||g!==g)g=h;if(d<c||c!==c)c=d;0<=e?(h=(a.min.z-f.z)*e,a=(a.max.z-f.z)*e):(h=(a.max.z-f.z)*e,a=(a.min.z-f.z)*e);if(g>a||h>c)return null;
if(h>g||g!==g)g=h;if(a<c||c!==c)c=a;return 0>c?null:this.at(0<=g?g:c,b)},intersectsBox:function(){var a=new n;return function(b){return null!==this.intersectBox(b,a)}}(),intersectTriangle:function(){var a=new n,b=new n,c=new n,d=new n;return function(e,f,g,h,k){b.subVectors(f,e);c.subVectors(g,e);d.crossVectors(b,c);f=this.direction.dot(d);if(0<f){if(h)return null;h=1}else if(0>f)h=-1,f=-f;else return null;a.subVectors(this.origin,e);e=h*this.direction.dot(c.crossVectors(a,c));if(0>e)return null;
......@@ -951,7 +951,7 @@ md;l.VertexNormalsHelper=nd;l.SpotLightHelper=mc;l.SkeletonHelper=nc;l.PointLigh
Lc;l.ParametricBufferGeometry=Xb;l.TetrahedronGeometry=Nc;l.TetrahedronBufferGeometry=Yb;l.OctahedronGeometry=Oc;l.OctahedronBufferGeometry=vb;l.IcosahedronGeometry=Pc;l.IcosahedronBufferGeometry=Zb;l.DodecahedronGeometry=Qc;l.DodecahedronBufferGeometry=$b;l.PolyhedronGeometry=Mc;l.PolyhedronBufferGeometry=Aa;l.TubeGeometry=Rc;l.TubeBufferGeometry=wb;l.TorusKnotGeometry=Sc;l.TorusKnotBufferGeometry=ac;l.TorusGeometry=Tc;l.TorusBufferGeometry=bc;l.TextGeometry=Yc;l.TextBufferGeometry=cc;l.SphereGeometry=
Zc;l.SphereBufferGeometry=zb;l.RingGeometry=$c;l.RingBufferGeometry=dc;l.PlaneGeometry=Bc;l.PlaneBufferGeometry=sb;l.LatheGeometry=ad;l.LatheBufferGeometry=ec;l.ShapeGeometry=Ab;l.ShapeBufferGeometry=Bb;l.ExtrudeGeometry=yb;l.ExtrudeBufferGeometry=Va;l.EdgesGeometry=fc;l.ConeGeometry=bd;l.ConeBufferGeometry=cd;l.CylinderGeometry=Cb;l.CylinderBufferGeometry=bb;l.CircleGeometry=dd;l.CircleBufferGeometry=gc;l.BoxGeometry=Ob;l.CubeGeometry=Ob;l.BoxBufferGeometry=rb;l.ShadowMaterial=Db;l.SpriteMaterial=
jb;l.RawShaderMaterial=hc;l.ShaderMaterial=Ca;l.PointsMaterial=Ia;l.MeshPhysicalMaterial=Eb;l.MeshStandardMaterial=Wa;l.MeshPhongMaterial=Ja;l.MeshToonMaterial=Fb;l.MeshNormalMaterial=Gb;l.MeshLambertMaterial=Hb;l.MeshDepthMaterial=gb;l.MeshDistanceMaterial=hb;l.MeshBasicMaterial=ya;l.MeshMatcapMaterial=Ib;l.LineDashedMaterial=Jb;l.LineBasicMaterial=R;l.Material=K;l.Float64BufferAttribute=zc;l.Float32BufferAttribute=F;l.Uint32BufferAttribute=qb;l.Int32BufferAttribute=yc;l.Uint16BufferAttribute=pb;
l.Int16BufferAttribute=xc;l.Uint8ClampedBufferAttribute=wc;l.Uint8BufferAttribute=vc;l.Int8BufferAttribute=uc;l.BufferAttribute=P;l.ArcCurve=kc;l.CatmullRomCurve3=oa;l.CubicBezierCurve=La;l.CubicBezierCurve3=Xa;l.EllipseCurve=Ea;l.LineCurve=ja;l.LineCurve3=Ma;l.QuadraticBezierCurve=Na;l.QuadraticBezierCurve3=Ya;l.SplineCurve=Oa;l.REVISION="102";l.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2};l.CullFaceNone=0;l.CullFaceBack=1;l.CullFaceFront=2;l.CullFaceFrontBack=3;l.FrontFaceDirectionCW=0;l.FrontFaceDirectionCCW=
l.Int16BufferAttribute=xc;l.Uint8ClampedBufferAttribute=wc;l.Uint8BufferAttribute=vc;l.Int8BufferAttribute=uc;l.BufferAttribute=P;l.ArcCurve=kc;l.CatmullRomCurve3=oa;l.CubicBezierCurve=La;l.CubicBezierCurve3=Xa;l.EllipseCurve=Ea;l.LineCurve=ja;l.LineCurve3=Ma;l.QuadraticBezierCurve=Na;l.QuadraticBezierCurve3=Ya;l.SplineCurve=Oa;l.REVISION="103dev";l.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2};l.CullFaceNone=0;l.CullFaceBack=1;l.CullFaceFront=2;l.CullFaceFrontBack=3;l.FrontFaceDirectionCW=0;l.FrontFaceDirectionCCW=
1;l.BasicShadowMap=0;l.PCFShadowMap=1;l.PCFSoftShadowMap=2;l.FrontSide=0;l.BackSide=1;l.DoubleSide=2;l.FlatShading=1;l.SmoothShading=2;l.NoColors=0;l.FaceColors=1;l.VertexColors=2;l.NoBlending=0;l.NormalBlending=1;l.AdditiveBlending=2;l.SubtractiveBlending=3;l.MultiplyBlending=4;l.CustomBlending=5;l.AddEquation=100;l.SubtractEquation=101;l.ReverseSubtractEquation=102;l.MinEquation=103;l.MaxEquation=104;l.ZeroFactor=200;l.OneFactor=201;l.SrcColorFactor=202;l.OneMinusSrcColorFactor=203;l.SrcAlphaFactor=
204;l.OneMinusSrcAlphaFactor=205;l.DstAlphaFactor=206;l.OneMinusDstAlphaFactor=207;l.DstColorFactor=208;l.OneMinusDstColorFactor=209;l.SrcAlphaSaturateFactor=210;l.NeverDepth=0;l.AlwaysDepth=1;l.LessDepth=2;l.LessEqualDepth=3;l.EqualDepth=4;l.GreaterEqualDepth=5;l.GreaterDepth=6;l.NotEqualDepth=7;l.MultiplyOperation=0;l.MixOperation=1;l.AddOperation=2;l.NoToneMapping=0;l.LinearToneMapping=1;l.ReinhardToneMapping=2;l.Uncharted2ToneMapping=3;l.CineonToneMapping=4;l.ACESFilmicToneMapping=5;l.UVMapping=
300;l.CubeReflectionMapping=301;l.CubeRefractionMapping=302;l.EquirectangularReflectionMapping=303;l.EquirectangularRefractionMapping=304;l.SphericalReflectionMapping=305;l.CubeUVReflectionMapping=306;l.CubeUVRefractionMapping=307;l.RepeatWrapping=1E3;l.ClampToEdgeWrapping=1001;l.MirroredRepeatWrapping=1002;l.NearestFilter=1003;l.NearestMipMapNearestFilter=1004;l.NearestMipMapLinearFilter=1005;l.LinearFilter=1006;l.LinearMipMapNearestFilter=1007;l.LinearMipMapLinearFilter=1008;l.UnsignedByteType=
......
......@@ -179,7 +179,7 @@ Object.assign( EventDispatcher.prototype, {
} );
var REVISION = '102';
var REVISION = '103dev';
var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
var CullFaceNone = 0;
var CullFaceBack = 1;
......@@ -40184,8 +40184,7 @@ function CubeCamera( near, far, cubeResolution, options ) {
for ( var i = 0; i < 6; i ++ ) {
renderTarget.activeCubeFace = i;
renderer.setRenderTarget( renderTarget );
renderer.setRenderTarget( renderTarget, i );
renderer.clear( color, depth, stencil );
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册