bintzgavin/helios

example-canvas

Patterns for using Helios with Vanilla Canvas API.

Ver código fuente

Cómo usar

  1. Copia el comando y revisa el paquete antes de instalarlo en tu entorno de agente.
  2. Consulta las herramientas, credenciales y entornos necesarios en el documento original.
  3. Describe las entradas y el resultado deseado; contrasta la salida con las fuentes.
npx skills add https://github.com/bintzgavin/helios --skill example-canvas

Antes de empezar

  • La instalación no incluye suscripción al modelo, cuota API ni permisos sobre tus archivos.
  • Las estrellas e instalaciones reflejan actividad, no una prueba independiente de calidad o seguridad.
Documento original del Skill

Contenido del repositorio de origen con títulos, ejemplos, código, tablas, enlaces e imágenes preservados.

Vanilla Canvas Patterns

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

Quick Start

1. HTML Setup

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

2. Logic Setup

javascript
// 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/
del mismo repositorio

Más Skills

Todos los Skills
bintzgavin
Comunidad

animated-video-philosophy

Story-first motion design philosophy for animated video: motion must earn its place; arc (establish, complicate, resolve); show vs tell; shots as units of thought; quiet vs loud motion; Disney principles with restraint; timing heuristics; composition; grammar by medium (product demos, logos, data viz, explainers); technical commitments (deterministic time, scrubbability, refs); cutting discipline; explicit anti-patterns. Use when planning, storyboarding, critiquing, or implementing programmatic

Instalaciones / 1h
1
GitHub Stars
131
Actualizado
12 nov
bintzgavin
Comunidad

archive-broll

Find, preview, cut and credit archival B-roll from the Internet Archive (archive.org) for a Helios video — public-domain, CC BY and CC BY-SA film plus Prelinger Archives. Use when a Helios composition needs real footage as a plate, cutaway, masked fill or texture. Not for generating footage or editing the user's own camera video.

Instalaciones / 1h
1
GitHub Stars
131
Actualizado
12 nov
bintzgavin
Comunidad

cinematic-product-promo-plan

End-to-end production plan template for feeling-first cinematic product promos: brief interrogation, 45s beat structure (cold open through brand), hero-element metaphor, storyboard fidelity ladder, visual system (palette, type, camera, texture), motion mix and easing vocabulary, audio and captions, tooling (animatic through HTML or AE), deliverables matrix, accessibility, review milestones, and compromises to accept or refuse. Use when planning, pitching, storyboarding, or producing polished bra

Instalaciones / 1h
1
GitHub Stars
131
Actualizado
12 nov
bintzgavin
Comunidad

example-tailwind-animation

Learn how to use Tailwind CSS with Helios. Use for styling compositions and animating with utility classes.

Instalaciones / 1h
1
GitHub Stars
131
Actualizado
12 nov