Skip to content

anime.js adapter and skill document v3 API while loading the v4 CDN bundle #3293

Closed

Description

@lhabiastudio

The anime.js adapter and its skill document v3 API while loading the v4 CDN bundle, so any agent or user following the docs writes code that fails at runtime.

Where

packages/core/src/runtime/adapters/animejs.ts — the docblock states "Supports anime.js v4+ (the .seek(timeMs) API)", then the usage example right below it uses v3:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/anime.iife.min.js"></script>
<script>
  const anim = anime({
    targets: '.box',
    translateX: 250,
    duration: 2000,
    autoplay: false,
  });

skills/animejs/SKILL.md has the same problem in both examples — the basic pattern uses anime({ targets: ..., easing: "easeOutExpo" }) and the timeline pattern uses anime.timeline({ ... }).

In anime.js v4 the global callable anime() and anime.timeline() were removed in favour of anime.animate(target, params) and anime.createTimeline(params); targets is now the first argument rather than a property, and easing was renamed to ease.

Evidence that v4 is the intended target

The integration test under packages/producer/tests/animejs-adapter/src/index.html already uses the correct v4 API:

const tl1 = anime.createTimeline({ autoplay: false });
tl1.add('#label', { opacity: [0, 1], translateY: [-30, 0], duration: 400, ease: 'out(4)' }, 200);

So the test and the docs disagree, and the test is the one that runs.

Impact

Agents are explicitly told to read the skill before authoring, so the broken snippets are the most likely thing to get copied. The failure is silent at author time and only shows up as a dead composition at render.

Suggested fix

Align the docblock in adapters/animejs.ts and both examples in skills/animejs/SKILL.md with the v4 API already exercised by the adapter test — or, if v3 is still meant to be supported, pin the CDN example to animejs@3 so the snippet at least matches the bundle it loads.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions