(url: string)
| 76 | ]; |
| 77 | |
| 78 | async 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 | |
| 95 | async function init( |
| 96 | jsUrl: string, |
no test coverage detected