feat: add quantitative views, time controls, and finish dead wiring - #3
Merged
Merged
Conversation
The sim's physics and a11y were complete; what was missing was what a learner can see and do with them. Quantitative views - IntensityProfileNode: a bamboo trace of intensity across a cut through the detector, on Michelson and both Mach-Zehnder ports. Turns the photograph into a measurement — the modulation depth is the visibility, the ripple count is the fringe count. With both ports plus the dashed total it draws I_A + I_B = const, which doc/model.md calls the point of that screen and which two percentages could only imply. - CoherenceEnvelopeNode: visibility against path difference on Michelson, with a marker at the current OPD. Makes doc/model.md §2 visible — flat for a laser, a needle for white light, and the sodium doublet's nulls and revivals. The span comes from the source's own feature scale, so metres and micrometres are both legible. - Both draw through the existing physics: a new pure intensityProfile() beside intensityAt(), and spectrumVisibility() unchanged. Time controls - TimeModel (previously unused) is composed into the two models that evolve on their own, each with stepOnce() for single-frame advance. Photon accumulation can now be paused and stepped a few photons at a time; the Fabry-Pérot sweep can be stopped on a transmission peak. Its scan checkbox is replaced by the clock rather than joined to it. Finished features that were built but never reached the view - showOpticalPath preference: plumbed from main.ts to the table nodes, labelling each element with what it adds to the path difference. The Michelson's contributions are doubled and the Mach-Zehnder's are not, which makes the factor of two concrete. - Mach-Zehnder vertical mirror tilt, which had a model Property and an a11y string but no control; and its visibility readout. - Path difference in wavelengths, using the unused units.waves pattern. - Home-screen icons, which were three blank rectangles. Also - New charts carry accessibleParagraph descriptions derived from the same samples they draw; all strings added in en/es/fr. - Fixed a leak the memory-leak suite caught: a chart must dispose the formatter Properties behind its description, not just its Multilink. - CSP: allow the two inline onclick handlers scenery writes on disabled controls, scoped to script-src-attr by hash. Without this the step button logs a violation on every enable/disable and fails the fuzz run. 138 tests (was 124), including that the two ports' profiles sum to a constant and that the sodium null falls inside the mirror's travel.
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
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.
The sim's physics and a11y were complete; what was missing was what a
learner can see and do with them.
Quantitative views
the detector, on Michelson and both Mach-Zehnder ports. Turns the
photograph into a measurement — the modulation depth is the visibility,
the ripple count is the fringe count. With both ports plus the dashed
total it draws I_A + I_B = const, which doc/model.md calls the point of
that screen and which two percentages could only imply.
with a marker at the current OPD. Makes doc/model.md §2 visible — flat
for a laser, a needle for white light, and the sodium doublet's nulls
and revivals. The span comes from the source's own feature scale, so
metres and micrometres are both legible.
beside intensityAt(), and spectrumVisibility() unchanged.
Time controls
evolve on their own, each with stepOnce() for single-frame advance.
Photon accumulation can now be paused and stepped a few photons at a
time; the Fabry-Pérot sweep can be stopped on a transmission peak. Its
scan checkbox is replaced by the clock rather than joined to it.
Finished features that were built but never reached the view
labelling each element with what it adds to the path difference. The
Michelson's contributions are doubled and the Mach-Zehnder's are not,
which makes the factor of two concrete.
a11y string but no control; and its visibility readout.
Also
samples they draw; all strings added in en/es/fr.
formatter Properties behind its description, not just its Multilink.
controls, scoped to script-src-attr by hash. Without this the step
button logs a violation on every enable/disable and fails the fuzz run.
138 tests (was 124), including that the two ports' profiles sum to a
constant and that the sodium null falls inside the mirror's travel.