Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·originates fromworld ad080bed-3…

flyBody

A fruit fly's body, built as an entity tree and posed frame by frame.

by◐rbiscutt·posted 1mo ago
What it does

flyBody

A fruit fly's body, built as an entity tree and posed frame by frame.

build(root, species, env) stands one fly's anatomy under an entity the caller owns — the entity that IS the fly, carrying FlyAgent and moving through the world. bind(root, species) walks that tree by name and hands back the same shape, which is how the agent poses a body it did not create, and how it recovers the rig after a hot-reload when the module's own memory of it is gone. pose(refs, state) moves the joints.

The anatomy, and how it is jointed

A head that is mostly two compound eyes, an antenna each side, a proboscis folded under it; a thorax wider than the head — the box the flight muscles are in; a three-segment abdomen; two wings; six legs.

The joints are nested rather than composed arithmetically: a leg is a hip that swings, holding a spread that points outward, holding a femur and a knee, holding a tibia and a foot. Each link sets only its own local rotation and the hierarchy multiplies them, so a gait is one number per joint instead of a quaternion the author has to get right by hand. The same trick spreads a wing with an inner yaw and flaps it with an outer roll, and lets a wing's beat and its fold be set independently.

Posing

pose takes one table describing what the creature is doing this frame:

FieldMeaning
flying0..1, how much of its weight the wings carry — legs fold away as it rises
flap0..1 wing drive, taken straight off the brain's flight pool
walk0..1 leg drive; the gait is a tripod, legs 1/3/5 against 2/4/6
feeding0..1 proboscis extension, and the abdomen pulses as it drinks
alert0..1 lifts the head and sweeps the antennae
speedunits per second, which sets the leg cadence and the lean

Each species' temperament.tempo scales the wing beat, so a Kinger beats his wings slowly and a Pomni fast, from the same code.

Sizing

The creature is about 0.6 world units long, which is small beside a 34-unit big top and a 1.8-unit visitor: a fly you can walk up to and watch, not a monster. STAND_CLEARANCE is how far its body sits above whatever it is standing on.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

strict

Model

spawn(name: string, parent: any, mesh: any, material: any, pos: { number }?, scale: { number }?, rot: { number }?) → any

argtypedescription
namestring
parentany
meshany
materialany
pos{ number }?
scale{ number }?
rot{ number }?

yaw(deg: number) → void

argtypedescription
degnumber

rollZ(rad: number) → void

argtypedescription
radnumber

pitchX(rad: number) → void

argtypedescription
radnumber

extras(kind: string, sp: any, anchor: any, env: any) → void

The pieces each character wears on top of the shared plan. Each returns the entities it made, so `pose` can move them.

argtypedescription
kindstring
spany
anchorany
envany

build(root: any, species: any, env: any) → any

Stand one fly's body under `root` — the entity that IS the fly, carrying the agent and moving through the world. This builds the anatomy beneath it and nothing else: the caller owns the root, so there is one entity per fly rather than a fly-inside-a-fly. `species` is a row from flycircus.flySpecies; `env` carries the materials and meshes the scene build authored for it.

argtypedescription
rootany
speciesany
envany

childOf(parent: any, name: string) → any

The scene's build stands each fly's body up as ordinary entities, so a fly is authored content a human can select and that is there the moment the world opens. This walks that tree by name and hands back the same shape `build` returns, so the agent can pose a body it did not create — and can do it again after a reload, when the module's own memory of it is gone.

argtypedescription
parentany
namestring

bind(root: any, species: any) → any

argtypedescription
rootany
speciesany

pose(refs: any, state: any) → void

`state` is what the creature is doing this frame: flying 0..1 how much of its weight the wings are carrying flap 0..1 wing drive, straight off the brain's flight pool walk 0..1 leg drive feeding 0..1 proboscis extension alert 0..1 how much it is paying attention speed units/s, for the leg cadence dt seconds

argtypedescription
refsany
stateany

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.