提交 4a486222 编写于 作者: M Mugen87

Updated builds.

上级 78dc2a29
......@@ -24241,6 +24241,14 @@
var index = geometry.index;
var position = geometry.attributes.position;
//
if ( index !== null && index.count === 0 ) { return; }
if ( position === undefined || position.count === 0 ) { return; }
//
var rangeFactor = 1;
if ( material.wireframe === true ) {
// threejs.org/license
(function(k,Aa){"object"===typeof exports&&"undefined"!==typeof module?Aa(exports):"function"===typeof define&&define.amd?define(["exports"],Aa):(k=k||self,Aa(k.THREE={}))})(this,function(k){function Aa(){}function B(a,b){this.x=a||0;this.y=b||0}function ua(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._w=void 0!==d?d:1}function n(a,b,c){this.x=a||0;this.y=b||0;this.z=c||0}function ca(){this.elements=[1,0,0,0,1,0,0,0,1];0<arguments.length&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}
function Y(a,b,c,d,e,f,g,h,l,m){Object.defineProperty(this,"id",{value:Ui++});this.uuid=R.generateUUID();this.name="";this.image=void 0!==a?a:Y.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==b?b:Y.DEFAULT_MAPPING;this.wrapS=void 0!==c?c:1001;this.wrapT=void 0!==d?d:1001;this.magFilter=void 0!==e?e:1006;this.minFilter=void 0!==f?f:1008;this.anisotropy=void 0!==l?l:1;this.format=void 0!==g?g:1023;this.type=void 0!==h?h:1009;this.offset=new B(0,0);this.repeat=new B(1,1);this.center=new B(0,0);this.rotation=
0;this.matrixAutoUpdate=!0;this.matrix=new ca;this.generateMipmaps=!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==m?m:3E3;this.version=0;this.onUpdate=null}function ba(a,b,c,d){this.x=a||0;this.y=b||0;this.z=c||0;this.w=void 0!==d?d:1}function la(a,b,c){this.width=a;this.height=b;this.scissor=new ba(0,0,a,b);this.scissorTest=!1;this.viewport=new ba(0,0,a,b);c=c||{};this.texture=new Y(void 0,void 0,c.wrapS,c.wrapT,c.magFilter,c.minFilter,c.format,c.type,c.anisotropy,
......@@ -213,13 +212,13 @@ this.getScissor=function(a){return a.copy(U)};this.setScissor=function(a,b,c,d){
arguments)};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=16384;if(void 0===b||b)d|=256;if(void 0===c||c)d|=1024;K.clear(d)};this.clearColor=function(){this.clear(!0,!1,!1)};this.clearDepth=function(){this.clear(!1,!0,!1)};this.clearStencil=function(){this.clear(!1,!1,!0)};this.dispose=function(){y.removeEventListener("webglcontextlost",d,!1);y.removeEventListener("webglcontextrestored",e,!1);va.dispose();ua.dispose();Z.dispose();ra.dispose();ja.dispose();ya.stop()};this.renderBufferImmediate=
function(a,b){aa.initAttributes();var c=Z.get(a);a.hasPositions&&!c.position&&(c.position=K.createBuffer());a.hasNormals&&!c.normal&&(c.normal=K.createBuffer());a.hasUvs&&!c.uv&&(c.uv=K.createBuffer());a.hasColors&&!c.color&&(c.color=K.createBuffer());b=b.getAttributes();a.hasPositions&&(K.bindBuffer(34962,c.position),K.bufferData(34962,a.positionArray,35048),aa.enableAttribute(b.position),K.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(K.bindBuffer(34962,c.normal),K.bufferData(34962,
a.normalArray,35048),aa.enableAttribute(b.normal),K.vertexAttribPointer(b.normal,3,5126,!1,0,0));a.hasUvs&&(K.bindBuffer(34962,c.uv),K.bufferData(34962,a.uvArray,35048),aa.enableAttribute(b.uv),K.vertexAttribPointer(b.uv,2,5126,!1,0,0));a.hasColors&&(K.bindBuffer(34962,c.color),K.bufferData(34962,a.colorArray,35048),aa.enableAttribute(b.color),K.vertexAttribPointer(b.color,3,5126,!1,0,0));aa.disableUnusedAttributes();K.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();aa.setMaterial(e,h);var l=k(a,c,e,f),m=!1;if(b!==d.id||Pe!==l.id||Y!==(!0===e.wireframe))b=d.id,Pe=l.id,Y=!0===e.wireframe,m=!0;f.morphTargetInfluences&&(xa.update(f,d,e,l),m=!0);h=d.index;var r=d.attributes.position;c=1;!0===e.wireframe&&(h=wa.getWireframeAttribute(d),c=2);a=za;if(null!==h){var p=ma.get(h);a=Aa;a.setIndex(p)}if(m){if(!1!==Ea.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==qa.get("ANGLE_instanced_arrays")){aa.initAttributes();
m=d.attributes;l=l.getAttributes();var u=e.defaultAttributeValues;for(H in l){var q=l[H];if(0<=q){var t=m[H];if(void 0!==t){var n=t.normalized,v=t.itemSize,w=ma.get(t);if(void 0!==w){var y=w.buffer,x=w.type;w=w.bytesPerElement;if(t.isInterleavedBufferAttribute){var A=t.data,F=A.stride;t=t.offset;A&&A.isInstancedInterleavedBuffer?(aa.enableAttributeAndDivisor(q,A.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=A.meshPerAttribute*A.count)):aa.enableAttribute(q);K.bindBuffer(34962,
y);K.vertexAttribPointer(q,v,x,n,F*w,t*w)}else t.isInstancedBufferAttribute?(aa.enableAttributeAndDivisor(q,t.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=t.meshPerAttribute*t.count)):aa.enableAttribute(q),K.bindBuffer(34962,y),K.vertexAttribPointer(q,v,x,n,0,0)}}else if("instanceMatrix"===H)w=ma.get(f.instanceMatrix),void 0!==w&&(y=w.buffer,x=w.type,aa.enableAttributeAndDivisor(q+0,1),aa.enableAttributeAndDivisor(q+1,1),aa.enableAttributeAndDivisor(q+2,1),aa.enableAttributeAndDivisor(q+
3,1),K.bindBuffer(34962,y),K.vertexAttribPointer(q+0,4,x,!1,64,0),K.vertexAttribPointer(q+1,4,x,!1,64,16),K.vertexAttribPointer(q+2,4,x,!1,64,32),K.vertexAttribPointer(q+3,4,x,!1,64,48));else if(void 0!==u&&(n=u[H],void 0!==n))switch(n.length){case 2:K.vertexAttrib2fv(q,n);break;case 3:K.vertexAttrib3fv(q,n);break;case 4:K.vertexAttrib4fv(q,n);break;default:K.vertexAttrib1fv(q,n)}}}aa.disableUnusedAttributes()}null!==h&&K.bindBuffer(34963,p.buffer)}p=Infinity;null!==h?p=h.count:void 0!==r&&(p=r.count);
h=d.drawRange.start*c;r=null!==g?g.start*c:0;var H=Math.max(h,r);g=Math.max(0,Math.min(p,h+d.drawRange.count*c,r+(null!==g?g.count*c:Infinity))-1-H+1);if(0!==g){if(f.isMesh)if(!0===e.wireframe)aa.setLineWidth(e.wireframeLinewidth*(null===P?fa: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),aa.setLineWidth(e*(null===P?fa:1)),f.isLineSegments?a.setMode(1):f.isLineLoop?a.setMode(2):a.setMode(3)):
f.isPoints?a.setMode(0):f.isSprite&&a.setMode(4);f.isInstancedMesh?a.renderInstances(d,H,g,f.count):d.isInstancedBufferGeometry?a.renderInstances(d,H,g,d.maxInstancedCount):a.render(H,g)}};this.compile=function(a,b){E=ua.get(a,b);E.init();a.traverse(function(a){a.isLight&&(E.pushLight(a),a.castShadow&&E.pushShadow(a))});E.setupLights(b);a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var c=0;c<b.material.length;c++)p(b.material[c],a.fog,b);else p(b.material,a.fog,b)})};var Ca=
null,ya=new gg;ya.setAnimationLoop(function(a){ja.isPresenting()||Ca&&Ca(a)});"undefined"!==typeof window&&ya.setContext(window);this.setAnimationLoop=function(a){Ca=a;ja.setAnimationLoop(a);ya.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.");
g){var h=f.isMesh&&0>f.matrixWorld.determinant();aa.setMaterial(e,h);var l=k(a,c,e,f),m=!1;if(b!==d.id||Pe!==l.id||Y!==(!0===e.wireframe))b=d.id,Pe=l.id,Y=!0===e.wireframe,m=!0;f.morphTargetInfluences&&(xa.update(f,d,e,l),m=!0);h=d.index;var r=d.attributes.position;if((null===h||0!==h.count)&&void 0!==r&&0!==r.count){c=1;!0===e.wireframe&&(h=wa.getWireframeAttribute(d),c=2);a=za;if(null!==h){var p=ma.get(h);a=Aa;a.setIndex(p)}if(m){if(!1!==Ea.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||
null!==qa.get("ANGLE_instanced_arrays")){aa.initAttributes();m=d.attributes;l=l.getAttributes();var u=e.defaultAttributeValues;for(H in l){var q=l[H];if(0<=q){var t=m[H];if(void 0!==t){var n=t.normalized,v=t.itemSize,w=ma.get(t);if(void 0!==w){var y=w.buffer,x=w.type;w=w.bytesPerElement;if(t.isInterleavedBufferAttribute){var A=t.data,F=A.stride;t=t.offset;A&&A.isInstancedInterleavedBuffer?(aa.enableAttributeAndDivisor(q,A.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=A.meshPerAttribute*
A.count)):aa.enableAttribute(q);K.bindBuffer(34962,y);K.vertexAttribPointer(q,v,x,n,F*w,t*w)}else t.isInstancedBufferAttribute?(aa.enableAttributeAndDivisor(q,t.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=t.meshPerAttribute*t.count)):aa.enableAttribute(q),K.bindBuffer(34962,y),K.vertexAttribPointer(q,v,x,n,0,0)}}else if("instanceMatrix"===H)w=ma.get(f.instanceMatrix),void 0!==w&&(y=w.buffer,x=w.type,aa.enableAttributeAndDivisor(q+0,1),aa.enableAttributeAndDivisor(q+1,1),aa.enableAttributeAndDivisor(q+
2,1),aa.enableAttributeAndDivisor(q+3,1),K.bindBuffer(34962,y),K.vertexAttribPointer(q+0,4,x,!1,64,0),K.vertexAttribPointer(q+1,4,x,!1,64,16),K.vertexAttribPointer(q+2,4,x,!1,64,32),K.vertexAttribPointer(q+3,4,x,!1,64,48));else if(void 0!==u&&(n=u[H],void 0!==n))switch(n.length){case 2:K.vertexAttrib2fv(q,n);break;case 3:K.vertexAttrib3fv(q,n);break;case 4:K.vertexAttrib4fv(q,n);break;default:K.vertexAttrib1fv(q,n)}}}aa.disableUnusedAttributes()}null!==h&&K.bindBuffer(34963,p.buffer)}p=Infinity;null!==
h?p=h.count:void 0!==r&&(p=r.count);h=d.drawRange.start*c;r=null!==g?g.start*c:0;var H=Math.max(h,r);g=Math.max(0,Math.min(p,h+d.drawRange.count*c,r+(null!==g?g.count*c:Infinity))-1-H+1);if(0!==g){if(f.isMesh)if(!0===e.wireframe)aa.setLineWidth(e.wireframeLinewidth*(null===P?fa: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),aa.setLineWidth(e*(null===P?fa:1)),f.isLineSegments?a.setMode(1):
f.isLineLoop?a.setMode(2):a.setMode(3)):f.isPoints?a.setMode(0):f.isSprite&&a.setMode(4);f.isInstancedMesh?a.renderInstances(d,H,g,f.count):d.isInstancedBufferGeometry?a.renderInstances(d,H,g,d.maxInstancedCount):a.render(H,g)}}};this.compile=function(a,b){E=ua.get(a,b);E.init();a.traverse(function(a){a.isLight&&(E.pushLight(a),a.castShadow&&E.pushShadow(a))});E.setupLights(b);a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var c=0;c<b.material.length;c++)p(b.material[c],a.fog,
b);else p(b.material,a.fog,b)})};var Ca=null,ya=new gg;ya.setAnimationLoop(function(a){ja.isPresenting()||Ca&&Ca(a)});"undefined"!==typeof window&&ya.setContext(window);this.setAnimationLoop=function(a){Ca=a;ja.setAnimationLoop(a);ya.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.");
var g=e}c&&c.isCamera?N||(Pe=b=null,Y=!1,ha=-1,X=null,!0===a.autoUpdate&&a.updateMatrixWorld(),null===c.parent&&c.updateMatrixWorld(),ja.enabled&&(c=ja.getCamera(c)),E=ua.get(a,c),E.init(),a.onBeforeRender(C,a,c,f||P),Jd.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse),kg.setFromMatrix(Jd),sa=this.localClippingEnabled,Ne=Sa.init(this.clippingPlanes,sa,c),I=va.get(a,c),I.init(),l(a,c,0,C.sortObjects),!0===C.sortObjects&&I.sort(),Ne&&Sa.beginShadows(),Da.render(E.state.shadowsArray,a,c),E.setupLights(c),
Ne&&Sa.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==f&&this.setRenderTarget(f),ja.enabled&&ta.isAvailable()&&ta.attachCamera(c),na.render(I,a,c,g),d=I.opaque,e=I.transparent,a.overrideMaterial?(f=a.overrideMaterial,d.length&&m(d,a,c,f),e.length&&m(e,a,c,f)):(d.length&&m(d,a,c),e.length&&m(e,a,c)),a.onAfterRender(C,a,c),null!==P&&(ca.updateRenderTargetMipmap(P),ca.updateMultisampleRenderTarget(P)),aa.buffers.depth.setTest(!0),aa.buffers.depth.setMask(!0),aa.buffers.color.setMask(!0),
aa.setPolygonOffset(!1),ja.enabled&&(ta.isAvailable()&&ta.detachCamera(c),ja.submitFrame()),E=I=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")};this.setFramebuffer=function(a){O!==a&&null===P&&K.bindFramebuffer(36160,a);O=a};this.getActiveCubeFace=function(){return Q};this.getActiveMipmapLevel=function(){return V};this.getRenderTarget=function(){return P};this.setRenderTarget=function(a,b,c){P=a;Q=b;V=c;a&&void 0===Z.get(a).__webglFramebuffer&&ca.setupRenderTarget(a);
......
......@@ -24233,6 +24233,14 @@ function WebGLRenderer( parameters ) {
var index = geometry.index;
var position = geometry.attributes.position;
//
if ( index !== null && index.count === 0 ) return;
if ( position === undefined || position.count === 0 ) return;
//
var rangeFactor = 1;
if ( material.wireframe === true ) {
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册