example-vanilla
Skill130 starsChanged 38 days agoApache-2.0View on GitHub
Patterns for using Helios with Vanilla JavaScript/TypeScript. Use when building compositions without a framework, or for simple DOM/Canvas manipulations.
In this repository38 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- llms.txtllms.txt
- skill-creatorSkill
- helios-coreSkill
- animated-video-philosophySkill
- cinematic-product-promo-planSkill
- motion-stylesSkill
- example-canvasSkill
- example-chartjsSkill
- example-d3-animationSkill
- example-framer-motionSkill
- example-gsapSkill
- example-lottieSkill
- example-p5-animationSkill
- example-pixiSkill
- example-podcast-visualizerSkill
- example-reactSkill
- example-signals-animationSkill
- example-solidSkill
- example-svelteSkill
- example-tailwind-animationSkill
- example-threejsSkill
- example-vueSkill
- helios-getting-startedSkill
- guided-brand-videoSkill
- guided-cartoon-shortSkill
- motion-design-rulesSkill
- guided-music-videoSkill
- guided-video-recipesSkill
- helios-playerSkill
- helios-rendererSkill
- helios-skillsSkill
- helios-studioSkill
- archive-brollSkill
- create-compositionSkill
- render-videoSkill
- workflow-visualize-dataSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 37
Use subscribe to update the DOM or Canvas on every frame.
- Very specific: line 81
Direct DOM Manipulation: Use style.transform, textContent, etc., inside the subscribe callback.
- Distinctive: line 83
Performance: Avoid expensive layout thrashing (reading offsets then writing styles) inside the loop.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Vanilla JS Composition Patterns
Integrate Helios into standard HTML/JS applications using direct DOM manipulation and subscriptions.
Quick Start
1. Setup
Initialize Helios and bind to the document timeline.
import { Helios } from '@helios-project/core';
// 1. Initialize Helios
const helios = new Helios({
duration: 10,
fps: 30,
width: 1920,
height: 1080,
autoSyncAnimations: true // Sync WAAPI/CSS animations
});
// 2. Expose for Player/Studio
(window as any).helios = helios;
// 3. Bind to external timeline (important for Renderer/Studio)
helios.bindToDocumentTimeline();2. Subscribe to Updates
Use subscribe to update the DOM or Canvas on every frame.
const box = document.getElementById('box');
helios.subscribe((state) => {
if (!box) return;
const { currentFrame, fps } = state;
const time = currentFrame / fps;
// Animate based on time
const x = time * 100;
box.style.transform = `translateX(${x}px)`;
// Update text
box.textContent = `Frame: ${currentFrame}`;
});3. Captions Example
Driven by SRT content.
const captionBox = document.getElementById('captions');
helios.subscribe((state) => {
if (!captionBox) return;
const activeCues = state.activeCaptions;
if (activeCues.length > 0) {
captionBox.innerText = activeCues.map(c => c.text).join('\n');
captionBox.style.opacity = '1';
} else {
captionBox.innerText = '';
captionBox.style.opacity = '0';
}
});Key Concepts
- Direct DOM Manipulation: Use
style.transform,textContent, etc., inside thesubscribecallback. bindToDocumentTimeline: Crucial for allowing theHeliosPlayerorRendererto drive the animation.- Performance: Avoid expensive layout thrashing (reading offsets then writing styles) inside the loop.
Source Files
- Example:
examples/vanilla-captions-animation/ - Example:
examples/simple-canvas-animation/
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

