parts
Builds every Trapwright piece's look out of local, never-saved parts on each peer: primitive shapes on the kit's generated PBR materials, look-aware shaping (voxels for pixel, rounded cel shading for cartoon), the generated hero meshes (pendulum blade, boulder, gargoyle turret, t…
dungeonKit.parts
Builds every Trapwright piece's look out of local, never-saved parts on each peer: primitive shapes on the kit's generated PBR materials, look-aware shaping (voxels for pixel, rounded cel shading for cartoon), the generated hero meshes (pendulum blade, boulder, gargoyle turret, tesla pylon, chest, lever plate, bookshelf, statue), point lights, labels, invisible box blockers for collision and the codeVault glitch dressing. Used by the kit's modules and handy for level geometry in the same look.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2dungeonKit.parts: builds every piece's look out of parts on every peer. Primitive shapes with the kit's generated PBR surfaces, look-aware shaping (pixel turns round shapes into voxels, cartoon rounds boxes and cel-shades), the generated hero meshes (pendulum blade, boulder, gargoyle turret, tesla pylon, chest, lever, bookshelf, statue, mirror), lights, labels, invisible blockers for collision and the codeVault glitch dressing. Every part is a temporary child entity, so looks are rebuilt by each peer and never saved.
spawn(name: string, opts: any?) → any
Spawn a local-only entity (never replicated: every peer builds its own look).
| arg | type | description |
|---|---|---|
| name | string | |
| opts | any? |
rgb(hex: string) → void
"#rrggbb" to { r, g, b } in 0..1.
| arg | type | description |
|---|---|---|
| hex | string |
mix(a: { number }, b: { number }, t: number) → void
Blend two colours.
| arg | type | description |
|---|---|---|
| a | { number } | |
| b | { number } | |
| t | number |
shade(c: { number }, k: number) → void
Scale a colour's brightness (emissive colours may go above 1).
| arg | type | description |
|---|---|---|
| c | { number } | |
| k | number |
euler(x: number?, y: number?, z: number?) → void
Euler angles in degrees (applied Y, then X, then Z) to a quaternion { x, y, z, w }.
| arg | type | description |
|---|---|---|
| x | number? | |
| y | number? | |
| z | number? |
smooth(x: number) → number
0..1 smoothstep.
| arg | type | description |
|---|---|---|
| x | number |
easeOutBack(x: number) → number
Ease out with a small overshoot.
| arg | type | description |
|---|---|---|
| x | number |
hash(seed: number, i: number) → number
A deterministic pseudo-random number in [0, 1) for (seed, i).
| arg | type | description |
|---|---|---|
| seed | number | |
| i | number |
seedOf(s: string) → number
A stable number from a string (piece ids seed their dressing with it).
| arg | type | description |
|---|---|---|
| s | string |
tint(e: any, col: { number }?, blend: number?) → void
| arg | type | description |
|---|---|---|
| e | any | |
| col | { number }? | |
| blend | number? |
group(parent: any, name: string, pos: { number }?, rot: { number }?) → any
An empty pivot under `parent`.
| arg | type | description |
|---|---|---|
| parent | any | |
| name | string | |
| pos | { number }? | |
| rot | { number }? |
part(parent: any, L: any, name: string, shape: string, o: any?) → any
One part drawn in look `L`. opts: pos, scale, euler {x,y,z} or rot, color, surf ("stone" | "trim" | "wood" | "glow" | "dark" | "gold" | "glass" | any MATS key), blend, glow (emissive multiplier), shadows. Round shapes become voxels in pixel, boxes round off in cartoon.
| arg | type | description |
|---|---|---|
| parent | any | |
| L | any | |
| name | string | |
| shape | string | |
| o | any? |
mesh(parent: any, L: any, name: string, key: string, o: any?) → any
A generated hero mesh (MESHES key) under `parent`. opts: pos, euler, size (metres; uniform or {x,y,z}), tintTo / blend (pull it toward the look). Pixel and cartoon looks tint it toward their palette, codeVault darkens it.
| arg | type | description |
|---|---|---|
| parent | any | |
| L | any | |
| name | string | |
| key | string | |
| o | any? |
glow(e: any, col: { number }, k: number) → void
Recolour a glowing part (colour times brightness k).
| arg | type | description |
|---|---|---|
| e | any | |
| col | { number } | |
| k | number |
show(e: any, on: boolean) → void
Show or hide one part's mesh.
| arg | type | description |
|---|---|---|
| e | any | |
| on | boolean |
pose(e: any, pos: { number }?, rot: { number }?, scale: { number }?) → void
Set a part's local position, rotation (quaternion) and scale.
| arg | type | description |
|---|---|---|
| e | any | |
| pos | { number }? | |
| rot | { number }? | |
| scale | { number }? |
light(parent: any, name: string, pos: { number }, c: { number }, intensity: number?, range: number?) → any
A point light under `parent`.
| arg | type | description |
|---|---|---|
| parent | any | |
| name | string | |
| pos | { number } | |
| c | { number } | |
| intensity | number? | |
| range | number? |
setLight(e: any, intensity: number, c: { number }?) → void
Set a light's brightness (and colour).
| arg | type | description |
|---|---|---|
| e | any | |
| intensity | number | |
| c | { number }? |
label(parent: any, name: string, text: string, pos: { number }, o: any?) → any
A floating billboarded label under `parent`.
| arg | type | description |
|---|---|---|
| parent | any | |
| name | string | |
| text | string | |
| pos | { number } | |
| o | any? |
setText(e: any, text: string) → void
Set a label's text.
| arg | type | description |
|---|---|---|
| e | any | |
| text | string |
blocker(parent: any, name: string, pos: { number }, size: { number }) → any
An invisible static box collider under `parent` (centre pos, full size). P.block turns it on and off.
| arg | type | description |
|---|---|---|
| parent | any | |
| name | string | |
| pos | { number } | |
| size | { number } |
block(e: any, on: boolean) → void
Turn a blocker on (in place) or off (moved far below the level).
| arg | type | description |
|---|---|---|
| e | any | |
| on | boolean |
clear(root: any) → void
Despawn every child of `root`.
| arg | type | description |
|---|---|---|
| root | any |
glitchDress(root: any, L: any, size: { number }, seed: number) → any
Add the codeVault dressing to a built piece: glitch voxels, a scan ring and neon code bars.
| arg | type | description |
|---|---|---|
| root | any | |
| L | any | |
| size | { number } | |
| seed | number |
glitchTick(g: any, t: number, parts: { any }?) → void
Animate the codeVault dressing at shared time t; `parts` are parts that may glitch out of place.
| arg | type | description |
|---|---|---|
| g | any | |
| t | number | |
| parts | { any }? |
stepTime(L: any, t: number) → number
Pixel look: snap time to 8 frames a second so motion steps like a sprite.
| arg | type | description |
|---|---|---|
| L | any | |
| t | number |
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.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ 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".
Scoped to this part · feeds back into the world's score.