DRincs-Productions/pixi-vn / skills/canvas
pixi-vn-canvas
VerifiedUse when adding, moving, or removing images, sprites, spritesheet frame animations (AnimatedSprite), text, or video on the Pixi'VN game canvas, or when applying or creating transitions (dissolve, fade, move, zoom, push, wipe, iris, split, flash, blur, pixelate, or a custom one built on `canvas.animate`/`filters.animate`), shake/animation effects, or ticker-based animations built on PixiJS. Covers the `canvas` singleton exported from `@drincs/pixi-vn`. For UI layers (HTML or PixiJS) mounted on top of the canvas, see `pixi-vn-ui` instead.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 37.6 KB |
| tickers.md | markdown | 2.4 KB |
tickers.md
View on GitHub# Pixi'VN Canvas: manual tickers (advanced)
Part of the `pixi-vn-canvas` skill — read `SKILL.md` first. This file covers **manual, low-level
ticker management**: registering a continuous/looping `Ticker` yourself and controlling it directly.
Reach for this only when `canvas.animate`, the transition helpers, or `shakeEffect` (covered in
`SKILL.md`) don't fit — e.g. an indefinitely-looping effect with no fixed duration, or fine-grained
pause/resume/completion control over a specific running animation.
Docs: [pixi-vn.com/start/canvas-tickers](https://pixi-vn.com/start/canvas-tickers).
## The `tickers` singleton
Ticker management lives on its own `tickers` object, imported from `@drincs/pixi-vn` like `canvas`:
```ts
import { tickers } from "@drincs/pixi-vn";
```
`canvas.tickers` is a deprecated alias of the same object — use `tickers` directly in new code (see
`pixi-vn-migration`, v1.9.3 → v1.9.4).
## Registering a ticker
For continuous/looping effects (e.g. a custom rotation), register a `Ticker` class and attach it
to an alias:
```ts
tickers.add("alien", new RotateTicker({ speed: 0.2 }));
```
## Sequencing tickers
To chain multiple tickers one after another on the same alias, use `tickers.addSequence` with a
plain array of `Ticker` instances — each step starts once the previous one completes:
```ts
tickers.addSequence("alien", [
new RotateTicker({ speed: 0.1, clockwise: true }, 2), // runs for 2 seconds
new RotateTicker({ speed: 0.2, clockwise: false }, 2),
]);
```
## Pausing, resuming, removing, and completion
Use `tickers.pause(...)` / `tickers.resume(...)` to pause/resume by canvas alias or ticker id, and
`tickers.remove(id)` / `tickers.removeAll()` to stop them. If a goal-directed ticker (e.g. a
`MoveTicker` with a destination) must finish before the current step ends — rather than being
interrupted by the player advancing — call `tickers.completeOnStepEnd({ id })`; this is distinct
from the `completeOnContinue` transition prop covered in `SKILL.md`.
Note also (from `SKILL.md`'s gotchas): `canvas.remove(alias)` removes tickers bound only to that
alias by default — pass `{ ignoreTickers: true }` if you intend to reattach them elsewhere first.
## Writing a custom `Ticker` subclass
Out of scope for a quick reference — see the `tickers` exports (`TickerBase`, `tickerDecorator`,
`RegisteredTickers`) in `@drincs/pixi-vn` if a project needs a genuinely new ticker type rather than
composing the built-in presets.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |