@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,221 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { pxRect } from "../../kit/asset-util.mjs";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { useCoords } from "@classytic/stage";
|
|
6
|
+
|
|
7
|
+
//#region src/physics/exponential/asset.tsx
|
|
8
|
+
const H = 320;
|
|
9
|
+
const CH = {
|
|
10
|
+
x0: 290,
|
|
11
|
+
x1: 632,
|
|
12
|
+
yTop: 278,
|
|
13
|
+
yBot: 54
|
|
14
|
+
};
|
|
15
|
+
const clamp01 = (x) => x < 0 ? 0 : x > 1 ? 1 : x;
|
|
16
|
+
const numOr = (v, d) => typeof v === "number" && Number.isFinite(v) ? v : d;
|
|
17
|
+
const arr = (v) => Array.isArray(v) ? v : [];
|
|
18
|
+
function resolver({ sim, params }) {
|
|
19
|
+
return {
|
|
20
|
+
kind: "asset-geom",
|
|
21
|
+
parts: {},
|
|
22
|
+
meta: {
|
|
23
|
+
value: numOr(sim?.value, 0),
|
|
24
|
+
target: numOr(sim?.target, 0),
|
|
25
|
+
samples: arr(sim?.samples),
|
|
26
|
+
tSec: numOr(sim?.tSec, 0),
|
|
27
|
+
done: sim?.done === true,
|
|
28
|
+
kind: numOr(params?.kind, 0),
|
|
29
|
+
value0: numOr(params?.value0, 100),
|
|
30
|
+
tau: numOr(params?.tau, 1)
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function Component({ geom }) {
|
|
35
|
+
const c = useCoords();
|
|
36
|
+
const m = geom.meta ?? {};
|
|
37
|
+
const P = (x, y) => c.toPx(x, H - y);
|
|
38
|
+
const decay = m.kind === 0;
|
|
39
|
+
const maxV = Math.max(m.value0, m.target, 1);
|
|
40
|
+
const sy = (v) => CH.yTop - clamp01(v / maxV) * (CH.yTop - CH.yBot);
|
|
41
|
+
const sx = (i, len) => CH.x0 + (len <= 1 ? 0 : i / (len - 1)) * (CH.x1 - CH.x0);
|
|
42
|
+
const frame = pxRect(P, CH.x0, CH.yBot, CH.x1, CH.yTop);
|
|
43
|
+
const curve = m.samples.map((v, i) => P(sx(i, m.samples.length), sy(v)).join(",")).join(" ");
|
|
44
|
+
const [tx0, ty] = P(CH.x0, sy(m.target));
|
|
45
|
+
const [tx1] = P(CH.x1, sy(m.target));
|
|
46
|
+
const halfLife = m.tau * Math.LN2;
|
|
47
|
+
const valStr = decay ? Math.round(m.value).toString() : `${m.value.toFixed(0)}°`;
|
|
48
|
+
let skin;
|
|
49
|
+
if (decay) {
|
|
50
|
+
const N = Math.min(100, Math.round(m.value0));
|
|
51
|
+
const lit = Math.round(m.value / (m.value0 || 1) * N);
|
|
52
|
+
const cols = 10, gap = 18, ox = 30, oy = 86;
|
|
53
|
+
const dots = [];
|
|
54
|
+
for (let i = 0; i < N; i++) {
|
|
55
|
+
const [px, py] = P(ox + i % cols * gap, oy + Math.floor(i / cols) * gap);
|
|
56
|
+
const on = i < lit;
|
|
57
|
+
dots.push(/* @__PURE__ */ jsx("circle", {
|
|
58
|
+
cx: px,
|
|
59
|
+
cy: py,
|
|
60
|
+
r: 5,
|
|
61
|
+
fill: on ? "var(--stage-accent)" : "none",
|
|
62
|
+
stroke: on ? "none" : "var(--stage-grid)",
|
|
63
|
+
strokeWidth: 1.2,
|
|
64
|
+
opacity: on ? 1 : .6
|
|
65
|
+
}, i));
|
|
66
|
+
}
|
|
67
|
+
skin = /* @__PURE__ */ jsx("g", { children: dots });
|
|
68
|
+
} else {
|
|
69
|
+
const frac = clamp01((m.value - m.target) / (m.value0 - m.target || 1));
|
|
70
|
+
const tubeX = 120, top = 80, bot = 250, w = 22;
|
|
71
|
+
const [bx, byTop] = P(tubeX - w / 2, top);
|
|
72
|
+
const [, byBot] = P(131, bot);
|
|
73
|
+
const tube = pxRect(P, tubeX - w / 2, top, 131, bot);
|
|
74
|
+
const [fillBx, fillTop] = P(112, top + (1 - frac) * (bot - top));
|
|
75
|
+
const fillRect = pxRect(P, 112, top + (1 - frac) * (bot - top), 128, bot);
|
|
76
|
+
const [bulbX, bulbY] = P(tubeX, 266);
|
|
77
|
+
const hot = `color-mix(in oklab, var(--stage-warn) ${Math.round(frac * 100)}%, var(--stage-accent))`;
|
|
78
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
79
|
+
chart(P, m, decay, maxV, sy, sx, frame, curve, tx0, tx1, ty, halfLife, valStr),
|
|
80
|
+
/* @__PURE__ */ jsx("rect", {
|
|
81
|
+
x: tube.x,
|
|
82
|
+
y: tube.y,
|
|
83
|
+
width: tube.width,
|
|
84
|
+
height: tube.height,
|
|
85
|
+
rx: 11,
|
|
86
|
+
fill: "var(--stage-bg)",
|
|
87
|
+
stroke: "var(--stage-metal)",
|
|
88
|
+
strokeWidth: 2
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ jsx("rect", {
|
|
91
|
+
x: fillRect.x,
|
|
92
|
+
y: fillRect.y,
|
|
93
|
+
width: fillRect.width,
|
|
94
|
+
height: fillRect.height,
|
|
95
|
+
rx: 8,
|
|
96
|
+
fill: hot
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ jsx("circle", {
|
|
99
|
+
cx: bulbX,
|
|
100
|
+
cy: bulbY,
|
|
101
|
+
r: 16,
|
|
102
|
+
fill: hot,
|
|
103
|
+
stroke: "var(--stage-metal)",
|
|
104
|
+
strokeWidth: 2
|
|
105
|
+
}),
|
|
106
|
+
(() => {
|
|
107
|
+
return null;
|
|
108
|
+
})()
|
|
109
|
+
] });
|
|
110
|
+
}
|
|
111
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [chart(P, m, decay, maxV, sy, sx, frame, curve, tx0, tx1, ty, halfLife, valStr), skin] });
|
|
112
|
+
}
|
|
113
|
+
/** the shared curve panel + readouts (both skins use it) */
|
|
114
|
+
function chart(P, m, decay, maxV, sy, _sx, frame, curve, tx0, tx1, ty, halfLife, valStr) {
|
|
115
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
116
|
+
(() => {
|
|
117
|
+
const [x, y] = P(90, 290);
|
|
118
|
+
return /* @__PURE__ */ jsx("text", {
|
|
119
|
+
x,
|
|
120
|
+
y,
|
|
121
|
+
textAnchor: "middle",
|
|
122
|
+
fontSize: 24,
|
|
123
|
+
fontWeight: 800,
|
|
124
|
+
fill: "var(--stage-accent)",
|
|
125
|
+
style: { fontVariantNumeric: "tabular-nums" },
|
|
126
|
+
children: valStr
|
|
127
|
+
});
|
|
128
|
+
})(),
|
|
129
|
+
(() => {
|
|
130
|
+
const [x, y] = P(90, 268);
|
|
131
|
+
return /* @__PURE__ */ jsxs("text", {
|
|
132
|
+
x,
|
|
133
|
+
y,
|
|
134
|
+
textAnchor: "middle",
|
|
135
|
+
fontSize: 11,
|
|
136
|
+
fill: "var(--stage-muted)",
|
|
137
|
+
children: [decay ? "atoms left" : "temperature", m.done ? " · ✓" : ""]
|
|
138
|
+
});
|
|
139
|
+
})(),
|
|
140
|
+
/* @__PURE__ */ jsx("rect", {
|
|
141
|
+
x: frame.x,
|
|
142
|
+
y: frame.y,
|
|
143
|
+
width: frame.width,
|
|
144
|
+
height: frame.height,
|
|
145
|
+
rx: 8,
|
|
146
|
+
fill: "color-mix(in oklab, var(--stage-accent) 5%, var(--stage-bg))",
|
|
147
|
+
stroke: "var(--stage-grid)",
|
|
148
|
+
strokeWidth: 1
|
|
149
|
+
}),
|
|
150
|
+
/* @__PURE__ */ jsx("line", {
|
|
151
|
+
x1: tx0,
|
|
152
|
+
y1: ty,
|
|
153
|
+
x2: tx1,
|
|
154
|
+
y2: ty,
|
|
155
|
+
stroke: "var(--stage-good)",
|
|
156
|
+
strokeWidth: 1.5,
|
|
157
|
+
strokeDasharray: "6 5"
|
|
158
|
+
}),
|
|
159
|
+
(() => {
|
|
160
|
+
const [x, y] = P(CH.x1 + 6, sy(m.target));
|
|
161
|
+
return /* @__PURE__ */ jsx("text", {
|
|
162
|
+
x,
|
|
163
|
+
y: y + 3,
|
|
164
|
+
fontSize: 11,
|
|
165
|
+
fontWeight: 700,
|
|
166
|
+
fill: "var(--stage-good)",
|
|
167
|
+
children: decay ? "0" : `${m.target.toFixed(0)}° room`
|
|
168
|
+
});
|
|
169
|
+
})(),
|
|
170
|
+
decay && (() => {
|
|
171
|
+
const [x, y] = P(CH.x0, sy(m.value0 / 2));
|
|
172
|
+
const [x1] = P(CH.x1, 0);
|
|
173
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("line", {
|
|
174
|
+
x1: x,
|
|
175
|
+
y1: y,
|
|
176
|
+
x2: x1,
|
|
177
|
+
y2: y,
|
|
178
|
+
stroke: "var(--stage-grid)",
|
|
179
|
+
strokeWidth: 1,
|
|
180
|
+
strokeDasharray: "3 4"
|
|
181
|
+
}), /* @__PURE__ */ jsx("text", {
|
|
182
|
+
x: x + 4,
|
|
183
|
+
y: y - 3,
|
|
184
|
+
fontSize: 9.5,
|
|
185
|
+
fill: "var(--stage-muted)",
|
|
186
|
+
children: "N₀/2"
|
|
187
|
+
})] });
|
|
188
|
+
})(),
|
|
189
|
+
/* @__PURE__ */ jsx("polyline", {
|
|
190
|
+
points: curve,
|
|
191
|
+
fill: "none",
|
|
192
|
+
stroke: "var(--stage-accent)",
|
|
193
|
+
strokeWidth: 2.5,
|
|
194
|
+
strokeLinejoin: "round",
|
|
195
|
+
strokeLinecap: "round"
|
|
196
|
+
}),
|
|
197
|
+
(() => {
|
|
198
|
+
const [x, y] = P((CH.x0 + CH.x1) / 2, CH.yBot - 16);
|
|
199
|
+
return /* @__PURE__ */ jsxs("text", {
|
|
200
|
+
x,
|
|
201
|
+
y,
|
|
202
|
+
textAnchor: "middle",
|
|
203
|
+
fontSize: 11,
|
|
204
|
+
fill: "var(--stage-muted)",
|
|
205
|
+
children: [
|
|
206
|
+
decay ? `half-life ≈ ${halfLife.toFixed(1)} s — each one halves what's left` : `cooling toward room temp · τ ≈ ${m.tau.toFixed(1)} s`,
|
|
207
|
+
" · t = ",
|
|
208
|
+
m.tSec.toFixed(1),
|
|
209
|
+
" s"
|
|
210
|
+
]
|
|
211
|
+
});
|
|
212
|
+
})()
|
|
213
|
+
] });
|
|
214
|
+
}
|
|
215
|
+
const RATE_PROCESS_ASSET = {
|
|
216
|
+
resolver,
|
|
217
|
+
Component
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
//#endregion
|
|
221
|
+
export { RATE_PROCESS_ASSET };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { DecayCoolingLab, DecayCoolingProps } from "./preset.mjs";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/physics/exponential/preset.d.ts
|
|
4
|
+
interface DecayCoolingProps {
|
|
5
|
+
mode?: 'decay' | 'cooling';
|
|
6
|
+
title?: string;
|
|
7
|
+
prompt?: string;
|
|
8
|
+
objectives?: string[];
|
|
9
|
+
}
|
|
10
|
+
declare function DecayCoolingLab({
|
|
11
|
+
mode: mode0,
|
|
12
|
+
title,
|
|
13
|
+
prompt,
|
|
14
|
+
objectives
|
|
15
|
+
}?: DecayCoolingProps): ReactNode;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { DecayCoolingLab, DecayCoolingProps };
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Chip, Slider } from "../../kit/controls.mjs";
|
|
4
|
+
import { ControlBar, Field, LabFrame } from "../../kit/frame.mjs";
|
|
5
|
+
import { ChallengeCard, useChallenge, useCheckpoint } from "../../kit/pedagogy.mjs";
|
|
6
|
+
import { RATE_PROCESS_ASSET } from "./asset.mjs";
|
|
7
|
+
import { useMemo, useState } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { Scene, registerAsset } from "@classytic/stage";
|
|
10
|
+
|
|
11
|
+
//#region src/physics/exponential/preset.tsx
|
|
12
|
+
/**
|
|
13
|
+
* DecayCoolingLab — exponential relaxation made tangible, the standard data-driven
|
|
14
|
+
* way: one SceneDoc + one `rate` sim, two skins via the rate-process asset. Same
|
|
15
|
+
* law (dy/dt = (target−y)/τ) tells two stories — radioactive atoms decaying to 0,
|
|
16
|
+
* and a hot drink cooling to room temperature. Press Play; it stops once relaxed.
|
|
17
|
+
*/
|
|
18
|
+
registerAsset("rate-process", RATE_PROCESS_ASSET);
|
|
19
|
+
const EXPONENTIAL_CHALLENGE = [{
|
|
20
|
+
id: "two-halflives",
|
|
21
|
+
prompt: "After two half-lives, the fraction of atoms remaining is…",
|
|
22
|
+
choices: [
|
|
23
|
+
{
|
|
24
|
+
value: "half",
|
|
25
|
+
label: "one-half"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
value: "quarter",
|
|
29
|
+
label: "one-quarter"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
value: "zero",
|
|
33
|
+
label: "none"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
answer: "quarter",
|
|
37
|
+
explain: "Each half-life removes HALF of what remains: ½ then ½ of that = ¼."
|
|
38
|
+
}, {
|
|
39
|
+
id: "cools-fastest",
|
|
40
|
+
prompt: "A hot drink cools fastest…",
|
|
41
|
+
choices: [
|
|
42
|
+
{
|
|
43
|
+
value: "start",
|
|
44
|
+
label: "at the start"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
value: "end",
|
|
48
|
+
label: "near room temperature"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
value: "steady",
|
|
52
|
+
label: "at a steady rate throughout"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
answer: "start",
|
|
56
|
+
explain: "The rate tracks the gap to the surroundings — biggest at the start, easing to zero as it nears room temperature."
|
|
57
|
+
}];
|
|
58
|
+
function DecayCoolingLab({ mode: mode0 = "decay", title = "Exponential change — decay & cooling", prompt = "Same law, two stories: atoms decay and a hot drink cools — each relaxes toward a baseline at a rate set by τ. Press Play.", objectives = [
|
|
59
|
+
"See exponential relaxation toward a baseline",
|
|
60
|
+
"Read a half-life (decay halves every t½)",
|
|
61
|
+
"Recognise the SAME curve behind decay and cooling"
|
|
62
|
+
] } = {}) {
|
|
63
|
+
const [mode, setMode] = useState(mode0);
|
|
64
|
+
const [tau, setTau] = useState(1.4);
|
|
65
|
+
const challenge = useChallenge(EXPONENTIAL_CHALLENGE);
|
|
66
|
+
useCheckpoint({
|
|
67
|
+
solved: challenge.allCorrect,
|
|
68
|
+
activity: "exponential"
|
|
69
|
+
});
|
|
70
|
+
const decay = mode === "decay";
|
|
71
|
+
const value0 = decay ? 100 : 90;
|
|
72
|
+
const target = decay ? 0 : 20;
|
|
73
|
+
const doc = useMemo(() => ({
|
|
74
|
+
schemaVersion: 2,
|
|
75
|
+
type: "stage-scene",
|
|
76
|
+
view: {
|
|
77
|
+
xMin: 0,
|
|
78
|
+
xMax: 720,
|
|
79
|
+
yMin: 0,
|
|
80
|
+
yMax: 320
|
|
81
|
+
},
|
|
82
|
+
elements: [{
|
|
83
|
+
id: "fig",
|
|
84
|
+
kind: "asset",
|
|
85
|
+
def: {
|
|
86
|
+
op: "asset",
|
|
87
|
+
asset: "rate-process",
|
|
88
|
+
params: {
|
|
89
|
+
kind: decay ? 0 : 1,
|
|
90
|
+
value0,
|
|
91
|
+
tau
|
|
92
|
+
},
|
|
93
|
+
bind: {},
|
|
94
|
+
simBind: {
|
|
95
|
+
value: {
|
|
96
|
+
sim: "r",
|
|
97
|
+
field: "value"
|
|
98
|
+
},
|
|
99
|
+
target: {
|
|
100
|
+
sim: "r",
|
|
101
|
+
field: "target"
|
|
102
|
+
},
|
|
103
|
+
samples: {
|
|
104
|
+
sim: "r",
|
|
105
|
+
field: "samples"
|
|
106
|
+
},
|
|
107
|
+
tSec: {
|
|
108
|
+
sim: "r",
|
|
109
|
+
field: "tSec"
|
|
110
|
+
},
|
|
111
|
+
done: {
|
|
112
|
+
sim: "r",
|
|
113
|
+
field: "done"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}],
|
|
118
|
+
bindings: [],
|
|
119
|
+
meta: { sims: [{
|
|
120
|
+
id: "r",
|
|
121
|
+
core: "rate",
|
|
122
|
+
params: {
|
|
123
|
+
value0,
|
|
124
|
+
target,
|
|
125
|
+
tau,
|
|
126
|
+
maxTime: 6 * tau
|
|
127
|
+
},
|
|
128
|
+
drives: {}
|
|
129
|
+
}] }
|
|
130
|
+
}), [
|
|
131
|
+
decay,
|
|
132
|
+
value0,
|
|
133
|
+
target,
|
|
134
|
+
tau
|
|
135
|
+
]);
|
|
136
|
+
return /* @__PURE__ */ jsx(LabFrame, {
|
|
137
|
+
title,
|
|
138
|
+
prompt,
|
|
139
|
+
objectives,
|
|
140
|
+
controls: /* @__PURE__ */ jsxs(ControlBar, { children: [/* @__PURE__ */ jsx(Field, {
|
|
141
|
+
label: "process",
|
|
142
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
143
|
+
className: "lab-field-row",
|
|
144
|
+
children: [/* @__PURE__ */ jsx(Chip, {
|
|
145
|
+
selected: decay,
|
|
146
|
+
onClick: () => setMode("decay"),
|
|
147
|
+
children: "☢ decay"
|
|
148
|
+
}), /* @__PURE__ */ jsx(Chip, {
|
|
149
|
+
selected: !decay,
|
|
150
|
+
onClick: () => setMode("cooling"),
|
|
151
|
+
children: "☕ cooling"
|
|
152
|
+
})]
|
|
153
|
+
})
|
|
154
|
+
}), /* @__PURE__ */ jsx(Field, {
|
|
155
|
+
label: "time constant τ",
|
|
156
|
+
value: decay ? `t½ ${(tau * Math.LN2).toFixed(1)}s` : `τ ${tau.toFixed(1)}s`,
|
|
157
|
+
children: /* @__PURE__ */ jsx(Slider, {
|
|
158
|
+
value: tau,
|
|
159
|
+
min: .5,
|
|
160
|
+
max: 3,
|
|
161
|
+
step: .1,
|
|
162
|
+
onChange: setTau,
|
|
163
|
+
ariaLabel: "time constant"
|
|
164
|
+
})
|
|
165
|
+
})] }),
|
|
166
|
+
footer: /* @__PURE__ */ jsx(ChallengeCard, {
|
|
167
|
+
questions: EXPONENTIAL_CHALLENGE,
|
|
168
|
+
state: challenge,
|
|
169
|
+
title: "Predict"
|
|
170
|
+
}),
|
|
171
|
+
children: /* @__PURE__ */ jsx(Scene, {
|
|
172
|
+
doc,
|
|
173
|
+
interactive: false,
|
|
174
|
+
showGrid: false,
|
|
175
|
+
showAxes: false,
|
|
176
|
+
ariaLabel: "Exponential decay or cooling curve with a live skin"
|
|
177
|
+
}, `${mode}:${tau}`)
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
//#endregion
|
|
182
|
+
export { DecayCoolingLab };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { GasProcessLab, GasProcessProps } from "./preset.mjs";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { ProcessKind } from "@classytic/stage/thermo";
|
|
3
|
+
|
|
4
|
+
//#region src/physics/gas-process/preset.d.ts
|
|
5
|
+
interface GasProcessProps {
|
|
6
|
+
kind?: ProcessKind;
|
|
7
|
+
/** Default gas (learner can still toggle). */
|
|
8
|
+
gas?: 'monatomic' | 'diatomic';
|
|
9
|
+
/** Initial amount, mol (default 1). */
|
|
10
|
+
moles?: number;
|
|
11
|
+
/** Initial temperature, K (default 300). */
|
|
12
|
+
tempK?: number;
|
|
13
|
+
/** Initial volume, L (default 20). */
|
|
14
|
+
volumeL?: number;
|
|
15
|
+
title?: string;
|
|
16
|
+
prompt?: string;
|
|
17
|
+
objectives?: string[];
|
|
18
|
+
}
|
|
19
|
+
declare function GasProcessLab({
|
|
20
|
+
kind: kind0,
|
|
21
|
+
title,
|
|
22
|
+
prompt,
|
|
23
|
+
objectives,
|
|
24
|
+
gas: gas0,
|
|
25
|
+
moles,
|
|
26
|
+
tempK,
|
|
27
|
+
volumeL
|
|
28
|
+
}?: GasProcessProps): ReactNode;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { GasProcessLab, GasProcessProps };
|