EntityBoxOptions
Defined in: sdk/src/ecs/entityBox.ts:47
Properties
Section titled “Properties”extentOf?
Section titled “extentOf?”
optionalextentOf?: (entity) => {height:number;width:number;x:number;y:number; } |null
Defined in: sdk/src/ecs/entityBox.ts:63
The drawn extent of an entity whose size is not in a component the box reads — a skeleton, a
tilemap: a rectangle in the entity’s own units, x/y its lower-left corner from the origin.
Scaled and turned by the world transform like a sprite’s.
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”{ height: number; width: number; x: number; y: number; } | null
iconHalf?
Section titled “iconHalf?”
optionaliconHalf?:number| ((at) =>number)
Defined in: sdk/src/ecs/entityBox.ts:57
World half-size for an entity that draws nothing of its own — a camera, a light, an empty. Zero (the default) reports no box for those; an editor that wants them clickable passes the size of the icon it drew.
A function when that size is not a world size: an icon drawn at a fixed number of PIXELS covers a world extent that depends on where it is, and the caller is handed the entity’s world position to answer for it.