Nothing

Animate a property

Place keys on the property owner and predict the sampled value between keys.

Read as Markdown

Put animate directly inside the element that owns the property. Key a shape’s translate-x to move its whole picture, a rectangle’s width to resize its contour, or a child shape’s along to move it on its host’s contour. For each track, declare an authored scene frame-rate and at least two strictly increasing keys. Keep a valid base value on the owner when the property requires one. Track authoring and key ownership

Match a moving marker to a stroke reveal

In the runnable road scene, the marker starts with along="0". Its track advances the locator from 0 on frame 0 to 1 on frame 24. The stripe uses the same keys for the end on its trim. The road travels 60 units right, then 40 units down, with its origin translated to (16, 16).

SampleLocator and trim endMarker origin in the scene
Frame 00(16, 16)
Frame 120.5(66, 16), facing right
Frame 180.75(76, 31), facing down
Frame 241(76, 56), facing down

The ease on the first key applies to the segment leaving it. linear gives the halfway value at frame 12. Try ease="hold" on both tracks’ first keys. At frame 12 the marker stays at the start and the stripe remains empty. Frame 24 still reaches the end because both tracks use fill="freeze". Change both tracks to fill="remove" and frame 24 instead returns to the authored base values of zero. Track evaluation and repeat boundaries

A frame address follows the authored rate. At 24 fps, frame="12" and time="0.5s" denote the same instant, so they would be duplicate addresses in the same track. At 30 fps, frame 12 moves to 0.4 seconds and the seconds address stays at 0.5. For a track inside another composition, resolve the owning clock first.

Examples

Download the complete .nothing source · Source on GitHub

Rendered with ncf-preview at 128 × 96.

An amber marker sits at the start of a dark road. The white stripe has zero length.
Frame 0 · StartAn amber marker sits at the start of a dark road. The white stripe has zero length.
The stripe has painted 50 of the road’s 100 local units. The marker points right from (66, 16).
Frame 12 · HalfwayThe stripe has painted 50 of the road’s 100 local units. The marker points right from (66, 16).
The stripe runs 15 units down the vertical leg. The marker points down from (76, 31).
Frame 18 · Around the cornerThe stripe runs 15 units down the vertical leg. The marker points down from (76, 31).
The stripe covers both legs. The marker points off the end of the vertical leg at (76, 56).
Frame 24 · EndThe stripe covers both legs. The marker points off the end of the vertical leg at (76, 56).
XML source
  <shape translate-x="16" translate-y="16">
    <polyline points="0,0 60,0 60,40"/>
    <stroke stroke-width="12">
      <paint><solid color="#2C313CFF"/></paint>
    </stroke>
    <stroke stroke-width="6">
      <trim start="0" end="0">
        <animate attributeName="end" fill="freeze">
          <key frame="0" value="0" ease="linear"/>
          <key frame="24" value="1"/>
        </animate>
      </trim>
      <paint><solid color="#F4F4F5FF"/></paint>
    </stroke>
    <shape along="0" orient="auto">
      <polygon points="-2,-6 8,0 -2,6"/>
      <fill><paint><solid color="#FFC23DFF"/></paint></fill>
      <animate attributeName="along" fill="freeze">
        <key frame="0" value="0" ease="linear"/>
        <key frame="24" value="1"/>
      </animate>
    </shape>
  </shape>

On this page