Log inGet started
·
assettype · drop-in viewer
asset⌬ assettypeassetTypeprimary: type.yaml·originates fromworld 07158574-5…

animation.assetType

A single animation clip, as a composite asset. The folder `<name>.animation/` carries:

byzero-proxy @ DESKTOP-DB3UJOJ·posted 2mo ago
What it does

animation asset type

A single animation clip, as a composite asset. The folder <name>.animation/ carries:

  • data.zanim — the engine-native binary clip payload (bincode AnimAsset): bone-named tracks, duration, channels. This is the asset's primary; consumers reference the .animation asset's guid, never this inner file. Parallel to how .mesh carries data.zmsh.
  • humanoid.profile (optional) — the editable retarget holder: the clip's source-rig role↔bone map, so any humanoid rig can consume the clip. Written by the retarget setup (animation.onCreate path), inspectable and hot-reloaded.

Clips are produced by the model importers (model, model_animation), which decode embedded animation tracks and call asset.create("animation", name, { bytes }). Bare .anim files are the legacy shape; the .animation composite supersedes them (existing .anim guids are inherited by their migrated .animation asset so references keep resolving).

In the Inspector

Selecting an animation opens its Clip section, decoded from data.zanim once per payload version. It reports the clip's name, duration in seconds, channel and bone counts, and, when the clip is tagged, whether it is humanoid. It links the rig named in source_rig.json and lists the clip's bones. An animation with no data.zanim says so.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/asset-type/v1
⌬ Spec
suffix.animationcontainernooptional files.metadata, data.zanim, rig.zmsh, humanoid.profile, README.md
Exposed API
⌬ Hooks

onChange(ref: any, change: { [string]: any }) → void

React to a write inside a `.animation/` instance: when the clip's source rig link (`source_rig.json`) changes, record the rig's humanoid classification into `.metadata` for search — the clip inherits it from the rig it targets. Originator-only; `.metadata` syncs as ordinary content.

argtypedescription
refanyThe AssetRef<animation> for the changed clip.
change{ [string]: any }`{ path, asset, type, kind, origin }`.

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

8items
▣
module · born here
❒asset
# json JSON encode/decode library for Luau. Encodes Lua values to JSON strings and decodes JSON strings back to Lua values. Used for communication with the Rust side of the engine, the VFS read/write bridge, and any wire-format that needs JSON. Pure Luau, no engine dependencies. Compact and pretty-printed encoders, plus a hand-rolled decoder that streams the input by position so it works under WASM as well as native. ## Exports - `Json.encode(value: any, indent?: string, currentIndent?: string) -> string` — compact encode. Functions / unknown types and NaN/Inf encode as `null`. - `Json.encodePretty(value: any, indentStr?: string) -> string` — pretty-printed encode with sorted object keys (diff-friendly). - `Json.encodeArgs(...: any) -> string` — encode varargs as a JSON array. - `Json.decode(str: string) -> any` — decode a JSON string. Returns the decoded value, or `nil` + error message on failure. ## Usage ```luau local Json = require("@builtin::modules.json") local widget = { type = "button", text = "Click Me" } local compact = Json.encode(widget) -- '{"text":"Click Me","type":"button"}' local pretty = Json.encodePretty(widget, " ") local decoded = Json.decode(compact) local v, err = Json.decode("oops") -- v = nil, err = error message ``` ## Notes - Object keys are sorted alphabetically in both encoders for consistent output across runs. - Numeric keys on objects are stringified at encode time (JSON has no numeric keys). Pure-integer key sets get detected as arrays via `isArray` and encoded with brackets. - NaN, +Inf, -Inf encode as `null` — JSON has no representation. Round trips through `decode` recover `null` (Lua `nil`), so they don't preserve. - Unicode `\uXXXX` escapes decode to UTF-8 by hand to stay WASM-safe. Only the BMP is covered; supplementary planes via surrogate pairs are not. - Functions encode as `null`. - Decode is character-streamed — no regex, no `string.match` patterns on the whole input — so the line-and-column information needs to be reconstructed from the position offset.
▲ 0↑ born
·
other · born here
▤file
▲ 0↑ born

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.