The two views
The flat cloth (the square view) is the shirt unfolded: the pattern you will get. The folded bundle (the view with the 2D/3D switch) is what you actually squirt. Everything you do to the bundle shows up on the flat cloth at once, and hovering either view shows where that point sits in the other.
Fold, then bind, then dye
Use the Shape section to fold: accordion pleats, zigzag triangles, diagonals, or draw your own fold line with Fold in the switch on the bundle view (tap a point, move to set the angle, tap, then tap the side that moves; the creases it would make are previewed on the flat cloth as you go). Twist mode pinches the centre and winds the cloth into a spiral instead. Bands squeeze the layers so dye cannot get in. To tie one, choose Band on the bundle view, press on the bundle, drag to set the angle, and let go. It is shown orange while you drag. The band goes straight across the whole bundle, through every layer, and leaves a line on the unfolded cloth.
Squirting is wicking
A squirt pours liquid onto the bundle and it wicks through the layers right away, top layer first, then the next, until the liquid is used up. Soak is how much liquid one squirt puts out, in layers: soak 1 fills the top layer under the nozzle, soak 10 reaches ten layers down. The dye goes wherever the liquid goes. This decides the reach of every squirt before any diffusion happens, which is also how it works with a real squeeze bottle. In a thick stack, sideways wick is the lever for depth: every layer's neighbours take a share on the way down, so turn it down to send a squirt straight through, and watch the readout in the corner of the bundle view, which reports how many layers the last squirt reached.
Working a spot
- Hold the button still and the squirt keeps pouring: its soak grows every second (hold flow), so the front moves deeper while you wait. This is the way to reach layers one squirt cannot. Set hold flow to off for pure click-and-stamp painting.
- Go over an area again and it gets darker, up to the build-up limit, then stops. The cloth remembers it is wet: a full spot takes no more liquid, extra liquid pushes deeper, and a new colour on a wet spot mixes in. Build-up 0 means a colour can never get stronger than one squirt.
- Whatever you did is saved as strokes. Rewind, Load and every fold change replay them exactly.
Batch: let it sit
▶ Play runs the hours in the bag. Free dye spreads within a layer, bleeds thru layers where they touch, and fixes to the fibres at the fixing rate until the cloth's capacity is used. Fixed dye is what survives the rinse; tick Rinse to see only that. Play pauses itself when nothing is left to move.
Bleach
The BL swatch squirts bleach instead of dye. It wicks and spreads like dye but removes colour wherever it reaches, fixed or not, and fades as it works (bleach power, bleach fade). Pick a colour under Cloth to start from a solid shirt and discharge a pattern out of it. Free bleach is tinted pale blue so you can see it on white cloth.
3D
Switch the bundle to 3D to orbit it and squirt from any side, including the edges of a stack. The switch in the corner of the bundle view sets what a touch does: Dye squirts, Band ties bands (press, drag to set the angle, let go), Fold draws a fold line (flat folds only), and Orbit turns the bundle. In 2D the last choice is Inspect: hover or touch the bundle to see the layers under that point. Right-drag always orbits; two fingers pan, and pinch zooms. Lost the bundle? Tap 3D again to fit it back in view.
Folds work in 3D too: with Fold chosen, tap the bundle (or the table around it) for the two points and the side, and drag to orbit in between. The crease is always a line on the table, shown as a plane cutting through the stack, with the part that will fold over tinted.
Layer height (View section) sets how thick each layer is drawn, from 0.1 mm to 1 cm. Tall stacks from many folds can be squashed flat to see the whole shape, or stretched to paint the edges. It is saved with the plan, since it also sets how much of each layer's edge a side squirt can reach.
Image (PNG) saves the unfolded cloth as a PNG at the size chosen under Export (1024, 2048 or 4096 px on the long side), with creases if they are shown. The detail in it comes from the resolution setting under Cloth: 240 texels is a 2.5 mm texel on a 60 cm cloth, 800 is 0.75 mm. Set the resolution before dyeing; changing it later replays the strokes on the new grid.
3D model (GLB) saves the bundle as a glTF binary model with the dye as its texture, for Blender, a web viewer, or AR Quick Look on iOS. Rinse first if you want only fixed dye in the texture.
The control panel, section by section
- Cloth
- Size is the shirt in cm. Colour picks a starting colour for a solid shirt (white for a plain one), and base dye how strongly it is dyed (a deep base leaves less room for new dye to fix, and gives bleach more to strip). Changing it keeps the fold list, but the lines may no longer land where you meant. Resolution is the detail of the dye grid (see Image, above).
- Shape: Fold
- Regular folds holds the ready-made ones: accordion pleats along X or Y, Zigzag triangles down the strip (the strip's direction, and 60° equilateral, 45° right-angled or square), and the two diagonals. Your own fold lines are drawn with Fold on the bundle view. Undo fold takes back the last one, and Folds lists them all.
- Shape: Twist
- Pinch the centre, twist, release, pat flat. It runs a particle cloth on a table with self-collision, and the core grows as fabric wraps onto it; Run twist takes a few seconds. Pick sets the centre by tapping the flat cloth. Turns, pinch (the size of the grab), friction against the table and pat flat shape the spiral.
- Dye & bindings
- Dye, Band and Orbit/Inspect are chosen with the switch on the bundle view; this section holds their settings. Tap a swatch to pick a dye, tap it again to change its colour; BL is bleach. Brush is the nozzle size, amount the dye strength in the liquid, soak layers how much liquid one squirt puts out, hold flow how fast a held squirt keeps pouring, build-up how much darker going over a spot can make it. Dip whole bundle soaks everything at once. Band width is how wide the next band is; Undo band takes back the last one.
- Batch (diffusion)
- Play lets the bundle sit. Speed is steps per frame. Spread is how fast free dye moves within a layer, thru layers between touching layers. Fixing rate turns free dye into fixed dye up to the cloth's capacity; free dye keeps spreading, fixed dye stays. Band halo is how far a band squeezes the cloth around it and band leak how much liquid still gets through under it. Sideways wick is how much of a squirt spreads within a layer rather than into the next. Bleach power is how fast bleach eats dye, bleach fade how fast it goes off by itself.
- View
- 3D style draws the bundle as a mesh or as splats. Layer height is explained under 3D. The checkboxes show only fixed dye (Rinse), the underside of the 2D bundle, the creases, a shade for how many layers are stacked, where bands press, and free bleach in pale blue. Colour depth brightens or deepens the displayed colour without changing the dye.
- Export
- Image size is the long side of the PNG. Image saves the unfolded pattern, 3D model the folded bundle as a GLB (see above).
Mouse and keys
Drag to squirt, or drag to tie a band. Hold still to keep pouring. space play/pause · z undo stroke · esc cancel a fold line or band · ? this help. The ☰ button slides the controls in over the views and back out.
Drag the bar between the two views to give one of them more room; double-tap it to even them out. The views sit side by side when there is more width than height and stack otherwise, and keep the same split when you rotate the device.
Full write-up: docs/dye-model.md in the source repository. Build .