SOURCE / PINNED RELEASE
Made of little things.
Safe Sand · Material studies
- Release
- 9101a9cd9fb4…
- Author-recorded commit
- 75d98e1b8edb…
- License
- LICENSE
- Author’s source reference
- nostr://npub182jczunncwe0jn6frpqwq3e0qjws7yqqnc3auccqv9nte2dnd63scjm4rf/wss%3A%2F%2Fgit.napplet.soy%2F/n-7682e55a791
Archive hash verified: 6c8ddabeb31100e1…. The source-to-build association is the author’s claim; it has not been independently rebuilt.
# Safe Sand — material studies
Port of av/safe-sand at e27bafa005b534041a801542ec0ca0bcb704c62e.
Job: pour, push, tilt and explore tactile granular materials in a sandboxed napplet.
Keep the WebGL2 grain simulation, height-field piles, dynamic lighting, shadows,
five original sand palettes and multi-finger plowing. Add snow, glass beads,
iron filings, glitter, salt crystals and kinetic sand through the same particle
engine, with distinct shapes, friction, restitution, cohesion and damping.
Iron supports a movable magnetic tool. These are playful material approximations.
## Expansion requested after the first checkpoint
Add a bounded, height-aware orthographic camera (pitch/yaw ±35°, never below the
tray), with an overhead reset and a camera drag tool. Inverse-project drawing
coordinates so all brushes remain aligned while viewing obliquely. Add continuous
pouring into the existing grain pool, a five-tine rake, eraser, magnetic attraction
and repulsion, one-stroke undo, slow motion and single-step while paused. Keep the
material-per-tray model; material selection refills the tray, while the pour tool
adds the current substance. The finite GPU pool recycles oldest slots when full.
The user explicitly requested publication after this expansion is verified.
## Port boundaries
| Feature | Source | Napplet implementation |
| --- | --- | --- |
| GPU simulation/rendering | sim/gl/render modules | Bundled local WebGL2 shaders |
| Preferences | browser persistence in main.js | Optional SDK storage; explicit Save setup/Restore setup |
| Motion and native haptics | input.js / main.js | On-screen tilt pad and shake; focused keyboard alternatives |
| Granular sound | external AudioWorklet module | Local synthesis after a user gesture, coordinated through optional SDK media |
| Android ads, purchases | app.js | Excluded from this local port |
| PWA installation and wake lock | index/main | Excluded; shell owns hosting |
| External bytes | none required | All content generated/bundled |
Requires: []. Optional domains: storage, media, identity (audio retirement). No Nostr queries, publishing, relay
escape hatches, cross-napplet intents, backend or network resources. Config schema:
empty; in-session material/brush/surface controls are the working tools.
Storage key: safe-sand.setup.v1, validated versioned settings only, no particle data.
## Visual direction
Preserve the original quiet, realistic grains-on-glass character. A pale porcelain
tray, angled warm light, microscopic mineral color variation and dark translucent
controls belong to the same tactile surface. Alternative charcoal and slate trays
make pale snow and iridescent materials legible. System sans-serif, restrained
uppercase tool labels, circular material swatches, soft outlined pill controls.
The scene fills the frame. No site header or marketing page. Material info floats
top-left; a bottom tool dock and dismissible scrollable material drawer leave room
for drawing. App-owned colors throughout (FOLLOW_HOST_THEME=false).
Desktop: floating material panel and compact dock. Phone: scrollable drawer and
two-row bottom controls; multi-touch drawing and tilt pad. Short landscape keeps
the dock on one row. Below 280×240 show an actionable enlargement notice and
preserve the scene. Live resize remaps particles instead of pouring a new scene.
Respect reduced motion by starting paused with a settled pour.
States: populated tray immediately; explicit pause/resume and fresh pour; empty
tray can be refilled; unsupported/lost GPU shows recovery. Missing/denied storage
only affects Save/Restore setup with visible feedback. No account needed.
## Proof plan
Four real iframe sizes, light/dark host themes, missing optional domains, touch
portrait/landscape, drag channels, tilted flow, magnetic attraction, pause, fresh
pour, preferences round-trip, and resize preservation. Build, guidance and real
Chromium conformance plus soyLI check. Capture a sculpted grain field for the
listing and a phone view. Independent-shell and physical-phone testing reported
separately. Preview process stopped after tests.
## Source provenance
The inspected upstream tree has no LICENSE file or package license declaration.
Retain attribution and record copied files in THIRD_PARTY.md; do not claim the
starter's MIT license covers upstream code. Keep UNLICENSED metadata and attribution; no upstream license grant is asserted.
Publication is explicitly requested by the user.
