diff --git a/backend/proteins/templates/proteins/_structure_section.html b/backend/proteins/templates/proteins/_structure_section.html index c71755f3c..96bc3c289 100644 --- a/backend/proteins/templates/proteins/_structure_section.html +++ b/backend/proteins/templates/proteins/_structure_section.html @@ -1,11 +1,11 @@
=0){H.bindBuffer(H.ARRAY_BUFFER,m.buffer);W.enableAttribute(l[m.buffer.belongsToAttribute]);H.vertexAttribPointer(l[m.buffer.belongsToAttribute],m.size,H.FLOAT,false,0,0)}}}if(l.color>=0){if(s.geometry.colors.length>0||s.geometry.faces.length>0){H.bindBuffer(H.ARRAY_BUFFER,o.__webglColorBuffer);W.enableAttribute(l.color);H.vertexAttribPointer(l.color,3,H.FLOAT,false,0,0)}else if(a.defaultAttributeValues!==undefined){H.vertexAttrib3fv(l.color,a.defaultAttributeValues.color)}}if(l.normal>=0){H.bindBuffer(H.ARRAY_BUFFER,o.__webglNormalBuffer);W.enableAttribute(l.normal);H.vertexAttribPointer(l.normal,3,H.FLOAT,false,0,0)}if(l.tangent>=0){H.bindBuffer(H.ARRAY_BUFFER,o.__webglTangentBuffer);W.enableAttribute(l.tangent);H.vertexAttribPointer(l.tangent,4,H.FLOAT,false,0,0)}if(l.uv>=0){if(s.geometry.faceVertexUvs[0]){H.bindBuffer(H.ARRAY_BUFFER,o.__webglUVBuffer);W.enableAttribute(l.uv);H.vertexAttribPointer(l.uv,2,H.FLOAT,false,0,0)}else if(a.defaultAttributeValues!==undefined){H.vertexAttrib2fv(l.uv,a.defaultAttributeValues.uv)}}if(l.uv2>=0){if(s.geometry.faceVertexUvs[1]){H.bindBuffer(H.ARRAY_BUFFER,o.__webglUV2Buffer);W.enableAttribute(l.uv2);H.vertexAttribPointer(l.uv2,2,H.FLOAT,false,0,0)}else if(a.defaultAttributeValues!==undefined){H.vertexAttrib2fv(l.uv2,a.defaultAttributeValues.uv2)}}if(a.skinning&&l.skinIndex>=0&&l.skinWeight>=0){H.bindBuffer(H.ARRAY_BUFFER,o.__webglSkinIndicesBuffer);W.enableAttribute(l.skinIndex);H.vertexAttribPointer(l.skinIndex,4,H.FLOAT,false,0,0);H.bindBuffer(H.ARRAY_BUFFER,o.__webglSkinWeightsBuffer);W.enableAttribute(l.skinWeight);H.vertexAttribPointer(l.skinWeight,4,H.FLOAT,false,0,0)}if(l.lineDistance>=0){H.bindBuffer(H.ARRAY_BUFFER,o.__webglLineDistanceBuffer);W.enableAttribute(l.lineDistance);H.vertexAttribPointer(l.lineDistance,1,H.FLOAT,false,0,0)}}W.disableUnusedAttributes();if(s instanceof e.Mesh){var v=o.__typeArray===Uint32Array?H.UNSIGNED_INT:H.UNSIGNED_SHORT;if(a.wireframe){W.setLineWidth(a.wireframeLinewidth*i);if(c)H.bindBuffer(H.ELEMENT_ARRAY_BUFFER,o.__webglLineBuffer);H.drawElements(H.LINES,o.__webglLineCount,v,0)}else{if(c)H.bindBuffer(H.ELEMENT_ARRAY_BUFFER,o.__webglFaceBuffer);H.drawElements(H.TRIANGLES,o.__webglFaceCount,v,0)}w.info.render.calls++;w.info.render.vertices+=o.__webglFaceCount;w.info.render.faces+=o.__webglFaceCount/3}else if(s instanceof e.Line){var y=s.mode===e.LineStrip?H.LINE_STRIP:H.LINES;W.setLineWidth(a.linewidth*i);H.drawArrays(y,0,o.__webglLineCount);w.info.render.calls++}else if(s instanceof e.PointCloud){H.drawArrays(H.POINTS,0,o.__webglParticleCount);w.info.render.calls++;w.info.render.points+=o.__webglParticleCount}};function Le(e,t,r){var n=e.program.attributes;if(r.morphTargetBase!==-1&&n.position>=0){H.bindBuffer(H.ARRAY_BUFFER,t.__webglMorphTargetsBuffers[r.morphTargetBase]);W.enableAttribute(n.position);H.vertexAttribPointer(n.position,3,H.FLOAT,false,0,0)}else if(n.position>=0){H.bindBuffer(H.ARRAY_BUFFER,t.__webglVertexBuffer);W.enableAttribute(n.position);H.vertexAttribPointer(n.position,3,H.FLOAT,false,0,0)}if(r.morphTargetForcedOrder.length){var i=0;var a=r.morphTargetForcedOrder;var o=r.morphTargetInfluences;var s;while(i -1){H.compressedTexImage2D(H.TEXTURE_CUBE_MAP_POSITIVE_X+o,d,l,f.width,f.height,0,f.data)}else{e.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setCubeTexture()")}}else{H.texImage2D(H.TEXTURE_CUBE_MAP_POSITIVE_X+o,d,l,f.width,f.height,0,l,c,f.data)}}}}if(t.generateMipmaps&&u){H.generateMipmap(H.TEXTURE_CUBE_MAP)}t.needsUpdate=false;if(t.onUpdate)t.onUpdate()}else{H.activeTexture(H.TEXTURE0+r);H.bindTexture(H.TEXTURE_CUBE_MAP,t.image.__webglTextureCube)}}}function St(e,t){H.activeTexture(H.TEXTURE0+t);H.bindTexture(H.TEXTURE_CUBE_MAP,e.__webglTexture)}function Tt(e,t,r){H.bindFramebuffer(H.FRAMEBUFFER,e);H.framebufferTexture2D(H.FRAMEBUFFER,H.COLOR_ATTACHMENT0,r,t.__webglTexture,0)}function Mt(e,t){H.bindRenderbuffer(H.RENDERBUFFER,e);if(t.depthBuffer&&!t.stencilBuffer){H.renderbufferStorage(H.RENDERBUFFER,H.DEPTH_COMPONENT16,t.width,t.height);H.framebufferRenderbuffer(H.FRAMEBUFFER,H.DEPTH_ATTACHMENT,H.RENDERBUFFER,e)}else if(t.depthBuffer&&t.stencilBuffer){H.renderbufferStorage(H.RENDERBUFFER,H.DEPTH_STENCIL,t.width,t.height);H.framebufferRenderbuffer(H.FRAMEBUFFER,H.DEPTH_STENCIL_ATTACHMENT,H.RENDERBUFFER,e)}else{H.renderbufferStorage(H.RENDERBUFFER,H.RGBA4,t.width,t.height)}}this.setRenderTarget=function(t){var r=t instanceof e.WebGLRenderTargetCube;if(t&&t.__webglFramebuffer===undefined){if(t.depthBuffer===undefined)t.depthBuffer=true;if(t.stencilBuffer===undefined)t.stencilBuffer=true;t.addEventListener("dispose",ge);t.__webglTexture=H.createTexture();w.info.memory.textures++;var n=e.Math.isPowerOfTwo(t.width)&&e.Math.isPowerOfTwo(t.height),i=Rt(t.format),a=Rt(t.type);if(r){t.__webglFramebuffer=[];t.__webglRenderbuffer=[];H.bindTexture(H.TEXTURE_CUBE_MAP,t.__webglTexture);wt(H.TEXTURE_CUBE_MAP,t,n);for(var o=0;o<6;o++){t.__webglFramebuffer[o]=H.createFramebuffer();t.__webglRenderbuffer[o]=H.createRenderbuffer();H.texImage2D(H.TEXTURE_CUBE_MAP_POSITIVE_X+o,0,i,t.width,t.height,0,i,a,null);Tt(t.__webglFramebuffer[o],t,H.TEXTURE_CUBE_MAP_POSITIVE_X+o);Mt(t.__webglRenderbuffer[o],t)}if(n)H.generateMipmap(H.TEXTURE_CUBE_MAP)}else{t.__webglFramebuffer=H.createFramebuffer();if(t.shareDepthFrom){t.__webglRenderbuffer=t.shareDepthFrom.__webglRenderbuffer}else{t.__webglRenderbuffer=H.createRenderbuffer()}H.bindTexture(H.TEXTURE_2D,t.__webglTexture);wt(H.TEXTURE_2D,t,n);H.texImage2D(H.TEXTURE_2D,0,i,t.width,t.height,0,i,a,null);Tt(t.__webglFramebuffer,t,H.TEXTURE_2D);if(t.shareDepthFrom){if(t.depthBuffer&&!t.stencilBuffer){H.framebufferRenderbuffer(H.FRAMEBUFFER,H.DEPTH_ATTACHMENT,H.RENDERBUFFER,t.__webglRenderbuffer)}else if(t.depthBuffer&&t.stencilBuffer){H.framebufferRenderbuffer(H.FRAMEBUFFER,H.DEPTH_STENCIL_ATTACHMENT,H.RENDERBUFFER,t.__webglRenderbuffer)}}else{Mt(t.__webglRenderbuffer,t)}if(n)H.generateMipmap(H.TEXTURE_2D)}if(r){H.bindTexture(H.TEXTURE_CUBE_MAP,null)}else{H.bindTexture(H.TEXTURE_2D,null)}H.bindRenderbuffer(H.RENDERBUFFER,null);H.bindFramebuffer(H.FRAMEBUFFER,null)}var s,u,l,c,f;if(t){if(r){s=t.__webglFramebuffer[t.activeCubeFace]}else{s=t.__webglFramebuffer}u=t.width;l=t.height;c=0;f=0}else{s=null;u=I;l=D;c=R;f=k}if(s!==S){H.bindFramebuffer(H.FRAMEBUFFER,s);H.viewport(c,f,u,l);S=s}B=u;L=l};this.readRenderTargetPixels=function(t,r,n,i,a,o){if(!(t instanceof e.WebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}if(t.__webglFramebuffer){if(t.format!==e.RGBAFormat){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA format. readPixels can read only RGBA format.");return}var s=false;if(t.__webglFramebuffer!==S){H.bindFramebuffer(H.FRAMEBUFFER,t.__webglFramebuffer);s=true}if(H.checkFramebufferStatus(H.FRAMEBUFFER)===H.FRAMEBUFFER_COMPLETE){H.readPixels(r,n,i,a,H.RGBA,H.UNSIGNED_BYTE,o)}else{console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}if(s){H.bindFramebuffer(H.FRAMEBUFFER,S)}}};function At(t){if(t instanceof e.WebGLRenderTargetCube){H.bindTexture(H.TEXTURE_CUBE_MAP,t.__webglTexture);H.generateMipmap(H.TEXTURE_CUBE_MAP);H.bindTexture(H.TEXTURE_CUBE_MAP,null)}else{H.bindTexture(H.TEXTURE_2D,t.__webglTexture);H.generateMipmap(H.TEXTURE_2D);H.bindTexture(H.TEXTURE_2D,null)}}function Pt(t){if(t===e.NearestFilter||t===e.NearestMipMapNearestFilter||t===e.NearestMipMapLinearFilter){return H.NEAREST}return H.LINEAR}function Rt(t){var r;if(t===e.RepeatWrapping)return H.REPEAT;if(t===e.ClampToEdgeWrapping)return H.CLAMP_TO_EDGE;if(t===e.MirroredRepeatWrapping)return H.MIRRORED_REPEAT;if(t===e.NearestFilter)return H.NEAREST;if(t===e.NearestMipMapNearestFilter)return H.NEAREST_MIPMAP_NEAREST;if(t===e.NearestMipMapLinearFilter)return H.NEAREST_MIPMAP_LINEAR;if(t===e.LinearFilter)return H.LINEAR;if(t===e.LinearMipMapNearestFilter)return H.LINEAR_MIPMAP_NEAREST;if(t===e.LinearMipMapLinearFilter)return H.LINEAR_MIPMAP_LINEAR;if(t===e.UnsignedByteType)return H.UNSIGNED_BYTE;if(t===e.UnsignedShort4444Type)return H.UNSIGNED_SHORT_4_4_4_4;if(t===e.UnsignedShort5551Type)return H.UNSIGNED_SHORT_5_5_5_1;if(t===e.UnsignedShort565Type)return H.UNSIGNED_SHORT_5_6_5;if(t===e.ByteType)return H.BYTE;if(t===e.ShortType)return H.SHORT;if(t===e.UnsignedShortType)return H.UNSIGNED_SHORT;if(t===e.IntType)return H.INT;if(t===e.UnsignedIntType)return H.UNSIGNED_INT;if(t===e.FloatType)return H.FLOAT;r=q.get("OES_texture_half_float");if(r!==null){if(t===e.HalfFloatType)return r.HALF_FLOAT_OES}if(t===e.AlphaFormat)return H.ALPHA;if(t===e.RGBFormat)return H.RGB;if(t===e.RGBAFormat)return H.RGBA;if(t===e.LuminanceFormat)return H.LUMINANCE;if(t===e.LuminanceAlphaFormat)return H.LUMINANCE_ALPHA;if(t===e.AddEquation)return H.FUNC_ADD;if(t===e.SubtractEquation)return H.FUNC_SUBTRACT;if(t===e.ReverseSubtractEquation)return H.FUNC_REVERSE_SUBTRACT;if(t===e.ZeroFactor)return H.ZERO;if(t===e.OneFactor)return H.ONE;if(t===e.SrcColorFactor)return H.SRC_COLOR;if(t===e.OneMinusSrcColorFactor)return H.ONE_MINUS_SRC_COLOR;if(t===e.SrcAlphaFactor)return H.SRC_ALPHA;if(t===e.OneMinusSrcAlphaFactor)return H.ONE_MINUS_SRC_ALPHA;if(t===e.DstAlphaFactor)return H.DST_ALPHA;if(t===e.OneMinusDstAlphaFactor)return H.ONE_MINUS_DST_ALPHA;if(t===e.DstColorFactor)return H.DST_COLOR;if(t===e.OneMinusDstColorFactor)return H.ONE_MINUS_DST_COLOR;if(t===e.SrcAlphaSaturateFactor)return H.SRC_ALPHA_SATURATE;r=q.get("WEBGL_compressed_texture_s3tc");if(r!==null){if(t===e.RGB_S3TC_DXT1_Format)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(t===e.RGBA_S3TC_DXT1_Format)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(t===e.RGBA_S3TC_DXT3_Format)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(t===e.RGBA_S3TC_DXT5_Format)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}r=q.get("WEBGL_compressed_texture_pvrtc");if(r!==null){if(t===e.RGB_PVRTC_4BPPV1_Format)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(t===e.RGB_PVRTC_2BPPV1_Format)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(t===e.RGBA_PVRTC_4BPPV1_Format)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(t===e.RGBA_PVRTC_2BPPV1_Format)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}r=q.get("EXT_blend_minmax");if(r!==null){if(t===e.MinEquation)return r.MIN_EXT;if(t===e.MaxEquation)return r.MAX_EXT}return 0}function kt(t){if(te&&t&&t.skeleton&&t.skeleton.useVertexTexture){return 1024}else{var r=H.getParameter(H.MAX_VERTEX_UNIFORM_VECTORS);var n=Math.floor((r-20)/4);var i=n;if(t!==undefined&&t instanceof e.SkinnedMesh){i=Math.min(t.skeleton.bones.length,i);if(ir){i[d].counter+=1;n=i[d].hash+"_"+i[d].counter;if(!(n in u)){s={id:qe++,faces3:[],materialIndex:d,vertices:0,numMorphTargets:a,numMorphNormals:o};u[n]=s;l.push(s)}}u[n].faces3.push(c);u[n].vertices+=3}return l}function Ye(t,r){var n=t.material,i=false;if(We[r.id]===undefined||r.groupsNeedUpdate===true){delete v[t.id];We[r.id]=Xe(r,n instanceof e.MeshFaceMaterial);r.groupsNeedUpdate=false}var a=We[r.id];for(var o=0,s=a.length;o=0;r--){if(e[r].object===t){e.splice(r,1)}}}var rt={MeshDepthMaterial:"depth",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointCloudMaterial:"particle_basic"};function nt(t,r,n,i){t.addEventListener("dispose",be);var o=rt[t.type];if(o){var s=e.ShaderLib[o];t.__webglShader={uniforms:e.UniformsUtils.clone(s.uniforms),vertexShader:s.vertexShader,fragmentShader:s.fragmentShader}}else{t.__webglShader={uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader}}var u=It(r);var l=Dt(r);var c=kt(i);var f={precision:a,supportsVertexTextures:ee,map:!!t.map,envMap:!!t.envMap,envMapMode:t.envMap&&t.envMap.mapping,lightMap:!!t.lightMap,bumpMap:!!t.bumpMap,normalMap:!!t.normalMap,specularMap:!!t.specularMap,alphaMap:!!t.alphaMap,combine:t.combine,vertexColors:t.vertexColors,fog:n,useFog:t.fog,fogExp:n instanceof e.FogExp2,flatShading:t.shading===e.FlatShading,sizeAttenuation:t.sizeAttenuation,logarithmicDepthBuffer:h,skinning:t.skinning,maxBones:c,useVertexTexture:te&&i&&i.skeleton&&i.skeleton.useVertexTexture,morphTargets:t.morphTargets,morphNormals:t.morphNormals,maxMorphTargets:w.maxMorphTargets,maxMorphNormals:w.maxMorphNormals,maxDirLights:u.directional,maxPointLights:u.point,maxSpotLights:u.spot,maxHemiLights:u.hemi,maxShadows:l,shadowMapEnabled:w.shadowMapEnabled&&i.receiveShadow&&l>0,shadowMapType:w.shadowMapType,shadowMapDebug:w.shadowMapDebug,shadowMapCascade:w.shadowMapCascade,alphaTest:t.alphaTest,metal:t.metal,wrapAround:t.wrapAround,doubleSided:t.side===e.DoubleSide,flipSided:t.side===e.BackSide};var d=[];if(o){d.push(o)}else{d.push(t.fragmentShader);d.push(t.vertexShader)}if(t.defines!==undefined){for(var p in t.defines){d.push(p);d.push(t.defines[p])}}for(var p in f){d.push(p);d.push(f[p])}var m=d.join();var v;for(var y=0,g=C.length;y0){y=n[n.length-1];m=y.x;v=y.y}else{y=this.actions[i-1].args;m=y[y.length-2];v=y[y.length-1]}for(g=1;g<=t;g++){b=g/t;x=e.Shape.Utils.b2(b,m,d,l);_=e.Shape.Utils.b2(b,v,p,c);n.push(new e.Vector2(x,_))}break;case e.PathActions.BEZIER_CURVE_TO:l=u[4];c=u[5];d=u[0];p=u[1];f=u[2];h=u[3];if(n.length>0){y=n[n.length-1];m=y.x;v=y.y}else{y=this.actions[i-1].args;m=y[y.length-2];v=y[y.length-1]}for(g=1;g<=t;g++){b=g/t;x=e.Shape.Utils.b3(b,m,d,f,l);_=e.Shape.Utils.b3(b,v,p,h,c);n.push(new e.Vector2(x,_))}break;case e.PathActions.CSPLINE_THRU:y=this.actions[i-1].args;var w=new e.Vector2(y[y.length-2],y[y.length-1]);var C=[w];var E=t*u[0].length;C=C.concat(u[0]);var S=new e.SplineCurve(C);for(g=1;g<=E;g++){n.push(S.getPointAt(g/E))}break;case e.PathActions.ARC:var T=u[0],M=u[1],A=u[2],P=u[3],R=u[4],k=!!u[5];var I=R-P;var D;var B=t*2;for(g=1;g<=B;g++){b=g/B;if(!k){b=1-b}D=P+b*I;x=T+A*Math.cos(D);_=M+A*Math.sin(D);n.push(new e.Vector2(x,_))}break;case e.PathActions.ELLIPSE:var T=u[0],M=u[1],L=u[2],F=u[3],P=u[4],R=u[5],k=!!u[6];var I=R-P;var D;var B=t*2;for(g=1;g<=B;g++){b=g/B;if(!k){b=1-b}D=P+b*I;x=T+L*Math.cos(D);_=M+F*Math.sin(D);n.push(new e.Vector2(x,_))}break}}var V=n[n.length-1];var O=1e-10;if(Math.abs(V.x-n[0].x).99999){this.quaternion.set(0,0,0,1)}else if(e.y<-.99999){this.quaternion.set(1,0,0,0)}else{t.set(e.z,0,-e.x).normalize();r=Math.acos(e.y);this.quaternion.setFromAxisAngle(t,r)}}}();e.ArrowHelper.prototype.setLength=function(e,t,r){if(t===undefined)t=.2*e;if(r===undefined)r=.2*t;this.line.scale.set(1,e-t,1);this.line.updateMatrix();this.cone.scale.set(r,t,r);this.cone.position.y=e;this.cone.updateMatrix()};e.ArrowHelper.prototype.setColor=function(e){this.line.material.color.set(e);this.cone.material.color.set(e)};e.BoxHelper=function(t){var r=new e.BufferGeometry;r.addAttribute("position",new e.BufferAttribute(new Float32Array(72),3));e.Line.call(this,r,new e.LineBasicMaterial({color:16776960}),e.LinePieces);if(t!==undefined){this.update(t)}};e.BoxHelper.prototype=Object.create(e.Line.prototype);e.BoxHelper.prototype.constructor=e.BoxHelper;e.BoxHelper.prototype.update=function(e){var t=e.geometry;if(t.boundingBox===null){t.computeBoundingBox()}var r=t.boundingBox.min;var n=t.boundingBox.max;var i=this.geometry.attributes.position.array;i[0]=n.x;i[1]=n.y;i[2]=n.z;i[3]=r.x;i[4]=n.y;i[5]=n.z;i[6]=r.x;i[7]=n.y;i[8]=n.z;i[9]=r.x;i[10]=r.y;i[11]=n.z;i[12]=r.x;i[13]=r.y;i[14]=n.z;i[15]=n.x;i[16]=r.y;i[17]=n.z;i[18]=n.x;i[19]=r.y;i[20]=n.z;i[21]=n.x;i[22]=n.y;i[23]=n.z;i[24]=n.x;i[25]=n.y;i[26]=r.z;i[27]=r.x;i[28]=n.y;i[29]=r.z;i[30]=r.x;i[31]=n.y;i[32]=r.z;i[33]=r.x;i[34]=r.y;i[35]=r.z;i[36]=r.x;i[37]=r.y;i[38]=r.z;i[39]=n.x;i[40]=r.y;i[41]=r.z;i[42]=n.x;i[43]=r.y;i[44]=r.z;i[45]=n.x;i[46]=n.y;i[47]=r.z;i[48]=n.x;i[49]=n.y;i[50]=n.z;i[51]=n.x;i[52]=n.y;i[53]=r.z;i[54]=r.x;i[55]=n.y;i[56]=n.z;i[57]=r.x;i[58]=n.y;i[59]=r.z;i[60]=r.x;i[61]=r.y;i[62]=n.z;i[63]=r.x;i[64]=r.y;i[65]=r.z;i[66]=n.x;i[67]=r.y;i[68]=n.z;i[69]=n.x;i[70]=r.y;i[71]=r.z;this.geometry.attributes.position.needsUpdate=true;this.geometry.computeBoundingSphere();this.matrix=e.matrixWorld;this.matrixAutoUpdate=false};e.BoundingBoxHelper=function(t,r){var n=r!==undefined?r:8947848;this.object=t;this.box=new e.Box3;e.Mesh.call(this,new e.BoxGeometry(1,1,1),new e.MeshBasicMaterial({color:n,wireframe:true}))};e.BoundingBoxHelper.prototype=Object.create(e.Mesh.prototype);e.BoundingBoxHelper.prototype.constructor=e.BoundingBoxHelper;e.BoundingBoxHelper.prototype.update=function(){this.box.setFromObject(this.object);this.box.size(this.scale);this.box.center(this.position)};e.CameraHelper=function(t){var r=new e.Geometry;var n=new e.LineBasicMaterial({color:16777215,vertexColors:e.FaceColors});var i={};var a=16755200;var o=16711680;var s=43775;var u=16777215;var l=3355443;c("n1","n2",a);c("n2","n4",a);c("n4","n3",a);c("n3","n1",a);c("f1","f2",a);c("f2","f4",a);c("f4","f3",a);c("f3","f1",a);c("n1","f1",a);c("n2","f2",a);c("n3","f3",a);c("n4","f4",a);c("p","n1",o);c("p","n2",o);c("p","n3",o);c("p","n4",o);c("u1","u2",s);c("u2","u3",s);c("u3","u1",s);c("c","t",u);c("p","c",l);c("cn1","cn2",l);c("cn3","cn4",l);c("cf1","cf2",l);c("cf3","cf4",l);function c(e,t,r){f(e,r);f(t,r)}function f(t,n){r.vertices.push(new e.Vector3);r.colors.push(new e.Color(n));if(i[t]===undefined){i[t]=[]}i[t].push(r.vertices.length-1)}e.Line.call(this,r,n,e.LinePieces);this.camera=t;this.matrix=t.matrixWorld;this.matrixAutoUpdate=false;this.pointMap=i;this.update()};e.CameraHelper.prototype=Object.create(e.Line.prototype);e.CameraHelper.prototype.constructor=e.CameraHelper;e.CameraHelper.prototype.update=function(){var t,r;var n=new e.Vector3;var i=new e.Camera;var a=function(e,a,o,s){n.set(a,o,s).unproject(i);var u=r[e];if(u!==undefined){for(var l=0,c=u.length;l=wt){return ft(e,h,l,s,p)}if(c&&!p&&h.length===2&&st(h[f^1])){return h[f^1]}if(c&&p&&h.length===1&&st(p)){return p}var m=e&&e===this.ownerID;var y=c?p?l:l^u:l|u;var x=c?p?gt(h,f,p,m):xt(h,f,m):bt(h,f,p,m);if(m){this.bitmap=y;this.nodes=x;return this}return new Ke(e,y,x)};function Qe(e,t,r){this.ownerID=e;this.count=t;this.nodes=r}Qe.prototype.get=function(e,t,r,n){if(t===undefined){t=Ae(r)}var i=(e===0?t:t>>>e)&g;var a=this.nodes[i];return a?a.get(e+v,t,r,n):n};Qe.prototype.update=function(e,t,r,n,i,a,o){if(r===undefined){r=Ae(n)}var s=(t===0?r:r>>>t)&g;var u=i===b;var l=this.nodes;var c=l[s];if(u&&!c){return this}var f=ot(c,e,t+v,r,n,i,a,o);if(f===c){return this}var h=this.count;if(!c){h++}else if(!f){h--;if(h>>=1}return t}function I(e,t){this.input=e;this.b=this.c=0;this.i={};t&&(t.flags&&(this.i=t.flags),"string"===typeof t.filename&&(this.filename=t.filename),"string"===typeof t.comment&&(this.A=t.comment),t.deflateOptions&&(this.l=t.deflateOptions));this.l||(this.l={})}I.prototype.g=function(){var e,r,n,i,o,s,u,l,c=new(a?Uint8Array:Array)(32768),f=0,h=this.input,p=this.c,m=this.filename,v=this.A;c[f++]=31;c[f++]=139;c[f++]=8;e=0;this.i.fname&&(e|=L);this.i.fcomment&&(e|=F);this.i.fhcrc&&(e|=B);c[f++]=e;r=(Date.now?Date.now():+new Date)/1e3|0;c[f++]=r&255;c[f++]=r>>>8&255;c[f++]=r>>>16&255;c[f++]=r>>>24&255;c[f++]=0;c[f++]=D;if(this.i.fname!==t){u=0;for(l=m.length;u=i&&(this.b=n,r=this.f(),n=this.b);for(;u--;)r[n]=r[n++-s]}for(;8<=this.e;)this.e-=8,this.c--;this.b=n};V.prototype.T=function(e,t){var r=this.a,n=this.b;this.C=e;for(var i=r.length,a,o,s,u;256!==(a=oe(this,e));)if(256>a)n>=i&&(r=this.f(),i=r.length),r[n++]=a;else{o=a-257;u=G[o];0
i&&(r=this.f(),i=r.length);for(;u--;)r[n]=r[n++-s]}for(;8<=this.e;)this.e-=8,this.c--;this.b=n};V.prototype.f=function(){var e=new(a?Uint8Array:Array)(this.b-32768),t=this.b-32768,r,n,i=this.a;if(a)e.set(i.subarray(32768,e.length));else{r=0;for(n=e.length;r