|
@@ -643,7 +643,7 @@ b){a=[];c=0;for(l=b.length;c<l;c++){var m=b[c];a.push([m,c])}a.sort(k);8<a.lengt
|
|
s.uniform1fv(a.morphTargetInfluences,oa);l=!0}b=d.index;c=d.attributes.position;!0===e.wireframe&&(b=na.getWireframeAttribute(d));null!==b?(a=Ba,a.setIndex(b)):a=Aa;if(l){a:{var l=void 0,q;if(d instanceof THREE.InstancedBufferGeometry&&(q=U.get("ANGLE_instanced_arrays"),null===q)){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");break a}void 0===l&&(l=0);I.initAttributes();var m=d.attributes,
|
|
s.uniform1fv(a.morphTargetInfluences,oa);l=!0}b=d.index;c=d.attributes.position;!0===e.wireframe&&(b=na.getWireframeAttribute(d));null!==b?(a=Ba,a.setIndex(b)):a=Aa;if(l){a:{var l=void 0,q;if(d instanceof THREE.InstancedBufferGeometry&&(q=U.get("ANGLE_instanced_arrays"),null===q)){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");break a}void 0===l&&(l=0);I.initAttributes();var m=d.attributes,
|
|
h=h.getAttributes(),n=e.defaultAttributeValues,p;for(p in h){var r=h[p];if(0<=r){var t=m[p];if(void 0!==t){var v=t.itemSize,x=na.getAttributeBuffer(t);if(t instanceof THREE.InterleavedBufferAttribute){var D=t.data,F=D.stride,t=t.offset;D instanceof THREE.InstancedInterleavedBuffer?(I.enableAttributeAndDivisor(r,D.meshPerAttribute,q),void 0===d.maxInstancedCount&&(d.maxInstancedCount=D.meshPerAttribute*D.count)):I.enableAttribute(r);s.bindBuffer(s.ARRAY_BUFFER,x);s.vertexAttribPointer(r,v,s.FLOAT,
|
|
h=h.getAttributes(),n=e.defaultAttributeValues,p;for(p in h){var r=h[p];if(0<=r){var t=m[p];if(void 0!==t){var v=t.itemSize,x=na.getAttributeBuffer(t);if(t instanceof THREE.InterleavedBufferAttribute){var D=t.data,F=D.stride,t=t.offset;D instanceof THREE.InstancedInterleavedBuffer?(I.enableAttributeAndDivisor(r,D.meshPerAttribute,q),void 0===d.maxInstancedCount&&(d.maxInstancedCount=D.meshPerAttribute*D.count)):I.enableAttribute(r);s.bindBuffer(s.ARRAY_BUFFER,x);s.vertexAttribPointer(r,v,s.FLOAT,
|
|
!1,F*D.array.BYTES_PER_ELEMENT,(l*F+t)*D.array.BYTES_PER_ELEMENT)}else t instanceof THREE.InstancedBufferAttribute?(I.enableAttributeAndDivisor(r,t.meshPerAttribute,q),void 0===d.maxInstancedCount&&(d.maxInstancedCount=t.meshPerAttribute*t.count)):I.enableAttribute(r),s.bindBuffer(s.ARRAY_BUFFER,x),s.vertexAttribPointer(r,v,s.FLOAT,!1,0,l*v*4)}else if(void 0!==n&&(v=n[p],void 0!==v))switch(v.length){case 2:s.vertexAttrib2fv(r,v);break;case 3:s.vertexAttrib3fv(r,v);break;case 4:s.vertexAttrib4fv(r,
|
|
!1,F*D.array.BYTES_PER_ELEMENT,(l*F+t)*D.array.BYTES_PER_ELEMENT)}else t instanceof THREE.InstancedBufferAttribute?(I.enableAttributeAndDivisor(r,t.meshPerAttribute,q),void 0===d.maxInstancedCount&&(d.maxInstancedCount=t.meshPerAttribute*t.count)):I.enableAttribute(r),s.bindBuffer(s.ARRAY_BUFFER,x),s.vertexAttribPointer(r,v,s.FLOAT,!1,0,l*v*4)}else if(void 0!==n&&(v=n[p],void 0!==v))switch(v.length){case 2:s.vertexAttrib2fv(r,v);break;case 3:s.vertexAttrib3fv(r,v);break;case 4:s.vertexAttrib4fv(r,
|
|
-v);break;default:s.vertexAttrib1fv(r,v)}}}I.disableUnusedAttributes()}null!==b&&s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,na.getAttributeBuffer(b))}q=Infinity;null!==b?q=b.count:void 0!==c&&(q=c.count);p=d.drawRange.start;b=d.drawRange.count;c=null!==g?g.start:0;l=null!==g?g.count:Infinity;g=Math.max(0,p,c);q=Math.min(0+q,p+b,c+l)-1;q=Math.max(0,q-g+1);if(f instanceof THREE.Mesh){if(!0===e.wireframe)I.setLineWidth(e.wireframeLinewidth*G),a.setMode(s.LINES);else switch(f.mode){case THREE.TrianglesDrawMode:a.setMode(s.TRIANGLES);
|
|
|
|
|
|
+v);break;default:s.vertexAttrib1fv(r,v)}}}I.disableUnusedAttributes()}null!==b&&s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,na.getAttributeBuffer(b))}q=Infinity;null!==b?q=b.count:void 0!==c&&(q=c.count);p=d.drawRange.start;b=d.drawRange.count;c=null!==g?g.start:0;l=null!==g?g.count:Infinity;g=Math.max(0,p,c);q=Math.min(0+q,p+b,c+l)-1;q=Math.max(0,q-g+1);if(f instanceof THREE.Mesh){if(!0===e.wireframe)I.setLineWidth(e.wireframeLinewidth*G),a.setMode(s.LINES);else switch(f.drawMode){case THREE.TrianglesDrawMode:a.setMode(s.TRIANGLES);
|
|
break;case THREE.TriangleStripDrawMode:a.setMode(s.TRIANGLE_STRIP);break;case THREE.TriangleFanDrawMode:a.setMode(s.TRIANGLE_FAN)}d instanceof THREE.InstancedBufferGeometry&&0<d.maxInstancedCount?a.renderInstances(d):a.render(g,q)}else f instanceof THREE.Line?(d=e.linewidth,void 0===d&&(d=1),I.setLineWidth(d*G),f instanceof THREE.LineSegments?a.setMode(s.LINES):a.setMode(s.LINE_STRIP),a.render(g,q)):f instanceof THREE.Points&&(a.setMode(s.POINTS),a.render(g,q))};this.render=function(a,b,c,d){if(!1===
|
|
break;case THREE.TriangleStripDrawMode:a.setMode(s.TRIANGLE_STRIP);break;case THREE.TriangleFanDrawMode:a.setMode(s.TRIANGLE_FAN)}d instanceof THREE.InstancedBufferGeometry&&0<d.maxInstancedCount?a.renderInstances(d):a.render(g,q)}else f instanceof THREE.Line?(d=e.linewidth,void 0===d&&(d=1),I.setLineWidth(d*G),f instanceof THREE.LineSegments?a.setMode(s.LINES):a.setMode(s.LINE_STRIP),a.render(g,q)):f instanceof THREE.Points&&(a.setMode(s.POINTS),a.render(g,q))};this.render=function(a,b,c,d){if(!1===
|
|
b instanceof THREE.Camera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else{var e=a.fog;ka="";pa=-1;ja=null;!0===a.autoUpdate&&a.updateMatrixWorld();null===b.parent&&b.updateMatrixWorld();b.matrixWorldInverse.getInverse(b.matrixWorld);qa.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);ua.setFromMatrix(qa);V.length=0;ma=ea=-1;$.length=0;va.length=0;q(a,b);Y.length=ea+1;aa.length=ma+1;!0===Z.sortObjects&&(Y.sort(m),aa.sort(p));var f=V,g,h,k,l=0,n=
|
|
b instanceof THREE.Camera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else{var e=a.fog;ka="";pa=-1;ja=null;!0===a.autoUpdate&&a.updateMatrixWorld();null===b.parent&&b.updateMatrixWorld();b.matrixWorldInverse.getInverse(b.matrixWorld);qa.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);ua.setFromMatrix(qa);V.length=0;ma=ea=-1;$.length=0;va.length=0;q(a,b);Y.length=ea+1;aa.length=ma+1;!0===Z.sortObjects&&(Y.sort(m),aa.sort(p));var f=V,g,h,k,l=0,n=
|
|
0,t=0,v,u,w,D=b.matrixWorldInverse,F=0,E=0,B=0,z=0;T.shadows=0;g=T.shadowsPointLight=0;for(h=f.length;g<h;g++)if(k=f[g],v=k.color,u=k.intensity,w=k.distance,k instanceof THREE.AmbientLight)l+=v.r,n+=v.g,t+=v.b;else if(k instanceof THREE.DirectionalLight){k.__webglUniforms||(k.__webglUniforms={direction:new THREE.Vector3,color:new THREE.Color});var A=k.__webglUniforms;A.direction.setFromMatrixPosition(k.matrixWorld);W.setFromMatrixPosition(k.target.matrixWorld);A.direction.sub(W);A.direction.transformDirection(D);
|
|
0,t=0,v,u,w,D=b.matrixWorldInverse,F=0,E=0,B=0,z=0;T.shadows=0;g=T.shadowsPointLight=0;for(h=f.length;g<h;g++)if(k=f[g],v=k.color,u=k.intensity,w=k.distance,k instanceof THREE.AmbientLight)l+=v.r,n+=v.g,t+=v.b;else if(k instanceof THREE.DirectionalLight){k.__webglUniforms||(k.__webglUniforms={direction:new THREE.Vector3,color:new THREE.Color});var A=k.__webglUniforms;A.direction.setFromMatrixPosition(k.matrixWorld);W.setFromMatrixPosition(k.target.matrixWorld);A.direction.sub(W);A.direction.transformDirection(D);
|