sillage_core
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
sillage_core
<!-- 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/v2strict
vialSlot(index: number) → void
Slot index 1..36, counted left-to-right along the top tier first.
| arg | type | description |
|---|---|---|
| index | number |
rgb(hex: string) → void
"#RRGGBB" -> three 0..1 channels. The UI takes hex strings and the Model component takes tintR/tintG/tintB, so every slice converts here and the palette above stays the single source of every colour in the game.
| arg | type | description |
|---|---|---|
| hex | string |
tinted(model: string, hex: string, blend: number?) → void
Fields ready to splat into a Model component: `component.add("Model", Core.tinted("cube", Core.surface.marble))`. `tintBlend` is the field that makes a tint visible at all — it defaults to 0, so tintR/G/B alone renders plain white and the albedo pass proves it. This is colour for BLOCKING OUT a shape. Anything that ends up on screen in the finished game wants a real `material` asset on the Model instead, because roughness, metalness and normal are what make amber glass look like glass and marble look like stone; a flat tint cannot. `blend` defaults to 0.8: enough colour to read, enough of the lit surface left that the shape still shades. At 1.0 everything goes flat and the room turns into a colour chart.
| arg | type | description |
|---|---|---|
| model | string | |
| hex | string | |
| blend | number? |
tintOf(id: string) → string
The colour a material's glass and its graph band take.
| arg | type | description |
|---|---|---|
| id | string |
timeToFraction(minutes: number) → number
Map a time in minutes to 0..1 down the graph. 0 is the top of the page.
| arg | type | description |
|---|---|---|
| minutes | number |
fractionToTime(f: number) → number
| arg | type | description |
|---|---|---|
| f | number |
clockLabel(minutes: number) → string
"3 h 20" / "12 min" — how the graph gutter and the cards write a time.
| arg | type | description |
|---|---|---|
| minutes | number |
on(event: string, fn: (any) → void
A subscription is identified by the MODULE that made it — the chunk the `Core.on` call sits in — not by the closure value. A reload produces a fresh closure from a fresh chunk, so re-subscribing REPLACES the stale one instead of stacking beside it. Without this a slice that binds in start() gains one dead handler per hot reload, and after a morning's editing an event fires fifty closures that each close over an older copy of the code. The chunk, rather than the chunk AND LINE: an edit anywhere above a subscription shifts its line, and a line-keyed entry would then read as a different subscriber and stack after all — which is the same leak wearing a hat. One slice holds one subscription per event, which is the shape every slice in this game actually has.
| arg | type | description |
|---|---|---|
| event | string | |
| fn | (any |
off(event: string, fn: ((any) → void
Drop one subscription, or every subscription for an event. Passing the function a slice handed to Core.on removes that one; passing nothing removes them all.
| arg | type | description |
|---|---|---|
| event | string | |
| fn | ((any |
emit(event: string, payload: any?) → void
| arg | type | description |
|---|---|---|
| event | string | |
| payload | any? |
register(name: string, impl: any) → void
| arg | type | description |
|---|---|---|
| name | string | |
| impl | any |
rootName(name: string) → string
| arg | type | description |
|---|---|---|
| name | string |
rebuildSlice(name: string) → void
Despawn and respawn one slice's subtree. Only ever touches entities named sil_<slice>; nothing else in the world is disturbed.
| arg | type | description |
|---|---|---|
| name | string |
rebuild( ) → void
stopAll( ) → void
startAll( ) → void
cameraEntity( ) → any
THE CAMERA The player's camera rig carries no behavior component, so it stays where it is put. This is how anything moves it. Staging owns the moves; other slices ask for a station by name via the "station:request" event. `layers.active.camera` is the live handle: `.entity` is whichever entity currently carries the Camera — the per-player clone of the rig, not the prototype. Re-resolve it every time; never stash it.
aim(ent: any, st: any) → void
Aim ONE camera-carrying entity at a point. Position first, then lookAt, because lookAt resolves against where the entity currently stands.
| arg | type | description |
|---|---|---|
| ent | any | |
| st | any |
cutTo(stationName: string) → void
Place the camera at a station immediately, with no transition. This moves TWO things, and both matter: * the live camera — what a player in play mode is looking through; * the PROTOTYPE's CameraRig — the scene's AUTHORED camera pose. The second is not housekeeping. `capture` with the default source renders the scene camera FROM ITS AUTHORED POSE, so a station that only moved the live camera photographs from wherever the prototype was left, and every screenshot of your slice comes back framed on the wrong thing. Move both and a capture in edit mode shows exactly what the player will see.
| arg | type | description |
|---|---|---|
| stationName | string |
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.