Skip to content

stripAssetCategory

stripAssetCategory(asset): { biome: string; edgeMask?: number; format: "png" | "glb" | "gltf"; id: string; path: string; role: "tile"; } | { biome?: string; format: "png"; grid: { cellHeight: number; cellWidth: number; cols: number; rows: number; }; id: string; path: string; role: "tileset"; transition?: { edgeCells: Record<string, number>; }; } | { category?: "unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter"; format: "png"; id: string; path: string; role: "sprite"; } | { category?: "unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter"; format: "glb" | "gltf"; id: string; path: string; role: "model"; }

Defined in: packages/declarative-hex-worlds/src/asset-source/scan.ts:179

Return a copy of an asset with any category field removed. Used by the init and web authoring flows when the developer clears a suggested gameplay category (choosing “none”).

{ biome: string; edgeMask?: number; format: "png" | "glb" | "gltf"; id: string; path: string; role: "tile"; } | { biome?: string; format: "png"; grid: { cellHeight: number; cellWidth: number; cols: number; rows: number; }; id: string; path: string; role: "tileset"; transition?: { edgeCells: Record<string, number>; }; } | { category?: "unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter"; format: "png"; id: string; path: string; role: "sprite"; } | { category?: "unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter"; format: "glb" | "gltf"; id: string; path: string; role: "model"; }

{ biome: string; edgeMask?: number; format: "png" | "glb" | "gltf"; id: string; path: string; role: "tile"; }

string = ...

Biome/terrain key this tile represents (grass, water, desert, …).

number = ...

Optional edge mask this tile satisfies, for transition tiles (G3).

"png" | "glb" | "gltf" = ...

string = idSchema

string = pathSchema

"tile" = ...


{ biome?: string; format: "png"; grid: { cellHeight: number; cellWidth: number; cols: number; rows: number; }; id: string; path: string; role: "tileset"; transition?: { edgeCells: Record<string, number>; }; }

string = ...

Optional biome this whole sheet represents (fill sheets).

"png" = ...

{ cellHeight: number; cellWidth: number; cols: number; rows: number; } = gridSchema

number = ...

number = ...

number = ...

number = ...

string = idSchema

string = pathSchema

"tileset" = ...

{ edgeCells: Record<string, number>; } = ...

Optional per-cell role: ‘fill’ cells are interchangeable variations; ‘transition’ cells map an edge mask to a specific cell index (G3).

Record<string, number> = ...

Canonical edge mask → cell index within the sheet grid.


{ category?: "unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter"; format: "png"; id: string; path: string; role: "sprite"; }

"unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter" = ...

Suggested gameplay category (unit/pc/npc/enemy/…); a default the dev may override.

"png" = ...

string = idSchema

string = pathSchema

"sprite" = ...


{ category?: "unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter"; format: "glb" | "gltf"; id: string; path: string; role: "model"; }

"unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter" = ...

Suggested gameplay category (unit/pc/npc/enemy/…); a default the dev may override.

"glb" | "gltf" = ...

string = idSchema

string = pathSchema

"model" = ...

{ biome: string; edgeMask?: number; format: "png" | "glb" | "gltf"; id: string; path: string; role: "tile"; }

biome: string

Biome/terrain key this tile represents (grass, water, desert, …).

optional edgeMask?: number

Optional edge mask this tile satisfies, for transition tiles (G3).

format: "png" | "glb" | "gltf"

id: string = idSchema

path: string = pathSchema

role: "tile"


{ biome?: string; format: "png"; grid: { cellHeight: number; cellWidth: number; cols: number; rows: number; }; id: string; path: string; role: "tileset"; transition?: { edgeCells: Record<string, number>; }; }

optional biome?: string

Optional biome this whole sheet represents (fill sheets).

format: "png"

grid: object = gridSchema

cellHeight: number

cellWidth: number

cols: number

rows: number

id: string = idSchema

path: string = pathSchema

role: "tileset"

optional transition?: object

Optional per-cell role: ‘fill’ cells are interchangeable variations; ‘transition’ cells map an edge mask to a specific cell index (G3).

edgeCells: Record<string, number>

Canonical edge mask → cell index within the sheet grid.


{ category?: "unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter"; format: "png"; id: string; path: string; role: "sprite"; }

optional category?: "unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter"

Suggested gameplay category (unit/pc/npc/enemy/…); a default the dev may override.

format: "png"

id: string = idSchema

path: string = pathSchema

role: "sprite"


{ category?: "unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter"; format: "glb" | "gltf"; id: string; path: string; role: "model"; }

optional category?: "unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter"

Suggested gameplay category (unit/pc/npc/enemy/…); a default the dev may override.

format: "glb" | "gltf"

id: string = idSchema

path: string = pathSchema

role: "model"