outline.renderFeature
No description provided.
No description provided yet.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2Outline render feature — screen-space jump-flood (JFA) silhouette rim. Every frame, draws a coloured rim hugging the silhouette of each entity in the @builtin::modules.outline registry. Unlike an extruded shell, the rim is a uniform pixel width and never tears on hard-edge or multi-part meshes, because it is computed from the silhouette in screen space: 1. mask — a geometry pass fills the group's meshes white into a mask RT. 2. seed — silhouette pixels store their own screen position (and an inside flag) into a float position buffer; others a far sentinel. 3. flood — log2(thickness) ping-pong passes propagate the nearest stored position, so every pixel learns the nearest silhouette pixel. 4. composite — blends the rim colour over the scene where a pixel is OUTSIDE the silhouette and within `thickness` of it. The mask, seed and flood run at half resolution (the flood is the cost and a few-pixel rim doesn't need full res); the composite runs at full resolution and samples the half-res field. Position buffers are RGBA32F: RG holds the nearest silhouette position (float32 — half-float rounds coordinates above 2048, which a high-DPI viewport exceeds), and B carries each pixel's own inside/outside mask, so the composite can exclude the interior by the real silhouette rather than by a distance that half resolution makes imprecise. Entities are grouped by (colour, thickness); each group is one mask→seed→ flood→composite chain. An empty registry enqueues nothing.
floodSteps(thickness: number) → void
Flood step schedule: the largest power of two that covers `thickness`, halving to 1. A bounded jump-flood — only a handful of passes for a thin rim.
| arg | type | description |
|---|---|---|
| thickness | number |
groupKey(color: { number }, thickness: number) → string
| arg | type | description |
|---|---|---|
| color | { number } | |
| thickness | number |
addUnregisteredDescendants(id: string, outlinedIds: { [string]: boolean }, sel: { any }) → void
Append every descendant of `id` that isn't itself outlined to `sel`, so a parent's outline covers the render-only child meshes it owns — a voxel shape keeps its mesh on a render child, a bundle scatters its parts across children. A descendant that carries its own outline is left to its own group. `entity.getDescendants` resolves the whole subtree at every depth in one pass over the entity set (bounding a mis-parented cycle to each node once), so a deep or wide hierarchy costs O(entity count) rather than one snapshot rescan per node.
| arg | type | description |
|---|---|---|
| id | string | |
| outlinedIds | { [string]: boolean } | |
| sel | { any } |
freeTargets( ) → void
render(ctx: ?) → void
| arg | type | description |
|---|---|---|
| ctx | ? |
teardown(ctx: ?) → void
| arg | type | description |
|---|---|---|
| ctx | ? |
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.