|
@@ -217,7 +217,7 @@ case THREE.UnsignedShortType:return g.UNSIGNED_SHORT;case THREE.IntType:return g
|
|
|
this.autoClearColor=this.autoClear=!0;this.shadowMapEnabled=this.physicallyBasedShading=this.gammaOutput=this.gammaInput=!1;this.shadowMapCullFrontFaces=this.shadowMapSoft=this.shadowMapAutoUpdate=!0;this.maxMorphTargets=8;this.autoScaleCubemaps=!0;this.renderPluginsPre=[];this.renderPluginsPost=[];this.info={memory:{programs:0,geometries:0,textures:0},render:{calls:0,vertices:0,faces:0,points:0}};var D=this,g,lb=[],Z=null,oa=null,Q=-1,L=null,qa=0,va=null,ba=null,ya=null,Ca=null,Ma=null,mb=null,Sa=
|
|
|
null,Pa=null,Na=null,zb=0,Fb=0,Pb=0,Ab=0,bc=0,cc=0,Gb=new THREE.Frustum,Ta=new THREE.Matrix4,Ua=new THREE.Vector4,Ia=new THREE.Vector3,dc={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[],distances:[]}};g=function(){var a;try{if(!(a=H.getContext("experimental-webgl",{alpha:M,premultipliedAlpha:N,antialias:I,stencil:ia,preserveDrawingBuffer:ua})))throw"Error creating WebGL context.";console.log(navigator.userAgent+" | "+a.getParameter(a.VERSION)+
|
|
|
" | "+a.getParameter(a.VENDOR)+" | "+a.getParameter(a.RENDERER)+" | "+a.getParameter(a.SHADING_LANGUAGE_VERSION))}catch(b){console.error(b)}return a}();g.clearColor(0,0,0,1);g.clearDepth(1);g.clearStencil(0);g.enable(g.DEPTH_TEST);g.depthFunc(g.LEQUAL);g.frontFace(g.CCW);g.cullFace(g.BACK);g.enable(g.CULL_FACE);g.enable(g.BLEND);g.blendEquation(g.FUNC_ADD);g.blendFunc(g.SRC_ALPHA,g.ONE_MINUS_SRC_ALPHA);g.clearColor(S.r,S.g,S.b,$);this.context=g;var ec=g.getParameter(g.MAX_VERTEX_TEXTURE_IMAGE_UNITS);
|
|
|
-g.getParameter(g.TEXTURE_SIZE);var tc=g.getParameter(g.MAX_CUBE_MAP_TEXTURE_SIZE);this.getContext=function(){return g};this.supportsVertexTextures=function(){return 0<ec};this.setSize=function(a,b){H.width=a;H.height=b;this.setViewport(0,0,H.width,H.height)};this.setViewport=function(a,b,c,d){zb=a;Fb=b;Pb=c;Ab=d;g.viewport(zb,Fb,Pb,Ab)};this.setScissor=function(a,b,c,d){g.scissor(a,b,c,d)};this.enableScissorTest=function(a){a?g.enable(g.SCISSOR_TEST):g.disable(g.SCISSOR_TEST)};this.setClearColorHex=
|
|
|
+g.getParameter(g.MAX_TEXTURE_SIZE);var tc=g.getParameter(g.MAX_CUBE_MAP_TEXTURE_SIZE);this.getContext=function(){return g};this.supportsVertexTextures=function(){return 0<ec};this.setSize=function(a,b){H.width=a;H.height=b;this.setViewport(0,0,H.width,H.height)};this.setViewport=function(a,b,c,d){zb=a;Fb=b;Pb=c;Ab=d;g.viewport(zb,Fb,Pb,Ab)};this.setScissor=function(a,b,c,d){g.scissor(a,b,c,d)};this.enableScissorTest=function(a){a?g.enable(g.SCISSOR_TEST):g.disable(g.SCISSOR_TEST)};this.setClearColorHex=
|
|
|
function(a,b){S.setHex(a);$=b;g.clearColor(S.r,S.g,S.b,$)};this.setClearColor=function(a,b){S.copy(a);$=b;g.clearColor(S.r,S.g,S.b,$)};this.getClearColor=function(){return S};this.getClearAlpha=function(){return $};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=g.COLOR_BUFFER_BIT;if(void 0===b||b)d|=g.DEPTH_BUFFER_BIT;if(void 0===c||c)d|=g.STENCIL_BUFFER_BIT;g.clear(d)};this.clearTarget=function(a,b,c,d){this.setRenderTarget(a);this.clear(b,c,d)};this.addPostPlugin=function(a){a.init(this);
|
|
|
this.renderPluginsPost.push(a)};this.addPrePlugin=function(a){a.init(this);this.renderPluginsPre.push(a)};this.deallocateObject=function(a){if(a.__webglInit)if(a.__webglInit=!1,delete a._modelViewMatrix,delete a._normalMatrixArray,delete a._modelViewMatrixArray,delete a._objectMatrixArray,a instanceof THREE.Mesh)for(var b in a.geometry.geometryGroups){var c=a.geometry.geometryGroups[b];g.deleteBuffer(c.__webglVertexBuffer);g.deleteBuffer(c.__webglNormalBuffer);g.deleteBuffer(c.__webglTangentBuffer);
|
|
|
g.deleteBuffer(c.__webglColorBuffer);g.deleteBuffer(c.__webglUVBuffer);g.deleteBuffer(c.__webglUV2Buffer);g.deleteBuffer(c.__webglSkinVertexABuffer);g.deleteBuffer(c.__webglSkinVertexBBuffer);g.deleteBuffer(c.__webglSkinIndicesBuffer);g.deleteBuffer(c.__webglSkinWeightsBuffer);g.deleteBuffer(c.__webglFaceBuffer);g.deleteBuffer(c.__webglLineBuffer);if(c.numMorphTargets)for(var d=0,e=c.numMorphTargets;d<e;d++)g.deleteBuffer(c.__webglMorphTargetsBuffers[d]);if(c.__webglCustomAttributesList)for(d in d=
|