一键导入
example-canvas
Patterns for using Helios with Vanilla Canvas API. Use when building high-performance 2D/3D animations without frameworks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Patterns for using Helios with Vanilla Canvas API. Use when building high-performance 2D/3D animations without frameworks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Collection of agent skills for Helios video engine. Use when working with programmatic video creation, browser-native animations, or Helios compositions. Install individual skills by path for specific capabilities.
Core API for Helios video engine. Use when creating compositions, managing timeline state, controlling playback, or subscribing to frame updates. Covers Helios class instantiation, signals, animation helpers, and DOM synchronization.
Chart.js integration patterns for Helios. Use when creating animated data visualizations with Chart.js.
Learn how to use D3.js with Helios for data visualization. Use when creating charts, graphs, or data-driven animations.
Patterns for using Helios with Framer Motion. Use when you want to use Framer Motion's physics and transitions but need frame-perfect synchronization with Helios.
Patterns for using Helios with GSAP (GreenSock). Use when integrating GSAP timelines with the Helios timeline for precise scrubbing and rendering.
| name | example-canvas |
| description | Patterns for using Helios with Vanilla Canvas API. Use when building high-performance 2D/3D animations without frameworks. |
Use Helios directly with the HTML5 Canvas API. This provides the lowest overhead and highest performance.
<!-- composition.html -->
<canvas id="canvas"></canvas>
<script type="module" src="./main.js"></script>
// 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);
OffscreenCanvas to keep the main thread free.fillStyle, strokeStyle, etc).examples/simple-canvas-animation/