MCPcopy
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / G

Function G

assets/js/space-wrap.js:125–130  ·  view source on GitHub ↗
(b,d,g)

Source from the content-addressed store, hash-verified

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()"):
129c.texImage2D(3553,w,u,h.width,h.height,0,r,t,h.data);b.__maxMipLevel=n.length-1}else if(d.isDataTexture2DArray)c.texImage3D(35866,0,u,g.width,g.height,g.depth,0,r,t,g.data),b.__maxMipLevel=0;else if(d.isDataTexture3D)c.texImage3D(32879,0,u,g.width,g.height,g.depth,0,r,t,g.data),b.__maxMipLevel=0;else if(0<n.length&&k){w=0;for(x=n.length;w<x;w++)h=n[w],c.texImage2D(3553,w,u,r,t,h);d.generateMipmaps=!1;b.__maxMipLevel=n.length-1}else c.texImage2D(3553,0,u,r,t,g),b.__maxMipLevel=0;q(d,k)&&p(3553,d,g.width,
130g.height);b.__version=d.version;if(d.onUpdate)d.onUpdate(d)}function ua(b,e,g,h){var l=f.convert(e.texture.format),m=f.convert(e.texture.type),q=v(l,m);c.texImage2D(h,0,q,e.width,e.height,0,l,m,null);a.bindFramebuffer(36160,b);a.framebufferTexture2D(36160,g,h,d.get(e.texture).__webglTexture,0);a.bindFramebuffer(36160,null)}function pa(b,c,d){a.bindRenderbuffer(36161,b);if(c.depthBuffer&&!c.stencilBuffer)d?(d=I(c),a.renderbufferStorageMultisample(36161,d,33189,c.width,c.height)):a.renderbufferStorage(36161,
13133189,c.width,c.height),a.framebufferRenderbuffer(36160,36096,36161,b);else if(c.depthBuffer&&c.stencilBuffer)d?(d=I(c),a.renderbufferStorageMultisample(36161,d,34041,c.width,c.height)):a.renderbufferStorage(36161,34041,c.width,c.height),a.framebufferRenderbuffer(36160,33306,36161,b);else{b=f.convert(c.texture.format);var e=f.convert(c.texture.type);b=v(b,e);d?(d=I(c),a.renderbufferStorageMultisample(36161,d,b,c.width,c.height)):a.renderbufferStorage(36161,b,c.width,c.height)}a.bindRenderbuffer(36161,
132null)}function I(a){return e.isWebGL2&&a.isWebGLMultisampleRenderTarget?Math.min(e.maxSamples,a.samples):0}var C={},E,D="undefined"!==typeof OffscreenCanvas,B=0,J=!1,A=!1;this.allocateTextureUnit=function(){var a=B;a>=e.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+a+" texture units while this GPU supports only "+e.maxTextures);B+=1;return a};this.resetTextureUnits=function(){B=0};this.setTexture2D=n;this.setTexture2DArray=function(a,b){var e=d.get(a);0<a.version&&e.__version!==
133a.version?G(e,a,b):(c.activeTexture(33984+b),c.bindTexture(35866,e.__webglTexture))};this.setTexture3D=function(a,b){var e=d.get(a);0<a.version&&e.__version!==a.version?G(e,a,b):(c.activeTexture(33984+b),c.bindTexture(32879,e.__webglTexture))};this.setTextureCube=z;this.setTextureCubeDynamic=x;this.setupRenderTarget=function(b){var h=d.get(b),l=d.get(b.texture);b.addEventListener("dispose",u);l.__webglTexture=a.createTexture();g.memory.textures++;var k=!0===b.isWebGLRenderTargetCube,r=!0===b.isWebGLMultisampleRenderTarget,

Callers 2

nFunction · 0.70
fhFunction · 0.70

Calls 7

FFunction · 0.70
mFunction · 0.70
lFunction · 0.70
vFunction · 0.70
yFunction · 0.70
qFunction · 0.70
pFunction · 0.70

Tested by

no test coverage detected