@reicek/neataptic-ts 0.1.21 → 0.1.23
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/.github/agents/boundary-mapper.agent.md +31 -0
- package/.github/agents/docs-scout.agent.md +29 -0
- package/.github/agents/plan-scout.agent.md +31 -0
- package/.github/agents/solid-split.agent.md +143 -0
- package/.github/copilot-instructions.md +119 -0
- package/.github/skills/solid-split-playbook/SKILL.md +220 -0
- package/.github/skills/solid-split-playbook/assets/docs-checklist.md +34 -0
- package/.github/skills/solid-split-playbook/assets/split-plan-template.md +48 -0
- package/.github/skills/solid-split-playbook/assets/split-workflow-checklist.md +51 -0
- package/.github/skills/trace-analyzer-extension/SKILL.md +63 -0
- package/.github/skills/trace-analyzer-extension/assets/extension-checklist.md +24 -0
- package/.github/skills/trace-analyzer-extension/references/analyzer-extension-workflow.md +101 -0
- package/.github/skills/trace-audit-reporting/SKILL.md +96 -0
- package/.github/skills/trace-audit-reporting/assets/performance-report-template.md +123 -0
- package/.github/skills/trace-audit-reporting/references/trace-analysis-workflow.md +132 -0
- package/package.json +7 -3
- package/plans/ES2023 migration +13 -8
- package/plans/Evolution_Training_Interoperability_Contracts.md +1 -1
- package/plans/Flappy_Bird_Folder_Documentation_Pass.md +53 -0
- package/plans/Flappy_Evolution_Worker_Documentation_Pass.md +58 -0
- package/plans/Interactive_Examples_and_Learning_Path.md +10 -2
- package/plans/Memory_Optimization.md +3 -3
- package/plans/README.md +63 -0
- package/plans/Roadmap.md +15 -3
- package/plans/asciiMaze_SOLID_split.done.md +130 -0
- package/plans/flappy_bird_SOLID_split.done.md +67 -0
- package/scripts/analyze-trace.ts +590 -0
- package/scripts/assets/theme.css +221 -34
- package/scripts/copy-examples.mjs +9 -5
- package/scripts/export-onnx.mjs +3 -3
- package/scripts/generate-bench-tables.mjs +10 -10
- package/scripts/generate-bench-tables.ts +10 -10
- package/scripts/generate-docs.ts +1415 -449
- package/scripts/render-docs-html.ts +15 -8
- package/src/README.md +127 -222
- package/src/architecture/README.md +117 -184
- package/src/architecture/architect.ts +6 -0
- package/src/architecture/layer/README.md +38 -38
- package/src/architecture/network/README.md +49 -31
- package/src/architecture/network/activate/README.md +77 -77
- package/src/architecture/network/connect/README.md +15 -13
- package/src/architecture/network/deterministic/README.md +7 -7
- package/src/architecture/network/evolve/README.md +44 -44
- package/src/architecture/network/gating/README.md +20 -20
- package/src/architecture/network/genetic/README.md +51 -51
- package/src/architecture/network/mutate/README.md +97 -97
- package/src/architecture/network/network.types.ts +39 -0
- package/src/architecture/network/onnx/README.md +264 -264
- package/src/architecture/network/prune/README.md +39 -39
- package/src/architecture/network/remove/README.md +26 -26
- package/src/architecture/network/serialize/README.md +56 -56
- package/src/architecture/network/serialize/network.serialize.json.utils.ts +1 -0
- package/src/architecture/network/serialize/network.serialize.utils.ts +6 -1
- package/src/architecture/network/serialize/network.serialize.utils.types.ts +1 -1
- package/src/architecture/network/slab/README.md +61 -61
- package/src/architecture/network/standalone/README.md +24 -24
- package/src/architecture/network/stats/README.md +9 -9
- package/src/architecture/network/topology/README.md +46 -46
- package/src/architecture/network/training/README.md +21 -21
- package/src/architecture/network.ts +114 -10
- package/src/methods/README.md +9 -87
- package/src/multithreading/README.md +8 -77
- package/src/multithreading/workers/README.md +2 -2
- package/src/multithreading/workers/browser/README.md +0 -6
- package/src/multithreading/workers/node/README.md +0 -3
- package/src/neat/README.md +623 -568
- package/src/neat/neat.evolve.population.utils.ts +29 -5
- package/src/neat/neat.helpers.ts +16 -0
- package/src/neat/neat.topology-intent.utils.ts +160 -0
- package/src/utils/README.md +18 -18
- package/test/examples/asciiMaze/README.md +59 -59
- package/test/examples/asciiMaze/asciiMaze.e2e.test.ts +14 -9
- package/test/examples/asciiMaze/browser-entry/README.md +196 -0
- package/test/examples/asciiMaze/browser-entry/browser-entry.abort.services.ts +95 -0
- package/test/examples/asciiMaze/browser-entry/browser-entry.constants.ts +23 -0
- package/test/examples/asciiMaze/browser-entry/browser-entry.curriculum.services.ts +115 -0
- package/test/examples/asciiMaze/browser-entry/browser-entry.globals.services.ts +106 -0
- package/test/examples/asciiMaze/browser-entry/browser-entry.host.services.ts +157 -0
- package/test/examples/asciiMaze/browser-entry/browser-entry.services.ts +14 -0
- package/test/examples/asciiMaze/browser-entry/browser-entry.ts +129 -0
- package/test/examples/asciiMaze/browser-entry/browser-entry.types.ts +120 -0
- package/test/examples/asciiMaze/browser-entry/browser-entry.utils.ts +98 -0
- package/test/examples/asciiMaze/browser-entry.ts +10 -576
- package/test/examples/asciiMaze/dashboardManager/README.md +276 -0
- package/test/examples/asciiMaze/dashboardManager/archive/README.md +16 -0
- package/test/examples/asciiMaze/dashboardManager/archive/dashboardManager.archive.services.ts +267 -0
- package/test/examples/asciiMaze/dashboardManager/dashboardManager.constants.ts +35 -0
- package/test/examples/asciiMaze/dashboardManager/dashboardManager.services.ts +103 -0
- package/test/examples/asciiMaze/dashboardManager/dashboardManager.ts +181 -0
- package/test/examples/asciiMaze/dashboardManager/dashboardManager.types.ts +267 -0
- package/test/examples/asciiMaze/dashboardManager/dashboardManager.utils.ts +254 -0
- package/test/examples/asciiMaze/dashboardManager/live/README.md +14 -0
- package/test/examples/asciiMaze/dashboardManager/live/dashboardManager.live.services.ts +264 -0
- package/test/examples/asciiMaze/dashboardManager/telemetry/README.md +47 -0
- package/test/examples/asciiMaze/dashboardManager/telemetry/dashboardManager.telemetry.services.ts +513 -0
- package/test/examples/asciiMaze/dashboardManager.ts +13 -2335
- package/test/examples/asciiMaze/evolutionEngine/README.md +1058 -0
- package/test/examples/asciiMaze/evolutionEngine/curriculumPhase.ts +90 -0
- package/test/examples/asciiMaze/evolutionEngine/engineState.constants.ts +36 -0
- package/test/examples/asciiMaze/evolutionEngine/engineState.ts +58 -513
- package/test/examples/asciiMaze/evolutionEngine/engineState.types.ts +212 -0
- package/test/examples/asciiMaze/evolutionEngine/engineState.utils.ts +301 -0
- package/test/examples/asciiMaze/evolutionEngine/evolutionEngine.types.ts +445 -0
- package/test/examples/asciiMaze/evolutionEngine/evolutionLoop.ts +81 -50
- package/test/examples/asciiMaze/evolutionEngine/optionsAndSetup.ts +2 -4
- package/test/examples/asciiMaze/evolutionEngine/populationDynamics.ts +17 -33
- package/test/examples/asciiMaze/evolutionEngine/populationPruning.ts +1 -1
- package/test/examples/asciiMaze/evolutionEngine/rngAndTiming.ts +1 -2
- package/test/examples/asciiMaze/evolutionEngine/sampling.ts +1 -1
- package/test/examples/asciiMaze/evolutionEngine/scratchPools.ts +2 -5
- package/test/examples/asciiMaze/evolutionEngine/setupHelpers.ts +30 -37
- package/test/examples/asciiMaze/evolutionEngine/telemetryMetrics.ts +16 -58
- package/test/examples/asciiMaze/evolutionEngine/trainingWarmStart.ts +2 -2
- package/test/examples/asciiMaze/evolutionEngine.ts +55 -55
- package/test/examples/asciiMaze/fitness.ts +2 -2
- package/test/examples/asciiMaze/fitness.types.ts +65 -0
- package/test/examples/asciiMaze/interfaces.ts +64 -1352
- package/test/examples/asciiMaze/mazeMovement/README.md +356 -0
- package/test/examples/asciiMaze/mazeMovement/finalization/README.md +49 -0
- package/test/examples/asciiMaze/mazeMovement/finalization/mazeMovement.finalization.ts +138 -0
- package/test/examples/asciiMaze/mazeMovement/mazeMovement.constants.ts +101 -0
- package/test/examples/asciiMaze/mazeMovement/mazeMovement.services.ts +230 -0
- package/test/examples/asciiMaze/mazeMovement/mazeMovement.ts +299 -0
- package/test/examples/asciiMaze/mazeMovement/mazeMovement.types.ts +185 -0
- package/test/examples/asciiMaze/mazeMovement/mazeMovement.utils.ts +153 -0
- package/test/examples/asciiMaze/mazeMovement/policy/README.md +91 -0
- package/test/examples/asciiMaze/mazeMovement/policy/mazeMovement.policy.ts +467 -0
- package/test/examples/asciiMaze/mazeMovement/runtime/README.md +95 -0
- package/test/examples/asciiMaze/mazeMovement/runtime/mazeMovement.runtime.ts +354 -0
- package/test/examples/asciiMaze/mazeMovement/shaping/README.md +124 -0
- package/test/examples/asciiMaze/mazeMovement/shaping/mazeMovement.shaping.ts +459 -0
- package/test/examples/asciiMaze/mazeMovement.ts +12 -2978
- package/test/examples/flappy_bird/README.md +193 -88
- package/test/examples/flappy_bird/browser-entry/README.md +1441 -0
- package/test/examples/flappy_bird/browser-entry/browser-entry.host.utils.ts +4 -324
- package/test/examples/flappy_bird/browser-entry/browser-entry.network-view.utils.ts +9 -396
- package/test/examples/flappy_bird/browser-entry/browser-entry.playback.utils.ts +6 -714
- package/test/examples/flappy_bird/browser-entry/browser-entry.render.types.ts +26 -3
- package/test/examples/flappy_bird/browser-entry/browser-entry.runtime.types.ts +16 -1
- package/test/examples/flappy_bird/browser-entry/browser-entry.simulation.types.ts +39 -5
- package/test/examples/flappy_bird/browser-entry/browser-entry.spawn.utils.ts +11 -31
- package/test/examples/flappy_bird/browser-entry/browser-entry.stats.types.ts +32 -4
- package/test/examples/flappy_bird/browser-entry/browser-entry.ts +11 -0
- package/test/examples/flappy_bird/browser-entry/browser-entry.types.ts +8 -0
- package/test/examples/flappy_bird/browser-entry/browser-entry.visualization.types.ts +50 -7
- package/test/examples/flappy_bird/browser-entry/browser-entry.visualization.utils.ts +21 -893
- package/test/examples/flappy_bird/browser-entry/browser-entry.worker.types.ts +91 -10
- package/test/examples/flappy_bird/browser-entry/host/README.md +318 -0
- package/test/examples/flappy_bird/browser-entry/host/host.canvas.service.ts +16 -0
- package/test/examples/flappy_bird/browser-entry/host/host.constants.ts +20 -0
- package/test/examples/flappy_bird/browser-entry/host/host.dom.service.ts +10 -0
- package/test/examples/flappy_bird/browser-entry/host/host.resize.service.ts +1 -295
- package/test/examples/flappy_bird/browser-entry/host/host.stats.service.ts +14 -0
- package/test/examples/flappy_bird/browser-entry/host/host.ts +592 -6
- package/test/examples/flappy_bird/browser-entry/host/host.types.ts +13 -0
- package/test/examples/flappy_bird/browser-entry/host/resize/README.md +309 -0
- package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.constants.ts +47 -0
- package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.services.ts +392 -0
- package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.ts +132 -0
- package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.types.ts +92 -0
- package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.utils.ts +272 -0
- package/test/examples/flappy_bird/browser-entry/network-view/README.md +389 -0
- package/test/examples/flappy_bird/browser-entry/network-view/network-view.draw.service.ts +13 -0
- package/test/examples/flappy_bird/browser-entry/network-view/network-view.labels.utils.ts +12 -0
- package/test/examples/flappy_bird/browser-entry/network-view/network-view.layout.utils.ts +14 -0
- package/test/examples/flappy_bird/browser-entry/network-view/network-view.topology.utils.ts +267 -0
- package/test/examples/flappy_bird/browser-entry/network-view/network-view.ts +823 -7
- package/test/examples/flappy_bird/browser-entry/network-view/network-view.types.ts +11 -0
- package/test/examples/flappy_bird/browser-entry/playback/README.md +845 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/README.md +355 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/README.md +1068 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.batch.services.ts +64 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.cache.services.ts +207 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.constants.ts +197 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.geometry.batch.utils.ts +114 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.geometry.layout.utils.test.ts +96 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.geometry.layout.utils.ts +204 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.geometry.services.ts +49 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.geometry.utils.ts +313 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.layer.services.ts +81 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.math.utils.test.ts +33 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.math.utils.ts +201 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.pulse.selection.utils.ts +171 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.pulse.timing.utils.ts +124 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.pulse.utils.test.ts +279 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.pulse.utils.ts +132 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.scene.services.ts +26 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.services.ts +65 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.ts +48 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.types.ts +342 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.utils.ts +10 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.cache.services.ts +96 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.constants.ts +127 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.draw.services.ts +184 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.scene.services.ts +64 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.services.ts +6 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.ts +53 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.types.ts +105 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.utils.ts +100 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/README.md +541 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.bird.utils.ts +180 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.canvas.services.ts +77 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.entity.services.ts +167 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.scene.services.ts +57 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.service.test.ts +176 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.service.ts +113 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.services.ts +35 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.trail.utils.ts +248 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.types.ts +103 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.utils.ts +11 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.constants.ts +1 -1
- package/test/examples/flappy_bird/browser-entry/playback/playback.frame-render.service.ts +10 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.iteration.services.ts +192 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.loop.service.ts +12 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.orchestration.types.ts +78 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.render.pipe-outline.service.ts +128 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.render.service.ts +1 -116
- package/test/examples/flappy_bird/browser-entry/playback/playback.session.services.ts +184 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.snapshot.utils.test.ts +121 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.snapshot.utils.ts +8 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.starfield.layer.services.ts +36 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.starfield.service.ts +11 -128
- package/test/examples/flappy_bird/browser-entry/playback/playback.starfield.services.ts +268 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.starfield.types.ts +91 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.starfield.utils.ts +11 -4
- package/test/examples/flappy_bird/browser-entry/playback/playback.trail.utils.ts +9 -86
- package/test/examples/flappy_bird/browser-entry/playback/playback.ts +75 -7
- package/test/examples/flappy_bird/browser-entry/playback/playback.types.ts +12 -9
- package/test/examples/flappy_bird/browser-entry/playback/playback.worker-channel.utils.ts +11 -123
- package/test/examples/flappy_bird/browser-entry/playback/snapshot/README.md +55 -0
- package/test/examples/flappy_bird/browser-entry/playback/snapshot/playback.snapshot.services.ts +103 -0
- package/test/examples/flappy_bird/browser-entry/playback/snapshot/playback.snapshot.summary.utils.test.ts +45 -0
- package/test/examples/flappy_bird/browser-entry/playback/snapshot/playback.snapshot.summary.utils.ts +28 -0
- package/test/examples/flappy_bird/browser-entry/playback/trail/README.md +95 -0
- package/test/examples/flappy_bird/browser-entry/playback/trail/playback.trail.history.services.test.ts +35 -0
- package/test/examples/flappy_bird/browser-entry/playback/trail/playback.trail.history.services.ts +64 -0
- package/test/examples/flappy_bird/browser-entry/playback/trail/playback.trail.opacity.utils.test.ts +37 -0
- package/test/examples/flappy_bird/browser-entry/playback/trail/playback.trail.opacity.utils.ts +74 -0
- package/test/examples/flappy_bird/browser-entry/playback/worker-channel/README.md +71 -0
- package/test/examples/flappy_bird/browser-entry/playback/worker-channel/playback.worker-channel.request.services.ts +45 -0
- package/test/examples/flappy_bird/browser-entry/playback/worker-channel/playback.worker-channel.summary.services.ts +74 -0
- package/test/examples/flappy_bird/browser-entry/playback/worker-channel/playback.worker-channel.types.ts +53 -0
- package/test/examples/flappy_bird/browser-entry/runtime/README.md +304 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.browser-globals.service.ts +15 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.errors.ts +17 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.evolution-launch.service.ts +56 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.evolution-loop.service.ts +19 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.lifecycle.service.ts +96 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.startup.service.ts +92 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.telemetry.service.ts +24 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.ts +31 -121
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.types.ts +65 -0
- package/test/examples/flappy_bird/browser-entry/visualization/README.md +568 -0
- package/test/examples/flappy_bird/browser-entry/visualization/visualization.colors.utils.ts +26 -0
- package/test/examples/flappy_bird/browser-entry/visualization/visualization.constants.ts +110 -0
- package/test/examples/flappy_bird/browser-entry/visualization/visualization.draw.service.ts +979 -19
- package/test/examples/flappy_bird/browser-entry/visualization/visualization.legend.utils.ts +157 -3
- package/test/examples/flappy_bird/browser-entry/visualization/visualization.topology.utils.ts +13 -27
- package/test/examples/flappy_bird/browser-entry/visualization/visualization.ts +7 -20
- package/test/examples/flappy_bird/browser-entry/visualization/visualization.types.ts +14 -0
- package/test/examples/flappy_bird/browser-entry/worker-channel/README.md +238 -0
- package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.errors.ts +11 -0
- package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.generation.service.ts +12 -0
- package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.playback.service.test.ts +143 -0
- package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.playback.service.ts +140 -14
- package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.request.service.ts +27 -0
- package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.ts +8 -0
- package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.types.ts +23 -0
- package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.url.service.ts +5 -0
- package/test/examples/flappy_bird/constants/README.md +1163 -0
- package/test/examples/flappy_bird/constants/constants.birds.ts +16 -38
- package/test/examples/flappy_bird/constants/constants.difficulty.ts +21 -0
- package/test/examples/flappy_bird/constants/constants.network-view.ts +24 -0
- package/test/examples/flappy_bird/constants/constants.network.ts +1 -1
- package/test/examples/flappy_bird/constants/constants.observation.ts +7 -0
- package/test/examples/flappy_bird/constants/constants.palette.ts +9 -2
- package/test/examples/flappy_bird/constants/constants.physics.ts +9 -0
- package/test/examples/flappy_bird/constants/constants.pipe-render.ts +3 -0
- package/test/examples/flappy_bird/constants/constants.pipes.ts +22 -3
- package/test/examples/flappy_bird/constants/constants.runtime.ts +28 -4
- package/test/examples/flappy_bird/constants/constants.starfield.ts +78 -3
- package/test/examples/flappy_bird/constants/constants.ts +6 -0
- package/test/examples/flappy_bird/environment/README.md +182 -0
- package/test/examples/flappy_bird/environment/environment.collision.utils.ts +7 -0
- package/test/examples/flappy_bird/environment/environment.constants.ts +16 -3
- package/test/examples/flappy_bird/environment/environment.observation.utils.ts +12 -19
- package/test/examples/flappy_bird/environment/environment.state.service.ts +10 -0
- package/test/examples/flappy_bird/environment/environment.step.service.ts +15 -66
- package/test/examples/flappy_bird/environment/environment.types.ts +14 -0
- package/test/examples/flappy_bird/evaluation/README.md +155 -0
- package/test/examples/flappy_bird/evaluation/evaluation.constants.ts +23 -4
- package/test/examples/flappy_bird/evaluation/evaluation.fitness.utils.ts +16 -1
- package/test/examples/flappy_bird/evaluation/evaluation.rollout.service.ts +7 -374
- package/test/examples/flappy_bird/evaluation/evaluation.seed.utils.ts +4 -0
- package/test/examples/flappy_bird/evaluation/evaluation.types.ts +18 -2
- package/test/examples/flappy_bird/evaluation/rollout/README.md +355 -0
- package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.constants.ts +38 -0
- package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.service.ts +71 -0
- package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.services.ts +338 -0
- package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.types.ts +69 -0
- package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.utils.ts +399 -0
- package/test/examples/flappy_bird/flappy-evolution-worker/README.md +845 -0
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.constants.ts +49 -7
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.errors.ts +34 -3
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.evolution.service.ts +22 -0
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.playback.service.ts +62 -26
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.protocol.service.ts +27 -1
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.runtime.service.ts +23 -0
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.simulation.frame.service.ts +378 -0
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.simulation.types.ts +22 -0
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.simulation.utils.ts +20 -203
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.snapshot.utils.test.ts +94 -0
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.snapshot.utils.ts +78 -13
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.ts +235 -344
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.types.ts +170 -22
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.warm-start.service.ts +314 -0
- package/test/examples/flappy_bird/flappy.simulation.shared.utils.ts +17 -0
- package/test/examples/flappy_bird/flappyEnvironment.ts +21 -0
- package/test/examples/flappy_bird/flappyEvaluation.ts +12 -0
- package/test/examples/flappy_bird/flappyEvolution.worker.ts +7 -0
- package/test/examples/flappy_bird/index.ts +8 -2
- package/test/examples/flappy_bird/rng.ts +10 -0
- package/test/examples/flappy_bird/simulation-shared/README.md +518 -0
- package/test/examples/flappy_bird/simulation-shared/observation/README.md +255 -0
- package/test/examples/flappy_bird/simulation-shared/observation/observation.features.utils.ts +339 -0
- package/test/examples/flappy_bird/simulation-shared/observation/observation.ts +19 -0
- package/test/examples/flappy_bird/simulation-shared/observation/observation.vector.utils.ts +81 -0
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.constants.ts +3 -0
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.control.utils.ts +6 -0
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.difficulty.utils.ts +9 -0
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.errors.ts +10 -1
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.memory.utils.ts +18 -0
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.observation.utils.ts +7 -402
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.spawn.utils.ts +36 -6
- package/test/examples/flappy_bird/{evaluation/evaluation.statistics.utils.ts → simulation-shared/simulation-shared.statistics.utils.ts} +30 -9
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.types.ts +38 -5
- package/test/examples/flappy_bird/trainFlappyBird.ts +13 -0
- package/test/examples/flappy_bird/trainer/README.md +676 -0
- package/test/examples/flappy_bird/trainer/evaluation/README.md +253 -0
- package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.constants.ts +15 -0
- package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.services.ts +86 -0
- package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.ts +187 -0
- package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.types.ts +32 -0
- package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.utils.ts +182 -0
- package/test/examples/flappy_bird/trainer/trainer.evaluation.service.ts +13 -0
- package/test/examples/flappy_bird/trainer/trainer.fitness.service.ts +23 -1
- package/test/examples/flappy_bird/trainer/trainer.loop.service.ts +17 -1
- package/test/examples/flappy_bird/trainer/trainer.report.service.services.ts +181 -0
- package/test/examples/flappy_bird/trainer/trainer.report.service.ts +136 -0
- package/test/examples/flappy_bird/trainer/trainer.selection.utils.ts +89 -0
- package/test/examples/flappy_bird/trainer/trainer.setup.service.ts +22 -0
- package/test/examples/flappy_bird/trainer/trainer.signals.service.ts +8 -0
- package/test/examples/flappy_bird/trainer/trainer.ts +38 -553
- package/test/examples/flappy_bird/trainer/trainer.types.ts +44 -7
- package/test/neat/neat.topology-intent.test.ts +129 -0
- package/test/network/network.topology-intent.test.ts +44 -0
- package/test/examples/flappy_bird/browser-entry/browser-entry.utils.ts +0 -12
- package/test/examples/flappy_bird/environment/environment.ts +0 -7
- package/test/examples/flappy_bird/evaluation/evaluation.ts +0 -7
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.ts +0 -15
- package/test/examples/flappy_bird/trainer/trainer.statistics.utils.ts +0 -78
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { clamp } from '../../browser-entry.math.utils';
|
|
2
|
+
import {
|
|
3
|
+
FLAPPY_UI_NETWORK_HOST_FIXED_HEIGHT_PX,
|
|
4
|
+
FLAPPY_VIEWPORT_MOBILE_MINIMAL_UI_BREAKPOINT_PX,
|
|
5
|
+
FLAPPY_VIEWPORT_MINIMUM_SIMULATION_HEIGHT_PX,
|
|
6
|
+
FLAPPY_VIEWPORT_MINIMUM_SIMULATION_HEIGHT_RATIO,
|
|
7
|
+
FLAPPY_VIEWPORT_MIN_NETWORK_HEIGHT_BUDGET_PX,
|
|
8
|
+
FLAPPY_VIEWPORT_NETWORK_ONLY_BREAKPOINT_PX,
|
|
9
|
+
FLAPPY_VIEWPORT_SIMULATION_BOTTOM_MARGIN_PX,
|
|
10
|
+
FLAPPY_VIEWPORT_VERTICAL_LAYOUT_GUTTER_PX,
|
|
11
|
+
} from '../../../constants/constants';
|
|
12
|
+
import {
|
|
13
|
+
FLAPPY_HOST_RESIZE_MIN_DIMENSION_PX,
|
|
14
|
+
FLAPPY_HOST_RESIZE_SPLIT_RATIO,
|
|
15
|
+
} from './host.resize.service.constants';
|
|
16
|
+
import type {
|
|
17
|
+
ResponsiveViewportLayoutContext,
|
|
18
|
+
SimulationCanvasBounds,
|
|
19
|
+
StatsPanelDimensions,
|
|
20
|
+
} from './host.resize.service.types';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Measurement and budget helpers for responsive host sizing.
|
|
24
|
+
*
|
|
25
|
+
* These functions convert live DOM dimensions into the numeric budgets used by
|
|
26
|
+
* the resize appliers.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Resolves responsive layout measurements and mode flags from the host DOM.
|
|
31
|
+
*
|
|
32
|
+
* This is the measurement root for the resize system: read the current viewport,
|
|
33
|
+
* reserve required minimums, then classify the active layout mode.
|
|
34
|
+
*
|
|
35
|
+
* @param containerElement - Width and height source.
|
|
36
|
+
* @param statsContainer - Stats host element.
|
|
37
|
+
* @param networkCanvasHost - Network host element.
|
|
38
|
+
* @returns Responsive layout context.
|
|
39
|
+
*/
|
|
40
|
+
export function resolveResponsiveViewportLayoutContext(
|
|
41
|
+
containerElement: HTMLElement,
|
|
42
|
+
statsContainer: HTMLElement,
|
|
43
|
+
networkCanvasHost: HTMLElement,
|
|
44
|
+
): ResponsiveViewportLayoutContext {
|
|
45
|
+
// Step 1: Measure header height and viewport budgets.
|
|
46
|
+
const headerHeightPx = resolveHeaderHeightPx(containerElement);
|
|
47
|
+
const totalCanvasBudgetPx = Math.max(
|
|
48
|
+
FLAPPY_HOST_RESIZE_MIN_DIMENSION_PX,
|
|
49
|
+
containerElement.clientHeight - headerHeightPx,
|
|
50
|
+
);
|
|
51
|
+
const viewportWidthPx = Math.max(
|
|
52
|
+
FLAPPY_HOST_RESIZE_MIN_DIMENSION_PX,
|
|
53
|
+
containerElement.clientWidth,
|
|
54
|
+
);
|
|
55
|
+
const viewportHeightPx = Math.max(
|
|
56
|
+
FLAPPY_HOST_RESIZE_MIN_DIMENSION_PX,
|
|
57
|
+
containerElement.clientHeight,
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
// Step 2: Measure panel-specific height constraints.
|
|
61
|
+
const nonNetworkStatsHeightPx = Math.max(
|
|
62
|
+
0,
|
|
63
|
+
statsContainer.scrollHeight - networkCanvasHost.offsetHeight,
|
|
64
|
+
);
|
|
65
|
+
const hardMinimumSimulationHeightPx = Math.max(
|
|
66
|
+
FLAPPY_VIEWPORT_MINIMUM_SIMULATION_HEIGHT_PX,
|
|
67
|
+
Math.floor(
|
|
68
|
+
window.innerHeight * FLAPPY_VIEWPORT_MINIMUM_SIMULATION_HEIGHT_RATIO,
|
|
69
|
+
),
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
// Step 3: Resolve the layout-mode flags used by responsive branching.
|
|
73
|
+
const useMinimalMobileLayout =
|
|
74
|
+
viewportWidthPx < FLAPPY_VIEWPORT_MOBILE_MINIMAL_UI_BREAKPOINT_PX;
|
|
75
|
+
const useLandscapeSplitLayout = viewportWidthPx > viewportHeightPx;
|
|
76
|
+
const useNetworkOnlyPanel =
|
|
77
|
+
!useLandscapeSplitLayout &&
|
|
78
|
+
viewportWidthPx < FLAPPY_VIEWPORT_NETWORK_ONLY_BREAKPOINT_PX;
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
headerHeightPx,
|
|
82
|
+
nonNetworkStatsHeightPx,
|
|
83
|
+
hardMinimumSimulationHeightPx,
|
|
84
|
+
totalCanvasBudgetPx,
|
|
85
|
+
viewportWidthPx,
|
|
86
|
+
viewportHeightPx,
|
|
87
|
+
useMinimalMobileLayout,
|
|
88
|
+
useLandscapeSplitLayout,
|
|
89
|
+
useNetworkOnlyPanel,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Resolves the simulation canvas bounds for the minimal mobile layout.
|
|
95
|
+
*
|
|
96
|
+
* Minimal mobile mode spends nearly the entire available budget on the main
|
|
97
|
+
* simulation surface.
|
|
98
|
+
*
|
|
99
|
+
* @param containerElement - Width and height source.
|
|
100
|
+
* @param responsiveViewportLayoutContext - Responsive layout context.
|
|
101
|
+
* @returns Simulation canvas bounds.
|
|
102
|
+
*/
|
|
103
|
+
export function resolveMinimalMobileCanvasBounds(
|
|
104
|
+
containerElement: HTMLElement,
|
|
105
|
+
responsiveViewportLayoutContext: ResponsiveViewportLayoutContext,
|
|
106
|
+
): SimulationCanvasBounds {
|
|
107
|
+
// Step 1: Use the full container width for the simulation canvas.
|
|
108
|
+
const availableWidthPx = Math.max(
|
|
109
|
+
FLAPPY_HOST_RESIZE_MIN_DIMENSION_PX,
|
|
110
|
+
Math.floor(containerElement.clientWidth),
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
// Step 2: Subtract the bottom breathing room while keeping a positive height.
|
|
114
|
+
const availableHeightPx = Math.max(
|
|
115
|
+
FLAPPY_HOST_RESIZE_MIN_DIMENSION_PX,
|
|
116
|
+
Math.floor(
|
|
117
|
+
responsiveViewportLayoutContext.totalCanvasBudgetPx -
|
|
118
|
+
FLAPPY_VIEWPORT_SIMULATION_BOTTOM_MARGIN_PX,
|
|
119
|
+
),
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
return {
|
|
123
|
+
availableWidthPx,
|
|
124
|
+
availableHeightPx,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Resolves the stats panel height and width budgets.
|
|
130
|
+
*
|
|
131
|
+
* The stats panel budget is computed after preserving a minimum readable region
|
|
132
|
+
* for the simulation canvas.
|
|
133
|
+
*
|
|
134
|
+
* @param responsiveViewportLayoutContext - Responsive layout context.
|
|
135
|
+
* @returns Stats panel dimensions.
|
|
136
|
+
*/
|
|
137
|
+
export function resolveStatsPanelDimensions(
|
|
138
|
+
responsiveViewportLayoutContext: ResponsiveViewportLayoutContext,
|
|
139
|
+
): StatsPanelDimensions {
|
|
140
|
+
// Step 1: Resolve the preferred stats panel height from the vertical split budget.
|
|
141
|
+
const halfSplitTargetHeightPx = Math.max(
|
|
142
|
+
FLAPPY_VIEWPORT_MIN_NETWORK_HEIGHT_BUDGET_PX,
|
|
143
|
+
Math.floor(
|
|
144
|
+
(responsiveViewportLayoutContext.totalCanvasBudgetPx -
|
|
145
|
+
FLAPPY_VIEWPORT_VERTICAL_LAYOUT_GUTTER_PX) *
|
|
146
|
+
FLAPPY_HOST_RESIZE_SPLIT_RATIO,
|
|
147
|
+
),
|
|
148
|
+
);
|
|
149
|
+
const maximumStatsHeightPx = Math.max(
|
|
150
|
+
FLAPPY_VIEWPORT_MIN_NETWORK_HEIGHT_BUDGET_PX,
|
|
151
|
+
responsiveViewportLayoutContext.totalCanvasBudgetPx -
|
|
152
|
+
responsiveViewportLayoutContext.hardMinimumSimulationHeightPx -
|
|
153
|
+
FLAPPY_VIEWPORT_VERTICAL_LAYOUT_GUTTER_PX,
|
|
154
|
+
);
|
|
155
|
+
const resolvedStatsPanelHeightPx =
|
|
156
|
+
responsiveViewportLayoutContext.useLandscapeSplitLayout
|
|
157
|
+
? responsiveViewportLayoutContext.totalCanvasBudgetPx
|
|
158
|
+
: Math.floor(
|
|
159
|
+
clamp(
|
|
160
|
+
halfSplitTargetHeightPx,
|
|
161
|
+
FLAPPY_VIEWPORT_MIN_NETWORK_HEIGHT_BUDGET_PX,
|
|
162
|
+
maximumStatsHeightPx,
|
|
163
|
+
),
|
|
164
|
+
);
|
|
165
|
+
const minimumStatsPanelHeightPx =
|
|
166
|
+
responsiveViewportLayoutContext.nonNetworkStatsHeightPx +
|
|
167
|
+
FLAPPY_UI_NETWORK_HOST_FIXED_HEIGHT_PX;
|
|
168
|
+
|
|
169
|
+
// Step 2: Resolve the stats panel width budget for landscape layouts.
|
|
170
|
+
const halfSplitTargetWidthPx = Math.max(
|
|
171
|
+
FLAPPY_VIEWPORT_MIN_NETWORK_HEIGHT_BUDGET_PX,
|
|
172
|
+
Math.floor(
|
|
173
|
+
(responsiveViewportLayoutContext.viewportWidthPx -
|
|
174
|
+
FLAPPY_VIEWPORT_VERTICAL_LAYOUT_GUTTER_PX) *
|
|
175
|
+
FLAPPY_HOST_RESIZE_SPLIT_RATIO,
|
|
176
|
+
),
|
|
177
|
+
);
|
|
178
|
+
const maximumStatsWidthPx = Math.max(
|
|
179
|
+
FLAPPY_VIEWPORT_MIN_NETWORK_HEIGHT_BUDGET_PX,
|
|
180
|
+
responsiveViewportLayoutContext.viewportWidthPx -
|
|
181
|
+
FLAPPY_VIEWPORT_MIN_NETWORK_HEIGHT_BUDGET_PX -
|
|
182
|
+
FLAPPY_VIEWPORT_VERTICAL_LAYOUT_GUTTER_PX,
|
|
183
|
+
);
|
|
184
|
+
|
|
185
|
+
return {
|
|
186
|
+
adjustedStatsPanelHeightPx:
|
|
187
|
+
responsiveViewportLayoutContext.useLandscapeSplitLayout
|
|
188
|
+
? resolvedStatsPanelHeightPx
|
|
189
|
+
: Math.max(resolvedStatsPanelHeightPx, minimumStatsPanelHeightPx),
|
|
190
|
+
resolvedStatsPanelWidthPx: Math.floor(
|
|
191
|
+
clamp(
|
|
192
|
+
halfSplitTargetWidthPx,
|
|
193
|
+
FLAPPY_VIEWPORT_MIN_NETWORK_HEIGHT_BUDGET_PX,
|
|
194
|
+
maximumStatsWidthPx,
|
|
195
|
+
),
|
|
196
|
+
),
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Resolves simulation canvas bounds from the current viewport layout.
|
|
202
|
+
*
|
|
203
|
+
* The simulation canvas consumes the remainder after the stats/network budget and
|
|
204
|
+
* fixed gutters are applied.
|
|
205
|
+
*
|
|
206
|
+
* @param containerElement - Width and height source.
|
|
207
|
+
* @param responsiveViewportLayoutContext - Responsive layout context.
|
|
208
|
+
* @param statsPanelDimensions - Resolved stats panel dimensions.
|
|
209
|
+
* @returns Simulation canvas bounds.
|
|
210
|
+
*/
|
|
211
|
+
export function resolveSimulationCanvasBounds(
|
|
212
|
+
containerElement: HTMLElement,
|
|
213
|
+
responsiveViewportLayoutContext: ResponsiveViewportLayoutContext,
|
|
214
|
+
statsPanelDimensions: StatsPanelDimensions,
|
|
215
|
+
): SimulationCanvasBounds {
|
|
216
|
+
// Step 1: Resolve the simulation width from the active split orientation.
|
|
217
|
+
const availableWidthPx =
|
|
218
|
+
responsiveViewportLayoutContext.useLandscapeSplitLayout
|
|
219
|
+
? Math.max(
|
|
220
|
+
FLAPPY_HOST_RESIZE_MIN_DIMENSION_PX,
|
|
221
|
+
containerElement.clientWidth -
|
|
222
|
+
statsPanelDimensions.resolvedStatsPanelWidthPx -
|
|
223
|
+
FLAPPY_VIEWPORT_VERTICAL_LAYOUT_GUTTER_PX,
|
|
224
|
+
)
|
|
225
|
+
: Math.max(
|
|
226
|
+
FLAPPY_HOST_RESIZE_MIN_DIMENSION_PX,
|
|
227
|
+
containerElement.clientWidth,
|
|
228
|
+
);
|
|
229
|
+
|
|
230
|
+
// Step 2: Resolve the simulation height from the remaining vertical budget.
|
|
231
|
+
const availableHeightPx =
|
|
232
|
+
responsiveViewportLayoutContext.useLandscapeSplitLayout
|
|
233
|
+
? Math.max(
|
|
234
|
+
FLAPPY_HOST_RESIZE_MIN_DIMENSION_PX,
|
|
235
|
+
responsiveViewportLayoutContext.totalCanvasBudgetPx -
|
|
236
|
+
FLAPPY_VIEWPORT_SIMULATION_BOTTOM_MARGIN_PX,
|
|
237
|
+
)
|
|
238
|
+
: Math.max(
|
|
239
|
+
FLAPPY_HOST_RESIZE_MIN_DIMENSION_PX,
|
|
240
|
+
responsiveViewportLayoutContext.totalCanvasBudgetPx -
|
|
241
|
+
statsPanelDimensions.adjustedStatsPanelHeightPx -
|
|
242
|
+
FLAPPY_VIEWPORT_VERTICAL_LAYOUT_GUTTER_PX -
|
|
243
|
+
FLAPPY_VIEWPORT_SIMULATION_BOTTOM_MARGIN_PX,
|
|
244
|
+
);
|
|
245
|
+
|
|
246
|
+
return {
|
|
247
|
+
availableWidthPx,
|
|
248
|
+
availableHeightPx,
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Resolves the header canvas height, if present.
|
|
254
|
+
*
|
|
255
|
+
* The resize system subtracts the header from the total container height before
|
|
256
|
+
* budgeting the main panels.
|
|
257
|
+
*
|
|
258
|
+
* @param containerElement - Width and height source.
|
|
259
|
+
* @returns Header height in pixels.
|
|
260
|
+
*/
|
|
261
|
+
function resolveHeaderHeightPx(containerElement: HTMLElement): number {
|
|
262
|
+
// Step 1: Locate the header canvas hosted above the simulation viewport.
|
|
263
|
+
const headerCanvasElement = containerElement.querySelector('canvas');
|
|
264
|
+
|
|
265
|
+
// Step 2: Return the canvas height when found, otherwise fall back to zero.
|
|
266
|
+
return Math.max(
|
|
267
|
+
0,
|
|
268
|
+
headerCanvasElement instanceof HTMLCanvasElement
|
|
269
|
+
? headerCanvasElement.offsetHeight
|
|
270
|
+
: 0,
|
|
271
|
+
);
|
|
272
|
+
}
|
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
# browser-entry/network-view
|
|
2
|
+
|
|
3
|
+
## browser-entry/network-view/network-view.types.ts
|
|
4
|
+
|
|
5
|
+
### network-view.types
|
|
6
|
+
|
|
7
|
+
Shared type contracts for network-view overlays.
|
|
8
|
+
|
|
9
|
+
The most notable overlay is the input-group label band system, which annotates
|
|
10
|
+
stacked temporal observation channels so the input layer reads as grouped
|
|
11
|
+
semantics instead of a flat strip of anonymous nodes.
|
|
12
|
+
|
|
13
|
+
### InputGroupLabelBand
|
|
14
|
+
|
|
15
|
+
Shared type contracts for network-view overlays.
|
|
16
|
+
|
|
17
|
+
The most notable overlay is the input-group label band system, which annotates
|
|
18
|
+
stacked temporal observation channels so the input layer reads as grouped
|
|
19
|
+
semantics instead of a flat strip of anonymous nodes.
|
|
20
|
+
|
|
21
|
+
## browser-entry/network-view/network-view.ts
|
|
22
|
+
|
|
23
|
+
### clampRecommendedNetworkHeightPx
|
|
24
|
+
|
|
25
|
+
`(recommendedHeightPx: number) => number`
|
|
26
|
+
|
|
27
|
+
Clamps a recommended network height into the configured panel range.
|
|
28
|
+
|
|
29
|
+
Parameters:
|
|
30
|
+
- `recommendedHeightPx` - - Recommended panel height.
|
|
31
|
+
|
|
32
|
+
Returns: Clamped panel height.
|
|
33
|
+
|
|
34
|
+
### createPositionByNodeIndex
|
|
35
|
+
|
|
36
|
+
`(centeredPositionedNodes: import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").PositionedNetworkNodeLike[]) => Map<number, import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").PositionedNetworkNodeLike>`
|
|
37
|
+
|
|
38
|
+
Builds a node-index lookup map for resolved positioned nodes.
|
|
39
|
+
|
|
40
|
+
Parameters:
|
|
41
|
+
- `centeredPositionedNodes` - - Positioned nodes after centering.
|
|
42
|
+
|
|
43
|
+
Returns: Map keyed by node index.
|
|
44
|
+
|
|
45
|
+
### drawNetworkVisualization
|
|
46
|
+
|
|
47
|
+
`(context: CanvasRenderingContext2D, network: import("src/architecture/network").default | undefined, inputSize: number, outputSize: number) => void`
|
|
48
|
+
|
|
49
|
+
Draws a complete, layer-based visualization of the active network.
|
|
50
|
+
|
|
51
|
+
Conceptually, this is the main fold from network object to finished panel:
|
|
52
|
+
resolve scene state, compute layout, paint the graph, then paint overlays.
|
|
53
|
+
|
|
54
|
+
Parameters:
|
|
55
|
+
- `context` - - Canvas 2D drawing context.
|
|
56
|
+
- `network` - - Network to visualize.
|
|
57
|
+
- `inputSize` - - Input-layer size.
|
|
58
|
+
- `outputSize` - - Output-layer size.
|
|
59
|
+
|
|
60
|
+
Returns: Nothing.
|
|
61
|
+
|
|
62
|
+
### drawPositionedNetworkGraph
|
|
63
|
+
|
|
64
|
+
`(context: CanvasRenderingContext2D, networkVisualizationScene: NetworkVisualizationScene, positionedNetworkGraphScene: PositionedNetworkGraphScene) => void`
|
|
65
|
+
|
|
66
|
+
Draws the positioned graph layers and optional guide overlays.
|
|
67
|
+
|
|
68
|
+
Parameters:
|
|
69
|
+
- `context` - - Canvas 2D drawing context.
|
|
70
|
+
- `networkVisualizationScene` - - Frame scene context.
|
|
71
|
+
- `positionedNetworkGraphScene` - - Positioned graph scene.
|
|
72
|
+
|
|
73
|
+
Returns: Nothing.
|
|
74
|
+
|
|
75
|
+
### formatArchitectureLabel
|
|
76
|
+
|
|
77
|
+
`(architectureInputSize: number, hiddenLayersLabel: string, architectureOutputSize: number, totalNodeCount: number, totalConnectionCount: number) => string`
|
|
78
|
+
|
|
79
|
+
Formats the two-line architecture label used by the header and legend.
|
|
80
|
+
|
|
81
|
+
Parameters:
|
|
82
|
+
- `architectureInputSize` - - Input layer size.
|
|
83
|
+
- `hiddenLayersLabel` - - Hidden-layer description.
|
|
84
|
+
- `architectureOutputSize` - - Output layer size.
|
|
85
|
+
- `totalNodeCount` - - Total node count.
|
|
86
|
+
- `totalConnectionCount` - - Total connection count.
|
|
87
|
+
|
|
88
|
+
Returns: Formatted architecture label.
|
|
89
|
+
|
|
90
|
+
### NetworkTopologySummary
|
|
91
|
+
|
|
92
|
+
Network-view orchestration for the browser-side architecture panel.
|
|
93
|
+
|
|
94
|
+
This subsystem sits between raw network data and the lower-level visualization
|
|
95
|
+
drawing helpers. It resolves topology summaries, chooses panel size, lays out
|
|
96
|
+
nodes inside the drawable area, and coordinates overlays such as legends and
|
|
97
|
+
input-group bands.
|
|
98
|
+
|
|
99
|
+
### paintNetworkVisualizationCanvasBase
|
|
100
|
+
|
|
101
|
+
`(context: CanvasRenderingContext2D, networkVisualizationScene: NetworkVisualizationScene) => void`
|
|
102
|
+
|
|
103
|
+
Paints the base network visualization canvas background.
|
|
104
|
+
|
|
105
|
+
Parameters:
|
|
106
|
+
- `context` - - Canvas 2D drawing context.
|
|
107
|
+
- `networkVisualizationScene` - - Frame scene context.
|
|
108
|
+
|
|
109
|
+
Returns: Nothing.
|
|
110
|
+
|
|
111
|
+
### resolveAdjustedGraphPaddingContext
|
|
112
|
+
|
|
113
|
+
`(context: CanvasRenderingContext2D, network: import("src/architecture/network").default | undefined, canvasWidthPx: number, hideNetworkOverlays: boolean, graphPaddingContext: NetworkGraphPaddingContext) => Pick<NetworkGraphPaddingContext, "graphLeftPaddingPx" | "graphRightPaddingPx">`
|
|
114
|
+
|
|
115
|
+
Adjusts graph-side padding to keep the floating legend from overlapping nodes.
|
|
116
|
+
|
|
117
|
+
Parameters:
|
|
118
|
+
- `context` - - Canvas 2D drawing context.
|
|
119
|
+
- `network` - - Network to visualize.
|
|
120
|
+
- `canvasWidthPx` - - Canvas width.
|
|
121
|
+
- `hideNetworkOverlays` - - Whether overlays are hidden.
|
|
122
|
+
- `graphPaddingContext` - - Base graph padding context.
|
|
123
|
+
|
|
124
|
+
Returns: Adjusted graph padding context.
|
|
125
|
+
|
|
126
|
+
### resolveBaseGraphPaddingContext
|
|
127
|
+
|
|
128
|
+
`() => NetworkGraphPaddingContext`
|
|
129
|
+
|
|
130
|
+
Resolves the base graph padding before legend-aware adjustments are applied.
|
|
131
|
+
|
|
132
|
+
Returns: Base graph padding context.
|
|
133
|
+
|
|
134
|
+
### resolveHiddenLayersLabel
|
|
135
|
+
|
|
136
|
+
`(hiddenLayerSizes: number[], architectureSource: "layer-metadata" | "graph-topology" | "inferred") => string`
|
|
137
|
+
|
|
138
|
+
Resolves the hidden-layer portion of the compact architecture label.
|
|
139
|
+
|
|
140
|
+
Parameters:
|
|
141
|
+
- `hiddenLayerSizes` - - Hidden-layer sizes.
|
|
142
|
+
- `architectureSource` - - Architecture source metadata.
|
|
143
|
+
|
|
144
|
+
Returns: Hidden-layer label.
|
|
145
|
+
|
|
146
|
+
### resolveNetworkArchitectureLabel
|
|
147
|
+
|
|
148
|
+
`(network: import("src/architecture/network").default | undefined, inputSize: number, outputSize: number) => string`
|
|
149
|
+
|
|
150
|
+
Resolves compact architecture label text for headers and HUD rows.
|
|
151
|
+
|
|
152
|
+
The label compresses the active network into a short human-readable summary:
|
|
153
|
+
input size, hidden-layer structure, output size, and graph size metadata.
|
|
154
|
+
|
|
155
|
+
Parameters:
|
|
156
|
+
- `network` - - Network to describe.
|
|
157
|
+
- `inputSize` - - Configured input size.
|
|
158
|
+
- `outputSize` - - Configured output size.
|
|
159
|
+
|
|
160
|
+
Returns: Readable architecture label.
|
|
161
|
+
|
|
162
|
+
### resolveNetworkDrawableArea
|
|
163
|
+
|
|
164
|
+
`(networkVisualizationScene: NetworkVisualizationScene) => NetworkDrawableArea`
|
|
165
|
+
|
|
166
|
+
Resolves the drawable graph area after scene padding is applied.
|
|
167
|
+
|
|
168
|
+
Parameters:
|
|
169
|
+
- `networkVisualizationScene` - - Frame scene context.
|
|
170
|
+
|
|
171
|
+
Returns: Drawable area dimensions.
|
|
172
|
+
|
|
173
|
+
### resolveNetworkNodeDimensions
|
|
174
|
+
|
|
175
|
+
`(network: import("src/architecture/network").default | undefined, inputSize: number, outputSize: number, drawableWidthPx: number, drawableHeightPx: number) => import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").NetworkNodeDimensionsLike`
|
|
176
|
+
|
|
177
|
+
Resolves node rectangle dimensions from topology density and drawable bounds.
|
|
178
|
+
|
|
179
|
+
Parameters:
|
|
180
|
+
- `network` - - Network to visualize.
|
|
181
|
+
- `inputSize` - - Input-layer size.
|
|
182
|
+
- `outputSize` - - Output-layer size.
|
|
183
|
+
- `drawableWidthPx` - - Drawable graph width.
|
|
184
|
+
- `drawableHeightPx` - - Drawable graph height.
|
|
185
|
+
|
|
186
|
+
Returns: Node dimensions.
|
|
187
|
+
|
|
188
|
+
### resolveNetworkNodeDimensionsFromTopologySummary
|
|
189
|
+
|
|
190
|
+
`(networkTopologySummary: NetworkTopologySummary, drawableWidthPx: number, drawableHeightPx: number) => import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").NetworkNodeDimensionsLike`
|
|
191
|
+
|
|
192
|
+
Resolves node rectangle dimensions from topology density and drawable bounds.
|
|
193
|
+
|
|
194
|
+
Parameters:
|
|
195
|
+
- `networkTopologySummary` - - Topology summary.
|
|
196
|
+
- `drawableWidthPx` - - Drawable graph width.
|
|
197
|
+
- `drawableHeightPx` - - Drawable graph height.
|
|
198
|
+
|
|
199
|
+
Returns: Node dimensions.
|
|
200
|
+
|
|
201
|
+
### resolveNetworkTopologySummary
|
|
202
|
+
|
|
203
|
+
`(network: import("src/architecture/network").default | undefined, inputSize: number, outputSize: number) => NetworkTopologySummary`
|
|
204
|
+
|
|
205
|
+
Resolves a reusable topology summary for layout and sizing helpers.
|
|
206
|
+
|
|
207
|
+
Parameters:
|
|
208
|
+
- `network` - - Network to visualize.
|
|
209
|
+
- `inputSize` - - Input-layer size.
|
|
210
|
+
- `outputSize` - - Output-layer size.
|
|
211
|
+
|
|
212
|
+
Returns: Topology summary.
|
|
213
|
+
|
|
214
|
+
### resolveNetworkVisualizationHeightPx
|
|
215
|
+
|
|
216
|
+
`(network: import("src/architecture/network").default | undefined, inputSize: number, outputSize: number) => number`
|
|
217
|
+
|
|
218
|
+
Resolves responsive visualization canvas height from network shape.
|
|
219
|
+
|
|
220
|
+
Dense or deeper networks need more vertical room to stay readable, so panel
|
|
221
|
+
height is driven by topology rather than fixed to a single constant.
|
|
222
|
+
|
|
223
|
+
Parameters:
|
|
224
|
+
- `network` - - Network to visualize.
|
|
225
|
+
- `inputSize` - - Input-layer size.
|
|
226
|
+
- `outputSize` - - Output-layer size.
|
|
227
|
+
|
|
228
|
+
Returns: Recommended height in pixels.
|
|
229
|
+
|
|
230
|
+
### resolveNetworkVisualizationScene
|
|
231
|
+
|
|
232
|
+
`(context: CanvasRenderingContext2D, network: import("src/architecture/network").default | undefined, inputSize: number, outputSize: number) => NetworkVisualizationScene`
|
|
233
|
+
|
|
234
|
+
Resolves all non-topology canvas state needed to draw the network view.
|
|
235
|
+
|
|
236
|
+
This separates frame-scene concerns such as canvas size, overlays, and color
|
|
237
|
+
scales from the later graph-topology layout step.
|
|
238
|
+
|
|
239
|
+
Parameters:
|
|
240
|
+
- `context` - - Canvas 2D drawing context.
|
|
241
|
+
- `network` - - Network to visualize.
|
|
242
|
+
- `inputSize` - - Input-layer size.
|
|
243
|
+
- `outputSize` - - Output-layer size.
|
|
244
|
+
|
|
245
|
+
Returns: Scene context for the current frame.
|
|
246
|
+
|
|
247
|
+
### resolvePositionedNetworkGraphScene
|
|
248
|
+
|
|
249
|
+
`(networkVisualizationScene: NetworkVisualizationScene, network: import("src/architecture/network").default | undefined, inputSize: number, outputSize: number) => PositionedNetworkGraphScene`
|
|
250
|
+
|
|
251
|
+
Resolves positioned nodes, connection lookup state, and shared node dimensions.
|
|
252
|
+
|
|
253
|
+
Parameters:
|
|
254
|
+
- `networkVisualizationScene` - - Frame scene context.
|
|
255
|
+
- `network` - - Network to visualize.
|
|
256
|
+
- `inputSize` - - Input-layer size.
|
|
257
|
+
- `outputSize` - - Output-layer size.
|
|
258
|
+
|
|
259
|
+
Returns: Positioned graph scene.
|
|
260
|
+
|
|
261
|
+
### resolveRecommendedNetworkHeightPx
|
|
262
|
+
|
|
263
|
+
`(networkTopologySummary: NetworkTopologySummary, topologyDrivenHeightPx: number) => number`
|
|
264
|
+
|
|
265
|
+
Resolves the recommended panel height from topology and density adjustments.
|
|
266
|
+
|
|
267
|
+
Parameters:
|
|
268
|
+
- `networkTopologySummary` - - Topology summary.
|
|
269
|
+
- `topologyDrivenHeightPx` - - Minimum readable topology height.
|
|
270
|
+
|
|
271
|
+
Returns: Recommended panel height.
|
|
272
|
+
|
|
273
|
+
### resolveRuntimeConnections
|
|
274
|
+
|
|
275
|
+
`(network: import("src/architecture/network").default | undefined) => import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").VisualNetworkConnectionLike[]`
|
|
276
|
+
|
|
277
|
+
Resolves the runtime connection array from the active network.
|
|
278
|
+
|
|
279
|
+
Parameters:
|
|
280
|
+
- `network` - - Network to visualize.
|
|
281
|
+
|
|
282
|
+
Returns: Runtime connection list.
|
|
283
|
+
|
|
284
|
+
### resolveTopologyDrivenHeightPx
|
|
285
|
+
|
|
286
|
+
`(networkTopologySummary: NetworkTopologySummary) => number`
|
|
287
|
+
|
|
288
|
+
Resolves the topology-driven minimum readable height.
|
|
289
|
+
|
|
290
|
+
Parameters:
|
|
291
|
+
- `networkTopologySummary` - - Topology summary.
|
|
292
|
+
|
|
293
|
+
Returns: Minimum readable height in pixels.
|
|
294
|
+
|
|
295
|
+
### shouldHideNetworkOverlays
|
|
296
|
+
|
|
297
|
+
`(context: CanvasRenderingContext2D, fallbackViewportWidthPx: number) => boolean`
|
|
298
|
+
|
|
299
|
+
Determines whether responsive rules hide auxiliary network overlays.
|
|
300
|
+
|
|
301
|
+
Parameters:
|
|
302
|
+
- `context` - - Canvas 2D drawing context.
|
|
303
|
+
- `fallbackViewportWidthPx` - - Fallback viewport width.
|
|
304
|
+
|
|
305
|
+
Returns: True when overlays should be hidden.
|
|
306
|
+
|
|
307
|
+
## browser-entry/network-view/network-view.constants.ts
|
|
308
|
+
|
|
309
|
+
### network-view.constants
|
|
310
|
+
|
|
311
|
+
Ordered labels for grouped Flappy network input bands.
|
|
312
|
+
|
|
313
|
+
### FLAPPY_INPUT_GROUP_LABELS
|
|
314
|
+
|
|
315
|
+
## browser-entry/network-view/network-view.draw.service.ts
|
|
316
|
+
|
|
317
|
+
### drawInputGroupLabelBands
|
|
318
|
+
|
|
319
|
+
`(context: CanvasRenderingContext2D, positionedNodes: import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").PositionedNetworkNodeLike[], nodeDimensions: import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").NetworkNodeDimensionsLike) => void`
|
|
320
|
+
|
|
321
|
+
Overlay drawing helpers specific to the network-view panel.
|
|
322
|
+
|
|
323
|
+
These helpers render semantic guides that sit on top of the raw graph, most
|
|
324
|
+
notably the colored input-group bands that explain how temporal observation
|
|
325
|
+
channels are organized.
|
|
326
|
+
|
|
327
|
+
### drawRoundedRect
|
|
328
|
+
|
|
329
|
+
`(context: CanvasRenderingContext2D, leftXPx: number, topYPx: number, widthPx: number, heightPx: number, radiusPx: number, fillColor: string) => void`
|
|
330
|
+
|
|
331
|
+
Draws a filled rounded rectangle path.
|
|
332
|
+
|
|
333
|
+
This is the small geometry primitive used by the input-group band renderer.
|
|
334
|
+
|
|
335
|
+
## browser-entry/network-view/network-view.labels.utils.ts
|
|
336
|
+
|
|
337
|
+
### resolveInputGroupLabelBands
|
|
338
|
+
|
|
339
|
+
`(inputNodeCount: number) => import("test/examples/flappy_bird/browser-entry/network-view/network-view.types").InputGroupLabelBand[]`
|
|
340
|
+
|
|
341
|
+
Semantic input-label helpers for the network-view panel.
|
|
342
|
+
|
|
343
|
+
The Flappy controller input layer is not just a list of anonymous scalars; it
|
|
344
|
+
is organized into stacked observation frames plus action-history channels.
|
|
345
|
+
These helpers recover that grouping for visual annotation.
|
|
346
|
+
|
|
347
|
+
## browser-entry/network-view/network-view.layout.utils.ts
|
|
348
|
+
|
|
349
|
+
### centerPositionedNodesInDrawableArea
|
|
350
|
+
|
|
351
|
+
`(positionedNodes: import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").PositionedNetworkNodeLike[], leftPaddingPx: number, topPaddingPx: number, drawableWidthPx: number, drawableHeightPx: number, nodeLayoutPaddingPx: number, nodeDimensions: import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").NetworkNodeDimensionsLike) => import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").PositionedNetworkNodeLike[]`
|
|
352
|
+
|
|
353
|
+
Centers positioned nodes within the drawable graph area.
|
|
354
|
+
|
|
355
|
+
Positioning establishes relative structure first; centering then shifts the
|
|
356
|
+
whole graph as a block so it sits comfortably within the padded draw region.
|
|
357
|
+
|
|
358
|
+
Parameters:
|
|
359
|
+
- `positionedNodes` - - Positioned nodes before centering.
|
|
360
|
+
- `leftPaddingPx` - - Left graph padding.
|
|
361
|
+
- `topPaddingPx` - - Top graph padding.
|
|
362
|
+
- `drawableWidthPx` - - Drawable graph width.
|
|
363
|
+
- `drawableHeightPx` - - Drawable graph height.
|
|
364
|
+
- `nodeLayoutPaddingPx` - - Inner graph padding.
|
|
365
|
+
- `nodeDimensions` - - Node dimensions.
|
|
366
|
+
|
|
367
|
+
Returns: Center-aligned positioned nodes.
|
|
368
|
+
|
|
369
|
+
### positionNetworkNodes
|
|
370
|
+
|
|
371
|
+
`(networkLayers: import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").VisualNetworkNodeLike[][], leftPaddingPx: number, topPaddingPx: number, drawableWidthPx: number, drawableHeightPx: number, nodeLayoutPaddingPx: number, nodeDimensions: import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").NetworkNodeDimensionsLike) => import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").PositionedNetworkNodeLike[]`
|
|
372
|
+
|
|
373
|
+
Node-positioning helpers for the browser network view.
|
|
374
|
+
|
|
375
|
+
Once topology has been resolved into layers, these helpers place nodes inside
|
|
376
|
+
the drawable panel and then center the final graph so it feels balanced inside
|
|
377
|
+
the available canvas space.
|
|
378
|
+
|
|
379
|
+
## browser-entry/network-view/network-view.topology.utils.ts
|
|
380
|
+
|
|
381
|
+
### resolveNetworkVisualizationLayers
|
|
382
|
+
|
|
383
|
+
`(network: import("src/architecture/network").default | undefined, inputSize: number, outputSize: number) => import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").VisualNetworkNodeLike[][]`
|
|
384
|
+
|
|
385
|
+
Topology resolution helpers for the browser network view.
|
|
386
|
+
|
|
387
|
+
These helpers answer a key visualization question: how should the current
|
|
388
|
+
network be partitioned into ordered layers so layout and architecture labels
|
|
389
|
+
stay meaningful even when some metadata is missing?
|
|
@@ -14,9 +14,20 @@ import type {
|
|
|
14
14
|
} from '../browser-entry.types';
|
|
15
15
|
import { resolveInputGroupLabelBands } from './network-view.labels.utils';
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Overlay drawing helpers specific to the network-view panel.
|
|
19
|
+
*
|
|
20
|
+
* These helpers render semantic guides that sit on top of the raw graph, most
|
|
21
|
+
* notably the colored input-group bands that explain how temporal observation
|
|
22
|
+
* channels are organized.
|
|
23
|
+
*/
|
|
24
|
+
|
|
17
25
|
/**
|
|
18
26
|
* Draws vertical neon bands that label semantic groups in the input layer.
|
|
19
27
|
*
|
|
28
|
+
* The bands make the input layer readable as domain features rather than just a
|
|
29
|
+
* numbered stack of nodes.
|
|
30
|
+
*
|
|
20
31
|
* @param context - Canvas 2D rendering context.
|
|
21
32
|
* @param positionedNodes - Positioned nodes in graph coordinates.
|
|
22
33
|
* @param nodeDimensions - Resolved node dimensions.
|
|
@@ -102,6 +113,8 @@ export function drawInputGroupLabelBands(
|
|
|
102
113
|
|
|
103
114
|
/**
|
|
104
115
|
* Draws a filled rounded rectangle path.
|
|
116
|
+
*
|
|
117
|
+
* This is the small geometry primitive used by the input-group band renderer.
|
|
105
118
|
*/
|
|
106
119
|
export function drawRoundedRect(
|
|
107
120
|
context: CanvasRenderingContext2D,
|