Ara
Download

Search or run a command

Jump to a section or open an Ara link.

Component · twoD

Flipbook

Tick-driven flipbook state, wholly contained in an ECS component.

Fields

frames

list<FlipbookFrame>
Ordered clip frames.
default []

startTick

u64
Clip's start tick, preserved through snapshots.
default 0

looping

bool
Repeat rather than hold the final frame.
default false

Usage

Every edit is an undoable command: from the CLI as below, or the same JSON from an agent over MCP. See component.add and property.set.

Add it

ara do component.add -p entity=name:Crate -p component=Flipbook --why "Add Flipbook"

Set a field

ara do property.set -p entity=name:Crate -p path=Flipbook.frames -p value=[] --why "Tune Flipbook"

In a scene document

{
  "Flipbook": {
    "frames": []
  }
}

From C#

/// <summary>Loop a campfire flipbook while the fire is burning.</summary>
public static void UseFlipbook(Entity entity, in Tick tick)
{
    ref var component = ref World.Get<Flipbook>(entity);
    component.Looping = true;
}

From C#

Scripts read and write it with Get<Flipbook>(); see the Flipbook struct.

Used by