Repository navigation
Harden the 3D runtime: multi-mount hooks, cycle breaking, group order - #149
Open
peluche20-code wants to merge 1 commit into
Open
peluche20-code wants to merge 1 commit into
peluche20-code wants to merge 1 commit into
Conversation
- window.__isoTurns lists every mounted figure; window.__isoTurn still points at the latest one, and destroy() falls back to the previous mount instead of deleting the hook. - t3Order/breakCycle keeps scanning for other cycles when the first one has no droppable edge, instead of going straight to a forced pick. - t3Poses throws a clear error when a group's parent does not come before it, instead of silently treating it as a root. - Remove unused variables and a duplicated line. Applied identically to kit/turn.mjs and kit/turn-fixed.mjs. All 290 tests in scripts/*.test.mjs pass before and after. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EkT8JhFhSNjE5CbJJiP1Zh
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.
What
Three small fixes in the 3D runtime, applied identically to
kit/turn.mjsandkit/turn-fixed.mjs, plus some dead-code cleanup.window.__isoTurnwith several figures. A secondTURN.mountoverwrote the first one's hook, sodrive/turn-checkcould only reach the last figure. Every mount is now also listed inwindow.__isoTurns.__isoTurnstill points at the latest mount, so existing scripts are unchanged.destroy()removes the mount from the list and falls back to the previous one instead of deleting the hook.breakCycleint3Order. It returned as soon as it found the first cycle, even when every edge of that cycle had already been checked. The caller then went straight to a forced pick, and other cycles that could be resolved were never examined. It now keeps scanning when the first cycle has no droppable edge.t3Poses. A group whoseparentindex is not smaller than its own was silently treated as a root, giving a wrong pose. It now throws a clear error. The builder always creates parents first, so valid data is unaffected.x0/x1/bufint3EmitPrismand a duplicated, mis-indentedlines.key.length = 0;(prism and tube emitters).Testing
node --test scripts/*.test.mjswith the CI's test dependencies (react 19.3.0, react-dom 19.3.0, typescript 5.9.3, esbuild 0.28.2): 290/290 pass, both before and after the change.Note: no existing test forces a cycle that the old
breakCyclecould not resolve, so change 2 is not covered by a test. I can add a regression fixture if you point me at the preferred place.Not changed
t3Gjkapproximates separation over sampled point clouds rather than the full solids, so its margin can be overestimated in edge cases. I left it alone, since changing it needs the orbit audits.🤖 Generated with Claude Code
https://claude.ai/code/session_01EkT8JhFhSNjE5CbJJiP1Zh