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”).
Parameters
Section titled “Parameters”{ 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"; }
Type Literal
Section titled “Type Literal”{ biome: string; edgeMask?: number; format: "png" | "glb" | "gltf"; id: string; path: string; role: "tile"; }
string = ...
Biome/terrain key this tile represents (grass, water, desert, …).
edgeMask?
Section titled “edgeMask?”number = ...
Optional edge mask this tile satisfies, for transition tiles (G3).
format
Section titled “format”"png" | "glb" | "gltf" = ...
string = idSchema
string = pathSchema
"tile" = ...
Type Literal
Section titled “Type Literal”{ biome?: string; format: "png"; grid: { cellHeight: number; cellWidth: number; cols: number; rows: number; }; id: string; path: string; role: "tileset"; transition?: { edgeCells: Record<string, number>; }; }
biome?
Section titled “biome?”string = ...
Optional biome this whole sheet represents (fill sheets).
format
Section titled “format”"png" = ...
{ cellHeight: number; cellWidth: number; cols: number; rows: number; } = gridSchema
grid.cellHeight
Section titled “grid.cellHeight”number = ...
grid.cellWidth
Section titled “grid.cellWidth”number = ...
grid.cols
Section titled “grid.cols”number = ...
grid.rows
Section titled “grid.rows”number = ...
string = idSchema
string = pathSchema
"tileset" = ...
transition?
Section titled “transition?”{ 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).
transition.edgeCells
Section titled “transition.edgeCells”Record<string, number> = ...
Canonical edge mask → cell index within the sheet grid.
Type Literal
Section titled “Type Literal”{ category?: "unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter"; format: "png"; id: string; path: string; role: "sprite"; }
category?
Section titled “category?”"unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter" = ...
Suggested gameplay category (unit/pc/npc/enemy/…); a default the dev may override.
format
Section titled “format”"png" = ...
string = idSchema
string = pathSchema
"sprite" = ...
Type Literal
Section titled “Type Literal”{ category?: "unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter"; format: "glb" | "gltf"; id: string; path: string; role: "model"; }
category?
Section titled “category?”"unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter" = ...
Suggested gameplay category (unit/pc/npc/enemy/…); a default the dev may override.
format
Section titled “format”"glb" | "gltf" = ...
string = idSchema
string = pathSchema
"model" = ...
Returns
Section titled “Returns”Type Literal
Section titled “Type Literal”{ 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, …).
edgeMask?
Section titled “edgeMask?”
optionaledgeMask?:number
Optional edge mask this tile satisfies, for transition tiles (G3).
format
Section titled “format”format:
"png"|"glb"|"gltf"
id:
string=idSchema
path:
string=pathSchema
role:
"tile"
Type Literal
Section titled “Type Literal”{ biome?: string; format: "png"; grid: { cellHeight: number; cellWidth: number; cols: number; rows: number; }; id: string; path: string; role: "tileset"; transition?: { edgeCells: Record<string, number>; }; }
biome?
Section titled “biome?”
optionalbiome?:string
Optional biome this whole sheet represents (fill sheets).
format
Section titled “format”format:
"png"
grid:
object=gridSchema
grid.cellHeight
Section titled “grid.cellHeight”cellHeight:
number
grid.cellWidth
Section titled “grid.cellWidth”cellWidth:
number
grid.cols
Section titled “grid.cols”cols:
number
grid.rows
Section titled “grid.rows”rows:
number
id:
string=idSchema
path:
string=pathSchema
role:
"tileset"
transition?
Section titled “transition?”
optionaltransition?:object
Optional per-cell role: ‘fill’ cells are interchangeable variations; ‘transition’ cells map an edge mask to a specific cell index (G3).
transition.edgeCells
Section titled “transition.edgeCells”edgeCells:
Record<string,number>
Canonical edge mask → cell index within the sheet grid.
Type Literal
Section titled “Type Literal”{ category?: "unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter"; format: "png"; id: string; path: string; role: "sprite"; }
category?
Section titled “category?”
optionalcategory?:"unit"|"prop"|"structure"|"npc"|"enemy"|"pc"|"encounter"
Suggested gameplay category (unit/pc/npc/enemy/…); a default the dev may override.
format
Section titled “format”format:
"png"
id:
string=idSchema
path:
string=pathSchema
role:
"sprite"
Type Literal
Section titled “Type Literal”{ category?: "unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter"; format: "glb" | "gltf"; id: string; path: string; role: "model"; }
category?
Section titled “category?”
optionalcategory?:"unit"|"prop"|"structure"|"npc"|"enemy"|"pc"|"encounter"
Suggested gameplay category (unit/pc/npc/enemy/…); a default the dev may override.
format
Section titled “format”format:
"glb"|"gltf"
id:
string=idSchema
path:
string=pathSchema
role:
"model"