loaders.gl support
| Type | API |
|---|---|
| Loader | CrunchLoader |
Portable texture delivery
Package once. Choose the GPU target at runtime.
Containers preserve dimensions and mip levels; portable payloads delay the final format choice until the application knows what the current device supports.
Distributed asset
Runtime choice
metadata · levels · capabilities
Renderer receives
The application keeps one asset pipeline while the renderer receives the representation its WebGL or WebGPU device can use efficiently.
Distribution and decode
Preserve compact assets while the pipeline transitions.
Crunch is a delivery encoding rather than a final rendering policy. The loader exposes compressed levels and metadata so an existing runtime can continue to consume the asset or migrate it to a newer container.
Input
Crunch `.crn` compressed texture files.
Decode
Read mip levels and recognized texture format metadata.
Runtime
Use the worker loader path for browser-friendly decoding.
Migration
Prefer Basis Universal and KTX2 for new cross-device pipelines.
Detailed guide
Crunch format and API details
The reference below covers CRN payloads, mip levels, worker loading, format metadata, and the relationship to modern Basis workflows.
@loaders.gl/images- loaders.gl implementationCrunchLoader- reads Crunch.crntextures
Crunch is a lossy texture compression format designed to reduce distribution size for GPU texture assets, especially BC / DXT-style texture data.
It is not just a generic image format. In practice, Crunch is used as an intermediate distribution format for textures that will be expanded or decoded for GPU-oriented use.
Crunch is typically not used for new texture pipelines. In modern workflows it has largely been replaced by Basis Universal, often carried in KTX2 containers, because that path is more portable across GPU format families and fits current web and realtime graphics tooling better.
Why It Is Used
Crunch is commonly used when a pipeline wants:
- smaller downloadable texture assets
- mipmapped texture distribution
- compatibility with DXT-family texture workflows
loaders.gl Support
| Format Feature | loaders.gl Support | Notes |
|---|---|---|
.crn parsing | ✅ | Supported by CrunchLoader. |
| Mip level extraction | ✅ | Returned as TextureLevel[]. |
| GPU texture metadata tagging | ✅ | loaders.gl reports recognized texture format metadata on decoded levels. |
| Worker-based loading | ✅ | Exposed through the Crunch worker loader path. |