AssetRenderRequest
AssetRenderRequest = {
dimension:"3d";opacity?:number;tint?:AssetTint;transform?:AssetTransform;type:"gltf";url:string; } | {cell:CellRect;dimension:"2d";hex:HexDims;opacity?:number;shape?:"quad"|"hex";sheetUrl:string;tint?:AssetTint;transform?:AssetTransform;type:"tileset-cell"; }
Defined in: packages/declarative-hex-worlds/src/asset-source/source.ts:96
A resolved, renderer-agnostic render request. A renderer BINDING (the
declarative-hex-worlds/three subpath today, /pixi tomorrow) subscribes to
the koota placement signals and dispatches on type + dimension to reconcile
its own scene nodes. New source kinds add new members here (a discriminated
union), and each binding grows a matching arm. Every request carries its
dimension so a binding can place/sort/orient a 2D sprite and a 3D model
correctly on the same board.
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ dimension: "3d"; opacity?: number; tint?: AssetTint; transform?: AssetTransform; type: "gltf"; url: string; }
dimension
Section titled “dimension”dimension:
"3d"
opacity?
Section titled “opacity?”
optionalopacity?:number
Optional per-placement opacity in [0, 1]. < 1 makes the placement
translucent (e.g. a fog shroud over an explored tile); omitted or >= 1
leaves it fully opaque.
optionaltint?:AssetTint
Optional per-placement multiplicative tint (fog/season/team shading). White ⇒ identity. Applied by the binding to the resolved object’s material colour.
transform?
Section titled “transform?”
optionaltransform?:AssetTransform
type:
"gltf"
url:
string
Type Literal
Section titled “Type Literal”{ cell: CellRect; dimension: "2d"; hex: HexDims; opacity?: number; shape?: "quad" | "hex"; sheetUrl: string; tint?: AssetTint; transform?: AssetTransform; type: "tileset-cell"; }
cell:
CellRect
dimension
Section titled “dimension”dimension:
"2d"
hex:
HexDims
opacity?
Section titled “opacity?”
optionalopacity?:number
Optional per-placement opacity in [0, 1]. < 1 makes the cell translucent
(e.g. a fog shroud over an explored tile); omitted or >= 1 leaves the
opaque-queue path (seamless cutout tessellation) unchanged.
shape?
Section titled “shape?”
optionalshape?:"quad"|"hex"
How the sheet cell is drawn onto the board plane:
'quad'(default): the FULL cell rect is drawn as a rectangle spanninghex.width × hex.height. Painterly hex atlases (e.g. JackleEarth) paint each cell as a flattened hex with TRANSPARENT corners — a full quad lets neighbouring cells’ opaque bodies fill each other’s transparent corners, so the board tessellates SEAMLESSLY into continuous terrain. This is what the canvas-2D binding already does (drawImageblits the whole cell), so'quad'makes the 3D binding match.'hex': the cell is clipped to a hexagon silhouette (UV-mapped to the cell). Use only for sheets whose cells are opaque edge-to-edge and must NOT bleed past the hex outline. Leaves gaps for transparent-corner art. Omitted ⇒'quad'.
sheetUrl
Section titled “sheetUrl”sheetUrl:
string
optionaltint?:AssetTint
Optional per-placement multiplicative tint (fog/season/team shading). White ⇒ identity. Multiplies the sampled cell colour, so one atlas serves every shading state without re-authoring art.
transform?
Section titled “transform?”
optionaltransform?:AssetTransform
type:
"tileset-cell"