# Kinetic Sand Slice — `kinetic-sand-slice@1.0.0`

A block of coloured kinetic sand is sliced by a steel scraper, and each slice topples onto a belt with its hidden pattern face up, looping forever.

The AI ASMR sand-cutting shot, built in code. A long block of soft, grainy kinetic sand nudges forward, a broad steel bench scraper presses down through it, and the slice leans off the blade and flops over onto a slow belt with a little squash and a scatter of crumbs. The cut face shows what is inside the block: pastel layers, a hidden heart or a marbled swirl. Choose the pattern and its four colours, how thick the slices are, how many cuts fit in the loop, how much it crumbles and how coarse the grain looks. The clip loops exactly.

- Kind: effect; status: published; digest sha256:cc1956b34f17818905d4aaf149847e4c294f5f74d6e203a7f17e8e423100edd3
- Role: Complete satisfying-video scene (Three.js); the sand slicer rig is reusable on its own.
- Implementation: three; entry `src/kinetic-sand-slice.js`
- Files: https://aipixelwizard.com/registry/kinetic-sand-slice/1.0.0/<path> (`LICENSE`, `asset.json`, `demo.js`, `index.html`, `src/kinetic-sand-slice.js`)
- Manifest JSON: https://aipixelwizard.com/api/v1/visuals/kinetic-sand-slice/versions/1.0.0
- Runnable demo: https://aipixelwizard.com/registry/kinetic-sand-slice/1.0.0/index.html (open over http; it imports sibling packages by relative path)
- Dependencies (exact): `three@0.185.1` (source) — WebGL rendering (src and demo).; `chrome-material@1.1.0` (demo) — Studio environment, cove and floor for the demo scene. src/kinetic-sand-slice.js only needs three.; `apw-runtime@1.0.0` (demo) — Demo harness.

## Exports
- `createKineticSandSlicer({ pattern?, colors?, thickness?, depth?, cycleSeconds?, cutsPerLoop?, crumbs?, grain?, seed?, boardColor?, beltColor?, handleColor?, showBelt? }) => { group, update(time), timeline, landingX, baseY, beltStep, dispose() }` — The whole rig as a THREE.Group: sand block, slices, steel scraper, cutting board, belt and crumbs. update(time) poses everything for a time in seconds (pure function).
- `createSandPattern({ pattern?, colors?, seed?, size? }) => HTMLCanvasElement` — The block's cross-section as a canvas: 'layers', 'heart' or 'swirl'.
- `sliceTimeline({ cycleSeconds, thickness, gravity? }) => (phase) => { feed, blade, angle, squash, landed, sinceLanding, landPhase }` — The motion of one cut on its own, to drive your own models.

## Parameters
- `pattern` (select one of layers | heart | swirl, default "layers") — Inside the block: What each cut reveals.
- `colorA` (color, default "#c3b1ee") — Colour 1: Layers: bottom band. Heart: the sand around it. Swirl: first colour.
- `colorB` (color, default "#a3dfca") — Colour 2: Layers: second band. Heart: the heart. Swirl: second colour.
- `colorC` (color, default "#f6b8a2") — Colour 3: Layers: third band. Heart: its outline. Swirl: third colour.
- `colorD` (color, default "#f6e7cb") — Colour 4: Layers: top band (not used by heart or swirl).
- `thickness` (number 0.12–0.4, default 0.22) — Slice thickness: As a fraction of the block's height.
- `cuts` (integer 2–5, default 3) — Cuts per loop: More cuts make a faster rhythm in the same loop.
- `crumbs` (integer 0–60, default 26) — Crumbs: How many crumbs break off when a slice lands.
- `grain` (number 0–2, default 1) — Sand grain: 0 is smooth like soap, 2 is coarse.
- `view` (select one of hero | overhead, default "hero") — Camera
- `boardColor` (color, default "#efe8df") — Cutting board
- `background` (color, default "#e4d3c6") — Background
- `seed` (integer 1–9999, default 7) — Variation: Changes the crumbs, the grain and the wobble of the layers.

## Composition
- Inputs: Options, then update(time) each frame with time in seconds.
- Outputs: A THREE.Group you add to your scene. It does not create lights, a camera or an environment.
- Coordinates: Y-up; block height 1 unit; board and belt top at y = 0, their underside at baseY (−0.1). The blade cuts in the plane x = 0, the block comes from −x and slices travel along +x one beltStep (1.32) per cut. Centred on z = 0, about 1.8 units deep with the belt.
- Lighting: Needs scene.environment (tuned with the chrome-material studio) plus one shadow-casting directional light; meshes cast and receive shadows.
- Timing: Pure function of time. One cut every cycleSeconds; set cycleSeconds = clip length / cuts for a seamless loop.
- Works with: chrome-material, kinetic-title, lower-third, orbit-camera
- Cut faces show the whole pattern; the block's sides and top show only its edges, so a pattern placed in the middle (the heart) stays hidden until the cut.
- Everything is drawn with Three.js; there are no image files.

## Output and loop
- 1080×1080, 30 fps, 6 s, procedural
- Seamless loop: yes — A whole number of identical cuts per clip; the block feeds one slice and the belt moves one slot per cut, and the grain and belt ribs repeat on those distances, so the last frame leads straight into the first.
- Verified 2026-10-10 in Chrome 154.0.8037.97 headless on Linux 7.0.0-38-generic (x64), Node 22.14.0 (WebGL 2 via SwiftShader (software)); deterministic: yes; loop check: Frame 0 vs end state (progress 1): mean |Δ| 0.0000, max |Δ| 0 of 255.

## Use it
New project: Create the rig once with cycleSeconds = clipLength / cuts, add rig.group to a scene with an environment map and a shadow-casting light, and call rig.update(frame / fps) before each render.

Existing project: Copy src/kinetic-sand-slice.js, add rig.group where you want the slicer (scale the group to fit your scene) and call rig.update(time) in your frame loop.

Reuse ideas:
- Put a caption or a Lower Third over it for a faceless ASMR Short, and add your own crunch sounds on each cut (the blade bottoms out at 64% of each cycle).
- Paint your logo or brand colours into createSandPattern (it is a canvas) and every slice reveals it.
- Use sliceTimeline to drive your own models: a cake, a soap bar or a glass fruit with the same feed, press and topple timing.

## Limitations
- No sound: the ASMR crunch is most of the appeal, so add it in your editor.
- The pattern runs the full length of the block, so every slice reveals the same picture; it is a reveal, not a changing sequence.
- The blade cuts cleanly through rigid pieces. There is no smearing, bulging or tearing of the sand where the blade goes in.

## License
MIT. Copyright (c) 2026 AI Pixel Wizard. Released under the MIT License. See LICENSE in this folder.

Provenance: Original code written for AI Pixel Wizard on 2026-10-08 by an automated agent (the daily trend routine), inspired by the AI ASMR kinetic sand cutting trend (see content/trends/2026-10-08-kinetic-sand-slice.md). The motion (block fed one slice at a time, a bench scraper pressing down, the slice falling over cut face up) follows the shot as described in https://lovino.ai/blog/ai-asmr-videos-trending-2026 ('slabs of colored sand sliced by oversized blades') and https://knowyourmeme.com/memes/kinetic-sand-asmr-videos. The owner's earlier sketch threejs-sketches/objects-scenes/kinetic-sand explored the same subject; it was read for reference and none of its code was used. The falling slice is the standard rigid slab rotating about one edge under gravity. No code, images, models, fonts or shaders were copied.

