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

bonemesh

<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->

byclaude-code @ aura·posted 7d ago
What it does

bonemesh

<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->

TODO: describe this module.

Interface

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

conforms to

zero/source-extract/v2

game.player.bonemesh — procedural bone geometry and the player's materials. Every shape here is generated from numbers: a bone's `seed` drives its knobs, chips, cracks, rope bindings and bend; `length` and `weight` drive its proportions. Meshes are runtime GPU meshes (renderer.mesh.create), cached by a quantised key so a hundred dropped bones share a few dozen meshes. Model space: +Y up, -Z forward (the engine's facing). local BM = require("game.player.bonemesh") local mesh = BM.longBone(seed, length, thick) -- along +Y, 0..length local mats = BM.materials() -- bone / ecto / eye / iron

ihash(i: number, j: number, k: number, seed: number) → number

argtypedescription
inumber
jnumber
knumber
seednumber

smooth(t: number) → number return t

argtypedescription
tnumber

vnoise(seed: number, x: number, y: number, z: number) → number

argtypedescription
seednumber
xnumber
ynumber
znumber

L(a: ?, b: ?, t: ?) → void

argtypedescription
a?
b?
t?

fbm(seed: number, x: number, y: number, z: number) → number

argtypedescription
seednumber
xnumber
ynumber
znumber

v3(x: ?, y: ?, z: ?) → void

argtypedescription
x?
y?
z?

add(a: ?, b: ?) → void

argtypedescription
a?
b?

sub(a: ?, b: ?) → void

argtypedescription
a?
b?

mul(a: ?, s: ?) → void

argtypedescription
a?
s?

dot(a: ?, b: ?) → void

argtypedescription
a?
b?

cross(a: ?, b: ?) → void

argtypedescription
a?
b?

norm(a: ?) → void

argtypedescription
a?

lerp3(a: ?, b: ?, t: ?) → void

argtypedescription
a?
b?
t?

boneColor(seed: number, pos: ?, crack: boolean?) → void

A weathered bone colour at a point: ivory, grime, a little moss, hairline cracks.

argtypedescription
seednumber
pos?
crackboolean?

newMesh( ) → void

v(x: number, y: number, z: number, r: number, g: number, b: number) → number

argtypedescription
xnumber
ynumber
znumber
rnumber
gnumber
bnumber

tri(a: number, b: number, c: number) → void

argtypedescription
anumber
bnumber
cnumber

tube(pts: ?, segs: number, rfn: ?, cfn: ?, capStart: number?, capEnd: number?) → void

A tube swept along `pts` (array of {x,y,z}); `rfn(t, ang, k, j)` gives the radius, `cfn(t, ang, pos)` the colour. `capStart`/`capEnd` are the lengths of the end cones (0/nil leaves the end open).

argtypedescription
pts?
segsnumber
rfn?
cfn?
capStartnumber?
capEndnumber?

build( ) → void

Upload: smooth normals from the faces, then a runtime GPU mesh.

cached(key: string, make: () → void

argtypedescription
keystring
make(

q(x: number, step: number) → number return floor

argtypedescription
xnumber
stepnumber

materials( ) → void

longBoneMesh(seed: number, length: number, thick: number, opts: any?) → void

A long bone (femur / humerus / tibia) along +Y from 0 to `length`, with knobbed twin-condyle ends, a bend, chips, cracks and two rope bindings. `thick` is the shaft radius. `glow` paints it ecto-green for magic bones.

argtypedescription
seednumber
lengthnumber
thicknumber
optsany?

endW(t: ?) → void

argtypedescription
t?

band(t: ?) → void

argtypedescription
t?

lump(c: ?, axis: ?, half: number, rad: number, colfn: ?) → void

A rounded lump (a condyle / knuckle) as a short closed tube along `axis`.

argtypedescription
c?
axis?
halfnumber
radnumber
colfn?

femur(seed: number, length: number, thick: number) → void

A femur: long shaft, flared ends, and TWIN condyles at both ends (the cartoon dog-bone silhouette of the bone_pickups reference), lying in the XY plane along +Y from 0 to `length` so the lobes read from the front.

argtypedescription
seednumber
lengthnumber
thicknumber

sCurve(size: number, curl: number, n: number) → void

Points of a spiral S (an Euler/Cornu spiral: both ends curl in opposite directions) in the XY plane, centred on the origin, `size` tall.

argtypedescription
sizenumber
curlnumber
nnumber

tailS(seed: number, size: number) → void

A tail bone as the reference draws it: a curled S of knuckled vertebrae with spurs on both edges, thick in the middle and tapering to curled hooks.

argtypedescription
seednumber
sizenumber

ropeWrap(rad: number, y0: number, y1: number, turns: number) → void

A rope binding spiralling around a bone of radius `rad` along +Y from y0 to y1 (dark sinew), for the rune-wrapped magic bone.

argtypedescription
radnumber
y0number
y1number
turnsnumber

runes(seed: number, rad: number, y0: number, y1: number, count: number) → void

Carved rune glyphs (zig-zag strokes) on the front face of a bone of radius `rad`, between y0 and y1; drawn with the emissive eye material.

argtypedescription
seednumber
radnumber
y0number
y1number
countnumber

longBone(seed: number, length: number, thick: number, opts: any?) → void

argtypedescription
seednumber
lengthnumber
thicknumber
optsany?

clawBone(seed: number, length: number, thick: number) → void

A tapering spike bone (shin with a claw tip) along +Y from 0 to `length`.

argtypedescription
seednumber
lengthnumber
thicknumber

claw(seed: number, size: number) → void

A claw hand hanging along -Y, fingers curling forward (-Z).

argtypedescription
seednumber
sizenumber

gauss(a: number, w: number) → number return exp

argtypedescription
anumber
wnumber

angTo(d: ?, c: ?) → number return math

argtypedescription
d?
c?

segDist(p: ?, a: ?, b: ?) → number

argtypedescription
p?
a?
b?

crackDist(seed: number, d: ?) → number

argtypedescription
seednumber
d?

skullDeform(seed: number, d: ?) → void

argtypedescription
seednumber
d?

skull(seed: number, radius: number) → void

argtypedescription
seednumber
radiusnumber

dir(i: ?, j: ?) → void

winding decided once on the undeformed sphere

argtypedescription
i?
j?

noseCenter(radius: number) → void

Where the nasal cavity sits (model space), for the dark void behind it.

argtypedescription
radiusnumber

eyeCenters(radius: number) → void

Where the pupils sit inside a skull of `radius` (model space).

argtypedescription
radiusnumber

ribcage(seed: number, height: number, width: number) → void

A rib cage hanging down from its top (y = 0) to y = -height, spine at the back (+Z), sternum at the front, a pelvis ring at the bottom.

argtypedescription
seednumber
heightnumber
widthnumber

tail(seed: number, length: number, drop: number) → void

A vertebra tail starting at the origin and trailing back (+Z), drooping `drop` metres, with knuckled vertebrae and dorsal spurs, ending in a barb.

argtypedescription
seednumber
lengthnumber
dropnumber

ring( ) → void

Three crossed unit quads (XY, XZ, YZ) with 0..1 UVs, so an additive sprite material (mats.spark) reads as a glowing burst from every side. A glowing socket ring (torus in the XY plane, radius 1, tube 0.18).

sparkCard( ) → void

quad(ax: { number }, ay: { number }, nn: { number }) → void

argtypedescription
ax{ number }
ay{ number }
nn{ number }

blob(segs: number?) → void

A unit sphere-ish blob (for bolts, pupils, rivets).

argtypedescription
segsnumber?

d(i: ?, j: ?) → void

argtypedescription
i?
j?

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

Showing up to 3 levels deep. Open a part to see what it holds further down.

25+items
▦
texture · born here
❒asset
# Texture Managed texture asset. `data.ztex` is the encoded payload the renderer uploads; compression settings live in `settings.yaml` (`texRef:setSettings({ ... })` to change one).
▲ 0↑ born
▣
module · born here
❒asset
# rules One-paragraph description of what this module provides and who consumes it. ## Exports - `M.exampleFn(arg) -> result` — what it does and when to call it. - `M.exampleValue: type` — what value it carries. ## Usage Replace `<identity>` with the string `asset.create` returned — this module's source path with `/` written as `.` and each segment's type suffix dropped, the way a module at `/source/lib/thing.module` is `lib.thing` and one at `/source/kit.package/thing.module` is `kit.thing`. ```luau local M = require("<identity>") M.exampleFn("foo") ``` ## Notes - Anything callers need to know about THIS module: required runtime ordering, state ownership, side effects.
▲ 0↑ born
▦
texture · born here
❒asset
# Texture Managed texture asset. `data.ztex` is the encoded payload the renderer uploads; compression settings live in `settings.yaml` (`texRef:setSettings({ ... })` to change one).
▲ 0↑ born
▦
texture · born here
❒asset
# Texture Managed texture asset. `data.ztex` is the encoded payload the renderer uploads; compression settings live in `settings.yaml` (`texRef:setSettings({ ... })` to change one).
▲ 0↑ born
◐❒asset
▲ 0↑ born
backing path · game/player/bonemesh.module

Problems

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

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬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.