Skip to content

SpriteSheetLoaderOptions

Defined in: packages/three-flatland/src/loaders/SpriteSheetLoader.ts:26

Options for loading a spritesheet.

  • BakedAssetLoaderOptions

optional forceRuntime?: boolean

Defined in: packages/bake/src/types.ts:90

Generate this asset’s derived data in the browser on every load instead of loading a pre-baked sidecar. The runtime generator becomes the canonical source — no sidecar probe, no devtime “no baked sibling” warning, just a fresh generate on every load.

If you ask for the data (e.g. normals: true), you always get it. forceRuntime chooses where the generation happens — browser vs CI — it does not choose whether you get the data. The default path still produces the data on every miss; this flag just commits to “the browser is always where it’s produced for this asset.”

Use when runtime really is the right home for the generation: procedurally varied content, throwaway prototypes, asset bundles where shipping the sidecar isn’t worth the bytes. Not a dev- iteration knob — the default path (probe → generate on miss + warn pointing at flatland-bake) already handles iteration.

Default false. Mirrors SlugFontLoader.forceRuntime — one flag across every baked-asset loader in the codebase.

BakedAssetLoaderOptions.forceRuntime


optional normals?: SpriteSheetNormalsOption

Defined in: packages/three-flatland/src/loaders/SpriteSheetLoader.ts:38

Normal-map generation. When truthy, the loader synthesizes one region per sprite frame (pixel rects from the sheet JSON), probes for a baked <sheet-image>.normal.png sibling with a matching descriptor hash, and falls back to an in-memory bake.

The resulting texture is attached to SpriteSheet.normalMap, 1:1 co-registered with the atlas.


optional texture?: TexturePreset | TextureOptions

Defined in: packages/three-flatland/src/loaders/SpriteSheetLoader.ts:28

Texture preset or custom options. Overrides loader and global defaults.