Skip to content
Video & Audio
Skill

/canvas

Patterns for using Helios with Vanilla Canvas API. Use when building high-performance 2D/3D animations without frameworks.

From plugin
helios
13035 skills1 MCP

Claude Code

$ npx -y skills add BintzGavin/helios --skill canvas --agent claude-code

SKILL.md

canvas.SKILL.md
name: example-canvas
description: Patterns for using Helios with Vanilla Canvas API. Use when building high-performance 2D/3D animations without frameworks.

Vanilla Canvas Patterns

Use Helios directly with the HTML5 Canvas API. This provides the lowest overhead and highest performance.

Quick Start

1. HTML Setup

<!-- composition.html -->
<canvas id="canvas"></canvas>
<script type="module" src="./main.js"></script>

2. Logic Setup

// main.js
import { Helios } from '@helios-project/core';

// Setup
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
const width = 1920;
const height = 1080;

canvas.width = width;
canvas.height = height;

// Initialize Helios
const helios = new Helios({
  duration: 5,
  fps: 60
});
helios.bindToDocumentTimeline();
window.helios = helios;

// Draw Function
function draw(frame) {
  // Clear
  ctx.clearRect(0, 0, width, height);

  // Calculate state
  const time = frame / helios.fps;
  const t = time / helios.duration; // 0..1

  // Draw
  const x = t * (width - 100);
  ctx.fillStyle = 'tomato';
  ctx.fillRect(x, height / 2 - 50, 100, 100);
}

// Subscribe
helios.subscribe((state) => {
  draw(state.currentFrame);
});

// Initial Render
draw(0);

Performance Tips

  • **Pre-calculate values:** Do heavy math (like sine tables or physics simulations) upfront if possible.
  • **OffscreenCanvas:** For very complex scenes, consider rendering in a Web Worker using `OffscreenCanvas` to keep the main thread free.
  • **Batch Draw Calls:** Minimize context state changes (`fillStyle`, `strokeStyle`, etc).

Source Files

  • Example: `examples/simple-canvas-animation/`
Read more
@bintzgavin
Ships withhelios

Programmatic video creation with web technologies you already know. CSS animations just work.

13035 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
130
Star history of BintzGavin/helios on GitHub, a chart by star-history.com

Other skills on helios.

make-video

make-video

Make videos drawn with code: motion graphics, launch and explainer videos, animated shorts, animated charts and data, logo…

@bintzgavin@bintzgavinInstall Skill
core

core

Core API for Helios video engine. Use when creating compositions, managing timeline state, controlling playback, or subscribing…

@bintzgavin@bintzgavinInstall Skill
animated-video-philosophy

animated-video-philoso…

Story-first motion design philosophy for animated video: motion must earn its place; arc (establish, complicate, resolve); show…

@bintzgavin@bintzgavinInstall Skill
motion-styles

motion-styles

Opt-in library of established visual styles for code-drawn Helios videos: style cards (colour rules, type, motion grammar, a…

@bintzgavin@bintzgavinInstall Skill
chartjs

chartjs

Chart.js integration patterns for Helios. Use when creating animated data visualizations with Chart.js.

@bintzgavin@bintzgavinInstall Skill

More skills from other plugins.

captions-overlay

captions-overlay

Overlay doctrine for captions in HyperFrames videos — the caption MODEL (drop / rail / embed) and the rule that captions are an…

@heygen-com@heygen-comInstall Skill
acestep

acestep

AI music generation with ACE-Step 1.5 — background music, vocal tracks, covers, stem extraction for video production. Use when…

@calesthio@calesthioInstall Skill
seedance-antislop

seedance-antislop

This skill should be used when a Seedance 2.0 prompt contains generic AI filler, hollow superlatives, vague cinematic language,…

@emily2040@emily2040Install Skill

Questions about canvas.

Which coding agents can use canvas?
canvas installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.