Splashery

Playground

Definitions, derivations, notes, and long tables start folded.

Using Splashery

The chapters after this one are about what a Splash is and how it is built. This page is about the screen you open one on: where the buttons are, what each one does, and how to bring the controls back when they fade. Everything here belongs to every Splash; a button that belongs to only a few says so. The labs switch hides Splashes that are still being tried out. More, then Settings, then Labs turns it on, and so does the Labs button on the shelf or ?labs=1 at the end of the address. Nothing on this page needs it except where it says.

The screen: the focused layout and the everyday layout

The Playground opens in the focused layout. The Splash fills most of the screen (the band it is framed in is 0.49 to 0.82 of the screen's height on a 384 × 742 phone screen, and 0.56 to 0.85 on a 390 × 844 one). Four parts make up the screen:

The everyday layout is the arrangement Splashery had before: the Splash gets about half of a phone's screen. Both layouts have the stage's buttons in the same column. In the everyday layout that column also has a Splashes button, which opens the gallery when the shelf is put away; the focused layout has the Shelf button in the bar instead. Add ?ui=classic (or ?old=focus) to the address to get the everyday layout back. ?ui=focus asks for the focused one, which is what you get with nothing added. In the focused layout, Save and the link back to Splashery are on More's Share tab.

On a phone, a sheet takes room from the Splash. With one open, the stage's buttons wrap into a second column or step aside, and a Splash's own sliders and tools keep to the left of them, so the buttons never cover a slider.

Figure to come: the focused layout and the everyday layout, side by side, with the header, the bar, and the stage's buttons labeled.

The bottom bar and its sheets

Each button in the bottom bar opens a sheet over the Splash. Esc closes a sheet.

Button What opens What is in it
Shelf The Splashes sheet The shelf chips (All, Featured, New, and then a shelf for each family, such as AI and Computing, Space, and Math), Surprise me, Labs, a search button, and Gallery.
Splash The Splash sheet, titled with the Splash's name The Splash's action button (Peel, on the Grape), an "Alive" row on kit Splashes (its own flicker, beat, and sway), and the Splash's own controls and input. The Splat Equation shows its t slider, its list of programs, and Splat it. The Picture Frame shows "Your own photo", Open photos…, and a box for a web address. A file you open yourself has no Splash sheet.
Effects The Effects sheet Poke, Wind, Dissolve, Drop, Twist, Slice, Paint, Magnet, Clay, and Move, and a Pattern list.
Views The list of views Cutaway, Show the Splats, Heat Map, Scrub and Slow Motion, Exploded Parts, Falling Keys, and the Measuring Panel (see "Views", below).
More Three tabs: Share, About, and Settings Described next.

More has three tabs:

The stage's buttons

The column at the right edge holds the buttons that change how you look at the Splash and what it does while you look. A button that is on is a yellow disc with a dark icon, so it still shows over a light Splash. On QR Code, Picture QR, and Video QR the buttons stay in one column, so none sits on the code. Where they run past the room, as with a sheet open on a phone, the column scrolls, its edge faded where more buttons wait, and Sound and How to play join it at its top. These are in every Splash's column:

These appear only on the Splashes that use them:

Figure to come: the stage's column of buttons, each one numbered and named.

Focus mode

Leave a Splash alone for 5 seconds and everything over it fades: the header with its credit, the bottom bar (and a game's or a song's own bar), the stage's buttons, and the Splash's own slider, tools, legend, and pill. It works the way a phone's video player does. The Splash grows to fill the room the controls leave, and eases back over half a second when they return.

To bring the controls back, touch the strip along the top or the bottom of the screen (each at least 48 pixels tall, and a faint line marks the bottom one), or press a key. A touch anywhere else plays the Splash, with a tap, a drag, or a pinch, and the controls stay hidden. A touch that wakes the controls never presses the one that stood there.

Figure to come: focus mode in three frames: controls shown, fading, and hidden.

What a tap does: the pill and Space

A Splash with a timed effect follows one set of rules for a tap, and a small pill at the lower left of the band says what a tap will do.

The Splash A tap
One that goes step by step (Unit Cells, Anatomy Atlas, Airport X-ray) Hurries to the next step. It never pauses.
A show of 8 seconds or less Plays to its end, and then once more.
A longer show Pauses it, with the turntable held. The next tap goes on.
A keyboard's song (the grand and upright pianos, the harpsichord, the electronic keyboard) Plays the whole song. A tap while it plays pauses it. At its end it stops, and a tap starts it over. (The song bar's Loop still loops.)

