GizStack
View .mdOpen in ChatGPTOpen in Claude

gizgame/animation

gizlang
import * as Animation from "gizgame/animation";

Types

Binding

gizlang
type Binding = { entity: Entity; component: i64; field: i64; channel: Channel; }

Binds a shared animation channel to one authoritative component field.

  • entity: M186.Entity
  • component: i64
  • field: i64
  • channel: gizlang_animation.Channel

Layer

gizlang
type Layer = { binding: Binding; time: f64; weight: f64; }

One weighted animation use. Playback time and weights remain caller-owned ECS component data.

  • binding: M180.Binding
  • time: f64
  • weight: f64

Functions

apply

gizlang
function apply(world: World, binding: Binding, time: f64): void throws string

Writes sampled values through the World's field validation, access scope and change tracking.

Effects: fail, read, write, alloc.

applyLayers

gizlang
function applyLayers(world: World, layers: Vec<Layer>): void throws string

Blends channels targeting the same field, then writes each field once through its authoritative World.

Effects: fail, read, write, alloc.