Skip to content

1681-engine / index / inspectWorld

Function: inspectWorld() ​

ts
function inspectWorld(
   world, 
   components?, 
   limit?, 
   previewLength?
): EntityRow[];

Defined in: src/debug/inspectWorld.ts:15

Lists up to limit entities with a short preview of each component's value: those holding any of components when the game names some (only those shown), else every live entity with all it holds (World.entities, componentsOf). For the debug overlay: it allocates, and runs a few times a second only while the overlay is open.

Parameters ​

ParameterTypeDefault value
worldWorldundefined
components?readonly ComponentType<unknown>[]undefined
limit?number20
previewLength?number40

Returns ​

EntityRow[]

Released under the MIT License.