MapDoodad beta
Interface of @v12-engine/engine
export interface MapDoodadScenery: a model on the map that is no entity of the rules, with no health, owner or place in a snapshot. A rock, a fence, a ruined arch, free to lean, float and stretch. What it keeps off the cells under it (blocks) the terrain has, for the paths of units and for building
Members
animation
animation?: string;A clip of its model it plays over and over (a windmill's sails, a flag, a chest held open), by its name: none when left out, or as the game says of its model (SceneryDef.animation). It is drawn on its own while it plays
batch
batch?: boolean;Merged with the scenery near it, to be drawn in one go (DoodadView): yes when left out, as far as its model can be. No keeps it a copy of its model's mesh: for a game's code that reaches for it
blocks
blocks?: 'build' | 'walk';What it keeps off the cells within radius of its middle: building there, or walking and building. Nothing when left out
bridge
bridge?: boolean;A bridge: walked on, over deep water too, at its height (y) above the water. Nothing is built on it. Within radius of its middle
detail
detail?: MapDoodadDetail;How this one is drawn by distance, over its model's (MapDetail): pinned to a level by its index (level: 0 always at full), or levels of its own. As its model when left out
gate
gate?: boolean;A gate: it keeps walking off the cells within radius while it is shut, and the rules open and shut it by its name while the game runs (setGate). Shut when the game starts, unless open
id
id: number;The editor's, see MapRegion.id
light
light?: MapDoodadLight;This one's lights otherwise than its model's (GameView.ground.scenery): put out (on: false), another colour, brighter, further. Laid over every light its model gives
model
model: string;The model, by its path in models/: the map's own, the game's, or a shared one
name
name?: string;What code knows it by (client.doodads.named). Doodads are the screen's: the rules never see them
open
open?: boolean;Whether the gate starts open; shut when left out
pitch
pitch?: number;How far it leans forward in radians; 0 when left out
radius
radius?: number;How far around its middle it blocks, in cells
roll
roll?: number;How far it leans to the side in radians; 0 when left out
scale
scale: [number, number, number];How much bigger or smaller it is drawn than it was made, across, up and deep
tint
tint?: [number, number, number];A colour it is drawn in, over its own
x
x: number;Where it stands on the map's x axis, in cells
y
y?: number;How high above the ground under it
yaw
yaw: number;Radians: which way it faces, the way entities do (0 is along +z), then how far it leans forward and to the side
z
z: number;Where it stands on the map's z axis, in cells