Everything you need to create ad templates, integrate Rollaway Ads into your site, and interact with the JavaScript API.
Every ad sheet is defined by a single JSON object. The canonical feed lives at /ads.json.
| Field | Type | Required | Description |
|---|---|---|---|
brand | string | Yes | Brand name shown at the top of the sheet |
accent | string (hex) | Yes | Primary accent colour, e.g. #b8541f |
headline | string | Yes | Main headline (use \n for line breaks) |
subhead | string | Yes | Supporting tagline below the headline |
bullets | string[] | Yes | Array of 3-5 selling points |
cta | string | Yes | Call-to-action text (e.g. ORDER NOW → example.com) |
footer | string | No | Small-print promotional text |
heroImage | string (URL) | No | Brand logo or hero image URL |
bg | string (hex) | No | Background colour override (default: #faf6eb) |
{
"brand": "NEXA COFFEE",
"accent": "#b8541f",
"headline": "YOUR MORNING\nDESERVES BETTER",
"subhead": "Freshly roasted. Shipped within 24 hrs.",
"bullets": [
"12 oz bags from $14",
"Subscribe & save 20%",
"Roasted the same day it ships",
"Ethically sourced, direct trade"
],
"cta": "ORDER NOW → nexa.coffee",
"footer": "Use code RECEIPT10 for 10% off",
"heroImage": "https://example.com/logo.png"
}
The Rollaway Ads engine runs entirely client-side. There is no SDK to install — the single index.html file includes the full WebGL cloth-physics engine, ad renderer, and Supabase connector.
| Variable | Description |
|---|---|
activeSheet | The currently displayed sheet object |
freeSheets | Array of released (falling) sheets |
AD_TEMPLATES | Built-in fallback ad templates (26 entries) |
LIVE_POOL | Live ads fetched from Supabase |
RW | Supabase client instance (null if offline) |
createSheet({ pinned: true, collapseFromSlit: true }) — Creates a new sheet with cloth physics and ad textureforceRelease() fires — sheet becomes free-falling, ad budget is debited via Supabase RPCLIVE_POOL) — preferred if the user isn't pulling too fastAD_TEMPLATES) — used during rate limiting or when Supabase is unavailableTo add Rollaway Ads to your own site:
<iframe
src="https://rollawayads.com"
width="100%"
height="100vh"
style="border:none; position:fixed; inset:0; z-index:9999;"
allow="accelerometer; gyroscope"
></iframe>
index.html with your own projectAD_TEMPLATES and /ads.json with your brand templates| File | Purpose |
|---|---|
index.html | Full application (WebGL, physics, UI, Supabase) |
solver.wasm | WASM physics solver (6 KB, optional — JS fallback exists) |
solver-worker.js | Web Worker for off-thread physics (optional) |
ads.json | Default ad template catalogue |
public/ | Fallback ad images |
The cloth simulation uses Verlet integration with distance constraints, solved iteratively each frame.