@classytic/labs 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +105 -0
- package/dist/biology/enzyme-rate/index.d.mts +1 -0
- package/dist/biology/enzyme-rate/preset.d.mts +25 -0
- package/dist/biology/enzyme-rate/preset.mjs +256 -0
- package/dist/biology/genetic-cross/core.d.mts +64 -0
- package/dist/biology/genetic-cross/core.mjs +147 -0
- package/dist/biology/genetic-cross/grid.mjs +239 -0
- package/dist/biology/genetic-cross/index.d.mts +3 -0
- package/dist/biology/genetic-cross/preset.d.mts +26 -0
- package/dist/biology/genetic-cross/preset.mjs +184 -0
- package/dist/biology/genetic-cross/sex-linked.d.mts +27 -0
- package/dist/biology/genetic-cross/sex-linked.mjs +226 -0
- package/dist/biology/index.d.mts +11 -0
- package/dist/biology/index.mjs +12 -0
- package/dist/biology/photosynthesis-factors/index.d.mts +1 -0
- package/dist/biology/photosynthesis-factors/preset.d.mts +25 -0
- package/dist/biology/photosynthesis-factors/preset.mjs +270 -0
- package/dist/biology/punnett-cross/index.d.mts +1 -0
- package/dist/biology/punnett-cross/preset.d.mts +27 -0
- package/dist/biology/punnett-cross/preset.mjs +21 -0
- package/dist/biology/respiration/index.d.mts +1 -0
- package/dist/biology/respiration/preset.d.mts +17 -0
- package/dist/biology/respiration/preset.mjs +179 -0
- package/dist/biology/sequence/central-dogma.d.mts +17 -0
- package/dist/biology/sequence/central-dogma.mjs +339 -0
- package/dist/biology/sequence/core.d.mts +38 -0
- package/dist/biology/sequence/core.mjs +178 -0
- package/dist/biology/sequence/index.d.mts +3 -0
- package/dist/biology/sequence/preset.d.mts +20 -0
- package/dist/biology/sequence/preset.mjs +235 -0
- package/dist/blocks/accounting.d.mts +142 -0
- package/dist/blocks/accounting.mjs +446 -0
- package/dist/blocks/authoring.d.mts +12 -0
- package/dist/blocks/authoring.mjs +705 -0
- package/dist/blocks/biology.d.mts +197 -0
- package/dist/blocks/biology.mjs +513 -0
- package/dist/blocks/chem.d.mts +128 -0
- package/dist/blocks/chem.mjs +486 -0
- package/dist/blocks/circuits.d.mts +86 -0
- package/dist/blocks/circuits.mjs +348 -0
- package/dist/blocks/discrete.d.mts +62 -0
- package/dist/blocks/discrete.mjs +314 -0
- package/dist/blocks/economics.d.mts +56 -0
- package/dist/blocks/economics.mjs +203 -0
- package/dist/blocks/geography.d.mts +58 -0
- package/dist/blocks/geography.mjs +115 -0
- package/dist/blocks/geometry.d.mts +28 -0
- package/dist/blocks/geometry.mjs +160 -0
- package/dist/blocks/ict.d.mts +65 -0
- package/dist/blocks/ict.mjs +197 -0
- package/dist/blocks/index.d.mts +4555 -0
- package/dist/blocks/index.mjs +120 -0
- package/dist/blocks/lab-block.d.mts +16 -0
- package/dist/blocks/lab-block.mjs +74 -0
- package/dist/blocks/lab-config.d.mts +23 -0
- package/dist/blocks/lab-config.mjs +200 -0
- package/dist/blocks/lab-gallery.d.mts +30 -0
- package/dist/blocks/lab-gallery.mjs +208 -0
- package/dist/blocks/language.d.mts +349 -0
- package/dist/blocks/language.mjs +750 -0
- package/dist/blocks/lesson.d.mts +43 -0
- package/dist/blocks/lesson.mjs +140 -0
- package/dist/blocks/math.d.mts +411 -0
- package/dist/blocks/math.mjs +1536 -0
- package/dist/blocks/ml.d.mts +84 -0
- package/dist/blocks/ml.mjs +146 -0
- package/dist/blocks/physics.d.mts +259 -0
- package/dist/blocks/physics.mjs +868 -0
- package/dist/blocks/statistics.d.mts +29 -0
- package/dist/blocks/statistics.mjs +123 -0
- package/dist/catalog/index.d.mts +3 -0
- package/dist/catalog/index.mjs +8 -0
- package/dist/catalog/registry.d.mts +46 -0
- package/dist/catalog/registry.mjs +56 -0
- package/dist/catalog/templates.d.mts +11 -0
- package/dist/catalog/templates.mjs +141 -0
- package/dist/chem/battery.d.mts +16 -0
- package/dist/chem/battery.mjs +311 -0
- package/dist/chem/bohr-atom.d.mts +16 -0
- package/dist/chem/bohr-atom.mjs +212 -0
- package/dist/chem/diffusion/asset.mjs +76 -0
- package/dist/chem/diffusion/index.d.mts +1 -0
- package/dist/chem/diffusion/preset.d.mts +15 -0
- package/dist/chem/diffusion/preset.mjs +188 -0
- package/dist/chem/electrochem/index.d.mts +1 -0
- package/dist/chem/electrochem/preset.d.mts +23 -0
- package/dist/chem/electrochem/preset.mjs +402 -0
- package/dist/chem/equilibrium/index.d.mts +1 -0
- package/dist/chem/equilibrium/preset.d.mts +36 -0
- package/dist/chem/equilibrium/preset.mjs +416 -0
- package/dist/chem/gas-box/index.d.mts +1 -0
- package/dist/chem/gas-box/preset.d.mts +27 -0
- package/dist/chem/gas-box/preset.mjs +395 -0
- package/dist/chem/index.d.mts +16 -0
- package/dist/chem/index.mjs +17 -0
- package/dist/chem/kinetics/index.d.mts +1 -0
- package/dist/chem/kinetics/preset.d.mts +31 -0
- package/dist/chem/kinetics/preset.mjs +478 -0
- package/dist/chem/periodic-trends/index.d.mts +1 -0
- package/dist/chem/periodic-trends/preset.d.mts +21 -0
- package/dist/chem/periodic-trends/preset.mjs +831 -0
- package/dist/chem/reaction-lab.d.mts +18 -0
- package/dist/chem/reaction-lab.mjs +165 -0
- package/dist/chem/reaction-profile.d.mts +21 -0
- package/dist/chem/reaction-profile.mjs +287 -0
- package/dist/chem/solution/dilution.d.mts +27 -0
- package/dist/chem/solution/dilution.mjs +199 -0
- package/dist/chem/solution/field.d.mts +30 -0
- package/dist/chem/solution/field.mjs +145 -0
- package/dist/chem/solution/index.d.mts +3 -0
- package/dist/chem/solution/solution-box.d.mts +28 -0
- package/dist/chem/solution/solution-box.mjs +140 -0
- package/dist/chem/stoichiometry/index.d.mts +1 -0
- package/dist/chem/stoichiometry/preset.d.mts +29 -0
- package/dist/chem/stoichiometry/preset.mjs +392 -0
- package/dist/chem/titration/index.d.mts +1 -0
- package/dist/chem/titration/preset.d.mts +29 -0
- package/dist/chem/titration/preset.mjs +436 -0
- package/dist/circuits/ac-dc/asset.mjs +295 -0
- package/dist/circuits/ac-dc/index.d.mts +1 -0
- package/dist/circuits/ac-dc/preset.d.mts +16 -0
- package/dist/circuits/ac-dc/preset.mjs +134 -0
- package/dist/circuits/capacitor-leak/index.d.mts +1 -0
- package/dist/circuits/capacitor-leak/preset.d.mts +32 -0
- package/dist/circuits/capacitor-leak/preset.mjs +271 -0
- package/dist/circuits/circuit/asset.d.mts +6 -0
- package/dist/circuits/circuit/asset.mjs +367 -0
- package/dist/circuits/circuit/index.d.mts +2 -0
- package/dist/circuits/circuit/preset.d.mts +46 -0
- package/dist/circuits/circuit/preset.mjs +235 -0
- package/dist/circuits/circuit-builder.d.mts +30 -0
- package/dist/circuits/circuit-builder.mjs +412 -0
- package/dist/circuits/circuit-lab.d.mts +20 -0
- package/dist/circuits/circuit-lab.mjs +400 -0
- package/dist/circuits/index.d.mts +7 -0
- package/dist/circuits/index.mjs +8 -0
- package/dist/commerce/accounting/core.d.mts +48 -0
- package/dist/commerce/accounting/core.mjs +57 -0
- package/dist/commerce/accounting/equation-balance.d.mts +35 -0
- package/dist/commerce/accounting/equation-balance.mjs +292 -0
- package/dist/commerce/accounting/index.d.mts +4 -0
- package/dist/commerce/accounting/journal-poster.d.mts +29 -0
- package/dist/commerce/accounting/journal-poster.mjs +472 -0
- package/dist/commerce/accounting/statement-sorter.d.mts +25 -0
- package/dist/commerce/accounting/statement-sorter.mjs +304 -0
- package/dist/commerce/economics/core.d.mts +33 -0
- package/dist/commerce/economics/core.mjs +26 -0
- package/dist/commerce/economics/demand-shift-vs-move.d.mts +35 -0
- package/dist/commerce/economics/demand-shift-vs-move.mjs +324 -0
- package/dist/commerce/economics/elasticity-revenue.d.mts +31 -0
- package/dist/commerce/economics/elasticity-revenue.mjs +253 -0
- package/dist/commerce/economics/index.d.mts +4 -0
- package/dist/commerce/economics/market-equilibrium.d.mts +33 -0
- package/dist/commerce/economics/market-equilibrium.mjs +340 -0
- package/dist/commerce/index.d.mts +9 -0
- package/dist/commerce/index.mjs +10 -0
- package/dist/core/easing.d.mts +28 -0
- package/dist/core/easing.mjs +66 -0
- package/dist/core/index.d.mts +10 -0
- package/dist/core/index.mjs +11 -0
- package/dist/core/numeric.d.mts +37 -0
- package/dist/core/numeric.mjs +75 -0
- package/dist/core/reactive.d.mts +24 -0
- package/dist/core/reactive.mjs +51 -0
- package/dist/core/rng.d.mts +21 -0
- package/dist/core/rng.mjs +39 -0
- package/dist/core/tex.d.mts +14 -0
- package/dist/core/tex.mjs +44 -0
- package/dist/core/timeline.d.mts +34 -0
- package/dist/core/timeline.mjs +77 -0
- package/dist/core/util.d.mts +19 -0
- package/dist/core/util.mjs +31 -0
- package/dist/discrete/arrangements/preset.d.mts +28 -0
- package/dist/discrete/arrangements/preset.mjs +304 -0
- package/dist/discrete/bayes/preset.d.mts +33 -0
- package/dist/discrete/bayes/preset.mjs +476 -0
- package/dist/discrete/binomial/preset.d.mts +25 -0
- package/dist/discrete/binomial/preset.mjs +333 -0
- package/dist/discrete/core/combinatorics.d.mts +23 -0
- package/dist/discrete/core/combinatorics.mjs +57 -0
- package/dist/discrete/core/inclusionExclusion.d.mts +19 -0
- package/dist/discrete/core/inclusionExclusion.mjs +30 -0
- package/dist/discrete/core/pigeonhole.d.mts +15 -0
- package/dist/discrete/core/pigeonhole.mjs +24 -0
- package/dist/discrete/core/probability.d.mts +29 -0
- package/dist/discrete/core/probability.mjs +43 -0
- package/dist/discrete/core/sets.d.mts +21 -0
- package/dist/discrete/core/sets.mjs +45 -0
- package/dist/discrete/counting-slots/preset.d.mts +30 -0
- package/dist/discrete/counting-slots/preset.mjs +553 -0
- package/dist/discrete/counting-tree/index.d.mts +1 -0
- package/dist/discrete/counting-tree/preset.d.mts +44 -0
- package/dist/discrete/counting-tree/preset.mjs +364 -0
- package/dist/discrete/expected-value/preset.d.mts +28 -0
- package/dist/discrete/expected-value/preset.mjs +352 -0
- package/dist/discrete/hypergeometric/preset.d.mts +25 -0
- package/dist/discrete/hypergeometric/preset.mjs +330 -0
- package/dist/discrete/index.d.mts +26 -0
- package/dist/discrete/index.mjs +27 -0
- package/dist/discrete/karnaugh/index.d.mts +1 -0
- package/dist/discrete/karnaugh/preset.d.mts +30 -0
- package/dist/discrete/karnaugh/preset.mjs +452 -0
- package/dist/discrete/lln/asset.mjs +206 -0
- package/dist/discrete/lln/index.d.mts +1 -0
- package/dist/discrete/lln/preset.d.mts +17 -0
- package/dist/discrete/lln/preset.mjs +152 -0
- package/dist/discrete/logic-circuit/index.d.mts +1 -0
- package/dist/discrete/logic-circuit/preset.d.mts +47 -0
- package/dist/discrete/logic-circuit/preset.mjs +307 -0
- package/dist/discrete/monte-carlo/index.d.mts +1 -0
- package/dist/discrete/monte-carlo/preset.d.mts +64 -0
- package/dist/discrete/monte-carlo/preset.mjs +446 -0
- package/dist/discrete/monty-hall/index.d.mts +1 -0
- package/dist/discrete/monty-hall/preset.d.mts +23 -0
- package/dist/discrete/monty-hall/preset.mjs +491 -0
- package/dist/discrete/outcome-builder/preset.d.mts +24 -0
- package/dist/discrete/outcome-builder/preset.mjs +283 -0
- package/dist/discrete/pascal/preset.d.mts +24 -0
- package/dist/discrete/pascal/preset.mjs +372 -0
- package/dist/discrete/sample-space/index.d.mts +1 -0
- package/dist/discrete/sample-space/preset.d.mts +42 -0
- package/dist/discrete/sample-space/preset.mjs +395 -0
- package/dist/discrete/selection/preset.d.mts +33 -0
- package/dist/discrete/selection/preset.mjs +406 -0
- package/dist/discrete/truth-table/index.d.mts +1 -0
- package/dist/discrete/truth-table/preset.d.mts +30 -0
- package/dist/discrete/truth-table/preset.mjs +456 -0
- package/dist/discrete/venn/index.d.mts +1 -0
- package/dist/discrete/venn/preset.d.mts +32 -0
- package/dist/discrete/venn/preset.mjs +461 -0
- package/dist/geography/cycle-lab/index.d.mts +1 -0
- package/dist/geography/cycle-lab/preset.d.mts +25 -0
- package/dist/geography/cycle-lab/preset.mjs +254 -0
- package/dist/geography/cycles.d.mts +21 -0
- package/dist/geography/cycles.mjs +205 -0
- package/dist/geography/index.d.mts +4 -0
- package/dist/geography/index.mjs +5 -0
- package/dist/geometry/board/index.d.mts +1 -0
- package/dist/geometry/board/preset.d.mts +71 -0
- package/dist/geometry/board/preset.mjs +148 -0
- package/dist/geometry/builder.d.mts +18 -0
- package/dist/geometry/builder.mjs +332 -0
- package/dist/geometry/index.d.mts +4 -0
- package/dist/geometry/index.mjs +5 -0
- package/dist/geometry/intersecting-circles.d.mts +17 -0
- package/dist/geometry/intersecting-circles.mjs +104 -0
- package/dist/ict/index.d.mts +5 -0
- package/dist/ict/index.mjs +6 -0
- package/dist/ict/number-systems/base-odometer.d.mts +34 -0
- package/dist/ict/number-systems/base-odometer.mjs +160 -0
- package/dist/ict/number-systems/bit-grouper.d.mts +32 -0
- package/dist/ict/number-systems/bit-grouper.mjs +190 -0
- package/dist/ict/number-systems/index.d.mts +4 -0
- package/dist/ict/number-systems/place-value-dial.d.mts +29 -0
- package/dist/ict/number-systems/place-value-dial.mjs +153 -0
- package/dist/ict/number-systems/wheel.d.mts +73 -0
- package/dist/ict/number-systems/wheel.mjs +279 -0
- package/dist/index.d.mts +10 -0
- package/dist/index.mjs +11 -0
- package/dist/kit/anim.mjs +52 -0
- package/dist/kit/annotate.mjs +116 -0
- package/dist/kit/answer-check.d.mts +38 -0
- package/dist/kit/answer-check.mjs +65 -0
- package/dist/kit/asset-util.mjs +15 -0
- package/dist/kit/controls.mjs +77 -0
- package/dist/kit/cycle.d.mts +44 -0
- package/dist/kit/cycle.mjs +188 -0
- package/dist/kit/diagram.mjs +176 -0
- package/dist/kit/electronics.mjs +357 -0
- package/dist/kit/expr-analysis.d.mts +37 -0
- package/dist/kit/expr-analysis.mjs +111 -0
- package/dist/kit/frame.d.mts +70 -0
- package/dist/kit/frame.mjs +205 -0
- package/dist/kit/freq-tree.mjs +99 -0
- package/dist/kit/gameshow.mjs +315 -0
- package/dist/kit/index.d.mts +5 -0
- package/dist/kit/index.mjs +6 -0
- package/dist/kit/logic-gates.d.mts +6 -0
- package/dist/kit/logic-gates.mjs +210 -0
- package/dist/kit/molecules.mjs +178 -0
- package/dist/kit/pedagogy.d.mts +126 -0
- package/dist/kit/pedagogy.mjs +331 -0
- package/dist/kit/play.d.mts +21 -0
- package/dist/kit/play.mjs +52 -0
- package/dist/kit/probability.mjs +141 -0
- package/dist/kit/proportion.mjs +112 -0
- package/dist/kit/reaction.mjs +102 -0
- package/dist/kit/rich.d.mts +10 -0
- package/dist/kit/rich.mjs +21 -0
- package/dist/kit/scale.mjs +230 -0
- package/dist/kit/space.mjs +326 -0
- package/dist/kit/steps.d.mts +24 -0
- package/dist/kit/steps.mjs +57 -0
- package/dist/kit/thermal.mjs +289 -0
- package/dist/language/agreement/index.d.mts +1 -0
- package/dist/language/agreement/preset.d.mts +27 -0
- package/dist/language/agreement/preset.mjs +113 -0
- package/dist/language/article-lens/index.d.mts +1 -0
- package/dist/language/article-lens/preset.d.mts +31 -0
- package/dist/language/article-lens/preset.mjs +125 -0
- package/dist/language/deck.d.mts +45 -0
- package/dist/language/deck.mjs +61 -0
- package/dist/language/icon.d.mts +40 -0
- package/dist/language/icon.mjs +73 -0
- package/dist/language/index.d.mts +10 -0
- package/dist/language/index.mjs +11 -0
- package/dist/language/preposition-scene/index.d.mts +1 -0
- package/dist/language/preposition-scene/preset.d.mts +34 -0
- package/dist/language/preposition-scene/preset.mjs +234 -0
- package/dist/language/sentence-builder/index.d.mts +1 -0
- package/dist/language/sentence-builder/preset.d.mts +32 -0
- package/dist/language/sentence-builder/preset.mjs +122 -0
- package/dist/language/transform/index.d.mts +1 -0
- package/dist/language/transform/preset.d.mts +31 -0
- package/dist/language/transform/preset.mjs +137 -0
- package/dist/language/ui.d.mts +53 -0
- package/dist/language/ui.mjs +88 -0
- package/dist/language/word-match/index.d.mts +1 -0
- package/dist/language/word-match/preset.d.mts +22 -0
- package/dist/language/word-match/preset.mjs +148 -0
- package/dist/math/area-model/asset.d.mts +6 -0
- package/dist/math/area-model/asset.mjs +270 -0
- package/dist/math/area-model/index.d.mts +2 -0
- package/dist/math/area-model/preset.d.mts +29 -0
- package/dist/math/area-model/preset.mjs +243 -0
- package/dist/math/balance-algebra/asset.d.mts +6 -0
- package/dist/math/balance-algebra/asset.mjs +150 -0
- package/dist/math/balance-algebra/index.d.mts +2 -0
- package/dist/math/balance-algebra/preset.d.mts +30 -0
- package/dist/math/balance-algebra/preset.mjs +228 -0
- package/dist/math/derivation.d.mts +22 -0
- package/dist/math/derivation.mjs +113 -0
- package/dist/math/derivative-explorer/index.d.mts +1 -0
- package/dist/math/derivative-explorer/preset.d.mts +19 -0
- package/dist/math/derivative-explorer/preset.mjs +227 -0
- package/dist/math/function-machine/index.d.mts +1 -0
- package/dist/math/function-machine/preset.d.mts +21 -0
- package/dist/math/function-machine/preset.mjs +177 -0
- package/dist/math/gradient-descent.d.mts +23 -0
- package/dist/math/gradient-descent.mjs +473 -0
- package/dist/math/grapher/index.d.mts +1 -0
- package/dist/math/grapher/preset.d.mts +40 -0
- package/dist/math/grapher/preset.mjs +313 -0
- package/dist/math/harmonic-form/index.d.mts +1 -0
- package/dist/math/harmonic-form/preset.d.mts +21 -0
- package/dist/math/harmonic-form/preset.mjs +387 -0
- package/dist/math/index.d.mts +25 -0
- package/dist/math/index.mjs +26 -0
- package/dist/math/integral-explorer/index.d.mts +1 -0
- package/dist/math/integral-explorer/preset.d.mts +23 -0
- package/dist/math/integral-explorer/preset.mjs +217 -0
- package/dist/math/interactive/index.d.mts +1 -0
- package/dist/math/interactive/preset.d.mts +72 -0
- package/dist/math/interactive/preset.mjs +202 -0
- package/dist/math/limit-explorer/index.d.mts +1 -0
- package/dist/math/limit-explorer/preset.d.mts +19 -0
- package/dist/math/limit-explorer/preset.mjs +216 -0
- package/dist/math/linear-system/index.d.mts +1 -0
- package/dist/math/linear-system/preset.d.mts +28 -0
- package/dist/math/linear-system/preset.mjs +164 -0
- package/dist/math/mystery-bucket/asset.d.mts +6 -0
- package/dist/math/mystery-bucket/asset.mjs +145 -0
- package/dist/math/mystery-bucket/index.d.mts +2 -0
- package/dist/math/mystery-bucket/preset.d.mts +36 -0
- package/dist/math/mystery-bucket/preset.mjs +116 -0
- package/dist/math/number-line/index.d.mts +1 -0
- package/dist/math/number-line/preset.d.mts +24 -0
- package/dist/math/number-line/preset.mjs +142 -0
- package/dist/math/parabola/index.d.mts +1 -0
- package/dist/math/parabola/preset.d.mts +13 -0
- package/dist/math/parabola/preset.mjs +79 -0
- package/dist/math/pattern/asset.d.mts +6 -0
- package/dist/math/pattern/asset.mjs +102 -0
- package/dist/math/pattern/index.d.mts +2 -0
- package/dist/math/pattern/preset.d.mts +32 -0
- package/dist/math/pattern/preset.mjs +294 -0
- package/dist/math/triangle-trig/index.d.mts +1 -0
- package/dist/math/triangle-trig/preset.d.mts +47 -0
- package/dist/math/triangle-trig/preset.mjs +245 -0
- package/dist/math/trig-explorer.d.mts +18 -0
- package/dist/math/trig-explorer.mjs +209 -0
- package/dist/ml/boundary/index.d.mts +1 -0
- package/dist/ml/boundary/preset.d.mts +24 -0
- package/dist/ml/boundary/preset.mjs +385 -0
- package/dist/ml/classifier/index.d.mts +1 -0
- package/dist/ml/classifier/preset.d.mts +25 -0
- package/dist/ml/classifier/preset.mjs +315 -0
- package/dist/ml/index.d.mts +6 -0
- package/dist/ml/index.mjs +7 -0
- package/dist/ml/kmeans/index.d.mts +1 -0
- package/dist/ml/kmeans/preset.d.mts +33 -0
- package/dist/ml/kmeans/preset.mjs +236 -0
- package/dist/ml/knn/index.d.mts +1 -0
- package/dist/ml/knn/preset.d.mts +28 -0
- package/dist/ml/knn/preset.mjs +279 -0
- package/dist/ml/regression/index.d.mts +1 -0
- package/dist/ml/regression/preset.d.mts +32 -0
- package/dist/ml/regression/preset.mjs +394 -0
- package/dist/physics/atwood/index.d.mts +1 -0
- package/dist/physics/atwood/preset.d.mts +23 -0
- package/dist/physics/atwood/preset.mjs +312 -0
- package/dist/physics/bullet-walls/index.d.mts +1 -0
- package/dist/physics/bullet-walls/preset.d.mts +28 -0
- package/dist/physics/bullet-walls/preset.mjs +373 -0
- package/dist/physics/carnot/index.d.mts +1 -0
- package/dist/physics/carnot/preset.d.mts +27 -0
- package/dist/physics/carnot/preset.mjs +427 -0
- package/dist/physics/circular-motion/index.d.mts +1 -0
- package/dist/physics/circular-motion/preset.d.mts +25 -0
- package/dist/physics/circular-motion/preset.mjs +293 -0
- package/dist/physics/collision-track/index.d.mts +1 -0
- package/dist/physics/collision-track/preset.d.mts +27 -0
- package/dist/physics/collision-track/preset.mjs +352 -0
- package/dist/physics/efficiency/index.d.mts +1 -0
- package/dist/physics/efficiency/preset.d.mts +33 -0
- package/dist/physics/efficiency/preset.mjs +343 -0
- package/dist/physics/electric-field/index.d.mts +1 -0
- package/dist/physics/electric-field/preset.d.mts +15 -0
- package/dist/physics/electric-field/preset.mjs +306 -0
- package/dist/physics/energy-skate/index.d.mts +1 -0
- package/dist/physics/energy-skate/preset.d.mts +25 -0
- package/dist/physics/energy-skate/preset.mjs +254 -0
- package/dist/physics/entropy/index.d.mts +1 -0
- package/dist/physics/entropy/preset.d.mts +18 -0
- package/dist/physics/entropy/preset.mjs +416 -0
- package/dist/physics/expansion/index.d.mts +1 -0
- package/dist/physics/expansion/preset.d.mts +26 -0
- package/dist/physics/expansion/preset.mjs +609 -0
- package/dist/physics/exponential/asset.mjs +221 -0
- package/dist/physics/exponential/index.d.mts +1 -0
- package/dist/physics/exponential/preset.d.mts +17 -0
- package/dist/physics/exponential/preset.mjs +182 -0
- package/dist/physics/gas-process/index.d.mts +1 -0
- package/dist/physics/gas-process/preset.d.mts +30 -0
- package/dist/physics/gas-process/preset.mjs +384 -0
- package/dist/physics/gravitation/index.d.mts +1 -0
- package/dist/physics/gravitation/preset.d.mts +24 -0
- package/dist/physics/gravitation/preset.mjs +345 -0
- package/dist/physics/gravity-drop.d.mts +9 -0
- package/dist/physics/gravity-drop.mjs +187 -0
- package/dist/physics/heat-transfer/index.d.mts +1 -0
- package/dist/physics/heat-transfer/preset.d.mts +27 -0
- package/dist/physics/heat-transfer/preset.mjs +626 -0
- package/dist/physics/impulse/index.d.mts +1 -0
- package/dist/physics/impulse/preset.d.mts +29 -0
- package/dist/physics/impulse/preset.mjs +453 -0
- package/dist/physics/index.d.mts +43 -0
- package/dist/physics/index.mjs +44 -0
- package/dist/physics/kepler/index.d.mts +1 -0
- package/dist/physics/kepler/preset.d.mts +27 -0
- package/dist/physics/kepler/preset.mjs +257 -0
- package/dist/physics/lever/asset.d.mts +6 -0
- package/dist/physics/lever/asset.mjs +220 -0
- package/dist/physics/lever/index.d.mts +2 -0
- package/dist/physics/lever/preset.d.mts +31 -0
- package/dist/physics/lever/preset.mjs +261 -0
- package/dist/physics/lorentz/index.d.mts +1 -0
- package/dist/physics/lorentz/preset.d.mts +29 -0
- package/dist/physics/lorentz/preset.mjs +367 -0
- package/dist/physics/magnetism/index.d.mts +1 -0
- package/dist/physics/magnetism/preset.d.mts +15 -0
- package/dist/physics/magnetism/preset.mjs +334 -0
- package/dist/physics/optics/asset.d.mts +6 -0
- package/dist/physics/optics/asset.mjs +234 -0
- package/dist/physics/optics/index.d.mts +2 -0
- package/dist/physics/optics/preset.d.mts +14 -0
- package/dist/physics/optics/preset.mjs +202 -0
- package/dist/physics/orbit-lab.d.mts +6 -0
- package/dist/physics/orbit-lab.mjs +222 -0
- package/dist/physics/projectile-lab.d.mts +10 -0
- package/dist/physics/projectile-lab.mjs +354 -0
- package/dist/physics/rain-relative/index.d.mts +1 -0
- package/dist/physics/rain-relative/preset.d.mts +19 -0
- package/dist/physics/rain-relative/preset.mjs +358 -0
- package/dist/physics/ramp-forces/index.d.mts +1 -0
- package/dist/physics/ramp-forces/preset.d.mts +36 -0
- package/dist/physics/ramp-forces/preset.mjs +550 -0
- package/dist/physics/river-boat.d.mts +22 -0
- package/dist/physics/river-boat.mjs +498 -0
- package/dist/physics/shm/index.d.mts +1 -0
- package/dist/physics/shm/preset.d.mts +33 -0
- package/dist/physics/shm/preset.mjs +554 -0
- package/dist/physics/stopping-distance/index.d.mts +1 -0
- package/dist/physics/stopping-distance/preset.d.mts +29 -0
- package/dist/physics/stopping-distance/preset.mjs +662 -0
- package/dist/physics/temperature-scales/index.d.mts +1 -0
- package/dist/physics/temperature-scales/preset.d.mts +15 -0
- package/dist/physics/temperature-scales/preset.mjs +353 -0
- package/dist/physics/terminal-velocity/index.d.mts +1 -0
- package/dist/physics/terminal-velocity/preset.d.mts +26 -0
- package/dist/physics/terminal-velocity/preset.mjs +404 -0
- package/dist/physics/thermal/index.d.mts +1 -0
- package/dist/physics/thermal/preset.d.mts +44 -0
- package/dist/physics/thermal/preset.mjs +373 -0
- package/dist/physics/vector-board/index.d.mts +1 -0
- package/dist/physics/vector-board/preset.d.mts +65 -0
- package/dist/physics/vector-board/preset.mjs +273 -0
- package/dist/physics/vector-board/view.d.mts +49 -0
- package/dist/physics/vector-board/view.mjs +58 -0
- package/dist/physics/vector-scene.d.mts +41 -0
- package/dist/physics/vector-scene.mjs +211 -0
- package/dist/physics/vector-types/index.d.mts +1 -0
- package/dist/physics/vector-types/preset.d.mts +27 -0
- package/dist/physics/vector-types/preset.mjs +192 -0
- package/dist/physics/water-density/index.d.mts +1 -0
- package/dist/physics/water-density/preset.d.mts +18 -0
- package/dist/physics/water-density/preset.mjs +439 -0
- package/dist/physics/waves/core.mjs +33 -0
- package/dist/physics/waves/doppler.d.mts +23 -0
- package/dist/physics/waves/doppler.mjs +260 -0
- package/dist/physics/waves/index.d.mts +4 -0
- package/dist/physics/waves/preset.d.mts +30 -0
- package/dist/physics/waves/preset.mjs +488 -0
- package/dist/physics/waves/ripple.d.mts +26 -0
- package/dist/physics/waves/ripple.mjs +234 -0
- package/dist/physics/waves/string.d.mts +29 -0
- package/dist/physics/waves/string.mjs +289 -0
- package/dist/physics/work-energy/index.d.mts +1 -0
- package/dist/physics/work-energy/preset.d.mts +17 -0
- package/dist/physics/work-energy/preset.mjs +341 -0
- package/dist/schemas/index.d.mts +235 -0
- package/dist/schemas/index.mjs +145 -0
- package/dist/statistics/center-spread/preset.d.mts +34 -0
- package/dist/statistics/center-spread/preset.mjs +323 -0
- package/dist/statistics/core/descriptive.d.mts +35 -0
- package/dist/statistics/core/descriptive.mjs +64 -0
- package/dist/statistics/core/normal.d.mts +21 -0
- package/dist/statistics/core/normal.mjs +37 -0
- package/dist/statistics/core/sequences.d.mts +27 -0
- package/dist/statistics/core/sequences.mjs +35 -0
- package/dist/statistics/galton/preset.d.mts +27 -0
- package/dist/statistics/galton/preset.mjs +331 -0
- package/dist/statistics/histogram/preset.d.mts +27 -0
- package/dist/statistics/histogram/preset.mjs +385 -0
- package/dist/statistics/index.d.mts +11 -0
- package/dist/statistics/index.mjs +12 -0
- package/dist/statistics/normal/preset.d.mts +30 -0
- package/dist/statistics/normal/preset.mjs +400 -0
- package/dist/statistics/sampling/preset.d.mts +32 -0
- package/dist/statistics/sampling/preset.mjs +406 -0
- package/dist/statistics/sequence/preset.d.mts +28 -0
- package/dist/statistics/sequence/preset.mjs +302 -0
- package/dist/statistics/z-table/preset.d.mts +28 -0
- package/dist/statistics/z-table/preset.mjs +348 -0
- package/package.json +266 -0
- package/styles.css +267 -0
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { clamp } from "../../core/util.mjs";
|
|
4
|
+
import { CheckButton, Slider, StatusPill } from "../../kit/controls.mjs";
|
|
5
|
+
import { Callout, ControlBar, Field, LabFrame, LiveRegion } from "../../kit/frame.mjs";
|
|
6
|
+
import { useFrameTick, useReducedMotion } from "../../kit/anim.mjs";
|
|
7
|
+
import { useRef, useState } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { Label, Polygon, Polyline, Segment, Stage, useInView, useLearner } from "@classytic/stage";
|
|
10
|
+
|
|
11
|
+
//#region src/physics/impulse/preset.tsx
|
|
12
|
+
/**
|
|
13
|
+
* ImpulseLab — "Catch the egg", why a long contact time saves you.
|
|
14
|
+
*
|
|
15
|
+
* The SAME ball at the SAME speed is brought to rest, so the impulse it delivers
|
|
16
|
+
* is FIXED: J = Δp = m·v. You only change HOW LONG the stop takes (a hard wall vs
|
|
17
|
+
* a soft glove / airbag). The force–time pulse is modelled as a half-sine,
|
|
18
|
+
* F(t) = F_peak·sin(πt/Δt), whose area ∫F dt = F_peak·(2Δt/π) is pinned to Δp —
|
|
19
|
+
* so as Δt grows the curve morphs from a tall-thin SPIKE (hard, big peak force)
|
|
20
|
+
* to a low-wide BUMP (soft), the two shaded areas staying equal on FIXED axes:
|
|
21
|
+
* the single-image proof that impulse is conserved while peak force is not.
|
|
22
|
+
*
|
|
23
|
+
* A fragile target (egg) cracks if the peak force tops its limit — so "bend your
|
|
24
|
+
* knees / airbags / follow-through" stops being a slogan and becomes a number.
|
|
25
|
+
*
|
|
26
|
+
* Tokenized SVG; time-dependent (integrator here); honours reduced-motion.
|
|
27
|
+
*/
|
|
28
|
+
const T_MAX = .34;
|
|
29
|
+
const F_MAX = 360;
|
|
30
|
+
const DT_MIN = .02, DT_MAX = .3;
|
|
31
|
+
/** Half-sine pulse pinned to area = dp: F_peak = π·dp / (2·Δt). */
|
|
32
|
+
function peakForce(dp, dt) {
|
|
33
|
+
return Math.PI * dp / (2 * dt);
|
|
34
|
+
}
|
|
35
|
+
function pulse(dp, dt) {
|
|
36
|
+
const fp = peakForce(dp, dt);
|
|
37
|
+
const pts = [];
|
|
38
|
+
for (let i = 0; i <= 60; i++) {
|
|
39
|
+
const t = i / 60 * dt;
|
|
40
|
+
pts.push({
|
|
41
|
+
x: t,
|
|
42
|
+
y: fp * Math.sin(Math.PI * t / dt)
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return pts;
|
|
46
|
+
}
|
|
47
|
+
function ImpulseLab({ mass = .5, speed = 8, contact = .05, crackForce = 120, title = "Catch the egg — stretch the stop, shrink the force", prompt = "Same ball, same speed, so the impulse J = m·v is fixed. Drag the contact time: a softer, slower stop keeps the same area but a much smaller peak force.", objectives, controlConfig }) {
|
|
48
|
+
const [m, setM] = useState(mass);
|
|
49
|
+
const [v, setV] = useState(speed);
|
|
50
|
+
const [dt, setDt] = useState(clamp(contact, DT_MIN, DT_MAX));
|
|
51
|
+
const [running, setRunning] = useState(false);
|
|
52
|
+
const tRef = useRef(0);
|
|
53
|
+
const reduce = useReducedMotion();
|
|
54
|
+
const learner = useLearner();
|
|
55
|
+
const { ref: viewRef, inView } = useInView();
|
|
56
|
+
const dp = m * v;
|
|
57
|
+
const fpeak = peakForce(dp, dt);
|
|
58
|
+
const cracks = fpeak > crackForce;
|
|
59
|
+
const curve = pulse(dp, dt);
|
|
60
|
+
const hard = pulse(dp, DT_MIN);
|
|
61
|
+
const APPROACH = .6;
|
|
62
|
+
const TOTAL = APPROACH + dt + .5;
|
|
63
|
+
const repaint = useFrameTick(running && inView, (f) => {
|
|
64
|
+
tRef.current += Math.min(.05, f.dtMs / 1e3);
|
|
65
|
+
if (tRef.current >= TOTAL) {
|
|
66
|
+
setRunning(false);
|
|
67
|
+
learner?.report({
|
|
68
|
+
activity: "impulse",
|
|
69
|
+
correct: !cracks,
|
|
70
|
+
score: {
|
|
71
|
+
raw: cracks ? 0 : 1,
|
|
72
|
+
max: 1
|
|
73
|
+
},
|
|
74
|
+
completion: true
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
const launch = () => {
|
|
79
|
+
tRef.current = 0;
|
|
80
|
+
if (reduce) {
|
|
81
|
+
tRef.current = TOTAL;
|
|
82
|
+
repaint();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
setRunning(true);
|
|
86
|
+
};
|
|
87
|
+
const onParam = (set) => (n) => {
|
|
88
|
+
set(n);
|
|
89
|
+
setRunning(false);
|
|
90
|
+
tRef.current = 0;
|
|
91
|
+
};
|
|
92
|
+
const t = tRef.current;
|
|
93
|
+
const wallX = 6;
|
|
94
|
+
const restX = wallX - .9;
|
|
95
|
+
const startX = -6;
|
|
96
|
+
const phase = t < APPROACH ? 0 : t < APPROACH + dt ? (t - APPROACH) / dt : 1;
|
|
97
|
+
const give = .4 + 2.6 * ((dt - DT_MIN) / (DT_MAX - DT_MIN));
|
|
98
|
+
const compress = Math.sin(phase * Math.PI) * give;
|
|
99
|
+
const settled = t >= APPROACH + dt;
|
|
100
|
+
const ballX = t < APPROACH ? startX + (restX - give - startX) * (t / APPROACH) : restX - compress;
|
|
101
|
+
const cushionFace = wallX - 1.4 - compress;
|
|
102
|
+
t >= APPROACH && t < APPROACH + dt && fpeak * Math.sin(Math.PI * (t - APPROACH) / dt);
|
|
103
|
+
const scene = /* @__PURE__ */ jsxs(Stage, {
|
|
104
|
+
view: {
|
|
105
|
+
xMin: -6.5,
|
|
106
|
+
xMax: 7.5,
|
|
107
|
+
yMin: -2.2,
|
|
108
|
+
yMax: 2.6
|
|
109
|
+
},
|
|
110
|
+
height: 150,
|
|
111
|
+
preserveAspect: false,
|
|
112
|
+
ariaLabel: `A ${m} kg ball at ${v} m/s stopped over ${(dt * 1e3).toFixed(0)} ms`,
|
|
113
|
+
children: [
|
|
114
|
+
/* @__PURE__ */ jsx(Segment, {
|
|
115
|
+
from: {
|
|
116
|
+
x: -6.5,
|
|
117
|
+
y: -1.6
|
|
118
|
+
},
|
|
119
|
+
to: {
|
|
120
|
+
x: 7.5,
|
|
121
|
+
y: -1.6
|
|
122
|
+
},
|
|
123
|
+
color: "var(--stage-fg)",
|
|
124
|
+
opacity: .4,
|
|
125
|
+
weight: 1.5
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ jsx(Polygon, {
|
|
128
|
+
points: [
|
|
129
|
+
{
|
|
130
|
+
x: wallX,
|
|
131
|
+
y: -1.6
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
x: 7.2,
|
|
135
|
+
y: -1.6
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
x: 7.2,
|
|
139
|
+
y: 2.2
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
x: wallX,
|
|
143
|
+
y: 2.2
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
color: "var(--stage-fg)",
|
|
147
|
+
fill: "var(--stage-muted)",
|
|
148
|
+
fillOpacity: .5,
|
|
149
|
+
weight: 1.5
|
|
150
|
+
}),
|
|
151
|
+
/* @__PURE__ */ jsx(Polygon, {
|
|
152
|
+
points: [
|
|
153
|
+
{
|
|
154
|
+
x: cushionFace,
|
|
155
|
+
y: -1.2
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
x: wallX,
|
|
159
|
+
y: -1.2
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
x: wallX,
|
|
163
|
+
y: 1.8
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
x: cushionFace,
|
|
167
|
+
y: 1.8
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
color: cracks ? "var(--stage-warn)" : "var(--stage-good)",
|
|
171
|
+
fill: cracks ? "var(--stage-warn)" : "var(--stage-good)",
|
|
172
|
+
fillOpacity: .25,
|
|
173
|
+
weight: 1.5
|
|
174
|
+
}),
|
|
175
|
+
/* @__PURE__ */ jsx(Label, {
|
|
176
|
+
x: (cushionFace + wallX) / 2,
|
|
177
|
+
y: 1.8,
|
|
178
|
+
text: dt > .16 ? "soft glove" : dt < .06 ? "hard wall" : "cushion",
|
|
179
|
+
color: "var(--stage-fg)",
|
|
180
|
+
size: 10,
|
|
181
|
+
dy: -6
|
|
182
|
+
}),
|
|
183
|
+
/* @__PURE__ */ jsx(Label, {
|
|
184
|
+
x: ballX,
|
|
185
|
+
y: 0,
|
|
186
|
+
text: cracks && settled ? "💥" : "🥚",
|
|
187
|
+
color: "var(--stage-fg)",
|
|
188
|
+
size: 34
|
|
189
|
+
}),
|
|
190
|
+
t < APPROACH && /* @__PURE__ */ jsx(Label, {
|
|
191
|
+
x: ballX,
|
|
192
|
+
y: 1.2,
|
|
193
|
+
text: `${v} m/s →`,
|
|
194
|
+
color: "var(--stage-accent)",
|
|
195
|
+
size: 11,
|
|
196
|
+
dy: -4
|
|
197
|
+
})
|
|
198
|
+
]
|
|
199
|
+
});
|
|
200
|
+
const gv = {
|
|
201
|
+
xMin: 0,
|
|
202
|
+
xMax: T_MAX,
|
|
203
|
+
yMin: 0,
|
|
204
|
+
yMax: F_MAX
|
|
205
|
+
};
|
|
206
|
+
const playT = clamp(t - APPROACH, 0, dt);
|
|
207
|
+
const filled = curve.filter((p) => p.x <= playT);
|
|
208
|
+
const figure = /* @__PURE__ */ jsxs("div", {
|
|
209
|
+
ref: viewRef,
|
|
210
|
+
className: "lab-playwrap",
|
|
211
|
+
style: {
|
|
212
|
+
display: "grid",
|
|
213
|
+
gap: 8
|
|
214
|
+
},
|
|
215
|
+
children: [scene, /* @__PURE__ */ jsxs(Stage, {
|
|
216
|
+
view: gv,
|
|
217
|
+
height: 150,
|
|
218
|
+
preserveAspect: false,
|
|
219
|
+
ariaLabel: `Force versus time. Peak force ${fpeak.toFixed(0)} newtons over ${(dt * 1e3).toFixed(0)} milliseconds`,
|
|
220
|
+
children: [
|
|
221
|
+
/* @__PURE__ */ jsx(Segment, {
|
|
222
|
+
from: {
|
|
223
|
+
x: 0,
|
|
224
|
+
y: 0
|
|
225
|
+
},
|
|
226
|
+
to: {
|
|
227
|
+
x: T_MAX,
|
|
228
|
+
y: 0
|
|
229
|
+
},
|
|
230
|
+
color: "var(--stage-fg)",
|
|
231
|
+
opacity: .5,
|
|
232
|
+
weight: 1.5
|
|
233
|
+
}),
|
|
234
|
+
/* @__PURE__ */ jsx(Segment, {
|
|
235
|
+
from: {
|
|
236
|
+
x: 0,
|
|
237
|
+
y: 0
|
|
238
|
+
},
|
|
239
|
+
to: {
|
|
240
|
+
x: 0,
|
|
241
|
+
y: F_MAX
|
|
242
|
+
},
|
|
243
|
+
color: "var(--stage-fg)",
|
|
244
|
+
opacity: .5,
|
|
245
|
+
weight: 1.5
|
|
246
|
+
}),
|
|
247
|
+
/* @__PURE__ */ jsx(Label, {
|
|
248
|
+
x: T_MAX,
|
|
249
|
+
y: 0,
|
|
250
|
+
text: "time",
|
|
251
|
+
color: "var(--stage-fg)",
|
|
252
|
+
size: 10,
|
|
253
|
+
dy: 14,
|
|
254
|
+
anchor: "end"
|
|
255
|
+
}),
|
|
256
|
+
/* @__PURE__ */ jsx(Label, {
|
|
257
|
+
x: 0,
|
|
258
|
+
y: F_MAX,
|
|
259
|
+
text: "force (N)",
|
|
260
|
+
color: "var(--stage-fg)",
|
|
261
|
+
size: 10,
|
|
262
|
+
dy: -4,
|
|
263
|
+
anchor: "start"
|
|
264
|
+
}),
|
|
265
|
+
/* @__PURE__ */ jsx(Segment, {
|
|
266
|
+
from: {
|
|
267
|
+
x: 0,
|
|
268
|
+
y: crackForce
|
|
269
|
+
},
|
|
270
|
+
to: {
|
|
271
|
+
x: T_MAX,
|
|
272
|
+
y: crackForce
|
|
273
|
+
},
|
|
274
|
+
color: "var(--stage-warn)",
|
|
275
|
+
opacity: .7,
|
|
276
|
+
weight: 1.2,
|
|
277
|
+
dashed: true
|
|
278
|
+
}),
|
|
279
|
+
/* @__PURE__ */ jsx(Label, {
|
|
280
|
+
x: T_MAX,
|
|
281
|
+
y: crackForce,
|
|
282
|
+
text: "egg cracks",
|
|
283
|
+
color: "var(--stage-warn)",
|
|
284
|
+
size: 9,
|
|
285
|
+
dy: -3,
|
|
286
|
+
anchor: "end"
|
|
287
|
+
}),
|
|
288
|
+
/* @__PURE__ */ jsx(Polyline, {
|
|
289
|
+
points: hard,
|
|
290
|
+
color: "var(--stage-muted)",
|
|
291
|
+
weight: 1,
|
|
292
|
+
opacity: .5,
|
|
293
|
+
dashed: true
|
|
294
|
+
}),
|
|
295
|
+
/* @__PURE__ */ jsx(Polygon, {
|
|
296
|
+
points: [
|
|
297
|
+
{
|
|
298
|
+
x: 0,
|
|
299
|
+
y: 0
|
|
300
|
+
},
|
|
301
|
+
...curve,
|
|
302
|
+
{
|
|
303
|
+
x: dt,
|
|
304
|
+
y: 0
|
|
305
|
+
}
|
|
306
|
+
],
|
|
307
|
+
color: "none",
|
|
308
|
+
fill: "var(--stage-accent)",
|
|
309
|
+
fillOpacity: .18,
|
|
310
|
+
weight: 0
|
|
311
|
+
}),
|
|
312
|
+
/* @__PURE__ */ jsx(Polyline, {
|
|
313
|
+
points: curve,
|
|
314
|
+
color: "var(--stage-accent)",
|
|
315
|
+
weight: 2.5
|
|
316
|
+
}),
|
|
317
|
+
running && filled.length > 1 && /* @__PURE__ */ jsx(Polygon, {
|
|
318
|
+
points: [
|
|
319
|
+
{
|
|
320
|
+
x: 0,
|
|
321
|
+
y: 0
|
|
322
|
+
},
|
|
323
|
+
...filled,
|
|
324
|
+
{
|
|
325
|
+
x: playT,
|
|
326
|
+
y: 0
|
|
327
|
+
}
|
|
328
|
+
],
|
|
329
|
+
color: "none",
|
|
330
|
+
fill: "var(--stage-accent)",
|
|
331
|
+
fillOpacity: .4,
|
|
332
|
+
weight: 0
|
|
333
|
+
}),
|
|
334
|
+
/* @__PURE__ */ jsx(Segment, {
|
|
335
|
+
from: {
|
|
336
|
+
x: dt / 2,
|
|
337
|
+
y: 0
|
|
338
|
+
},
|
|
339
|
+
to: {
|
|
340
|
+
x: dt / 2,
|
|
341
|
+
y: fpeak
|
|
342
|
+
},
|
|
343
|
+
color: "var(--stage-accent)",
|
|
344
|
+
opacity: .5,
|
|
345
|
+
weight: 1,
|
|
346
|
+
dashed: true
|
|
347
|
+
})
|
|
348
|
+
]
|
|
349
|
+
})]
|
|
350
|
+
});
|
|
351
|
+
return /* @__PURE__ */ jsx(LabFrame, {
|
|
352
|
+
title,
|
|
353
|
+
prompt,
|
|
354
|
+
objectives,
|
|
355
|
+
aside: /* @__PURE__ */ jsxs("div", {
|
|
356
|
+
style: {
|
|
357
|
+
display: "flex",
|
|
358
|
+
flexDirection: "column",
|
|
359
|
+
gap: 10
|
|
360
|
+
},
|
|
361
|
+
children: [
|
|
362
|
+
/* @__PURE__ */ jsx(Callout, {
|
|
363
|
+
tone: "result",
|
|
364
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
365
|
+
style: {
|
|
366
|
+
display: "grid",
|
|
367
|
+
gap: 4,
|
|
368
|
+
fontVariantNumeric: "tabular-nums"
|
|
369
|
+
},
|
|
370
|
+
children: [
|
|
371
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
372
|
+
"impulse J = Δp = ",
|
|
373
|
+
/* @__PURE__ */ jsxs("strong", { children: [dp.toFixed(1), " kg·m/s"] }),
|
|
374
|
+
" (fixed)"
|
|
375
|
+
] }),
|
|
376
|
+
/* @__PURE__ */ jsxs("span", { children: ["contact Δt = ", /* @__PURE__ */ jsxs("strong", { children: [(dt * 1e3).toFixed(0), " ms"] })] }),
|
|
377
|
+
/* @__PURE__ */ jsxs("span", {
|
|
378
|
+
style: { color: cracks ? "var(--stage-warn)" : "var(--stage-good)" },
|
|
379
|
+
children: ["peak force ≈ ", /* @__PURE__ */ jsxs("strong", { children: [fpeak.toFixed(0), " N"] })]
|
|
380
|
+
})
|
|
381
|
+
]
|
|
382
|
+
})
|
|
383
|
+
}),
|
|
384
|
+
/* @__PURE__ */ jsx(StatusPill, {
|
|
385
|
+
ok: !cracks,
|
|
386
|
+
children: cracks ? "💥 Too hard — the egg cracks" : "✓ Gentle enough — egg survives"
|
|
387
|
+
}),
|
|
388
|
+
/* @__PURE__ */ jsxs("p", {
|
|
389
|
+
style: {
|
|
390
|
+
fontSize: 12,
|
|
391
|
+
opacity: .75,
|
|
392
|
+
margin: 0
|
|
393
|
+
},
|
|
394
|
+
children: [
|
|
395
|
+
"Same area under both curves = same impulse. Spreading the stop over more time is exactly why",
|
|
396
|
+
/* @__PURE__ */ jsx("strong", { children: " airbags, crumple zones, knee-bending landings" }),
|
|
397
|
+
" and ",
|
|
398
|
+
/* @__PURE__ */ jsx("strong", { children: "following through" }),
|
|
399
|
+
" work."
|
|
400
|
+
]
|
|
401
|
+
}),
|
|
402
|
+
/* @__PURE__ */ jsx(LiveRegion, { children: `Impulse ${dp.toFixed(1)}, contact ${(dt * 1e3).toFixed(0)} milliseconds, peak force ${fpeak.toFixed(0)} newtons. Egg ${cracks ? "cracks" : "survives"}.` })
|
|
403
|
+
]
|
|
404
|
+
}),
|
|
405
|
+
controls: /* @__PURE__ */ jsxs(ControlBar, { children: [
|
|
406
|
+
/* @__PURE__ */ jsx(CheckButton, {
|
|
407
|
+
onClick: launch,
|
|
408
|
+
children: "▶ Drop it"
|
|
409
|
+
}),
|
|
410
|
+
/* @__PURE__ */ jsx(Field, {
|
|
411
|
+
label: "contact Δt",
|
|
412
|
+
value: `${(dt * 1e3).toFixed(0)} ms`,
|
|
413
|
+
children: /* @__PURE__ */ jsx(Slider, {
|
|
414
|
+
value: dt,
|
|
415
|
+
min: DT_MIN,
|
|
416
|
+
max: DT_MAX,
|
|
417
|
+
step: .005,
|
|
418
|
+
onChange: onParam(setDt),
|
|
419
|
+
ariaLabel: "contact time (seconds)"
|
|
420
|
+
})
|
|
421
|
+
}),
|
|
422
|
+
/* @__PURE__ */ jsx(Field, {
|
|
423
|
+
label: "mass",
|
|
424
|
+
value: `${m} kg`,
|
|
425
|
+
children: /* @__PURE__ */ jsx(Slider, {
|
|
426
|
+
value: m,
|
|
427
|
+
min: .2,
|
|
428
|
+
max: 1.5,
|
|
429
|
+
step: .1,
|
|
430
|
+
onChange: onParam(setM),
|
|
431
|
+
ariaLabel: "ball mass (kg)"
|
|
432
|
+
})
|
|
433
|
+
}),
|
|
434
|
+
/* @__PURE__ */ jsx(Field, {
|
|
435
|
+
label: "speed",
|
|
436
|
+
value: `${v} m/s`,
|
|
437
|
+
children: /* @__PURE__ */ jsx(Slider, {
|
|
438
|
+
value: v,
|
|
439
|
+
min: 2,
|
|
440
|
+
max: 12,
|
|
441
|
+
step: .5,
|
|
442
|
+
onChange: onParam(setV),
|
|
443
|
+
ariaLabel: "impact speed (m/s)"
|
|
444
|
+
})
|
|
445
|
+
})
|
|
446
|
+
] }),
|
|
447
|
+
controlConfig,
|
|
448
|
+
children: figure
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
//#endregion
|
|
453
|
+
export { ImpulseLab };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { BALANCE_LEVER_ASSET } from "./lever/asset.mjs";
|
|
2
|
+
import { LeverBalanceLab, LeverBalanceProps, LeverItemSpec, leverBalanceDoc } from "./lever/preset.mjs";
|
|
3
|
+
import { OPTICS_RAY_ASSET } from "./optics/asset.mjs";
|
|
4
|
+
import { OpticsLab, OpticsProps, opticsDoc } from "./optics/preset.mjs";
|
|
5
|
+
import { ProjectileLab, ProjectileLabProps } from "./projectile-lab.mjs";
|
|
6
|
+
import { GravityDrop, GravityDropProps } from "./gravity-drop.mjs";
|
|
7
|
+
import { RiverBoat, RiverBoatProps } from "./river-boat.mjs";
|
|
8
|
+
import { SceneVector, VectorScene, VectorSceneProps } from "./vector-scene.mjs";
|
|
9
|
+
import { BoardVector, VectorBoardLab, VectorBoardProps } from "./vector-board/preset.mjs";
|
|
10
|
+
import { TypePanel, VectorTypesLab, VectorTypesProps } from "./vector-types/preset.mjs";
|
|
11
|
+
import { RainRelativeLab, RainRelativeProps } from "./rain-relative/preset.mjs";
|
|
12
|
+
import { StoppingDistanceLab, StoppingDistanceProps } from "./stopping-distance/preset.mjs";
|
|
13
|
+
import { RampForcesLab, RampForcesProps } from "./ramp-forces/preset.mjs";
|
|
14
|
+
import { CollisionTrackLab, CollisionTrackProps } from "./collision-track/preset.mjs";
|
|
15
|
+
import { ImpulseLab, ImpulseProps } from "./impulse/preset.mjs";
|
|
16
|
+
import { BulletWallsLab, BulletWallsProps } from "./bullet-walls/preset.mjs";
|
|
17
|
+
import { CircularMotionLab, CircularMotionProps } from "./circular-motion/preset.mjs";
|
|
18
|
+
import { EnergySkateLab, EnergySkateProps } from "./energy-skate/preset.mjs";
|
|
19
|
+
import { SHMMode, SimpleHarmonicLab, SimpleHarmonicProps } from "./shm/preset.mjs";
|
|
20
|
+
import { AtwoodLab, AtwoodProps } from "./atwood/preset.mjs";
|
|
21
|
+
import { TerminalVelocityLab, TerminalVelocityProps } from "./terminal-velocity/preset.mjs";
|
|
22
|
+
import { KeplerLab, KeplerProps } from "./kepler/preset.mjs";
|
|
23
|
+
import { GravitationLab, GravitationProps } from "./gravitation/preset.mjs";
|
|
24
|
+
import { OrbitLab } from "./orbit-lab.mjs";
|
|
25
|
+
import { WaveLab, WaveLabProps, WaveMode } from "./waves/preset.mjs";
|
|
26
|
+
import { RippleTankLab, RippleTankProps, RippleView } from "./waves/ripple.mjs";
|
|
27
|
+
import { DopplerLab, DopplerProps } from "./waves/doppler.mjs";
|
|
28
|
+
import { EndType, StringMode, StringReflectionLab, StringReflectionProps } from "./waves/string.mjs";
|
|
29
|
+
import { MagnetismLab, MagnetismProps } from "./magnetism/preset.mjs";
|
|
30
|
+
import { ElectricFieldLab, ElectricFieldProps } from "./electric-field/preset.mjs";
|
|
31
|
+
import { LorentzForceLab, LorentzProps } from "./lorentz/preset.mjs";
|
|
32
|
+
import { DecayCoolingLab, DecayCoolingProps } from "./exponential/preset.mjs";
|
|
33
|
+
import { WorkEnergyLab, WorkEnergyProps } from "./work-energy/preset.mjs";
|
|
34
|
+
import { HeatingCurveLab, HeatingCurveProps } from "./thermal/preset.mjs";
|
|
35
|
+
import { HeatTransferLab, HeatTransferProps } from "./heat-transfer/preset.mjs";
|
|
36
|
+
import { ThermalExpansionLab, ThermalExpansionProps } from "./expansion/preset.mjs";
|
|
37
|
+
import { TemperatureScalesLab, TemperatureScalesProps } from "./temperature-scales/preset.mjs";
|
|
38
|
+
import { WaterDensityLab, WaterDensityProps } from "./water-density/preset.mjs";
|
|
39
|
+
import { GasProcessLab, GasProcessProps } from "./gas-process/preset.mjs";
|
|
40
|
+
import { CarnotCycleLab, CarnotProps } from "./carnot/preset.mjs";
|
|
41
|
+
import { EntropyLab, EntropyProps } from "./entropy/preset.mjs";
|
|
42
|
+
import { EffStream, EfficiencyLab, EfficiencyProps } from "./efficiency/preset.mjs";
|
|
43
|
+
export { AtwoodLab, type AtwoodProps, BALANCE_LEVER_ASSET, type BoardVector, BulletWallsLab, type BulletWallsProps, CarnotCycleLab, type CarnotProps, CircularMotionLab, type CircularMotionProps, CollisionTrackLab, type CollisionTrackProps, DecayCoolingLab, type DecayCoolingProps, DopplerLab, type DopplerProps, type EffStream, EfficiencyLab, type EfficiencyProps, ElectricFieldLab, type ElectricFieldProps, type EndType, EnergySkateLab, type EnergySkateProps, EntropyLab, type EntropyProps, GasProcessLab, type GasProcessProps, GravitationLab, type GravitationProps, GravityDrop, type GravityDropProps, HeatTransferLab, type HeatTransferProps, HeatingCurveLab, type HeatingCurveProps, ImpulseLab, type ImpulseProps, KeplerLab, type KeplerProps, LeverBalanceLab, type LeverBalanceProps, type LeverItemSpec, LorentzForceLab, type LorentzProps, MagnetismLab, type MagnetismProps, OPTICS_RAY_ASSET, OpticsLab, type OpticsProps, OrbitLab, ProjectileLab, type ProjectileLabProps, RainRelativeLab, type RainRelativeProps, RampForcesLab, type RampForcesProps, RippleTankLab, type RippleTankProps, type RippleView, RiverBoat, type RiverBoatProps, type SHMMode, type SceneVector, SimpleHarmonicLab, type SimpleHarmonicProps, StoppingDistanceLab, type StoppingDistanceProps, type StringMode, StringReflectionLab, type StringReflectionProps, TemperatureScalesLab, type TemperatureScalesProps, TerminalVelocityLab, type TerminalVelocityProps, ThermalExpansionLab, type ThermalExpansionProps, type TypePanel, VectorBoardLab, type VectorBoardProps, VectorScene, type VectorSceneProps, VectorTypesLab, type VectorTypesProps, WaterDensityLab, type WaterDensityProps, WaveLab, type WaveLabProps, type WaveMode, WorkEnergyLab, type WorkEnergyProps, leverBalanceDoc, opticsDoc };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { BALANCE_LEVER_ASSET } from "./lever/asset.mjs";
|
|
2
|
+
import { LeverBalanceLab, leverBalanceDoc } from "./lever/preset.mjs";
|
|
3
|
+
import { OPTICS_RAY_ASSET } from "./optics/asset.mjs";
|
|
4
|
+
import { OpticsLab, opticsDoc } from "./optics/preset.mjs";
|
|
5
|
+
import { ProjectileLab } from "./projectile-lab.mjs";
|
|
6
|
+
import { GravityDrop } from "./gravity-drop.mjs";
|
|
7
|
+
import { RiverBoat } from "./river-boat.mjs";
|
|
8
|
+
import { VectorScene } from "./vector-scene.mjs";
|
|
9
|
+
import { VectorBoardLab } from "./vector-board/preset.mjs";
|
|
10
|
+
import { VectorTypesLab } from "./vector-types/preset.mjs";
|
|
11
|
+
import { RainRelativeLab } from "./rain-relative/preset.mjs";
|
|
12
|
+
import { StoppingDistanceLab } from "./stopping-distance/preset.mjs";
|
|
13
|
+
import { RampForcesLab } from "./ramp-forces/preset.mjs";
|
|
14
|
+
import { CollisionTrackLab } from "./collision-track/preset.mjs";
|
|
15
|
+
import { ImpulseLab } from "./impulse/preset.mjs";
|
|
16
|
+
import { BulletWallsLab } from "./bullet-walls/preset.mjs";
|
|
17
|
+
import { CircularMotionLab } from "./circular-motion/preset.mjs";
|
|
18
|
+
import { EnergySkateLab } from "./energy-skate/preset.mjs";
|
|
19
|
+
import { SimpleHarmonicLab } from "./shm/preset.mjs";
|
|
20
|
+
import { AtwoodLab } from "./atwood/preset.mjs";
|
|
21
|
+
import { TerminalVelocityLab } from "./terminal-velocity/preset.mjs";
|
|
22
|
+
import { KeplerLab } from "./kepler/preset.mjs";
|
|
23
|
+
import { GravitationLab } from "./gravitation/preset.mjs";
|
|
24
|
+
import { OrbitLab } from "./orbit-lab.mjs";
|
|
25
|
+
import { WaveLab } from "./waves/preset.mjs";
|
|
26
|
+
import { RippleTankLab } from "./waves/ripple.mjs";
|
|
27
|
+
import { DopplerLab } from "./waves/doppler.mjs";
|
|
28
|
+
import { StringReflectionLab } from "./waves/string.mjs";
|
|
29
|
+
import { MagnetismLab } from "./magnetism/preset.mjs";
|
|
30
|
+
import { ElectricFieldLab } from "./electric-field/preset.mjs";
|
|
31
|
+
import { LorentzForceLab } from "./lorentz/preset.mjs";
|
|
32
|
+
import { DecayCoolingLab } from "./exponential/preset.mjs";
|
|
33
|
+
import { WorkEnergyLab } from "./work-energy/preset.mjs";
|
|
34
|
+
import { HeatingCurveLab } from "./thermal/preset.mjs";
|
|
35
|
+
import { HeatTransferLab } from "./heat-transfer/preset.mjs";
|
|
36
|
+
import { ThermalExpansionLab } from "./expansion/preset.mjs";
|
|
37
|
+
import { TemperatureScalesLab } from "./temperature-scales/preset.mjs";
|
|
38
|
+
import { WaterDensityLab } from "./water-density/preset.mjs";
|
|
39
|
+
import { GasProcessLab } from "./gas-process/preset.mjs";
|
|
40
|
+
import { CarnotCycleLab } from "./carnot/preset.mjs";
|
|
41
|
+
import { EntropyLab } from "./entropy/preset.mjs";
|
|
42
|
+
import { EfficiencyLab } from "./efficiency/preset.mjs";
|
|
43
|
+
|
|
44
|
+
export { AtwoodLab, BALANCE_LEVER_ASSET, BulletWallsLab, CarnotCycleLab, CircularMotionLab, CollisionTrackLab, DecayCoolingLab, DopplerLab, EfficiencyLab, ElectricFieldLab, EnergySkateLab, EntropyLab, GasProcessLab, GravitationLab, GravityDrop, HeatTransferLab, HeatingCurveLab, ImpulseLab, KeplerLab, LeverBalanceLab, LorentzForceLab, MagnetismLab, OPTICS_RAY_ASSET, OpticsLab, OrbitLab, ProjectileLab, RainRelativeLab, RampForcesLab, RippleTankLab, RiverBoat, SimpleHarmonicLab, StoppingDistanceLab, StringReflectionLab, TemperatureScalesLab, TerminalVelocityLab, ThermalExpansionLab, VectorBoardLab, VectorScene, VectorTypesLab, WaterDensityLab, WaveLab, WorkEnergyLab, leverBalanceDoc, opticsDoc };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { KeplerLab, KeplerProps } from "./preset.mjs";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ControlConfig } from "../../kit/frame.mjs";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/physics/kepler/preset.d.ts
|
|
5
|
+
interface KeplerProps {
|
|
6
|
+
/** Semi-major axis (drawn units). */
|
|
7
|
+
semiMajor?: number;
|
|
8
|
+
eccentricity?: number;
|
|
9
|
+
/** Show the equal-time / equal-area wedges. */
|
|
10
|
+
wedges?: boolean;
|
|
11
|
+
title?: string;
|
|
12
|
+
prompt?: string;
|
|
13
|
+
objectives?: string[];
|
|
14
|
+
/** Lock/hide knobs, e.g. `{ hide: ['equal-area wedges'] }`. */
|
|
15
|
+
controlConfig?: ControlConfig;
|
|
16
|
+
}
|
|
17
|
+
declare function KeplerLab({
|
|
18
|
+
semiMajor,
|
|
19
|
+
eccentricity,
|
|
20
|
+
wedges,
|
|
21
|
+
title,
|
|
22
|
+
prompt,
|
|
23
|
+
objectives,
|
|
24
|
+
controlConfig
|
|
25
|
+
}: KeplerProps): ReactNode;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { KeplerLab, KeplerProps };
|