The pill reads Playing (a ring, with +1 for each tap waiting), Paused, Zoomed in, or Ready. Press it to pause or to go on. A tap that pauses or resumes an effect makes no sound.

Space pauses everything that moves and holds all audio, so a song's clock waits where it stopped. The pill shows Paused, and a tap on the stage plays again.

The status ring. Every Splash says what it is loading, making, or stuck on in one place: a round button 44 pixels across beside the pill (in the pill's place when the pill is hidden), so no words lie over the Splash. A job shows there once it has taken 0.3 seconds (0.6 for a Splash's own loading, "Loading" and its name), so a quick one shows nothing. The ring is blue and fills as the job goes, with its share in the middle; a job with no measure turns a short arc instead, with three dots in the middle. A problem that stops the Splash turns it red, with an exclamation mark, pulsing gently. When a job that showed is done, a green check shows for 1.4 seconds, and with nothing to say there is no ring. A tap on the ring opens a card: what is loading or being made, how far it has come, whether it can play already, and for a problem what happened and what to do, with Stop, Retry, or Dismiss where the job has one. A tap anywhere else, or Escape, closes the card. The ring fades with the pill in focus mode, and stands aside where it would lie on a QR code. A capture's veil still shows as it opens, and the messages that confirm what you did, or give a hint, are still short messages that come and go. So is a problem that comes from your own tap (a file that cannot be opened, for example): only a problem that stops the Splash turns the ring red.

Figure to come: the status ring working, with no measure, with a problem, and done, and its card.
Figure to come: the pill in its four states: Playing, Paused, Zoomed in, and Ready.

Turning, zooming, and panning

A drag turns the Splash. A pinch, or the mouse wheel, zooms. Two fingers moved together pan the view, and so do Shift (or Alt) and a drag with a mouse. On most Splashes a double-tap or a double-click resets the view, as the Reset button does. Where two quick taps mean something else, they do not: Splash Book, Storybook, and Photo Album turn two pages, Picture Lab and Picture Frame fill the screen with the page, two taps on the Chess Set's board are a piece and its square, and a few Splashes that steer their own view, such as Real Earth and Star Explorer, take them as two taps. The Reset button works on all of them, and Reset always goes to the opening view, whichever Splash was open before it. The arrow keys turn, and + and − zoom (see "Keys", below). Zoom is counted in fits: 1 is the distance at which the whole Splash just fits the stage.

Why this number? How close you can zoom

Our choice Nothing in the splat format sets it.

A floor of 0.45 fits would keep a Splash from being looked at closely. Going in costs drawing time once the Splash fills the screen. On a MacBook Pro M3 Pro the Grape's draw cost doubled at that point (7.2 ms to 13.4 ms at 0.3), then stayed nearly flat down to 0.12 (15.6 ms). The Strawberry and the Mandeltorus barely changed.

Where it lives: zoomBy and surfaceCheck in src/stage.js; the fade of very near splats in src/gl/shaders.js.

Keys

These work on a computer when the stage has the focus. More, then About, lists the keys for the Splash on show; that line leaves out G and the held B.

Key What it does
R Starts Record. It does not reset the view; use the Reset button or a double-tap.
F Full screen. The browser's own Esc leaves it.
G Opens the gallery. Esc closes it.
T, H, M Turntable, Hands-on, and Sound, each on or off.
Space Pauses and plays everything that moves, and holds all audio.
L (hold) Pulls the frame into its layers. Let go and it goes back.
The arrow keys Turn the Splash.
+ and − Zoom in and out.
Enter Taps the Splash.
Shift (or Alt) and a drag Moves the Splash across the screen.
B (hold) Draws a box on a picture Splash.
Esc Closes the gallery, a sheet, or the Detail and splats panel.
A W S E D F T G Y H U J K O L P ; ', with Z and X With Falling Keys open: play the keys from a C near the middle, with Z an octave down and X an octave up.
1 to 5 Nothing in general. A Splash with a row of tools of its own can use them: Splat Name's are Spin, Poke, Paint, Drop, and Blow.

Finding a Splash: the shelf, search, and names

Shelf opens the shelf. Its chips list the shelves: All, Featured, and then one for each family. A New chip after Featured lists the Splashes that arrived in your last 14 days, newest first, whenever there are any (the labs ones only with labs on). Surprise me opens one at random, Labs turns the labs switch on and off, and search finds a Splash by its name or by another name it is known by. On a phone the finder is one line: Search first, with Surprise me and Labs after the names. A flick along the row of thumbnails coasts as far as its speed carries it.

Names follow one set of rules: title case, 16 characters or fewer (20 at most), no commas or parentheses, and no two alike. A photoreal capture is "Real X" and a Splash built from rules as a version of one is "X Model" (Real Earth and Earth Model, Real Orange and Orange). Shelves follow the same rule. A Splash's other names are in its search words, so searching for "Lamp" finds the Desk Lamp.

The shelf shows only Splashes whose assets allow commercial use. Four whose assets are licensed for non-commercial use only are off the shelf, search, Surprise me, and New. A link to one still opens it, with its credit.

Figure to come: the shelf with Search, Surprise me, and Labs on one line, and the New chip.

Saving, recording, and sharing

All of these are on More's Share tab. Anything you download is named splashery- and the Splash's id: a picture, a scene file, a GIF, a recording, or a PDF.

Figure to come: one Splash saved at 1×, 2×, and 4×, and the same Splash alone on a transparent background.

Views: seeing inside the drawing

A view is a tool for looking at how a Splash is drawn rather than at the Splash itself: a cut through the middle, the outline of each splat, how many splats pile up on one pixel. The Views button in the bottom bar lists seven with the labs switch off: Cutaway, Show the Splats, Heat Map, Scrub and Slow Motion, Exploded Parts, Falling Keys, and the Measuring Panel. Pick one from the list, or add ?view= and its name to the address to open the page in it: cutaway, splats, heat, scrub, parts, or keys. A view's shader code is compiled only when the view is open, so a page with no view open draws exactly as it did before views existed.

Cutaway

Open it with the Views button or ?view=cutaway. Cutaway puts a clip plane through the Splash: a flat sheet that leaves out everything on one side of it, so what lies inside shows. It suits a Splash with something inside, such as Walnut CT, a scan of a walnut's inside.

Figure to come: Walnut CT in Cutaway, cut through the middle.
Figure to come: a demo that moves a clip plane through a built Splash.

Show the Splats

Open it with the Views button or ?view=splats. It draws the outline of each splat, so you can see how big the splats are and how they overlap. It leaves out splats under a size filter, 6 pixels by default. A Splash made of very small splats would show nothing at that size, so the filter steps down for it: the Music Box shows at 3 pixels, while the Strawberry keeps 6.

Figure to come: the Music Box in Show the Splats.

Heat Map

Open it with the Views button or ?view=heat. It colors each pixel by how many splats were blended onto it, and reports the blended fragments a frame and the splats on each covered pixel. That is overdraw, and it is where the graphics chip's time goes. At 300,000 splats the Grape piles 227 splats on each covered pixel on average and 793 at most, about 33 million blended fragments a frame. Walnut CT draws only the outer skin of its lattice until the walnut is cut, because nearly all of the lattice is the walnut's hidden inside: in the Heat Map on a MacBook Pro M5 Pro, the whole lattice would come to 102.8 million fragments a frame, and the skin comes to 34.3 million.

Figure to come: the Grape at 300,000 splats in the Heat Map.

Scrub and Slow Motion

Open it with the Views button or ?view=scrub. It plays a Splash's motion slowly and lets you scrub back and forth through it, so you can stop on any moment. Use it on a Splash with a timed effect.

Figure to come: a timed effect stopped partway through in Scrub and Slow Motion.

Exploded Parts

Open it with the Views button or ?view=parts. It pulls a Splash's parts apart from one another, the way a parts diagram does, so you can see which splats belong to which part (Chapter 2). It suits a kit Splash with moving parts, such as the Treasure Chest.

Figure to come: the Treasure Chest in Exploded Parts.

Falling Keys

Open it with the Views button, with ?view=keys, from the song panel's Watch the keys, or with the falling keys button on the stage, the only view with a button there. It draws a keyboard Splash's song as notes falling in 2D over the stage onto a keyboard. It is there on the grand and upright pianos, the harpsichord, and the electronic keyboard. The Toy Piano has no song, so no falling keys.

Figure to come: the Grand Piano with notes falling onto its keys.

Measuring Panel

Open it with the Views button or ?measure=1. It shows how the page is doing: frame times, the page's work for each frame, the graphics chip's time where the browser offers it, and more. It is for people who make Splashes. How Splashery is built says what it measures.

Where to try it