Conversation
Adds a pill button (top-left, below model dimensions) that switches the Three.js camera between PerspectiveCamera and OrthographicCamera without rebuilding the scene. OrbitControls.object is swapped in-place; position and orientation are preserved across the switch. The resize handler and auto-framing both branch on camera type. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Lifts isOrtho state to App.tsx and passes it down to both ThreeDView (to drive switchCamera) and PreviewActions (to render the button). The toggle is now the first icon-button in the top-right toolbar when in 3D mode, matching the size="icon" square style of undo/redo/download. Icon shows Camera in perspective mode and Box in ortho mode. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduces nextBestColor() which recommends the single most impactful filament to add, scored by how much it reduces blend-aware reachable error across all image swatches. Scoring uses segment geometry in Lab space: each candidate C is evaluated by the gain from new C↔filament blend lines (distToSegment), not just direct ΔE. The baseline also accounts for existing filament↔filament blend lines, so the metric correctly values isolated candidates whose longer segments sweep previously unreachable regions of Lab space. Candidate pool is restricted to the p75 most underserved swatches (by blend-aware reachable error) to reduce O(S² × F) to O(0.25S² × F). Adds "Suggest next filament" button in AutoPaintTab with a result card showing hex swatch, recommended TD, improvement %, pixels captured, and isolation score. "Add to filaments" names the entry Kromacut-Suggestion-NN. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Instead of only testing image swatch colors as candidates, also generate
extrapolated Lab positions by solving blend(C, F, t) = S for each
underserved swatch S and existing filament F at t ∈ {0.3, 0.5, 0.7}.
These candidates represent colors that, when blended with an existing
filament, land exactly on an uncovered swatch — often better than the
swatch color itself because they extend the new C↔F segment further into
uncovered Lab space.
Also adds labToHex (Lab→XYZ→linear RGB→sRGB with gamut clamping) and
deduplicates the candidate pool by hex before scoring.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
labToHex clamps out-of-gamut Lab values (e.g. aggressive t=0.3 extrapolations), so the raw extrapolated Lab and the returned hex could represent very different colors. Scoring used the raw Lab (scoring a phantom) while the UI displayed the clamped hex — causing near-black colors like #080000 to always win regardless of the filament set. Fix: round-trip all candidates through hex→Lab so scoring and the coverage threshold always operate on the actual representable color. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When switching perspective→ortho, the ortho camera was created with a hardcoded far=2000, ignoring any near/far the perspective camera had accumulated via auto-framing. Switching back ortho→perspective also left the perspective camera with stale near/far values. Fix: copy near/far from the active camera onto the incoming camera before updateProjectionMatrix(), so large models framed in one mode remain fully visible after toggling. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Per repo guidance: adds an unreleased v3.1.0 changelog entry and a Preview Controls section in 3d-mode.md describing the new perspective/orthographic toggle button. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add ortho/perspective camera toggle to 3D view
Per repo guidance: adds an unreleased v3.1.0 changelog entry and a Preview Controls section in 3d-mode.md describing the new perspective/orthographic toggle button. Signed-off-by: Brice Johnson <1939015+Bjohnson131@users.noreply.github.com>
…detailed result card Signed-off-by: Brice Johnson <1939015+Bjohnson131@users.noreply.github.com>
… suggestions Signed-off-by: Brice Johnson <1939015+Bjohnson131@users.noreply.github.com>
…for p75-underserved swatches Signed-off-by: Brice Johnson <1939015+Bjohnson131@users.noreply.github.com>
…test suite Signed-off-by: Brice Johnson <1939015+Bjohnson131@users.noreply.github.com>
Signed-off-by: Brice Johnson <1939015+Bjohnson131@users.noreply.github.com>
Signed-off-by: Brice Johnson <1939015+Bjohnson131@users.noreply.github.com>
Implement camera mode persistence with localStorage
…ristic Signed-off-by: Brice Johnson <1939015+Bjohnson131@users.noreply.github.com>
Next best color
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
Validation
Notes