MCPcopy
hub / github.com/pixijs/pixijs / load

Function load

src/compressed-textures/basis/worker/basis.worker.ts:78–93  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

76];
77
78async function load(url: string): Promise<TextureSourceOptions>
79{
80 const BasisTexture = await getBasis();
81
82 const basisTexture = await fetchBasisTexture(url, BasisTexture);
83
84 const levelBuffers = createLevelBuffers(basisTexture, basisTranscoderFormat);
85
86 return {
87 width: basisTexture.getImageWidth(0, 0),
88 height: basisTexture.getImageHeight(0, 0),
89 format: basisTranscodedTextureFormat,
90 resource: levelBuffers,
91 alphaMode: 'no-premultiply-alpha'
92 } as TextureSourceOptions;
93}
94
95async function init(
96 jsUrl: string,

Callers 1

basis.worker.tsFile · 0.70

Calls 5

createLevelBuffersFunction · 0.90
getBasisFunction · 0.85
fetchBasisTextureFunction · 0.85
getImageWidthMethod · 0.80
getImageHeightMethod · 0.80

Tested by

no test coverage detected