Feat: Player Piano demo reel + animation state persistence fixes#90
Merged
Feat: Player Piano demo reel + animation state persistence fixes#90
Conversation
- PlayerPiano-generator.js: 23-view browser console script that tours primitives, platonic solids, geodesics, planar/radial matrices, and tetrahelixes with camera tumbling between axis views - Fix captureView() → saveView() call chain (views were created but never pushed to state.views) - Document three discovered bugs in Animations.md: - Camera slerp torque on Z-down transitions (quaternion antipodal) - Planar/radial matrix groups missing dissolve transitions - Radial matrix state not persisting across save/load 🤖 Co-Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Andy🤦♂️ & Claude🤖 <andy@openbuilding.ca>
Developer-only console utility that auto-downloads files — should not be in the public repo. Moved to scripts/ alongside other local tools. 🤖 Co-Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Andy🤦♂️ & Claude🤖 <andy@openbuilding.ca>
Two fixes in animateToView(): 1. Proper slerp formula for direction interpolation — replaces lerp+normalize which breaks near antipodal directions (midpoint approaches zero). Angle-based slerp sin((1-t)ω)/sin(ω) handles all angular separations correctly. 2. Interpolated up vector — instead of hardcoding camera.up=(0,0,1) every frame (which is degenerate when looking along Z axis), now captures start up vector and computes end up vector matching setCameraPreset Z-pole logic (Y-up near poles). Smooth lerp between them avoids the lookAt singularity that caused the 180° torque on zdown/zup transitions. Also adds note about possible browser freeze on tab switch during preview playback (requestAnimationFrame burst on tab regain). 🤖 Co-Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Andy🤦♂️ & Claude🤖 <andy@openbuilding.ca>
…te slider displays, reveal sub-control panels Three interrelated bugs fixed: 1. 45° rotation toggles (cubeMatrixRotate45 etc.) were absent from both RTDelta capture and RTFileHandler export — now captured in both systems 2. Matrix size slider display text stayed at "1×1" after import because importState() set el.value without updating the display element — now explicitly updates N×N format 3. Matrix sub-control panels (size slider, 45° toggle) stayed hidden after import because importState() had no show/hide blocks for matrix controls — added 10 entries (5 planar + 5 radial) Also: applyDelta() now toggles sub-control panel visibility via _subControlMap, fixing view transitions too. Radial frequency slider displays also updated with correct Fn format on import. 🤖 Co-Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Andy🤦♂️ & Claude🤖 <andy@openbuilding.ca>
… maintenance - Mark matrix sub-control persistence bug as RESOLVED (9326f11) with full root cause analysis - Remove archived Janus-Inversion-JAN23.tex, add Universalize-Logs.md 🤖 Co-Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Andy🤦♂️ & Claude🤖 <andy@openbuilding.ca>
…rebuild Three fixes for matrix animation and state persistence: 1. Matrix dissolve opacity — all 10 matrix creation blocks (5 planar + 5 radial) in rt-rendering.js now read group.userData.dissolveOpacity and compute effectiveOpacity before passing to matrix creators. Matrices previously popped in at full slider opacity, bypassing the dissolve fade system that regular polyhedra use via renderPolyhedron(). 2. Radial matrix mode toggles — radialCubeSpaceFill, radialTetIVMMode, radialOctIVMScale added to rt-delta.js captureCheckboxes() and rt-filehandler.js exportState()/importState(). These three toggles were missing from the entire persistence pipeline. 3. Double updateGeometry() per tick — buildSteppedTick() in rt-delta.js called _setSlider() (which dispatches 'input' → updateGeometry()) then also called updateGeometry() explicitly. Removed the redundant call; explicit rebuild now only fires for projection radio snaps. 🤖 Co-Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Andy🤦♂️ & Claude🤖 <andy@openbuilding.ca>
…orkplan, 30-view demo reel 🤖 Co-Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Andy🤦♂️ & Claude🤖 <andy@openbuilding.ca>
Matrix forms (planar + radial) produce glitchy dissolve transitions due to duplicated geometry with coplanar z-fighting and per-cell material overhead. Documented as known limitation in Animations.md with short, medium, and long-term pipeline items. PlayerPiano generator trimmed from 30 to 15 views — removes Acts 4 & 5 (planar/radial matrices), keeps primitives, platonics, geodesics, and tetrahelixes which all dissolve cleanly. 🤖 Co-Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Andy🤦♂️ & Claude🤖 <andy@openbuilding.ca>
showTetrahelix3, all 8 strand toggles (A-H), and all 8 chirality toggles were absent from RTDelta._captureCheckboxes(). View deltas never captured the checkbox state, so playback transitions showed blank scenes for tetrahelix3 views. Also added showTetrahelix3 → tetrahelix3-controls to _subControlMap so the sub-control panel reveals during delta apply. 🤖 Co-Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Andy🤦♂️ & Claude🤖 <andy@openbuilding.ca>
🤖 Claude Code ReviewLooking through the diff and file contents, here's what I found: Code Quality Issues1. Unused variables
const endZoom = toThis variable declaration is incomplete/cut off at the end of the file, suggesting the code may be truncated or there's a syntax error. 2. Large function
3. Large function
4. Code duplication
_updatePlayStopBtn(
"previewAnimationBtn",
playing,
"Stop animation preview",
"Preview animation loop in scene"
);
_updatePlayStopBtn(
"previewFullBtn",
playing,
"Stop full-scene animation preview",
"Preview with full scene restore (cutplane, render state)"
);These two functions ( No issues found. ℹ️ About this reviewThis automated review checks for:
Human review required - these are suggestions only. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Player Piano (
scripts/PlayerPiano-generator.js— gitignored)State Persistence Fixes (
rt-delta.js,rt-filehandler.js)9326f11): 5 rotate45 toggles, 10 matrix sub-control panels, slider display text — all added to delta capture + filehandler export/import66de343):radialCubeSpaceFill,radialTetIVMMode,radialOctIVMScaleadded to full persistence pipelinee3a7add):showTetrahelix3+ 8 strand toggles + 8 chirality toggles added to delta capture; sub-control panel mapping added66de343): Removed redundant explicit call inbuildSteppedTick()— slider dispatch already triggers rebuildRendering (
rt-rendering.js)66de343): All 10 matrix creation blocks (5 planar + 5 radial) now readgroup.userData.dissolveOpacityand computeeffectiveOpacitybefore passing to matrix creatorsCamera (
rt-animate.js— prior commit)bfc1a1c): Proper angle-based slerp for direction interpolation + interpolated up vectorDocumentation (
Animations.md)Test plan
🤖 Generated with Claude Code
Co-Authored-By: Andy🤦♂️ & Claude🤖 andy@openbuilding.ca