Skip to content

LDtkLoaderOptions

Defined in: packages/three-flatland/src/loaders/LDtkLoader.ts:155

Options for loading an LDtk project.

  • 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?: LDtkNormalsOption

Defined in: packages/three-flatland/src/loaders/LDtkLoader.ts:167

Normal-map generation. When truthy, the loader synthesizes a descriptor from each tileset’s tile custom data (tileDir, tileCap*, etc.), probes for a baked .normal.png sibling with a matching descriptor hash, and falls back to an in-memory bake.

The resulting texture is attached to TilesetData.normalMap, 1:1 co-registered with the tileset image.


optional texture?: TexturePreset | TextureOptions

Defined in: packages/three-flatland/src/loaders/LDtkLoader.ts:157

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