Skip to content

OpenSenseNova/SenseNova-Skills / skills/sn-motion-html

sn-motion-html

Verified

Build continuous-shot motion-driven HTML stories from a subject or narrative, including research, story structure, consistent AI stills, Seedance scene and connector clips, interface styling, media normalization, and browser QA. Use for immersive journeys, timelines, product stories, fictional worlds, or other scene-based visual narratives whose camera should flow from beginning to end; not for ordinary autoplay video pages or general web apps.

assets/template/src/app.js

View on GitHub
(async function boot() {
  const root = document.getElementById('experience');
  const bootScreen = document.getElementById('boot');
  const dialog = document.getElementById('sources');
  try {
    const response = await fetch('content/story.json', { cache: 'no-store' });
    if (!response.ok) throw new Error(`story.json returned ${response.status}`);
    const story = await response.json();
    document.title = story.meta.title;
    const description = document.querySelector('meta[name="description"]');
    if (description) description.content = story.meta.description || story.meta.subtitle || story.meta.title;
    document.documentElement.dataset.style = story.meta.style || 'cinematic';
    document.documentElement.dataset.ui = story.meta.ui || 'folio';
    if (story.meta.accent) {
      document.documentElement.style.setProperty('--mh-accent', story.meta.accent);
    }
    window.mountMotionHTML(root, {
      title: story.meta.title,
      kicker: story.meta.kicker,
      subtitle: story.meta.subtitle,
      ui: story.meta.ui || 'folio',
      accent: story.meta.accent,
      chapters: story.chapters,
      connectors: story.connectors,
      connectorSpan: story.meta.connectorSpan || 1.2,
      scrollSnap: story.meta.scrollSnap !== false,
      snapThreshold: story.meta.snapThreshold,
      connectorPlaybackRate: story.meta.connectorPlaybackRate,
    });

    document.getElementById('adaptation-note').textContent = story.meta.note || '';
    const sourceList = document.getElementById('source-list');
    for (const source of story.sources || []) {
      const li = document.createElement('li');
      const link = document.createElement('a');
      link.href = source.url;
      link.textContent = source.label;
      link.target = '_blank';
      link.rel = 'noreferrer';
      li.appendChild(link);
      sourceList.appendChild(li);
    }

    document.addEventListener('click', (event) => {
      if (event.target.closest('a[href="#sources"]')) {
        event.preventDefault();
        dialog.showModal();
      }
    });
    dialog.querySelector('[data-close]').addEventListener('click', () => dialog.close());
    dialog.addEventListener('click', (event) => { if (event.target === dialog) dialog.close(); });
  } catch (error) {
    console.error(error);
    bootScreen.textContent = 'Could not load story data. Open this project through HTTP.';
    return;
  }
  bootScreen.classList.add('is-hidden');
  setTimeout(() => bootScreen.remove(), 400);
})();
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall