Goal
Finish Hair as a ClojureScript worker-safe state planner that emits host commands for material, part, outline, and physics updates without touching Three/Loom3 objects directly.
Current state
Polyester already has src-cljs/latticework/hair.cljs, in-process creation, worker client methods, color presets, part state, and physics config planning. The old TypeScript service still bridges into actual LoomLarge/Loom3 objects.
This mirrors the Latticework research issue: meekmachine/Latticework#40.
Clojure-way direction
- Move serializable hair color, eyebrow color, outline, visibility, part scale/position, object registration metadata, and physics config into CLJS planner state.
- Main thread applies emitted
applyHairState and applyHairPhysics outputs to materials, meshes, morphs, and runtime physics.
- Keep worker outputs plain data and avoid object references.
- Preserve current public behavior through a JS/TS compatibility adapter.
Acceptance criteria
- Worker state snapshots are serializable and include hair state, object summaries, and physics config.
- Worker emits object-specific host commands for color/outline/visibility/scale/position and physics config changes.
- No worker code references Loom3, Three objects, DOM, or global debug APIs.
- Existing hair behavior remains unchanged through the main-thread adapter.
- Add parity tests for color presets, custom colors, object registration, part visibility/scale/position, outline, reset, and physics config.
Goal
Finish Hair as a ClojureScript worker-safe state planner that emits host commands for material, part, outline, and physics updates without touching Three/Loom3 objects directly.
Current state
Polyester already has
src-cljs/latticework/hair.cljs, in-process creation, worker client methods, color presets, part state, and physics config planning. The old TypeScript service still bridges into actual LoomLarge/Loom3 objects.This mirrors the Latticework research issue: meekmachine/Latticework#40.
Clojure-way direction
applyHairStateandapplyHairPhysicsoutputs to materials, meshes, morphs, and runtime physics.Acceptance criteria