AnimationVector

sealed class AnimationVector

A small, mutable, fixed-size holder for the float components an animated value decomposes into — the currency the spring/tween machinery computes on. A scalar animates as one component, a size as two, a color as four.

The get/set operators let callers treat it like an indexed buffer (vector[i]). Concrete shapes are an implementation detail; obtain one via ofSize, which a TypeConverter uses to implement TypeConverter.newVector. The small fixed sizes are backed by plain fields (no FloatArray indirection); larger sizes fall back to an array.

See also

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val size: Int

Number of float components this vector holds.

Functions

Link copied to clipboard
abstract operator fun get(index: Int): Float

Reads component index; out-of-range indices read as 0f.

Link copied to clipboard
abstract operator fun set(index: Int, value: Float)

Writes component index; out-of-range indices are ignored.