# `<animate>`

[Canonical page](https://nothing.graphics/docs/format/reference/animate) · [Page source on GitHub](https://github.com/gridaco/nothing/blob/main/ncf/docs/reference/animate.md)

Key one property on the enclosing XML element.

## Examples

[Download the complete .nothing source](https://nothing.graphics/format/moving-locator/source.nothing) · [Source on GitHub](https://github.com/gridaco/nothing/blob/main/ncf/conformance/attached-drawables/01-road-arrow.nothing)

Rendered with ncf-preview at 128 × 96.

- [Frame 0 · Start](https://nothing.graphics/format/moving-locator/0.webp). An amber marker sits at the start of a dark road. The white stripe has zero length.
- [Frame 12 · Halfway](https://nothing.graphics/format/moving-locator/12.webp). The stripe has painted 50 of the road’s 100 local units. The marker points right from (66, 16).
- [Frame 18 · Around the corner](https://nothing.graphics/format/moving-locator/18.webp). The stripe runs 15 units down the vertical leg. The marker points down from (76, 31).
- [Frame 24 · End](https://nothing.graphics/format/moving-locator/24.webp). The stripe covers both legs. The marker points off the end of the vertical leg at (76, 56).

```xml
  <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>
```



<!-- Generated by ncf/tools/reference/generate.mjs. -->

A property track is a direct child of the element that owns the value. Tracks add no paint or mixing slot. Base evaluation uses the authored value or its defined default.

## Syntax [#syntax]

### Turn a shape and hold its final angle [#turn-a-shape-and-hold-its-final-angle]

Key rotation on the owning shape. The turn reaches 45° at frame 2 and 90° at frame 4. Freeze retains the final angle while the rectangle’s separate width track runs through frame 8.

```xml
<animate attributeName="rotate" fill="freeze">
  <key frame="0" value="0" ease="linear"/>
  <key frame="4" value="90"/>
</animate>
```

[Complete .nothing source](https://github.com/gridaco/nothing/blob/main/ncf/conformance/boxed-geometry/centered-rectangle.nothing) · [Sample checks](https://github.com/gridaco/nothing/blob/main/ncf/conformance/boxed-geometry/README.md#a-centered-rectangle-rotates-and-widens)

## Usage context [#usage-context]

Use directly under a keyable property owner. The selected property must support keys in that context. Level 1 owners are [`<shape>`](https://nothing.graphics/docs/format/reference/shape), [`<rect>`](https://nothing.graphics/docs/format/reference/rect), [`<group>`](https://nothing.graphics/docs/format/reference/group), [`<scene>`](https://nothing.graphics/docs/format/reference/scene), [`<camera>`](https://nothing.graphics/docs/format/reference/camera), [`<circle>`](https://nothing.graphics/docs/format/reference/circle), [`<ellipse>`](https://nothing.graphics/docs/format/reference/ellipse), [`<line>`](https://nothing.graphics/docs/format/reference/line), [`<polyline>`](https://nothing.graphics/docs/format/reference/polyline), [`<polygon>`](https://nothing.graphics/docs/format/reference/polygon), [`<path>`](https://nothing.graphics/docs/format/reference/path), [`<boolean>`](https://nothing.graphics/docs/format/reference/boolean), [`<stroke>`](https://nothing.graphics/docs/format/reference/stroke), [`<trim>`](https://nothing.graphics/docs/format/reference/trim), [`<paint>`](https://nothing.graphics/docs/format/reference/paint), [`<solid>`](https://nothing.graphics/docs/format/reference/solid), [`<image>`](https://nothing.graphics/docs/format/reference/image), [`<gradient>`](https://nothing.graphics/docs/format/reference/gradient), [`<stop>`](https://nothing.graphics/docs/format/reference/stop), [`<mask>`](https://nothing.graphics/docs/format/reference/mask), [`<blur>`](https://nothing.graphics/docs/format/reference/blur), [`<drop-shadow>`](https://nothing.graphics/docs/format/reference/drop-shadow), [`<inner-shadow>`](https://nothing.graphics/docs/format/reference/inner-shadow), [`<box-shadow>`](https://nothing.graphics/docs/format/reference/box-shadow), [`<text>`](https://nothing.graphics/docs/format/reference/text), [`<span>`](https://nothing.graphics/docs/format/reference/span), [`<sequence>`](https://nothing.graphics/docs/format/reference/sequence).

The spatial trial also allows [`<plane>`](https://nothing.graphics/docs/format/reference/plane) as a property owner.

The selected property needs a valid base. Some bases are mandatory even when the property can be omitted without a track. At a sample, the latest contributing first-key time wins, with ties resolved by later declaration order.

## Attributes [#attributes]

[Property animation](https://nothing.graphics/docs/format/spec/animation#property-types-and-exceptions)

### `attributeName` [#attributename]

**Value** `Case-sensitive keyable property name on the enclosing owner` · **Required** · **Keys** Static

Select the XML attribute or an animation-only target such as the literal copy value on leaf text.

### `fill` [#fill]

**Value** `remove`, `freeze` · **If omitted** `remove` · **Keys** Static

Remove releases the property when the final iteration finishes. Freeze retains the last value. [Evaluating animation tracks](https://nothing.graphics/docs/format/spec/animation#evaluation)

### `repeatCount` [#repeatcount]

**Value** `Positive integer` · **If omitted** `1` · **Keys** Static

Number of iterations. An interior repeat boundary uses the first key again. [Evaluating animation tracks](https://nothing.graphics/docs/format/spec/animation#evaluation)

## Children [#children]

| Elements                                                      | Cardinality | Declared by | Role and source order                                                                                                                                                                                                                                                             |
| ------------------------------------------------------------- | ----------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`<key>`](https://nothing.graphics/docs/format/reference/key) | Two or more | `<animate>` | The first key starts the track and the last defines the iteration endpoint. Strictly increasing resolved instants. Equal times are invalid even with different address forms. [Frame and exact-time addresses](https://nothing.graphics/docs/format/spec/animation#key-addresses) |

## Specifications [#specifications]

* [Owning and authoring tracks](https://nothing.graphics/docs/format/spec/animation#authoring)
* [Evaluating animation tracks](https://nothing.graphics/docs/format/spec/animation#evaluation)
* [Frame and exact-time addresses](https://nothing.graphics/docs/format/spec/animation#key-addresses)
