IrisWindow data
A circular aperture opens over supplied media. Edge and image travel together on a single curve.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| diameter | number (40 to 2000) | 560 | |
| curve | curve | "gentle" | |
| tint | color | "accent" |
* required. Every node also takes the common props: id, motion, start, place, scale, rotate, opacity, w, h. A colour is a palette name, never a value.
Parts#
Named parts can be restyled from outside without making a new component: "parts": { "root": { … } }.
| Part | Is a |
|---|---|
| root | box |
| matte | box |
Content it wraps#
| Slot | What goes in it |
|---|---|
| media | Image, footage, or another component inside the aperture |
Fill a slot with a list of nodes: "slots": { "media": [ … ] }.
Example#
{
"el": "IrisWindow",
"slots": {"media": [{"el": "icon", "name": "sparkle", "size": 240, "color": "white"}]}
}How it is made#
This component is plain data. Its whole definition is the tree below: copy it into a scene's components list under a new name to make your own version. See Custom components.
{
"el": "box",
"id": "matte",
"dir": "stack",
"clip": true,
"w": "$diameter",
"h": "$diameter",
"radius": 999,
"fill": "$tint",
"aperture": "=0.12+0.88*open",
"children": [
{
"el": "box",
"dir": "stack",
"w": "fill",
"h": "fill",
"scale": "=1.18-0.18*open",
"children": [{"$slot": "media"}]
}
]
}