Skip to content

five-on-it / packages/world/src/level / DoorDef

Interface: DoorDef ​

Defined in: packages/world/src/level.ts:204

A door of the level (GAME_DESIGN §5.5): a panel standing in a doorway, which the interaction key opens (swung a quarter turn about its hinge, its −x end, away from whoever opens it) and closes, its collider with it. A lock tag keeps it shut unless the character carries an item with that tag (a key, a keycard), which unlocks it for good; missions lock and unlock it too. Not a placement: the simulation builds it, open or closed. Its kind makes it a sliding gate or a barrier arm (DoorKind).

Properties ​

depth ​

depth: number

Defined in: packages/world/src/level.ts:220

The panel's thickness (m).


height ​

height: number

Defined in: packages/world/src/level.ts:218

The panel's height (m).


kind? ​

optional kind?: DoorKind

Defined in: packages/world/src/level.ts:224

A gate or a barrier; absent for a door that swings.


lock? ​

optional lock?: string

Defined in: packages/world/src/level.ts:222

The tag that unlocks it; absent for a door that is not locked.


name ​

name: string

Defined in: packages/world/src/level.ts:206

The node's name in the editor: for messages and a stable order.


width ​

width: number

Defined in: packages/world/src/level.ts:216

The panel's width (m).


x ​

x: number

Defined in: packages/world/src/level.ts:208

The doorway's centre on its floor (m).


y ​

y: number

Defined in: packages/world/src/level.ts:210

The doorway's floor (m).


yaw ​

yaw: number

Defined in: packages/world/src/level.ts:214

Which way the doorway faces (rad, 0 faces +z): the panel lies across it, along its x.


z ​

z: number

Defined in: packages/world/src/level.ts:212

The doorway's centre on its floor (m).