v0.4.0GitHub—

docs / getting started / index

Meet Swarm Troopers

Coordinate a swarm of named cursor agents on your existing page.

Swarm Troopers is a browser overlay that reveals your existing HTML through familiar cursor gestures. Agents type text, frame cards, draw dividers, and stamp repeated items. One orchestrator coordinates small squads around the content currently in view.

Your HTML remains complete. Swarm Troopers does not generate copy, duplicate elements, or rearrange your layout. When JavaScript is unavailable, the page remains readable. Readers can skip the effect with the quality controls.

##Your first build

  1. Add the pinned script from the CDN (https://unpkg.com/swarmtroopers@0.4.0/dist/swarmtroopers.core.iife.js), or self-host it: install the package with npm i swarmtroopers and copy dist/swarmtroopers.core.iife.js from node_modules/swarmtroopers into your website’s public files.
  2. Add the script after your page content. Swarm Troopers starts when the DOM is ready.
html
<main>
  <h1>A page with a little character.</h1>
  <p>Your own content, already here.</p>
</main>
<script src="https://unpkg.com/swarmtroopers@0.4.0/dist/swarmtroopers.core.iife.js"
  data-swarmtroopers-init='{"root":"main","auto":true,"controls":true}'></script>

The script creates window.swarmtroopers, exposes helpers through window.SwarmTroopers, and adds Full, Light, and Off controls. Keep the controls outside the animated content; the built-in helper handles this for you.

##What happens on the page

  1. The scanner converts eligible elements into tasks and groups them by section.
  2. The orchestrator sends named cursor agents to visible work first. Each named agent keeps its own color as it shares tasks and moves between sections.
  3. Each tool reveals its element in place. A patience limit prevents untouched visible content from staying hidden indefinitely.
  4. After every task is done, the troopers leave. Optional pointer inspection can still identify finished elements.

The animated root is scanned through its descendants, so place the elements to build inside root. Scope Swarm Troopers to main or a specific showcase rather than including persistent navigation.

##Choose your integration

##Where Swarm Troopers fits

Use Swarm Troopers for a product introduction, portfolio, creative landing page, or a focused interactive example. Keep reading-critical documentation, checkout forms, and frequently used application interfaces immediately available. These documentation pages deliberately stay still.