THREE.JS / FOUNDATIONS 326

Decode options are part of the cache contract.

Read the asymmetric fixture at pixel level, then load it with ImageBitmap orientation options. The route makes the URL-only cache key visible instead of treating a cache hit as a new decode.

Preparing decode contractWebGL2 + Canvas2D

Run the matrix to compare decoded pixels, cache identity, request count, and GPU upload.

reviewed
6 lanes
implemented
0 / 6
runtime
0 / 6
cache
disabled
pixels
—
requests
0
sample
NOT RUN
nonewaiting

Top/bottom rows preserve source orientation.

flipYwaiting

createImageBitmap flips before Texture upload.

cache keywaiting

Same URL returns the first decoded bitmap.

no cachewaiting

Changed options trigger a second decode.

GPU uploadwaiting

ImageBitmap becomes a Three.js Texture.

releasewaiting

Clear cache, dispose texture, close bitmaps.

The route uses the deterministic asymmetric PNG at /__loader-fixture.png. Three.js documents that ImageBitmap options must be set before loading and that its cache key is URL-only; the test keeps those claims local and does not infer every browser decoder's alpha behavior.

Sources: ImageBitmapLoader · Texture · Textures manual · createImageBitmap

LAB 326 / IMAGEBITMAP DECODE CACHE