Inspector
Defined in: Inspector.ts:66
Programmatic state queries for testing and debugging.
Exposed on window.__yage__ in debug mode.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Inspector(
engine):Inspector
Defined in: Inspector.ts:69
Parameters
Section titled “Parameters”engine
Section titled “engine”EngineRef
Returns
Section titled “Returns”Inspector
Methods
Section titled “Methods”getComponentData()
Section titled “getComponentData()”getComponentData(
entityName,componentClass):unknown
Defined in: Inspector.ts:106
Get component data (serializable subset) by class name string.
Parameters
Section titled “Parameters”entityName
Section titled “entityName”string
componentClass
Section titled “componentClass”string
Returns
Section titled “Returns”unknown
getEntities()
Section titled “getEntities()”getEntities():
EntitySnapshot[]
Defined in: Inspector.ts:113
Get all entities in the active scene as snapshots.
Returns
Section titled “Returns”getEntityByName()
Section titled “getEntityByName()”getEntityByName(
name):EntitySnapshot|undefined
Defined in: Inspector.ts:85
Find entity by name in the active scene.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”EntitySnapshot | undefined
getEntityPosition()
Section titled “getEntityPosition()”getEntityPosition(
name): {x:number;y:number; } |undefined
Defined in: Inspector.ts:92
Get entity position (from Transform component).
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”{ x: number; y: number; } | undefined
getErrors()
Section titled “getErrors()”getErrors():
ErrorSnapshot
Defined in: Inspector.ts:147
Get disabled components/systems from error boundary.
Returns
Section titled “Returns”getSceneStack()
Section titled “getSceneStack()”getSceneStack():
SceneSnapshot[]
Defined in: Inspector.ts:126
Get scene stack info.
Returns
Section titled “Returns”getSystems()
Section titled “getSystems()”getSystems():
SystemSnapshot[]
Defined in: Inspector.ts:135
Get active system info.
Returns
Section titled “Returns”hasComponent()
Section titled “hasComponent()”hasComponent(
entityName,componentClass):boolean
Defined in: Inspector.ts:101
Check if an entity has a component by class name string.
Parameters
Section titled “Parameters”entityName
Section titled “entityName”string
componentClass
Section titled “componentClass”string
Returns
Section titled “Returns”boolean
snapshot()
Section titled “snapshot()”snapshot():
EngineSnapshot
Defined in: Inspector.ts:74
Full state snapshot (serializable).