MCPcopy Index your code
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / y

Function y

assets/js/space-wrap.js:123–125  ·  view source on GitHub ↗
(c,g,h)

Source from the content-addressed store, hash-verified

121b.version&&h.__version!==b.version){F(h,b);c.activeTexture(33984+g);c.bindTexture(34067,h.__webglTexture);a.pixelStorei(37440,b.flipY);g=b&&b.isCompressedTexture;for(var k=b.image[0]&&b.image[0].isDataTexture,t=[],r=0;6>r;r++)t[r]=g||k?k?b.image[r].image:b.image[r]:l(b.image[r],!1,!0,e.maxCubemapSize);var u=t[0],n=m(u)||e.isWebGL2,w=f.convert(b.format),x=f.convert(b.type),G=v(w,x);y(34067,b,n);for(r=0;6>r;r++)if(g)for(var S,ha=t[r].mipmaps,z=0,ua=ha.length;z<ua;z++)S=ha[z],1023!==b.format&&1022!==
122b.format?-1<c.getCompressedTextureFormats().indexOf(w)?c.compressedTexImage2D(34069+r,z,G,S.width,S.height,0,S.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):c.texImage2D(34069+r,z,G,S.width,S.height,0,w,x,S.data);else k?c.texImage2D(34069+r,0,G,t[r].width,t[r].height,0,w,x,t[r].data):c.texImage2D(34069+r,0,G,w,x,t[r]);h.__maxMipLevel=g?ha.length-1:0;q(b,n)&&p(34067,b,u.width,u.height);h.__version=b.version;if(b.onUpdate)b.onUpdate(b)}else c.activeTexture(33984+
123g),c.bindTexture(34067,h.__webglTexture)}function x(a,b){c.activeTexture(33984+b);c.bindTexture(34067,d.get(a).__webglTexture)}function y(c,g,h){h?(a.texParameteri(c,10242,f.convert(g.wrapS)),a.texParameteri(c,10243,f.convert(g.wrapT)),32879!==c&&35866!==c||a.texParameteri(c,32882,f.convert(g.wrapR)),a.texParameteri(c,10240,f.convert(g.magFilter)),a.texParameteri(c,10241,f.convert(g.minFilter))):(a.texParameteri(c,10242,33071),a.texParameteri(c,10243,33071),32879!==c&&35866!==c||a.texParameteri(c,
12432882,33071),1001===g.wrapS&&1001===g.wrapT||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),a.texParameteri(c,10240,k(g.magFilter)),a.texParameteri(c,10241,k(g.minFilter)),1003!==g.minFilter&&1006!==g.minFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter."));!(h=b.get("EXT_texture_filter_anisotropic"))||1015===
125g.type&&null===b.get("OES_texture_float_linear")||1016===g.type&&null===(e.isWebGL2||b.get("OES_texture_half_float_linear"))||!(1<g.anisotropy||d.get(g).__currentAnisotropy)||(a.texParameterf(c,h.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(g.anisotropy,e.getMaxAnisotropy())),d.get(g).__currentAnisotropy=g.anisotropy)}function F(b,c){void 0===b.__webglInit&&(b.__webglInit=!0,c.addEventListener("dispose",r),b.__webglTexture=a.createTexture(),g.memory.textures++)}function G(b,d,g){var h=3553;d.isDataTexture2DArray&&
126(h=35866);d.isDataTexture3D&&(h=32879);F(b,d);c.activeTexture(33984+g);c.bindTexture(h,b.__webglTexture);a.pixelStorei(37440,d.flipY);a.pixelStorei(37441,d.premultiplyAlpha);a.pixelStorei(3317,d.unpackAlignment);g=e.isWebGL2?!1:1001!==d.wrapS||1001!==d.wrapT||1003!==d.minFilter&&1006!==d.minFilter;g=g&&!1===m(d.image);g=l(d.image,g,!1,e.maxTextureSize);var k=m(g)||e.isWebGL2,r=f.convert(d.format),t=f.convert(d.type),u=v(r,t);y(h,d,k);var n=d.mipmaps;if(d.isDepthTexture){u=6402;if(1015===d.type){if(!e.isWebGL2)throw Error("Float Depth Texture only supported in WebGL2.0");
127u=36012}else e.isWebGL2&&(u=33189);1026===d.format&&6402===u&&1012!==d.type&&1014!==d.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),d.type=1012,t=f.convert(d.type));1027===d.format&&(u=34041,1020!==d.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),d.type=1020,t=f.convert(d.type)));c.texImage2D(3553,0,u,g.width,g.height,0,r,t,null)}else if(d.isDataTexture)if(0<n.length&&k){for(var w=
1280,x=n.length;w<x;w++)h=n[w],c.texImage2D(3553,w,u,h.width,h.height,0,r,t,h.data);d.generateMipmaps=!1;b.__maxMipLevel=n.length-1}else c.texImage2D(3553,0,u,g.width,g.height,0,r,t,g.data),b.__maxMipLevel=0;else if(d.isCompressedTexture){w=0;for(x=n.length;w<x;w++)h=n[w],1023!==d.format&&1022!==d.format?-1<c.getCompressedTextureFormats().indexOf(r)?c.compressedTexImage2D(3553,w,u,h.width,h.height,0,h.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):

Callers 3

zFunction · 0.70
GFunction · 0.70
fhFunction · 0.70

Calls 1

kFunction · 0.70

Tested by

no test coverage detected