# Debug commands of @ferret/humans

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

- `humans.bake` — Bake a figure to a glb: {id, tier?="L1m", expressions?=true, path?}. Writes the file when a path is given and the host can, else returns {bytes}.
- `humans.code` — The share code of a figure {id}, or the spec of a code {code}.
- `humans.compare` — Compare a figure with a picture: {id, image, regions?: {skin, hair, iris, white}, landmarks?|mediapipe?, view?}. Colour distances (0 same) of skin, hair and iris, the landmark residual, and the pixel colour distance to a render when the host can render.
- `humans.create` — Create a figure. {id?, seed?, words?: face/person description, kit?, recipe?: species, proof?: proof figure id, code?: share code, spec?: full spec, outfit?: clothes in words}. Returns its summary.
- `humans.delete` — Remove a figure from the session: {id}.
- `humans.describe` — The figure in plain words: {id}. Returns the sentence and its parts (who, build, face, skin, eyes, hair, outfit).
- `humans.diff` — What differs between two figures (or a figure and a code): {a, b} ids; returns JSON-pointer changes.
- `humans.dress` — Clothes for a figure. {id, words?: "a navy wool coat, brown boots", pieces?: OutfitPiece[], uniform?: id, add?: true to keep the current pieces}.
- `humans.fromPicture` — Fill a figure from a picture and words. {id?, words?, mediapipe?: [{x,y}...] | landmarks?: {name:[x,y]}, image?: {width,height,channels,data}, regions?: {skin?, hair?, iris?: Region, white?: Region}, garments?: PictureRead[]}. Returns the figure and what was read.
- `humans.get` — Read a figure or part of it. {id, path?: JSON pointer such as /body/age}.
- `humans.list` — List the figures of this session, and the presets (recipes, proofs, uniforms) humans.preset accepts.
- `humans.preset` — Apply a preset to a figure. {id, recipe?: species, proof?: proof id, uniform?: uniform id}. recipe sets kit + kitOptions, uniform sets the outfit, proof replaces the figure.
- `humans.randomise` — A new random figure from a profile. {id?, seed, profile?: "uniform" | a Profile object}.
- `humans.report` — Cost and checks of a figure at a tier: {id, tier?="L1m"}. Triangles, bytes, build ms, joints, garment penetration, height.
- `humans.save` — Save a figure as a library item: {id, name}. Returns the code (and the library answer when the host has one).
- `humans.set` — Change one value by JSON pointer: {id, path: "/body/age", value}. Several: {id, patch: [{path, value}]}. The change is refused (and undone) when the spec stops validating.
- `humans.sheet` — A picture sheet of figures (needs the viewer): {ids: string[], view?, tier?}.
- `humans.validate` — Check a figure: {id}. Returns the issues with their JSON pointers.
