Wreck
The liner on the bottom, and the things on it that move. One component on one entity; it is the whole `wreck` slice of DEADLIGHT.
Wreck
The liner on the bottom, and the things on it that move. One component on one
entity; it is the whole wreck slice of DEADLIGHT.
On awake it derives every surface, builds the ship, and spawns the five
anchors Film.NAMES promises — Bow, PortAnchor, Forecastle,
BridgeFront, DebrisField — each carrying its own geometry, so a shot framed
against a name frames the real thing rather than a contracted fallback.
Then it joins the film clock through Film.register("wreck", ...). Everything
the wreck DOES is a function of Film.t and nothing else: the rusticles sway
down the whole side, one of them parts and falls its whole length at 41 s for
shot 7, corrosion flakes lift off the forecastle for shot 8 and rust dust falls
past the bridge for shot 11. Nothing here reads wall time, so two runs of the
film are the same film.
Using it
local c = entity.find("Wreck").component.get("Wreck")
c.status() -- { built, clumps, flakes, t }
c.at(48.0) -- put the wreck where it stands at 48 s, without running the clock
c.rebuild() -- re-derive every texture and mesh after editing a module
Component methods take no self — call them with ., not :.
Fields
generation— bump it to force a rebuild.
What it spawns
Every entity it makes is TEMPORARY: the wreck is a function of this code, not a
hundred records in the scene, and a slice that leaves un-marked entities behind
blocks the shared commit gate for the other three. It also puts every piece on
the wreck render layer as well as default, so a diagnostic capture can ask
for the ship alone (capture { renderLayers = "wreck" }) without disturbing the
other slices.
Where the parts live
deadlight.wreck.geom builds triangles, …surfaces makes the materials,
…hull is the shape of the ship, …fittings is everything bolted to it,
…growth is the rusticles and …debris is the field aft of the break.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2Wreck — the liner on the bottom, and the things on it that move. One component on one entity. On `awake` it derives every surface, builds the ship, and spawns the five anchors `Film.NAMES` promises — `Bow`, `PortAnchor`, `Forecastle`, `BridgeFront`, `DebrisField` — each carrying its own geometry so a shot framed against a name frames the real thing. Then it joins the film clock. Everything the wreck DOES is a function of `Film.t` and nothing else: the rusticles sway down the whole side, one of them parts and falls its whole length in shot 7, corrosion flakes lift off the forecastle in shot 8 and rust dust falls past the bridge in shot 11. Nothing here reads wall time, so two runs of the film are the same film. Every entity it spawns is TEMPORARY: the wreck is a function of this code, not a hundred records in the scene, and a slice that leaves un-marked entities behind blocks the shared commit gate for the other three.
meshSet( ) → any
attach(root: any, rootPos: { number }, M: any, mats: any, tag: string) → void
Attach every non-empty mesh in the set to the anchor as its own child, one per material, so the whole ship is a handful of draw calls.
| arg | type | description |
|---|---|---|
| root | any | |
| rootPos | { number } | |
| M | any | |
| mats | any | |
| tag | string |
anchorEntity(name: string, where: { number }?) → void
`at` overrides `Film.ANCHORS` for a name whose real place on the ship is not where the contract's fallback guessed. `PortAnchor` is the one: the fallback puts it 13.2 m off the centreline, and the hull's own surface eight metres abaft the stem — where a hawse pipe actually is — is at 7. The entity goes where the anchor IS, because a shot framed against a name that exists never reads the fallback.
| arg | type | description |
|---|---|---|
| name | string | |
| where | { number }? |
buildRusticles(mats: any, bow: any, bowPos: { number }) → void
| arg | type | description |
|---|---|---|
| mats | any | |
| bow | any | |
| bowPos | { number } |
buildFlakes(mats: any, bow: any, bowPos: { number }) → void
Corrosion flakes: sheets of oxide the size of a hand, lifted off the plating by whatever disturbs them. One entity per swarm, each a spray of thin plates around its own origin, so moving the entity moves the whole drift.
| arg | type | description |
|---|---|---|
| mats | any | |
| bow | any | |
| bowPos | { number } |
rnd( ) → void
build( ) → void
quat(ax: number, ay: number, az: number, angle: number) → void
`Transform.quatFromAxisAngle` returns FOUR numbers, and `entity.rotation` wants one quaternion value, so the tuple is collected here rather than at every call site.
| arg | type | description |
|---|---|---|
| ax | number | |
| ay | number | |
| az | number | |
| angle | number |
swayAll(t: number) → void
| arg | type | description |
|---|---|---|
| t | number |
faller(t: number) → void
| arg | type | description |
|---|---|---|
| t | number |
driftFlakes(t: number) → void
| arg | type | description |
|---|---|---|
| t | number |
awake( ) → void
reset( ) → void
tick(t: number) → void
| arg | type | description |
|---|---|---|
| t | number |
at(t: number) → void
Put the wreck where it stands at film time `t`, without running the clock. The film's own playback goes through `Film`; this is for looking at one instant while working.
| arg | type | description |
|---|---|---|
| t | number |
rebuild( ) → void
Force a rebuild after a module edit, without restarting the film.
status( ) → any
The liner on the bottom and the things on it that move — the whole wreck slice of DEADLIGHT on one component.Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
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.