Appendix B
Share and embed
Put a Splash in a link, on a page, or on paper.
A link
The Playground's Share button copies a link that keeps the Splash, its view, its effects, and its splat count. A Splash's own page has a plain link to it. Old links keep loading.
On your own page
Add the element and one script tag. It sizes itself to 4:3 unless you give it a height, starts when it scrolls into view, and shows a message on a device without WebGL 2.
<script type="module" src="https://splashery.app/play/src/element.js"></script>
<splashery-toy toy="grape"></splashery-toy>Or use an iframe:
<iframe src="https://splashery.app/embed/?toy=grape" title="A Splash" loading="lazy" style="width:100%;aspect-ratio:4/3;border:0"></iframe>The Playground's Share tab writes both for the Splash and view you're looking at, with a size and a transparent background.
Every option
| Attribute | What it does |
|---|---|
| scene | a shared scene (the part after "#s=" in a Splashery link) |
| toy | a shelf splash's id when there is no scene (grape when neither) |
| theme | auto | light | dark (auto follows the page, and its paper-theme-change event) |
| background | transparent | page (the page shows through) | #rrggbb; the theme's page color else |
| autoplay | none | breeze | pokes | twist | dissolve (a scene's own when not given) |
| turntable | "off" stops the idle spin |
| zoom | 0.5 to 2; 1 fits the splash |
| controls | "0" hides the + and − zoom buttons |
| label | the splash's accessible description |
| start | "tap" opens on the splash's picture and loads the stage on a tap |
Saving
The Playground saves a picture, a turntable video, a GIF, a scene file, and a PDF that carries the Splash's credits, licenses, and a QR code. Share links and QR codes in the Manual explains what a link holds.