Haruspex

The 3D helper

The 3D helper gives the Code tab's agent check_3d. The agent writes code that builds a model; the helper runs, saves, measures and renders it. Turn it on in Settings → Code → Helpers → 3D. With a delegate model set there, it also gets delegate_3d: see the 3d-delegate page. See the helpers page for all helpers, and 3d-models for jobs.

What the agent writes

A build module is a .js file whose default export is build(THREE, kit). It imports nothing, since it runs alone in a hidden sandbox, and returns one Three.js object (or { object, animations } with clips). Units are metres, y is up, the front faces +z, and every mesh is named.

kit adds mergeGeometries (it says why a merge fails), mergeVertices, RoundedBoxGeometry, ConvexGeometry, ParametricGeometry, seeded createNoise(seed) → { noise2, noise3 } and random(seed), and texture('textures/bark.png'), which loads a PNG beside the file. Write texture paths in full; up to 8 PNGs of 4 MB each.

An animation module keeps clips in a file of their own. Its animate(THREE, object, kit) gets the built model and returns an array of clips. Clips turn or move named nodes, usually pivots placed at the joints (Hip_L > Knee_L). A track naming a node that doesn't exist is dropped, and the report lists it.

Arguments

Argument What it does
path the build module, or a .glb/.gltf to check (required)
anim an animation module to run with the build module
out where to save the .glb; a module defaults to its own name
clip show that clip moving instead of the still views
clips per clip loop and airborne, overriding the name
view show one part close up: a mesh or pivot name, or head
height scale the model to this many metres tall
spec_height warn when the model is over 10% off this height
ground put the feet on the floor, centred
max_triangles warn above this many triangles

Checking a .glb writes nothing unless height or ground asks for a copy at out.

What it checks

A build error stops the check and is reported with its line and file. So is a clip track whose values don't match its times. Otherwise:

Vertex colours outside 0–1 are clamped in the .glb; the report says how many.

Each clip is sampled at 16 frames. Idle, Walk, Run, Swim and flight (Fly, Hover, Glide, Soar) loop; runs, jumps and flight may leave the floor, unless clips says otherwise. A walk or run plays in place, since the game moves the model; its line gives that speed. Each clip reports:

What it returns

The agent sees the sheets only if its model reads images.

What it doesn't do