Search Docs
Loading...
Skip to content

Type Alias: KeyframeValue

type KeyframeValue =
| {
type: "Float";
value: number;
}
| {
type: "Vec2";
value: Vec2;
}
| {
type: "Color";
value: Color;
}
| {
type: "Path";
value: {
vertices: KeyframePathVertex[];
closed: boolean;
};
}
| {
type: "List";
value: number[];
}
| {
type: "Discrete";
value: boolean | number | string;
};

Experimental

The value of a keyframe. type names the kind of the value, which must match the kind of the property. Experimental: this API may change in a minor release.

A 'Discrete' value never interpolates: a number is an integer, for example an enum index.