Skip to content

Feat: Full scene transitions with delta system + form dissolve#89

Merged
arossti merged 7 commits intomainfrom
Animate
Feb 11, 2026
Merged

Feat: Full scene transitions with delta system + form dissolve#89
arossti merged 7 commits intomainfrom
Animate

Conversation

@arossti
Copy link
Owner

@arossti arossti commented Feb 11, 2026

Summary

  • Scene state delta system (rt-delta.js) captures, diffs, applies, and interpolates view states
  • Per-row ▶ buttons now animate full scene (camera + forms + sliders + projections), not just camera
  • Base forms fade in/out smoothly via dissolveOpacity during view transitions
  • Deposited instances fade in/out with material opacity dissolve
  • Papercut + SVG export skips zero-opacity objects during transitions
  • Integer sliders (geodesic freq, tetrahelix count) step with linear timing for even spacing
  • Noisy rt-nodes.js console.log calls gated through MetaLog

Changes

  • modules/rt-delta.js (new) — Scene state delta module: captureSnapshot(), computeDelta(), applyDelta(), buildSteppedTick() with rawT for integer sliders, smoothstepped t for floats
  • modules/rt-animate.js — Instance dissolve (_setupDissolve), form dissolve (_setupFormDissolve + _CHECKBOX_TO_GROUP map + _cleanupFormDissolve), merged onTick with cutplane/dissolve/delta ticks
  • modules/rt-viewmanager.jscaptureView() stores scene deltas, getSnapshotAtView() accumulates snapshots, loadView() applies full accumulated state, per-row ▶ uses animateToViewFull()
  • modules/rt-rendering.jsrenderPolyhedron() reads group.userData.dissolveOpacity and applies to face/edge/node materials
  • modules/rt-papercut.js — Skips dissolved-out objects (opacity=0) during section cuts
  • modules/rt-nodes.js — 11 raw console.log calls replaced with MetaLog.log() at SUMMARY/DETAILED levels
  • Geometry Documents/Animations.md — Phase 5b marked DONE, TODOs for smoother mesh rebuilds and scene state preview

Test plan

  • Save View 1 with Cube + Tetrahedron visible, View 2 with Geodesic Icosahedron
  • Click ▶ on View 2 — forms dissolve in/out while camera slerps
  • Click ▶ on View 1 — reverse dissolve
  • Test cancel: click ▶ mid-transition, verify clean recovery
  • Test geodesic freq change between views — steps should be evenly timed
  • Verify console is quiet with MetaLog at default level (SILENT)
  • Verify ?logLevel=detailed restores diagnostic output

🤖 Generated with Claude Code

Co-Authored-By: Andy🤦‍♂️ & Claude🤖 andy@openbuilding.ca

- Add _setupDissolve() in rt-animate.js: smooth opacity fade between views
  based on instanceRefs, with mid-cancel cleanup via material markers
- Integrate dissolve into animateToViewFull() alongside cutplane interpolation
- Add instance visibility snap in loadView() using group.visible
- Add opacity===0 guard in rt-papercut.js to exclude dissolved-out objects
  from section cuts
- Add same guard to extractEdgeLines() and extractMeshFaces() for SVG export

🤖 Co-Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Andy🤦‍♂️ & Claude🤖 <andy@openbuilding.ca>
🤖 Co-Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Andy🤦‍♂️ & Claude🤖 <andy@openbuilding.ca>
New rt-delta.js module captures/diffs/applies/interpolates scene state:
- captureSnapshot() reads checkboxes, sliders, projections from DOM
- computeDelta() shallow-diffs two snapshots, stores only changes
- applyDelta() restores state through existing UI handlers + updateGeometry()
- buildSteppedTick() returns onTick(t) for animated transitions:
  integer sliders step through values, floats interpolate smoothly,
  projections snap at midpoint

Integration:
- captureView() now stores view.sceneState (delta vs previous view)
- loadView() applies accumulated snapshot for instant scene restore
- animateToViewFull() merges delta tick with cutplane + dissolve ticks

🤖 Co-Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Andy🤦‍♂️ & Claude🤖 <andy@openbuilding.ca>
…igation note

_setSlider() now fires dispatchEvent('input') so scale/opacity handlers
respond during animated transitions. Added TO BE INVESTIGATED section
in Animations.md for per-polyhedron scale capture beyond global/tet sliders.

🤖 Co-Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Andy🤦‍♂️ & Claude🤖 <andy@openbuilding.ca>
…TODOs

Discrete integer sliders (geodesic freq, helix count) now use linear rawT
for even step spacing instead of smoothstepped t which bunched steps at
the midpoint. Continuous sliders (scale, opacity) keep smoothstep easing.
Updated Animations.md: 5b marked DONE, added TODOs for smoother mesh
rebuild transitions and scene state preview in Saved Views table.

🤖 Co-Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Andy🤦‍♂️ & Claude🤖 <andy@openbuilding.ca>
Per-row ▶ buttons now use animateToViewFull() for full scene transitions
(camera + forms + sliders), not just camera-only. Base forms fade in/out
smoothly via dissolveOpacity on group.userData, read by renderPolyhedron()
when creating fresh materials each frame.

🤖 Co-Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Andy🤦‍♂️ & Claude🤖 <andy@openbuilding.ca>
Replaced 11 raw console.log calls with MetaLog.log() at appropriate levels:
- Close-pack RT diagnostics → DETAILED
- Geodesic/tiling edge Q scaling → DETAILED
- Matrix/radial node counts → SUMMARY
- Close-pack unavailable warning → SUMMARY (warn)

🤖 Co-Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Andy🤦‍♂️ & Claude🤖 <andy@openbuilding.ca>
@github-actions
Copy link

🤖 Claude Code Review

No issues found.


ℹ️ About this review

This automated review checks for:

  • Debug statements (console.log)
  • Commented-out code
  • Code duplication
  • Large functions (>50 lines)
  • Unused variables

Human review required - these are suggestions only.
Diff size: 62137 bytes

@arossti arossti self-assigned this Feb 11, 2026
@arossti arossti merged commit 52d1607 into main Feb 11, 2026
3 checks passed
@arossti arossti deleted the Animate branch February 13, 2026 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant