# Debug commands of @ferret/inspector, @ferret/core

Call with `world.commands.execute(name, args)`; `world.commands.list()` on the running game is the authority. Read from the sources of these packages.

- `anim.graph` — the graph state of an entity: {entity} -> state, parameters, montages
- `anim.list` — animation groups of the scene, or of an entity's Animator: {entity?}
- `anim.montage` — play a one-shot clip on an entity: {entity, clip, mask?, blendIn?, blendOut?, loop?}
- `anim.play` — play a clip on a model or entity, outside any graph: {group, clip, loop?: true, speed?: 1}
- `anim.scrub` — show a clip at a time on a model, with the graph not driving it: {group: model/entity name, clip, time}
- `anim.set` — set graph parameters or fire a trigger: {entity, params?: {name: number|bool}, trigger?}
- `anim.stop` — stop a clip started with anim.play: {group}
- `asset.list` — models loaded with asset.load
- `asset.load` — load a glTF/GLB into the scene: {url, name?, position?, scale?} -> the model's nodes and clips
- `asset.remove` — remove a model loaded with asset.load: {name}
- `camera.get` — the active camera
- `camera.set` — move the camera: {position?, target?, fov?, radius?, alpha?, beta?}
- `camera.view` — named view of the scene or a node: {name: "front"|"back"|"left"|"right"|"top"|"iso"|"fit", node?, margin?}
- `physics.bodies` — the rigid bodies of the physics host: [{entity, node, kind, shape, mass, material, position, speed}], with the level's constraints and fractured bodies
- `record.pause` — pause the recording
- `record.resume` — resume a paused recording
- `record.start` — start recording the scene: {fps?, audio?, videoBitsPerSecond?} -> {mime, audio}; audio is false while the sound is still locked
- `record.state` — the recorder: {state: idle|recording|paused, elapsedMs, supported}
- `record.stop` — end the recording: {dataUrl?: false to leave the file out} -> {mime, bytes, durationMs, audio, dataUrl}
- `scene.bounds` — world bounds of the scene or of one node and its children: {node?}
- `scene.entities` — list entities: {tag?, name?} -> id, name, position, components
- `scene.node` — details of one node: {name} -> transform, bounds, material, skeleton
- `scene.nodes` — list scene nodes: {filter?, kind?: "mesh"|"transform"|"light"|"camera", limit?}
- `scene.stats` — counts and frame stats
- `scene.validate` — check the level: meshes without collision, without material, nodes with bad transforms, skeletons without animation
- `view.set` — debug views: {wireframe?, bounds?, skeletons?, colliders?, triggers?} -> current flags
- `commands.list` — every command of this world: -> [{name, description}]
- `host.show` — show a world by name ("main" or one a game created): {name}
- `host.worlds` — the worlds on the shared engine and which one is shown
- `world.info` — time, tick count, entity and service counts
- `world.pause` — pause or resume the simulation: {paused}
- `world.step` — run n fixed steps (use while paused): {n}
- `world.timeScale` — set the time scale: {scale}
