Home
Features

Prop injection

Attach decorative or interactive props to existing tiles after the board has rendered.

Note:

Screenshot embedding lands once the F-Gallery test harness flips on with the RB browser-CI gate.

Problem

A merchant arrives at the tavern tile with three crates of trade goods. You want the crates rendered on the tile, queryable by AI, and removable when the merchant leaves.

Snippet

import { spawnGameboardPlacement } from 'declarative-hex-worlds/koota';

const crateA = spawnGameboardPlacement(world, {
  tileKey: '2,4',
  assetId: 'crate_A_big',
  kind: 'prop',
  layer: 'prop',
  metadata: { ownerActorId: 'merchant:trader-7' },
});

What the library handles

  • Placement spawn. Adds the koota entity with IsGameboardPlacement + PlacementOnTile + PlacementState traits.
  • Footprint check. Asserts the prop fits within the tile's available footprint slots.
  • Query surface. Consumer can later findGameboardActor(world, ...) to locate the merchant + iterate their placements.