Log inGet started
·
procpack · drop-in viewer
asset⌬ procpackprocPackprimary: init.luau·part ofpackage procgen.package·originates fromworld 07158574-5…

ramp.procPack

A ramp is a value that changes over 0..1. It is how an effect makes one thing follow another: colour over life, size over speed, opacity over height.

by◐lumi·posted 1mo ago
What it does

ramp

A ramp is a value that changes over 0..1. It is how an effect makes one thing follow another: colour over life, size over speed, opacity over height.

procgen.searchNodes("", { pack = "ramp" }) lists the family and procgen.describeNode("op.<id>") describes any one of them.

Ops

  • ramp.keys — a ramp built from keys. Each key is { t, value }, and the value can be a Float, Color, Vec2, Vec3 or Vec4. Between keys the value moves in one of three ways:
    • linear: a straight line from key to key;
    • smooth: eased into and out of each key;
    • constant: each key's value held until the next key.
  • ramp.blackbody — the colours a blackbody glows at across a temperature range, as a Color ramp: red embers through orange flame to white. glow makes the hotter keys brighter; 4 follows the fourth power of temperature that real blackbody radiance does.
  • ramp.sample — a ramp read at every element, at the position along it a 0..1 field names. The ramp compiles to the element's dispatch, so a solver's particles read it on the device.
  • field.ramp — a ramp read at every element by a value it carries: a graph of field.attribute, field.map_range and ramp.sample. By default each element reads it by its own life attribute, so particles change over their lifetime. by names any other attribute, range maps that attribute's values onto 0..1, and wiring t reads the ramp by any field.

A ramp is a graph value like any other. It can be wired, animated (its keys are params) and cached.

g:node("fire", "ramp.blackbody", nil, { from = 900, to = 4000, glow = 1 })
g:node("tint", "field.ramp", { ramp = "fire" })
g:node("lit", "attribute.set", { domain = "sim", value = "tint" }, { name = "Cd" })

Interface

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

conforms to

zero/source-extract/v2

ramp — Values that change over 0..1, and reading them by any attribute: colour over life, size over speed, opacity over height. A ramp is made from keys or from the colour a blackbody glows at, and `ramp.sample` reads one at every element, on the device.

num(v: any, d: number) → number

argtypedescription
vany
dnumber

componentsOf(v: any, lanes: number, t: string, where: string) → void

A key's value as `lanes` numbers: a number, `{ x, y, z, w }`, `{ r, g, b, a }` or an array. A colour missing its alpha is opaque.

argtypedescription
vany
lanesnumber
tstring
wherestring

valueExpr(values: { number }, at: number, lanes: number) → string

A float as the token a compiled template carries, and a key's value as the WGSL value of its width.

argtypedescription
values{ number }
atnumber
lanesnumber

rampExpr(ramp: any, u: string) → void

The walk `Ramp.sample` takes, as one expression of `u`.

argtypedescription
rampany
ustring

blackbody(kelvin: number) → void

A blackbody's colour at `kelvin`, as linear RGB: the fit of the Planckian locus in sRGB the film and games industries share, taken to linear.

argtypedescription
kelvinnumber

linear(c: number) → number

argtypedescription
cnumber

eval(_ctx: ?, _inputs: ?, params: ?) → void

argtypedescription
_ctx?
_inputs?
params?

eval(_ctx: ?, _inputs: ?, params: ?) → void

argtypedescription
_ctx?
_inputs?
params?

eval(_ctx: ?, inputs: ?, _params: ?) → void

argtypedescription
_ctx?
inputs?
_params?

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.