Skip to content

Palette @include reports a circular include when a sprite is used twice as a GIF frame #23

Open

Description

@scbrown
// base.pxl
{ type: "palette", name: "p", colors: { _: "transparent", x: "#ff0000" } }
// anim.pxl
{ type: "sprite", name: "a", size: [4, 4], palette: "@include:base.pxl", regions: { x: { points: [[0, 0]] } } }
{ type: "animation", name: "an", frames: ["a", "a"], duration: 100 }

The first frame is right, but the second renders magenta with Circular include detected: .../base.pxl and
Unknown token x. The include-visited set seems to be shared across frames,
so the second lookup of the same file is treated as a cycle. The same include
works through a composition. Workaround: skull_anim.pxl repeats the
bone palette instead of including it from skull.pxl.

Found while animating examples/skull (#21).

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions