Skip to content

@modoki/engine / index / deriveLayer

Function: deriveLayer()

deriveLayer(traitNames, storedLayer): "3d" | "2d" | "ui" | undefined

Derive the authoritative rendering layer for an entity from the renderable traits it actually has, falling back to the stored EntityAttributes.layer when none of the primary renderable traits is present. See PRIMARY_RENDERABLE_LAYER.

Parameters

traitNames

readonly string[]

storedLayer

"3d" | "2d" | "ui" | undefined

Returns

"3d" | "2d" | "ui" | undefined

Built with Modoki.