PushIn data
A camera around whatever it wraps: pushes in on a point at one moment and pulls back at another. Use it as the root, or give it a size.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| zoom | number (1 to 8) | 1.9 | |
| focus | point | [0.5,0.5] | [x, y] fractions, or "#id" of something inside |
| at | time | 1 | |
| back | time | "end" | when it pulls back out |
| curve | curve | "heavy" |
* 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 |
| view | box |
Content it wraps#
It wraps whatever is written in its children.
Example#
{"el": "PushIn", "zoom": 2.2, "focus": "#price", "at": 1.5, "back": 3.5, "children": []}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",
"w": "fill",
"h": "fill",
"clip": true,
"children": [
{
"el": "box",
"id": "view",
"w": "fill",
"h": "fill",
"align": "center",
"justify": "center",
"motion": [
{
"do": "camera",
"moves": [
{"at": "$at", "zoom": "$zoom", "focus": "$focus", "curve": "$curve"},
{"at": "$back", "zoom": 1, "curve": "$curve"}
]
}
],
"children": ["$children"]
}
]
}