@vibefield/puppeteer-views 0.0.0-stage → 0.2.1
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/dist/bar/InstrumentBar.d.ts +81 -0
- package/dist/bar/InstrumentBar.d.ts.map +1 -0
- package/dist/bar/InstrumentBar.js +86 -0
- package/dist/bar/InstrumentBar.js.map +1 -0
- package/dist/bar/ProfileTabs.d.ts +24 -0
- package/dist/bar/ProfileTabs.d.ts.map +1 -0
- package/dist/bar/ProfileTabs.js +141 -0
- package/dist/bar/ProfileTabs.js.map +1 -0
- package/dist/chrome/ChromeBoundary.d.ts +60 -0
- package/dist/chrome/ChromeBoundary.d.ts.map +1 -0
- package/dist/chrome/ChromeBoundary.js +70 -0
- package/dist/chrome/ChromeBoundary.js.map +1 -0
- package/dist/chrome/stage.d.ts +8 -0
- package/dist/chrome/stage.d.ts.map +1 -0
- package/dist/chrome/stage.js +8 -0
- package/dist/chrome/stage.js.map +1 -0
- package/dist/colour/pane-colours.d.ts +21 -0
- package/dist/colour/pane-colours.d.ts.map +1 -0
- package/dist/colour/pane-colours.js +25 -0
- package/dist/colour/pane-colours.js.map +1 -0
- package/dist/colour/project-tint.d.ts +23 -0
- package/dist/colour/project-tint.d.ts.map +1 -0
- package/dist/colour/project-tint.js +100 -0
- package/dist/colour/project-tint.js.map +1 -0
- package/dist/deck/DeckFrames.d.ts +71 -0
- package/dist/deck/DeckFrames.d.ts.map +1 -0
- package/dist/deck/DeckFrames.js +50 -0
- package/dist/deck/DeckFrames.js.map +1 -0
- package/dist/deck/PaneFrame.d.ts +80 -0
- package/dist/deck/PaneFrame.d.ts.map +1 -0
- package/dist/deck/PaneFrame.js +118 -0
- package/dist/deck/PaneFrame.js.map +1 -0
- package/dist/deck/completed-agent-panes.d.ts +24 -0
- package/dist/deck/completed-agent-panes.d.ts.map +1 -0
- package/dist/deck/completed-agent-panes.js +72 -0
- package/dist/deck/completed-agent-panes.js.map +1 -0
- package/dist/deck/deck-zoom.d.ts +40 -0
- package/dist/deck/deck-zoom.d.ts.map +1 -0
- package/dist/deck/deck-zoom.js +200 -0
- package/dist/deck/deck-zoom.js.map +1 -0
- package/dist/deck/index.d.ts +8 -0
- package/dist/deck/index.d.ts.map +1 -0
- package/dist/deck/index.js +13 -0
- package/dist/deck/index.js.map +1 -0
- package/dist/deck/pane-elements.d.ts +24 -0
- package/dist/deck/pane-elements.d.ts.map +1 -0
- package/dist/deck/pane-elements.js +73 -0
- package/dist/deck/pane-elements.js.map +1 -0
- package/dist/deck/pane-frame.d.ts +88 -0
- package/dist/deck/pane-frame.d.ts.map +1 -0
- package/dist/deck/pane-frame.js +51 -0
- package/dist/deck/pane-frame.js.map +1 -0
- package/dist/deck/unused-pane-sessions.d.ts +24 -0
- package/dist/deck/unused-pane-sessions.d.ts.map +1 -0
- package/dist/deck/unused-pane-sessions.js +75 -0
- package/dist/deck/unused-pane-sessions.js.map +1 -0
- package/dist/deck/use-deck-zoom.d.ts +10 -0
- package/dist/deck/use-deck-zoom.d.ts.map +1 -0
- package/dist/deck/use-deck-zoom.js +31 -0
- package/dist/deck/use-deck-zoom.js.map +1 -0
- package/dist/find/FindSheet.d.ts +23 -0
- package/dist/find/FindSheet.d.ts.map +1 -0
- package/dist/find/FindSheet.js +197 -0
- package/dist/find/FindSheet.js.map +1 -0
- package/dist/find/find-agent.d.ts +35 -0
- package/dist/find/find-agent.d.ts.map +1 -0
- package/dist/find/find-agent.js +2 -0
- package/dist/find/find-agent.js.map +1 -0
- package/dist/find/find-model.d.ts +93 -0
- package/dist/find/find-model.d.ts.map +1 -0
- package/dist/find/find-model.js +372 -0
- package/dist/find/find-model.js.map +1 -0
- package/dist/find/history-port.d.ts +78 -0
- package/dist/find/history-port.d.ts.map +1 -0
- package/dist/find/history-port.js +9 -0
- package/dist/find/history-port.js.map +1 -0
- package/dist/icons/ServiceMark.d.ts +32 -0
- package/dist/icons/ServiceMark.d.ts.map +1 -0
- package/dist/icons/ServiceMark.js +57 -0
- package/dist/icons/ServiceMark.js.map +1 -0
- package/dist/icons/profile-glyph-suggest.d.ts +8 -0
- package/dist/icons/profile-glyph-suggest.d.ts.map +1 -0
- package/dist/icons/profile-glyph-suggest.js +42 -0
- package/dist/icons/profile-glyph-suggest.js.map +1 -0
- package/dist/icons/service-marks.d.ts +5 -0
- package/dist/icons/service-marks.d.ts.map +1 -0
- package/dist/icons/service-marks.js +81 -0
- package/dist/icons/service-marks.js.map +1 -0
- package/dist/index.d.ts +60 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +86 -0
- package/dist/index.js.map +1 -0
- package/dist/lab/lab-clock.d.ts +11 -0
- package/dist/lab/lab-clock.d.ts.map +1 -0
- package/dist/lab/lab-clock.js +48 -0
- package/dist/lab/lab-clock.js.map +1 -0
- package/dist/lab/lab-model.d.ts +10 -0
- package/dist/lab/lab-model.d.ts.map +1 -0
- package/dist/lab/lab-model.js +146 -0
- package/dist/lab/lab-model.js.map +1 -0
- package/dist/lab/lab-stage.d.ts +72 -0
- package/dist/lab/lab-stage.d.ts.map +1 -0
- package/dist/lab/lab-stage.js +201 -0
- package/dist/lab/lab-stage.js.map +1 -0
- package/dist/lab/lab-world.d.ts +33 -0
- package/dist/lab/lab-world.d.ts.map +1 -0
- package/dist/lab/lab-world.js +394 -0
- package/dist/lab/lab-world.js.map +1 -0
- package/dist/lab/view-lab.css +98 -0
- package/dist/launcher/DeckLaunchers.d.ts +92 -0
- package/dist/launcher/DeckLaunchers.d.ts.map +1 -0
- package/dist/launcher/DeckLaunchers.js +377 -0
- package/dist/launcher/DeckLaunchers.js.map +1 -0
- package/dist/launcher/PaneLaunch.d.ts +50 -0
- package/dist/launcher/PaneLaunch.d.ts.map +1 -0
- package/dist/launcher/PaneLaunch.js +318 -0
- package/dist/launcher/PaneLaunch.js.map +1 -0
- package/dist/launcher/PaneLaunchChrome.d.ts +49 -0
- package/dist/launcher/PaneLaunchChrome.d.ts.map +1 -0
- package/dist/launcher/PaneLaunchChrome.js +32 -0
- package/dist/launcher/PaneLaunchChrome.js.map +1 -0
- package/dist/launcher/PaneLauncher.d.ts +97 -0
- package/dist/launcher/PaneLauncher.d.ts.map +1 -0
- package/dist/launcher/PaneLauncher.js +349 -0
- package/dist/launcher/PaneLauncher.js.map +1 -0
- package/dist/launcher/PaneLauncherChrome.d.ts +97 -0
- package/dist/launcher/PaneLauncherChrome.d.ts.map +1 -0
- package/dist/launcher/PaneLauncherChrome.js +131 -0
- package/dist/launcher/PaneLauncherChrome.js.map +1 -0
- package/dist/launcher/index.d.ts +9 -0
- package/dist/launcher/index.d.ts.map +1 -0
- package/dist/launcher/index.js +16 -0
- package/dist/launcher/index.js.map +1 -0
- package/dist/launcher/launch-model.d.ts +162 -0
- package/dist/launcher/launch-model.d.ts.map +1 -0
- package/dist/launcher/launch-model.js +169 -0
- package/dist/launcher/launch-model.js.map +1 -0
- package/dist/launcher/launcher-model.d.ts +268 -0
- package/dist/launcher/launcher-model.d.ts.map +1 -0
- package/dist/launcher/launcher-model.js +443 -0
- package/dist/launcher/launcher-model.js.map +1 -0
- package/dist/launcher/launcher-port.d.ts +115 -0
- package/dist/launcher/launcher-port.d.ts.map +1 -0
- package/dist/launcher/launcher-port.js +12 -0
- package/dist/launcher/launcher-port.js.map +1 -0
- package/dist/monitor/agent-status.d.ts +13 -0
- package/dist/monitor/agent-status.d.ts.map +1 -0
- package/dist/monitor/agent-status.js +5 -0
- package/dist/monitor/agent-status.js.map +1 -0
- package/dist/monitor/agents.d.ts +6 -0
- package/dist/monitor/agents.d.ts.map +1 -0
- package/dist/monitor/agents.js +21 -0
- package/dist/monitor/agents.js.map +1 -0
- package/dist/monitor/cost-format.d.ts +3 -0
- package/dist/monitor/cost-format.d.ts.map +1 -0
- package/dist/monitor/cost-format.js +12 -0
- package/dist/monitor/cost-format.js.map +1 -0
- package/dist/monitor/folder-name.d.ts +3 -0
- package/dist/monitor/folder-name.d.ts.map +1 -0
- package/dist/monitor/folder-name.js +6 -0
- package/dist/monitor/folder-name.js.map +1 -0
- package/dist/monitor/palette.d.ts +94 -0
- package/dist/monitor/palette.d.ts.map +1 -0
- package/dist/monitor/palette.js +157 -0
- package/dist/monitor/palette.js.map +1 -0
- package/dist/monitor/parameters.d.ts +33 -0
- package/dist/monitor/parameters.d.ts.map +1 -0
- package/dist/monitor/parameters.js +53 -0
- package/dist/monitor/parameters.js.map +1 -0
- package/dist/monitor/recede.d.ts +14 -0
- package/dist/monitor/recede.d.ts.map +1 -0
- package/dist/monitor/recede.js +35 -0
- package/dist/monitor/recede.js.map +1 -0
- package/dist/monitor/registry.d.ts +14 -0
- package/dist/monitor/registry.d.ts.map +1 -0
- package/dist/monitor/registry.js +36 -0
- package/dist/monitor/registry.js.map +1 -0
- package/dist/monitor/remote-write.d.ts +16 -0
- package/dist/monitor/remote-write.d.ts.map +1 -0
- package/dist/monitor/remote-write.js +21 -0
- package/dist/monitor/remote-write.js.map +1 -0
- package/dist/monitor/types.d.ts +205 -0
- package/dist/monitor/types.d.ts.map +1 -0
- package/dist/monitor/types.js +2 -0
- package/dist/monitor/types.js.map +1 -0
- package/dist/styles/bar.css +396 -0
- package/dist/styles/deck-frame.css +439 -0
- package/dist/styles/deck-zoom.css +70 -0
- package/dist/styles/find-sheet.css +270 -0
- package/dist/styles/pane-launcher.css +955 -0
- package/dist/styles/usage.css +368 -0
- package/dist/styles/views.css +12 -0
- package/dist/usage/UsageColumn.d.ts +8 -0
- package/dist/usage/UsageColumn.d.ts.map +1 -0
- package/dist/usage/UsageColumn.js +133 -0
- package/dist/usage/UsageColumn.js.map +1 -0
- package/dist/usage/account-usage-port.d.ts +12 -0
- package/dist/usage/account-usage-port.d.ts.map +1 -0
- package/dist/usage/account-usage-port.js +2 -0
- package/dist/usage/account-usage-port.js.map +1 -0
- package/dist/usage/account-usage.d.ts +86 -0
- package/dist/usage/account-usage.d.ts.map +1 -0
- package/dist/usage/account-usage.js +262 -0
- package/dist/usage/account-usage.js.map +1 -0
- package/dist/views/list/AgentList.d.ts +4 -0
- package/dist/views/list/AgentList.d.ts.map +1 -0
- package/dist/views/list/AgentList.js +101 -0
- package/dist/views/list/AgentList.js.map +1 -0
- package/dist/views/list/ListSpawnMenu.d.ts +20 -0
- package/dist/views/list/ListSpawnMenu.d.ts.map +1 -0
- package/dist/views/list/ListSpawnMenu.js +143 -0
- package/dist/views/list/ListSpawnMenu.js.map +1 -0
- package/dist/views/list/index.d.ts +8 -0
- package/dist/views/list/index.d.ts.map +1 -0
- package/dist/views/list/index.js +43 -0
- package/dist/views/list/index.js.map +1 -0
- package/dist/views/list/lab/main.d.ts +2 -0
- package/dist/views/list/lab/main.d.ts.map +1 -0
- package/dist/views/list/lab/main.js +25 -0
- package/dist/views/list/lab/main.js.map +1 -0
- package/dist/views/list/list-parameters.d.ts +9 -0
- package/dist/views/list/list-parameters.d.ts.map +1 -0
- package/dist/views/list/list-parameters.js +27 -0
- package/dist/views/list/list-parameters.js.map +1 -0
- package/dist/views/list/list.css +387 -0
- package/dist/views/rain/RainView.d.ts +4 -0
- package/dist/views/rain/RainView.d.ts.map +1 -0
- package/dist/views/rain/RainView.js +282 -0
- package/dist/views/rain/RainView.js.map +1 -0
- package/dist/views/rain/index.d.ts +8 -0
- package/dist/views/rain/index.d.ts.map +1 -0
- package/dist/views/rain/index.js +53 -0
- package/dist/views/rain/index.js.map +1 -0
- package/dist/views/rain/lab/main.d.ts +2 -0
- package/dist/views/rain/lab/main.d.ts.map +1 -0
- package/dist/views/rain/lab/main.js +26 -0
- package/dist/views/rain/lab/main.js.map +1 -0
- package/dist/views/rain/rain-parameters.d.ts +15 -0
- package/dist/views/rain/rain-parameters.d.ts.map +1 -0
- package/dist/views/rain/rain-parameters.js +52 -0
- package/dist/views/rain/rain-parameters.js.map +1 -0
- package/dist/views/rain/rain-streams.d.ts +44 -0
- package/dist/views/rain/rain-streams.d.ts.map +1 -0
- package/dist/views/rain/rain-streams.js +101 -0
- package/dist/views/rain/rain-streams.js.map +1 -0
- package/dist/views/rain/rain.css +200 -0
- package/dist/views/spend/SpendView.d.ts +30 -0
- package/dist/views/spend/SpendView.d.ts.map +1 -0
- package/dist/views/spend/SpendView.js +645 -0
- package/dist/views/spend/SpendView.js.map +1 -0
- package/dist/views/spend/index.d.ts +8 -0
- package/dist/views/spend/index.d.ts.map +1 -0
- package/dist/views/spend/index.js +54 -0
- package/dist/views/spend/index.js.map +1 -0
- package/dist/views/spend/lab/main.d.ts +2 -0
- package/dist/views/spend/lab/main.d.ts.map +1 -0
- package/dist/views/spend/lab/main.js +237 -0
- package/dist/views/spend/lab/main.js.map +1 -0
- package/dist/views/spend/lab/spend-fixtures.d.ts +72 -0
- package/dist/views/spend/lab/spend-fixtures.d.ts.map +1 -0
- package/dist/views/spend/lab/spend-fixtures.js +412 -0
- package/dist/views/spend/lab/spend-fixtures.js.map +1 -0
- package/dist/views/spend/spend-ink.d.ts +18 -0
- package/dist/views/spend/spend-ink.d.ts.map +1 -0
- package/dist/views/spend/spend-ink.js +50 -0
- package/dist/views/spend/spend-ink.js.map +1 -0
- package/dist/views/spend/spend-list.d.ts +48 -0
- package/dist/views/spend/spend-list.d.ts.map +1 -0
- package/dist/views/spend/spend-list.js +93 -0
- package/dist/views/spend/spend-list.js.map +1 -0
- package/dist/views/spend/spend-paint.d.ts +88 -0
- package/dist/views/spend/spend-paint.d.ts.map +1 -0
- package/dist/views/spend/spend-paint.js +225 -0
- package/dist/views/spend/spend-paint.js.map +1 -0
- package/dist/views/spend/spend-parameters.d.ts +11 -0
- package/dist/views/spend/spend-parameters.d.ts.map +1 -0
- package/dist/views/spend/spend-parameters.js +27 -0
- package/dist/views/spend/spend-parameters.js.map +1 -0
- package/dist/views/spend/spend-scale.d.ts +43 -0
- package/dist/views/spend/spend-scale.d.ts.map +1 -0
- package/dist/views/spend/spend-scale.js +71 -0
- package/dist/views/spend/spend-scale.js.map +1 -0
- package/dist/views/spend/spend-series.d.ts +91 -0
- package/dist/views/spend/spend-series.d.ts.map +1 -0
- package/dist/views/spend/spend-series.js +212 -0
- package/dist/views/spend/spend-series.js.map +1 -0
- package/dist/views/spend/spend-words.d.ts +82 -0
- package/dist/views/spend/spend-words.d.ts.map +1 -0
- package/dist/views/spend/spend-words.js +164 -0
- package/dist/views/spend/spend-words.js.map +1 -0
- package/dist/views/spend/spend.css +585 -0
- package/dist/views/swarm/AgentSwarm.d.ts +4 -0
- package/dist/views/swarm/AgentSwarm.d.ts.map +1 -0
- package/dist/views/swarm/AgentSwarm.js +969 -0
- package/dist/views/swarm/AgentSwarm.js.map +1 -0
- package/dist/views/swarm/bloom/SpawnBloom.d.ts +26 -0
- package/dist/views/swarm/bloom/SpawnBloom.d.ts.map +1 -0
- package/dist/views/swarm/bloom/SpawnBloom.js +332 -0
- package/dist/views/swarm/bloom/SpawnBloom.js.map +1 -0
- package/dist/views/swarm/bloom/birth.d.ts +70 -0
- package/dist/views/swarm/bloom/birth.d.ts.map +1 -0
- package/dist/views/swarm/bloom/birth.js +89 -0
- package/dist/views/swarm/bloom/birth.js.map +1 -0
- package/dist/views/swarm/bloom/canvas-measure.d.ts +11 -0
- package/dist/views/swarm/bloom/canvas-measure.d.ts.map +1 -0
- package/dist/views/swarm/bloom/canvas-measure.js +37 -0
- package/dist/views/swarm/bloom/canvas-measure.js.map +1 -0
- package/dist/views/swarm/bloom/constants.d.ts +93 -0
- package/dist/views/swarm/bloom/constants.d.ts.map +1 -0
- package/dist/views/swarm/bloom/constants.js +94 -0
- package/dist/views/swarm/bloom/constants.js.map +1 -0
- package/dist/views/swarm/bloom/field-frame.d.ts +69 -0
- package/dist/views/swarm/bloom/field-frame.d.ts.map +1 -0
- package/dist/views/swarm/bloom/field-frame.js +104 -0
- package/dist/views/swarm/bloom/field-frame.js.map +1 -0
- package/dist/views/swarm/bloom/geometry.d.ts +187 -0
- package/dist/views/swarm/bloom/geometry.d.ts.map +1 -0
- package/dist/views/swarm/bloom/geometry.js +379 -0
- package/dist/views/swarm/bloom/geometry.js.map +1 -0
- package/dist/views/swarm/bloom/index.d.ts +8 -0
- package/dist/views/swarm/bloom/index.d.ts.map +1 -0
- package/dist/views/swarm/bloom/index.js +13 -0
- package/dist/views/swarm/bloom/index.js.map +1 -0
- package/dist/views/swarm/bloom/menu.d.ts +5 -0
- package/dist/views/swarm/bloom/menu.d.ts.map +1 -0
- package/dist/views/swarm/bloom/menu.js +14 -0
- package/dist/views/swarm/bloom/menu.js.map +1 -0
- package/dist/views/swarm/bloom/model.d.ts +255 -0
- package/dist/views/swarm/bloom/model.d.ts.map +1 -0
- package/dist/views/swarm/bloom/model.js +678 -0
- package/dist/views/swarm/bloom/model.js.map +1 -0
- package/dist/views/swarm/bloom/scenarios.d.ts +7 -0
- package/dist/views/swarm/bloom/scenarios.d.ts.map +1 -0
- package/dist/views/swarm/bloom/scenarios.js +57 -0
- package/dist/views/swarm/bloom/scenarios.js.map +1 -0
- package/dist/views/swarm/bloom/spawn-bloom.css +407 -0
- package/dist/views/swarm/bloom/targeting.d.ts +60 -0
- package/dist/views/swarm/bloom/targeting.d.ts.map +1 -0
- package/dist/views/swarm/bloom/targeting.js +74 -0
- package/dist/views/swarm/bloom/targeting.js.map +1 -0
- package/dist/views/swarm/bloom/use-spawn-bloom.d.ts +100 -0
- package/dist/views/swarm/bloom/use-spawn-bloom.d.ts.map +1 -0
- package/dist/views/swarm/bloom/use-spawn-bloom.js +333 -0
- package/dist/views/swarm/bloom/use-spawn-bloom.js.map +1 -0
- package/dist/views/swarm/bloom/words.d.ts +73 -0
- package/dist/views/swarm/bloom/words.d.ts.map +1 -0
- package/dist/views/swarm/bloom/words.js +195 -0
- package/dist/views/swarm/bloom/words.js.map +1 -0
- package/dist/views/swarm/body-id.d.ts +13 -0
- package/dist/views/swarm/body-id.d.ts.map +1 -0
- package/dist/views/swarm/body-id.js +12 -0
- package/dist/views/swarm/body-id.js.map +1 -0
- package/dist/views/swarm/bubble-model.d.ts +128 -0
- package/dist/views/swarm/bubble-model.d.ts.map +1 -0
- package/dist/views/swarm/bubble-model.js +421 -0
- package/dist/views/swarm/bubble-model.js.map +1 -0
- package/dist/views/swarm/gpu/frame-layout.d.ts +52 -0
- package/dist/views/swarm/gpu/frame-layout.d.ts.map +1 -0
- package/dist/views/swarm/gpu/frame-layout.js +122 -0
- package/dist/views/swarm/gpu/frame-layout.js.map +1 -0
- package/dist/views/swarm/gpu/glyph-atlas.d.ts +63 -0
- package/dist/views/swarm/gpu/glyph-atlas.d.ts.map +1 -0
- package/dist/views/swarm/gpu/glyph-atlas.js +207 -0
- package/dist/views/swarm/gpu/glyph-atlas.js.map +1 -0
- package/dist/views/swarm/gpu/profile-icons.d.ts +4 -0
- package/dist/views/swarm/gpu/profile-icons.d.ts.map +1 -0
- package/dist/views/swarm/gpu/profile-icons.js +18 -0
- package/dist/views/swarm/gpu/profile-icons.js.map +1 -0
- package/dist/views/swarm/gpu/shaders/body.wgsl.d.ts +3 -0
- package/dist/views/swarm/gpu/shaders/body.wgsl.d.ts.map +1 -0
- package/dist/views/swarm/gpu/shaders/body.wgsl.js +162 -0
- package/dist/views/swarm/gpu/shaders/body.wgsl.js.map +1 -0
- package/dist/views/swarm/gpu/shaders/common.wgsl.d.ts +3 -0
- package/dist/views/swarm/gpu/shaders/common.wgsl.d.ts.map +1 -0
- package/dist/views/swarm/gpu/shaders/common.wgsl.js +171 -0
- package/dist/views/swarm/gpu/shaders/common.wgsl.js.map +1 -0
- package/dist/views/swarm/gpu/shaders/erase.wgsl.d.ts +3 -0
- package/dist/views/swarm/gpu/shaders/erase.wgsl.d.ts.map +1 -0
- package/dist/views/swarm/gpu/shaders/erase.wgsl.js +61 -0
- package/dist/views/swarm/gpu/shaders/erase.wgsl.js.map +1 -0
- package/dist/views/swarm/gpu/shaders/field.wgsl.d.ts +3 -0
- package/dist/views/swarm/gpu/shaders/field.wgsl.d.ts.map +1 -0
- package/dist/views/swarm/gpu/shaders/field.wgsl.js +47 -0
- package/dist/views/swarm/gpu/shaders/field.wgsl.js.map +1 -0
- package/dist/views/swarm/gpu/shaders/glow.wgsl.d.ts +3 -0
- package/dist/views/swarm/gpu/shaders/glow.wgsl.d.ts.map +1 -0
- package/dist/views/swarm/gpu/shaders/glow.wgsl.js +39 -0
- package/dist/views/swarm/gpu/shaders/glow.wgsl.js.map +1 -0
- package/dist/views/swarm/gpu/shaders/hub.wgsl.d.ts +3 -0
- package/dist/views/swarm/gpu/shaders/hub.wgsl.d.ts.map +1 -0
- package/dist/views/swarm/gpu/shaders/hub.wgsl.js +48 -0
- package/dist/views/swarm/gpu/shaders/hub.wgsl.js.map +1 -0
- package/dist/views/swarm/gpu/shaders/shadow.wgsl.d.ts +3 -0
- package/dist/views/swarm/gpu/shaders/shadow.wgsl.d.ts.map +1 -0
- package/dist/views/swarm/gpu/shaders/shadow.wgsl.js +37 -0
- package/dist/views/swarm/gpu/shaders/shadow.wgsl.js.map +1 -0
- package/dist/views/swarm/gpu/shaders/text.wgsl.d.ts +3 -0
- package/dist/views/swarm/gpu/shaders/text.wgsl.d.ts.map +1 -0
- package/dist/views/swarm/gpu/shaders/text.wgsl.js +51 -0
- package/dist/views/swarm/gpu/shaders/text.wgsl.js.map +1 -0
- package/dist/views/swarm/gpu/swarm-renderer.d.ts +155 -0
- package/dist/views/swarm/gpu/swarm-renderer.d.ts.map +1 -0
- package/dist/views/swarm/gpu/swarm-renderer.js +696 -0
- package/dist/views/swarm/gpu/swarm-renderer.js.map +1 -0
- package/dist/views/swarm/index.d.ts +9 -0
- package/dist/views/swarm/index.d.ts.map +1 -0
- package/dist/views/swarm/index.js +40 -0
- package/dist/views/swarm/index.js.map +1 -0
- package/dist/views/swarm/lab/fixtures.d.ts +148 -0
- package/dist/views/swarm/lab/fixtures.d.ts.map +1 -0
- package/dist/views/swarm/lab/fixtures.js +821 -0
- package/dist/views/swarm/lab/fixtures.js.map +1 -0
- package/dist/views/swarm/lab/lab.css +315 -0
- package/dist/views/swarm/lab/main.d.ts +2 -0
- package/dist/views/swarm/lab/main.d.ts.map +1 -0
- package/dist/views/swarm/lab/main.js +474 -0
- package/dist/views/swarm/lab/main.js.map +1 -0
- package/dist/views/swarm/physics/driver.d.ts +23 -0
- package/dist/views/swarm/physics/driver.d.ts.map +1 -0
- package/dist/views/swarm/physics/driver.js +68 -0
- package/dist/views/swarm/physics/driver.js.map +1 -0
- package/dist/views/swarm/physics/frame.d.ts +28 -0
- package/dist/views/swarm/physics/frame.d.ts.map +1 -0
- package/dist/views/swarm/physics/frame.js +47 -0
- package/dist/views/swarm/physics/frame.js.map +1 -0
- package/dist/views/swarm/physics/host.d.ts +28 -0
- package/dist/views/swarm/physics/host.d.ts.map +1 -0
- package/dist/views/swarm/physics/host.js +168 -0
- package/dist/views/swarm/physics/host.js.map +1 -0
- package/dist/views/swarm/physics/index.d.ts +6 -0
- package/dist/views/swarm/physics/index.d.ts.map +1 -0
- package/dist/views/swarm/physics/index.js +14 -0
- package/dist/views/swarm/physics/index.js.map +1 -0
- package/dist/views/swarm/physics/inline-driver.d.ts +27 -0
- package/dist/views/swarm/physics/inline-driver.d.ts.map +1 -0
- package/dist/views/swarm/physics/inline-driver.js +37 -0
- package/dist/views/swarm/physics/inline-driver.js.map +1 -0
- package/dist/views/swarm/physics/protocol.d.ts +125 -0
- package/dist/views/swarm/physics/protocol.d.ts.map +1 -0
- package/dist/views/swarm/physics/protocol.js +4 -0
- package/dist/views/swarm/physics/protocol.js.map +1 -0
- package/dist/views/swarm/physics/spawn-clamp.d.ts +11 -0
- package/dist/views/swarm/physics/spawn-clamp.d.ts.map +1 -0
- package/dist/views/swarm/physics/spawn-clamp.js +15 -0
- package/dist/views/swarm/physics/spawn-clamp.js.map +1 -0
- package/dist/views/swarm/physics/swarm-physics.worker.d.ts +2 -0
- package/dist/views/swarm/physics/swarm-physics.worker.d.ts.map +1 -0
- package/dist/views/swarm/physics/swarm-physics.worker.js +66 -0
- package/dist/views/swarm/physics/swarm-physics.worker.js.map +1 -0
- package/dist/views/swarm/physics/world.d.ts +174 -0
- package/dist/views/swarm/physics/world.d.ts.map +1 -0
- package/dist/views/swarm/physics/world.js +454 -0
- package/dist/views/swarm/physics/world.js.map +1 -0
- package/dist/views/swarm/swarm-parameters.d.ts +50 -0
- package/dist/views/swarm/swarm-parameters.d.ts.map +1 -0
- package/dist/views/swarm/swarm-parameters.js +103 -0
- package/dist/views/swarm/swarm-parameters.js.map +1 -0
- package/dist/views/swarm/swarm-theme.d.ts +5 -0
- package/dist/views/swarm/swarm-theme.d.ts.map +1 -0
- package/dist/views/swarm/swarm-theme.js +63 -0
- package/dist/views/swarm/swarm-theme.js.map +1 -0
- package/dist/views/swarm/swarm.css +136 -0
- package/dist/views/swarm/text-layout.d.ts +72 -0
- package/dist/views/swarm/text-layout.d.ts.map +1 -0
- package/dist/views/swarm/text-layout.js +76 -0
- package/dist/views/swarm/text-layout.js.map +1 -0
- package/dist/views/swarm/weight.d.ts +44 -0
- package/dist/views/swarm/weight.d.ts.map +1 -0
- package/dist/views/swarm/weight.js +57 -0
- package/dist/views/swarm/weight.js.map +1 -0
- package/dist/views/timeline/TimelineView.d.ts +9 -0
- package/dist/views/timeline/TimelineView.d.ts.map +1 -0
- package/dist/views/timeline/TimelineView.js +889 -0
- package/dist/views/timeline/TimelineView.js.map +1 -0
- package/dist/views/timeline/index.d.ts +11 -0
- package/dist/views/timeline/index.d.ts.map +1 -0
- package/dist/views/timeline/index.js +63 -0
- package/dist/views/timeline/index.js.map +1 -0
- package/dist/views/timeline/lab/main.d.ts +2 -0
- package/dist/views/timeline/lab/main.d.ts.map +1 -0
- package/dist/views/timeline/lab/main.js +114 -0
- package/dist/views/timeline/lab/main.js.map +1 -0
- package/dist/views/timeline/lab/timeline-fixtures.d.ts +31 -0
- package/dist/views/timeline/lab/timeline-fixtures.d.ts.map +1 -0
- package/dist/views/timeline/lab/timeline-fixtures.js +337 -0
- package/dist/views/timeline/lab/timeline-fixtures.js.map +1 -0
- package/dist/views/timeline/pulse-map.d.ts +63 -0
- package/dist/views/timeline/pulse-map.d.ts.map +1 -0
- package/dist/views/timeline/pulse-map.js +162 -0
- package/dist/views/timeline/pulse-map.js.map +1 -0
- package/dist/views/timeline/timeline-inks.d.ts +28 -0
- package/dist/views/timeline/timeline-inks.d.ts.map +1 -0
- package/dist/views/timeline/timeline-inks.js +35 -0
- package/dist/views/timeline/timeline-inks.js.map +1 -0
- package/dist/views/timeline/timeline-lanes.d.ts +139 -0
- package/dist/views/timeline/timeline-lanes.d.ts.map +1 -0
- package/dist/views/timeline/timeline-lanes.js +240 -0
- package/dist/views/timeline/timeline-lanes.js.map +1 -0
- package/dist/views/timeline/timeline-paint.d.ts +39 -0
- package/dist/views/timeline/timeline-paint.d.ts.map +1 -0
- package/dist/views/timeline/timeline-paint.js +242 -0
- package/dist/views/timeline/timeline-paint.js.map +1 -0
- package/dist/views/timeline/timeline-parameters.d.ts +11 -0
- package/dist/views/timeline/timeline-parameters.d.ts.map +1 -0
- package/dist/views/timeline/timeline-parameters.js +27 -0
- package/dist/views/timeline/timeline-parameters.js.map +1 -0
- package/dist/views/timeline/timeline-scale.d.ts +73 -0
- package/dist/views/timeline/timeline-scale.d.ts.map +1 -0
- package/dist/views/timeline/timeline-scale.js +152 -0
- package/dist/views/timeline/timeline-scale.js.map +1 -0
- package/dist/views/timeline/timeline-words.d.ts +46 -0
- package/dist/views/timeline/timeline-words.d.ts.map +1 -0
- package/dist/views/timeline/timeline-words.js +132 -0
- package/dist/views/timeline/timeline-words.js.map +1 -0
- package/dist/views/timeline/timeline.css +875 -0
- package/dist/views/timeline/wake-geometry.d.ts +88 -0
- package/dist/views/timeline/wake-geometry.d.ts.map +1 -0
- package/dist/views/timeline/wake-geometry.js +243 -0
- package/dist/views/timeline/wake-geometry.js.map +1 -0
- package/package.json +78 -3
- package/README.md +0 -3
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
// The shader as a string module, so the package needs no bundler loader
|
|
2
|
+
// (esbuild in Godview, Vite in VibeField, tsc in both). `common.wgsl` beside it
|
|
3
|
+
// is the authoring copy; `shaders.test.ts` keeps the two identical.
|
|
4
|
+
export default `// Shared by every swarm pipeline; the renderer prepends this to each shader.
|
|
5
|
+
//
|
|
6
|
+
// All geometry is in CSS px with y down, the same space the physics and the
|
|
7
|
+
// pointer use; the device pixel ratio only enters through \`cov\`, the one-pixel
|
|
8
|
+
// box filter, so edges are one device pixel wide at any ratio. Colours are
|
|
9
|
+
// straight-alpha sRGB in the buffers and premultiplied on output, composited
|
|
10
|
+
// over the window's glass with (one, one-minus-src-alpha).
|
|
11
|
+
|
|
12
|
+
// One of the spawn bloom's clearings (erase.wgsl).
|
|
13
|
+
struct Clearing {
|
|
14
|
+
// a circle's centre and radius (w: 0), or a rect's centre and half extents (CSS px)
|
|
15
|
+
shape: vec4f,
|
|
16
|
+
// feather (px), kind (0 circle, 1 rect), opacity (0..1), unused
|
|
17
|
+
edge: vec4f,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const MAX_CLEARINGS: u32 = 4u;
|
|
21
|
+
|
|
22
|
+
struct Frame {
|
|
23
|
+
// width, height (CSS px), device pixel ratio, time (s; frozen when motion is off)
|
|
24
|
+
viewport: vec4f,
|
|
25
|
+
// body fill opacity, motion (0/1), grid pitch (px), the veil (0..1: the grid
|
|
26
|
+
// is drawn at 1 − veil while the spawn bloom is open)
|
|
27
|
+
params: vec4f,
|
|
28
|
+
grid: vec4f,
|
|
29
|
+
// the theme's shadow colour; \`a\` is the resting alpha, \`shadowPeak.a\` the peak's
|
|
30
|
+
shadow: vec4f,
|
|
31
|
+
shadowPeak: vec4f,
|
|
32
|
+
// hold-to-create, and the spawn bloom's hub: x, y, progress 0..1, opacity (0: none)
|
|
33
|
+
pointer: vec4f,
|
|
34
|
+
orange: vec4f,
|
|
35
|
+
holdRim: vec4f,
|
|
36
|
+
holdFill: vec4f,
|
|
37
|
+
holdInk: vec4f,
|
|
38
|
+
// the ring's rim width and dot radius (px): 1 and 2 while a hold is in flight,
|
|
39
|
+
// 1.5 and 2.5 once it is the spawn bloom's hub; z/w unused
|
|
40
|
+
holdShape: vec4f,
|
|
41
|
+
// the state glow's shape: where it begins, where it is full, its strength, unused
|
|
42
|
+
glowBand: vec4f,
|
|
43
|
+
// and its motion: crests across the radius, crests a second, trough depth, unused
|
|
44
|
+
glowWave: vec4f,
|
|
45
|
+
// the spawn bloom's clearings: how many of \`clearings\` are set; y/z/w unused
|
|
46
|
+
clearing: vec4f,
|
|
47
|
+
clearings: array<Clearing, 4>,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
struct Body {
|
|
51
|
+
// x, y, radius, visual scale (arrival curve)
|
|
52
|
+
posRadius: vec4f,
|
|
53
|
+
fill: vec4f,
|
|
54
|
+
ink: vec4f,
|
|
55
|
+
// the inner light's colour — the STATE's, never the project's (see body.wgsl)
|
|
56
|
+
core: vec4f,
|
|
57
|
+
rim: vec4f,
|
|
58
|
+
// x: flag bits; y/z/w unused
|
|
59
|
+
flags: vec4u,
|
|
60
|
+
// context ring: fraction 0..1, the weight it starts its climb at, the track's
|
|
61
|
+
// weight, the weight a full ring would reach
|
|
62
|
+
ring: vec4f,
|
|
63
|
+
// the outer light: reach (px), strength, breath (0..1), phase seed
|
|
64
|
+
glow: vec4f,
|
|
65
|
+
// a pending body's dash turn (radians, clockwise), phase seed, stale mix (0/1), opacity
|
|
66
|
+
motion: vec4f,
|
|
67
|
+
link: vec4f,
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const F_HOLLOW: u32 = 1u;
|
|
71
|
+
const F_RUNNING: u32 = 2u;
|
|
72
|
+
const F_GLOW: u32 = 8u;
|
|
73
|
+
const F_RIM: u32 = 16u;
|
|
74
|
+
const F_STALE: u32 = 32u;
|
|
75
|
+
const F_LINKED: u32 = 64u;
|
|
76
|
+
const F_FOCUS: u32 = 128u;
|
|
77
|
+
const F_RING_HOT: u32 = 512u;
|
|
78
|
+
const F_RING: u32 = 1024u;
|
|
79
|
+
const F_SHADOW: u32 = 2048u;
|
|
80
|
+
const F_CORE: u32 = 4096u;
|
|
81
|
+
const F_WAVES: u32 = 8192u;
|
|
82
|
+
const F_PENDING: u32 = 16384u;
|
|
83
|
+
|
|
84
|
+
const TAU: f32 = 6.28318530718;
|
|
85
|
+
|
|
86
|
+
// The context gauge's width and the light's gutter follow the body's radius:
|
|
87
|
+
// 5px and 2px on the 60px working body, thicker on a bigger one.
|
|
88
|
+
const GAUGE_WIDTH_RATIO: f32 = 5.0 / 60.0;
|
|
89
|
+
const LIGHT_GUTTER_RATIO: f32 = 2.0 / 60.0;
|
|
90
|
+
|
|
91
|
+
@group(0) @binding(0) var<uniform> frame: Frame;
|
|
92
|
+
@group(0) @binding(1) var<storage, read> bodies: array<Body>;
|
|
93
|
+
|
|
94
|
+
fn has(flags: u32, bit: u32) -> bool {
|
|
95
|
+
return (flags & bit) != 0u;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
fn cssToClip(p: vec2f) -> vec4f {
|
|
99
|
+
return vec4f(p.x / frame.viewport.x * 2.0 - 1.0, 1.0 - p.y / frame.viewport.y * 2.0, 0.0, 1.0);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
fn quadCorner(vertex: u32) -> vec2f {
|
|
103
|
+
var corners = array<vec2f, 6>(
|
|
104
|
+
vec2f(-1.0, -1.0), vec2f(1.0, -1.0), vec2f(-1.0, 1.0),
|
|
105
|
+
vec2f(-1.0, 1.0), vec2f(1.0, -1.0), vec2f(1.0, 1.0),
|
|
106
|
+
);
|
|
107
|
+
return corners[vertex];
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
fn premul(c: vec4f) -> vec4f {
|
|
111
|
+
return vec4f(c.rgb * c.a, c.a);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** Source-over of premultiplied \`src\` on premultiplied \`dst\`. */
|
|
115
|
+
fn over(dst: vec4f, src: vec4f) -> vec4f {
|
|
116
|
+
return src + dst * (1.0 - src.a);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/** Coverage of a signed distance (CSS px) under a one-device-pixel box filter. */
|
|
120
|
+
fn cov(d: f32) -> f32 {
|
|
121
|
+
return clamp(0.5 - d * frame.viewport.z, 0.0, 1.0);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** Coverage of a stroke of width \`w\` centred on the iso-line \`d = 0\`. */
|
|
125
|
+
fn stroke(d: f32, w: f32) -> f32 {
|
|
126
|
+
return cov(abs(d) - w * 0.5);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Abramowitz–Stegun 7.1.26: enough for a shadow.
|
|
130
|
+
fn erfA(x: f32) -> f32 {
|
|
131
|
+
let s = sign(x);
|
|
132
|
+
let a = abs(x);
|
|
133
|
+
let t = 1.0 / (1.0 + 0.3275911 * a);
|
|
134
|
+
let y = 1.0 - (((((1.061405429 * t - 1.453152027) * t) + 1.421413741) * t - 0.284496736) * t + 0.254829592) * t * exp(-a * a);
|
|
135
|
+
return s * y;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/** The disc blurred by a gaussian of \`sigma\`: what CSS \`box-shadow\` paints,
|
|
139
|
+
* with sigma half the blur radius. */
|
|
140
|
+
fn occupancy(d: f32, sigma: f32) -> f32 {
|
|
141
|
+
return 0.5 - 0.5 * erfA(d / max(sigma * 1.4142136, 0.0001));
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
fn luma(c: vec3f) -> f32 {
|
|
145
|
+
return dot(c, vec3f(0.2126, 0.7152, 0.0722));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** Angle from twelve o'clock, clockwise, 0..1. */
|
|
149
|
+
fn clockwise(p: vec2f) -> f32 {
|
|
150
|
+
return fract(atan2(p.x, -p.y) / TAU + 1.0);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
struct BodyVertex {
|
|
154
|
+
@builtin(position) position: vec4f,
|
|
155
|
+
@location(0) local: vec2f,
|
|
156
|
+
@location(1) @interpolate(flat) index: u32,
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
fn bodyQuad(vertex: u32, instance: u32, margin: f32, enabled: bool) -> BodyVertex {
|
|
160
|
+
let body = bodies[instance];
|
|
161
|
+
let radius = body.posRadius.z * body.posRadius.w;
|
|
162
|
+
let extent = select(0.0, radius + margin, enabled);
|
|
163
|
+
let corner = quadCorner(vertex);
|
|
164
|
+
var out: BodyVertex;
|
|
165
|
+
out.local = corner * extent;
|
|
166
|
+
out.position = cssToClip(body.posRadius.xy + out.local);
|
|
167
|
+
out.index = instance;
|
|
168
|
+
return out;
|
|
169
|
+
}
|
|
170
|
+
`;
|
|
171
|
+
//# sourceMappingURL=common.wgsl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.wgsl.js","sourceRoot":"","sources":["../../../../../src/views/swarm/gpu/shaders/common.wgsl.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,gFAAgF;AAChF,oEAAoE;AACpE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsKd,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: "// The spawn bloom's clearings (record \u00A72.8): solid ground where the bloom and\n// its words stand, cut out of everything drawn before them \u2014 the grid, the\n// bodies and their type \u2014 so nothing on the field shows through. The pass\n// ERASES: its blend is (zero, one-minus-src-alpha) on colour and alpha alike,\n// so the canvas keeps (1 \u2212 coverage) of itself, and since the page composites\n// the canvas premultiplied, what shows there is the monitor's own ground, as if\n// that ground were painted over the frame at `coverage`. One triangle; the\n// renderer skips it when there are none.\n\nstruct ClearingVertex {\n @builtin(position) position: vec4f,\n};\n\n@vertex\nfn vs(@builtin(vertex_index) vertex: u32) -> ClearingVertex {\n var out: ClearingVertex;\n let uv = vec2f(f32((vertex << 1u) & 2u), f32(vertex & 2u));\n out.position = vec4f(uv * 2.0 - 1.0, 0.0, 1.0);\n return out;\n}\n\n/** A ring's clearing: solid to its radius, then the prototype's radial-gradient\n * stops \u2014 0.62 at 45% of the feather, nothing at its end \u2014 piecewise linear. */\nfn circleCoverage(distance: f32, radius: f32, feather: f32) -> f32 {\n let t = clamp((distance - radius) / feather, 0.0, 1.0);\n return select(0.62 * (1.0 - t) / 0.55, 1.0 - 0.38 * t / 0.45, t < 0.45);\n}\n\n/** The words' clearing: solid inside its box, then a smooth fall to nothing\n * over the feather, measured from the box (so its corners round off). */\nfn rectCoverage(p: vec2f, centre: vec2f, half: vec2f, feather: f32) -> f32 {\n let outside = length(max(abs(p - centre) - half, vec2f(0.0)));\n return 1.0 - smoothstep(0.0, feather, outside);\n}\n\n@fragment\nfn fs(in: ClearingVertex) -> @location(0) vec4f {\n let p = in.position.xy / frame.viewport.z;\n // A feather under a device pixel still antialiases the edge.\n let least = 1.0 / frame.viewport.z;\n let count = min(u32(frame.clearing.x), MAX_CLEARINGS);\n // Each clearing lays the ground over the last, as the prototype painted them.\n var keep = 1.0;\n for (var i = 0u; i < count; i = i + 1u) {\n let clearing = frame.clearings[i];\n let feather = max(clearing.edge.x, least);\n var coverage = 0.0;\n if (clearing.edge.y > 0.5) {\n coverage = rectCoverage(p, clearing.shape.xy, clearing.shape.zw, feather);\n } else {\n coverage = circleCoverage(length(p - clearing.shape.xy), clearing.shape.z, feather);\n }\n keep = keep * (1.0 - coverage * clamp(clearing.edge.z, 0.0, 1.0));\n }\n return vec4f(0.0, 0.0, 0.0, 1.0 - keep);\n}\n";
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=erase.wgsl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"erase.wgsl.d.ts","sourceRoot":"","sources":["../../../../../src/views/swarm/gpu/shaders/erase.wgsl.ts"],"names":[],"mappings":";AAGA,wBAwDE"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// The shader as a string module, so the package needs no bundler loader
|
|
2
|
+
// (esbuild in Godview, Vite in VibeField, tsc in both). `erase.wgsl` beside it
|
|
3
|
+
// is the authoring copy; `shaders.test.ts` keeps the two identical.
|
|
4
|
+
export default `// The spawn bloom's clearings (record §2.8): solid ground where the bloom and
|
|
5
|
+
// its words stand, cut out of everything drawn before them — the grid, the
|
|
6
|
+
// bodies and their type — so nothing on the field shows through. The pass
|
|
7
|
+
// ERASES: its blend is (zero, one-minus-src-alpha) on colour and alpha alike,
|
|
8
|
+
// so the canvas keeps (1 − coverage) of itself, and since the page composites
|
|
9
|
+
// the canvas premultiplied, what shows there is the monitor's own ground, as if
|
|
10
|
+
// that ground were painted over the frame at \`coverage\`. One triangle; the
|
|
11
|
+
// renderer skips it when there are none.
|
|
12
|
+
|
|
13
|
+
struct ClearingVertex {
|
|
14
|
+
@builtin(position) position: vec4f,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
@vertex
|
|
18
|
+
fn vs(@builtin(vertex_index) vertex: u32) -> ClearingVertex {
|
|
19
|
+
var out: ClearingVertex;
|
|
20
|
+
let uv = vec2f(f32((vertex << 1u) & 2u), f32(vertex & 2u));
|
|
21
|
+
out.position = vec4f(uv * 2.0 - 1.0, 0.0, 1.0);
|
|
22
|
+
return out;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** A ring's clearing: solid to its radius, then the prototype's radial-gradient
|
|
26
|
+
* stops — 0.62 at 45% of the feather, nothing at its end — piecewise linear. */
|
|
27
|
+
fn circleCoverage(distance: f32, radius: f32, feather: f32) -> f32 {
|
|
28
|
+
let t = clamp((distance - radius) / feather, 0.0, 1.0);
|
|
29
|
+
return select(0.62 * (1.0 - t) / 0.55, 1.0 - 0.38 * t / 0.45, t < 0.45);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** The words' clearing: solid inside its box, then a smooth fall to nothing
|
|
33
|
+
* over the feather, measured from the box (so its corners round off). */
|
|
34
|
+
fn rectCoverage(p: vec2f, centre: vec2f, half: vec2f, feather: f32) -> f32 {
|
|
35
|
+
let outside = length(max(abs(p - centre) - half, vec2f(0.0)));
|
|
36
|
+
return 1.0 - smoothstep(0.0, feather, outside);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@fragment
|
|
40
|
+
fn fs(in: ClearingVertex) -> @location(0) vec4f {
|
|
41
|
+
let p = in.position.xy / frame.viewport.z;
|
|
42
|
+
// A feather under a device pixel still antialiases the edge.
|
|
43
|
+
let least = 1.0 / frame.viewport.z;
|
|
44
|
+
let count = min(u32(frame.clearing.x), MAX_CLEARINGS);
|
|
45
|
+
// Each clearing lays the ground over the last, as the prototype painted them.
|
|
46
|
+
var keep = 1.0;
|
|
47
|
+
for (var i = 0u; i < count; i = i + 1u) {
|
|
48
|
+
let clearing = frame.clearings[i];
|
|
49
|
+
let feather = max(clearing.edge.x, least);
|
|
50
|
+
var coverage = 0.0;
|
|
51
|
+
if (clearing.edge.y > 0.5) {
|
|
52
|
+
coverage = rectCoverage(p, clearing.shape.xy, clearing.shape.zw, feather);
|
|
53
|
+
} else {
|
|
54
|
+
coverage = circleCoverage(length(p - clearing.shape.xy), clearing.shape.z, feather);
|
|
55
|
+
}
|
|
56
|
+
keep = keep * (1.0 - coverage * clamp(clearing.edge.z, 0.0, 1.0));
|
|
57
|
+
}
|
|
58
|
+
return vec4f(0.0, 0.0, 0.0, 1.0 - keep);
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
61
|
+
//# sourceMappingURL=erase.wgsl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"erase.wgsl.js","sourceRoot":"","sources":["../../../../../src/views/swarm/gpu/shaders/erase.wgsl.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,+EAA+E;AAC/E,oEAAoE;AACpE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDd,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: "// The ground of the swarm: the faint 24px grid under a radial mask, quieted by\n// the veil while the spawn bloom is open. One triangle. The hold ring is drawn\n// last, in its own pass (hub.wgsl), so nothing the field draws covers it.\n\nstruct FieldVertex {\n @builtin(position) position: vec4f,\n};\n\n@vertex\nfn vs(@builtin(vertex_index) vertex: u32) -> FieldVertex {\n var out: FieldVertex;\n let uv = vec2f(f32((vertex << 1u) & 2u), f32(vertex & 2u));\n out.position = vec4f(uv * 2.0 - 1.0, 0.0, 1.0);\n return out;\n}\n\nfn lineCoverage(coordinate: f32, pitch: f32) -> f32 {\n // A 1px line at the start of every tile, box-filtered at the device pixel.\n let half = 0.5 / frame.viewport.z;\n let f = fract(coordinate / pitch) * pitch;\n let overlap = min(f + half, 1.0) - max(f - half, 0.0);\n return clamp(overlap * frame.viewport.z, 0.0, 1.0);\n}\n\n@fragment\nfn fs(in: FieldVertex) -> @location(0) vec4f {\n let dpr = frame.viewport.z;\n let p = in.position.xy / dpr;\n let size = frame.viewport.xy;\n let centre = size * 0.5;\n\n let pitch = frame.params.z;\n let lines = max(lineCoverage(p.x, pitch), lineCoverage(p.y, pitch));\n // `radial-gradient(circle at center, black 20%, transparent 82%)`: the\n // circle reaches the farthest corner.\n let reach = length(centre);\n let mask = 1.0 - smoothstep(0.2, 0.82, length(p - centre) / reach);\n // The veil is the monitor's own ground laid over the field; over a canvas\n // the page composites, that is exactly the grid's alpha times (1 \u2212 veil).\n let veil = clamp(frame.params.w, 0.0, 1.0);\n return premul(vec4f(frame.grid.rgb, frame.grid.a * lines * mask * (1.0 - veil)));\n}\n";
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=field.wgsl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.wgsl.d.ts","sourceRoot":"","sources":["../../../../../src/views/swarm/gpu/shaders/field.wgsl.ts"],"names":[],"mappings":";AAGA,wBA0CE"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// The shader as a string module, so the package needs no bundler loader
|
|
2
|
+
// (esbuild in Godview, Vite in VibeField, tsc in both). `field.wgsl` beside it
|
|
3
|
+
// is the authoring copy; `shaders.test.ts` keeps the two identical.
|
|
4
|
+
export default `// The ground of the swarm: the faint 24px grid under a radial mask, quieted by
|
|
5
|
+
// the veil while the spawn bloom is open. One triangle. The hold ring is drawn
|
|
6
|
+
// last, in its own pass (hub.wgsl), so nothing the field draws covers it.
|
|
7
|
+
|
|
8
|
+
struct FieldVertex {
|
|
9
|
+
@builtin(position) position: vec4f,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
@vertex
|
|
13
|
+
fn vs(@builtin(vertex_index) vertex: u32) -> FieldVertex {
|
|
14
|
+
var out: FieldVertex;
|
|
15
|
+
let uv = vec2f(f32((vertex << 1u) & 2u), f32(vertex & 2u));
|
|
16
|
+
out.position = vec4f(uv * 2.0 - 1.0, 0.0, 1.0);
|
|
17
|
+
return out;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
fn lineCoverage(coordinate: f32, pitch: f32) -> f32 {
|
|
21
|
+
// A 1px line at the start of every tile, box-filtered at the device pixel.
|
|
22
|
+
let half = 0.5 / frame.viewport.z;
|
|
23
|
+
let f = fract(coordinate / pitch) * pitch;
|
|
24
|
+
let overlap = min(f + half, 1.0) - max(f - half, 0.0);
|
|
25
|
+
return clamp(overlap * frame.viewport.z, 0.0, 1.0);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@fragment
|
|
29
|
+
fn fs(in: FieldVertex) -> @location(0) vec4f {
|
|
30
|
+
let dpr = frame.viewport.z;
|
|
31
|
+
let p = in.position.xy / dpr;
|
|
32
|
+
let size = frame.viewport.xy;
|
|
33
|
+
let centre = size * 0.5;
|
|
34
|
+
|
|
35
|
+
let pitch = frame.params.z;
|
|
36
|
+
let lines = max(lineCoverage(p.x, pitch), lineCoverage(p.y, pitch));
|
|
37
|
+
// \`radial-gradient(circle at center, black 20%, transparent 82%)\`: the
|
|
38
|
+
// circle reaches the farthest corner.
|
|
39
|
+
let reach = length(centre);
|
|
40
|
+
let mask = 1.0 - smoothstep(0.2, 0.82, length(p - centre) / reach);
|
|
41
|
+
// The veil is the monitor's own ground laid over the field; over a canvas
|
|
42
|
+
// the page composites, that is exactly the grid's alpha times (1 − veil).
|
|
43
|
+
let veil = clamp(frame.params.w, 0.0, 1.0);
|
|
44
|
+
return premul(vec4f(frame.grid.rgb, frame.grid.a * lines * mask * (1.0 - veil)));
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
47
|
+
//# sourceMappingURL=field.wgsl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.wgsl.js","sourceRoot":"","sources":["../../../../../src/views/swarm/gpu/shaders/field.wgsl.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,+EAA+E;AAC/E,oEAAoE;AACpE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0Cd,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: "// The outer light in the body's own colour: the mark of the body mounted in\n// the SELECTED pane. Every other mounted body wears the band alone. Drawn\n// after every body so it falls on neighbours the way light does. Two falloffs of the distance outside the rim: a tight photographic rim\n// and a designer halo (power 2.65, the fit from the glow study), scaled by the\n// tunable reach and strength, breathing if asked.\n\n@vertex\nfn vs(@builtin(vertex_index) vertex: u32, @builtin(instance_index) instance: u32) -> BodyVertex {\n let body = bodies[instance];\n return bodyQuad(vertex, instance, body.glow.x + 6.0, has(body.flags.x, F_GLOW));\n}\n\n@fragment\nfn fs(in: BodyVertex) -> @location(0) vec4f {\n let body = bodies[in.index];\n let r = body.posRadius.z * body.posRadius.w;\n let d = length(in.local) - r;\n // The light starts a thirtieth of the radius off the rim (2px at 60), where\n // the pane-colour gutter band stops.\n let gutter = r * LIGHT_GUTTER_RATIO;\n let outside = clamp((d - gutter) * frame.viewport.z + 0.5, 0.0, 1.0);\n let reach = max(body.glow.x, 1.0);\n let strength = body.glow.y;\n let breath = body.glow.z * frame.params.y;\n let time = frame.viewport.w;\n let breathe = 1.0 - breath * 0.62 * (0.5 - 0.5 * cos(time * TAU / 1.2 + body.glow.w));\n let outer = max(d - gutter, 0.0);\n let rim = exp(-outer / 6.0);\n let halo = pow(clamp(1.0 - outer / reach, 0.0, 1.0), 2.65);\n let a = clamp(strength * (0.45 * rim + 0.6 * halo), 0.0, 1.0) * breathe * outside;\n // The light beyond the band is the pane's, like the band: the colour of the\n // pane the body is worked in, not the project's.\n return premul(vec4f(body.link.rgb, a));\n}\n";
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=glow.wgsl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glow.wgsl.d.ts","sourceRoot":"","sources":["../../../../../src/views/swarm/gpu/shaders/glow.wgsl.ts"],"names":[],"mappings":";AAGA,wBAkCE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// The shader as a string module, so the package needs no bundler loader
|
|
2
|
+
// (esbuild in Godview, Vite in VibeField, tsc in both). `glow.wgsl` beside it
|
|
3
|
+
// is the authoring copy; `shaders.test.ts` keeps the two identical.
|
|
4
|
+
export default `// The outer light in the body's own colour: the mark of the body mounted in
|
|
5
|
+
// the SELECTED pane. Every other mounted body wears the band alone. Drawn
|
|
6
|
+
// after every body so it falls on neighbours the way light does. Two falloffs of the distance outside the rim: a tight photographic rim
|
|
7
|
+
// and a designer halo (power 2.65, the fit from the glow study), scaled by the
|
|
8
|
+
// tunable reach and strength, breathing if asked.
|
|
9
|
+
|
|
10
|
+
@vertex
|
|
11
|
+
fn vs(@builtin(vertex_index) vertex: u32, @builtin(instance_index) instance: u32) -> BodyVertex {
|
|
12
|
+
let body = bodies[instance];
|
|
13
|
+
return bodyQuad(vertex, instance, body.glow.x + 6.0, has(body.flags.x, F_GLOW));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@fragment
|
|
17
|
+
fn fs(in: BodyVertex) -> @location(0) vec4f {
|
|
18
|
+
let body = bodies[in.index];
|
|
19
|
+
let r = body.posRadius.z * body.posRadius.w;
|
|
20
|
+
let d = length(in.local) - r;
|
|
21
|
+
// The light starts a thirtieth of the radius off the rim (2px at 60), where
|
|
22
|
+
// the pane-colour gutter band stops.
|
|
23
|
+
let gutter = r * LIGHT_GUTTER_RATIO;
|
|
24
|
+
let outside = clamp((d - gutter) * frame.viewport.z + 0.5, 0.0, 1.0);
|
|
25
|
+
let reach = max(body.glow.x, 1.0);
|
|
26
|
+
let strength = body.glow.y;
|
|
27
|
+
let breath = body.glow.z * frame.params.y;
|
|
28
|
+
let time = frame.viewport.w;
|
|
29
|
+
let breathe = 1.0 - breath * 0.62 * (0.5 - 0.5 * cos(time * TAU / 1.2 + body.glow.w));
|
|
30
|
+
let outer = max(d - gutter, 0.0);
|
|
31
|
+
let rim = exp(-outer / 6.0);
|
|
32
|
+
let halo = pow(clamp(1.0 - outer / reach, 0.0, 1.0), 2.65);
|
|
33
|
+
let a = clamp(strength * (0.45 * rim + 0.6 * halo), 0.0, 1.0) * breathe * outside;
|
|
34
|
+
// The light beyond the band is the pane's, like the band: the colour of the
|
|
35
|
+
// pane the body is worked in, not the project's.
|
|
36
|
+
return premul(vec4f(body.link.rgb, a));
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
//# sourceMappingURL=glow.wgsl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glow.wgsl.js","sourceRoot":"","sources":["../../../../../src/views/swarm/gpu/shaders/glow.wgsl.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,8EAA8E;AAC9E,oEAAoE;AACpE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCd,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: "// The hold ring, and the spawn bloom's hub: drawn LAST, above the bodies, their\n// type and the clearings, so the press point is never lost under anything the\n// field draws (record \u00A72.8). 16px at the end of the hold, reached out-cubic from\n// 55%; the theme's surface at 74%, a rim that climbs from the supporting ink to\n// the full ink, and a dot. The frozen hub is the ring's final look (progress 1),\n// drawn heavier (`holdShape`: a 1 px rim and 2 px dot in flight, 1.5 and 2.5 as\n// the hub), and `pointer.w` scales all of it as the bloom closes. One quad.\n\nconst HUB_RADIUS: f32 = 16.0;\n// Room past the ring for its rim's box filter.\nconst HUB_MARGIN: f32 = 2.0;\n\nstruct HubVertex {\n @builtin(position) position: vec4f,\n @location(0) local: vec2f,\n};\n\n@vertex\nfn vs(@builtin(vertex_index) vertex: u32) -> HubVertex {\n var out: HubVertex;\n out.local = quadCorner(vertex) * (HUB_RADIUS + HUB_MARGIN);\n out.position = cssToClip(frame.pointer.xy + out.local);\n return out;\n}\n\n@fragment\nfn fs(in: HubVertex) -> @location(0) vec4f {\n let progress = clamp(frame.pointer.z, 0.0, 1.0);\n let rest = 1.0 - progress;\n let eased = 1.0 - rest * rest * rest;\n let radius = HUB_RADIUS * mix(0.55, 1.0, eased);\n let opacity = min(progress / 0.2, 1.0) * mix(0.8, 1.0, eased) * clamp(frame.pointer.w, 0.0, 1.0);\n let q = in.local;\n let d = length(q) - radius;\n let rim = mix(frame.holdRim, frame.holdInk, eased);\n // The rim is drawn inside the ring's edge, so a heavier one does not grow it.\n let half = frame.holdShape.x * 0.5;\n var out = vec4f(0.0);\n out = over(out, premul(frame.holdFill) * cov(d) * opacity);\n out = over(out, premul(rim) * cov(abs(d + half) - half) * opacity);\n out = over(out, premul(frame.holdInk) * cov(length(q) - frame.holdShape.y) * opacity);\n return out;\n}\n";
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=hub.wgsl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hub.wgsl.d.ts","sourceRoot":"","sources":["../../../../../src/views/swarm/gpu/shaders/hub.wgsl.ts"],"names":[],"mappings":";AAGA,wBA2CE"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// The shader as a string module, so the package needs no bundler loader
|
|
2
|
+
// (esbuild in Godview, Vite in VibeField, tsc in both). `hub.wgsl` beside it
|
|
3
|
+
// is the authoring copy; `shaders.test.ts` keeps the two identical.
|
|
4
|
+
export default `// The hold ring, and the spawn bloom's hub: drawn LAST, above the bodies, their
|
|
5
|
+
// type and the clearings, so the press point is never lost under anything the
|
|
6
|
+
// field draws (record §2.8). 16px at the end of the hold, reached out-cubic from
|
|
7
|
+
// 55%; the theme's surface at 74%, a rim that climbs from the supporting ink to
|
|
8
|
+
// the full ink, and a dot. The frozen hub is the ring's final look (progress 1),
|
|
9
|
+
// drawn heavier (\`holdShape\`: a 1 px rim and 2 px dot in flight, 1.5 and 2.5 as
|
|
10
|
+
// the hub), and \`pointer.w\` scales all of it as the bloom closes. One quad.
|
|
11
|
+
|
|
12
|
+
const HUB_RADIUS: f32 = 16.0;
|
|
13
|
+
// Room past the ring for its rim's box filter.
|
|
14
|
+
const HUB_MARGIN: f32 = 2.0;
|
|
15
|
+
|
|
16
|
+
struct HubVertex {
|
|
17
|
+
@builtin(position) position: vec4f,
|
|
18
|
+
@location(0) local: vec2f,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
@vertex
|
|
22
|
+
fn vs(@builtin(vertex_index) vertex: u32) -> HubVertex {
|
|
23
|
+
var out: HubVertex;
|
|
24
|
+
out.local = quadCorner(vertex) * (HUB_RADIUS + HUB_MARGIN);
|
|
25
|
+
out.position = cssToClip(frame.pointer.xy + out.local);
|
|
26
|
+
return out;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@fragment
|
|
30
|
+
fn fs(in: HubVertex) -> @location(0) vec4f {
|
|
31
|
+
let progress = clamp(frame.pointer.z, 0.0, 1.0);
|
|
32
|
+
let rest = 1.0 - progress;
|
|
33
|
+
let eased = 1.0 - rest * rest * rest;
|
|
34
|
+
let radius = HUB_RADIUS * mix(0.55, 1.0, eased);
|
|
35
|
+
let opacity = min(progress / 0.2, 1.0) * mix(0.8, 1.0, eased) * clamp(frame.pointer.w, 0.0, 1.0);
|
|
36
|
+
let q = in.local;
|
|
37
|
+
let d = length(q) - radius;
|
|
38
|
+
let rim = mix(frame.holdRim, frame.holdInk, eased);
|
|
39
|
+
// The rim is drawn inside the ring's edge, so a heavier one does not grow it.
|
|
40
|
+
let half = frame.holdShape.x * 0.5;
|
|
41
|
+
var out = vec4f(0.0);
|
|
42
|
+
out = over(out, premul(frame.holdFill) * cov(d) * opacity);
|
|
43
|
+
out = over(out, premul(rim) * cov(abs(d + half) - half) * opacity);
|
|
44
|
+
out = over(out, premul(frame.holdInk) * cov(length(q) - frame.holdShape.y) * opacity);
|
|
45
|
+
return out;
|
|
46
|
+
}
|
|
47
|
+
`;
|
|
48
|
+
//# sourceMappingURL=hub.wgsl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hub.wgsl.js","sourceRoot":"","sources":["../../../../../src/views/swarm/gpu/shaders/hub.wgsl.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,6EAA6E;AAC7E,oEAAoE;AACpE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2Cd,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: "// Under the bodies: a working body's resting drop shadow, breathing between a\n// rest and a peak layer over three seconds, a gaussian occupancy of the disc,\n// which is what CSS box-shadow is.\n\nconst SHADOW_MARGIN: f32 = 40.0;\n\n@vertex\nfn vs(@builtin(vertex_index) vertex: u32, @builtin(instance_index) instance: u32) -> BodyVertex {\n let flags = bodies[instance].flags.x;\n return bodyQuad(vertex, instance, SHADOW_MARGIN, has(flags, F_SHADOW));\n}\n\n@fragment\nfn fs(in: BodyVertex) -> @location(0) vec4f {\n let body = bodies[in.index];\n let flags = body.flags.x;\n let r = body.posRadius.z * body.posRadius.w;\n let p = in.local;\n let time = frame.viewport.w;\n var out = vec4f(0.0);\n\n if (has(flags, F_SHADOW)) {\n let k = (0.5 - 0.5 * cos(time * TAU / 3.0 + body.motion.y)) * frame.params.y;\n let opacity = body.motion.w;\n let rest = occupancy(length(p - vec2f(0.0, 8.0)) - r, 2.5) * frame.shadow.a * (1.0 - k) * opacity;\n let peak = occupancy(length(p - vec2f(0.0, 12.0)) - r, 4.25) * frame.shadowPeak.a * k * opacity;\n out = over(out, premul(vec4f(frame.shadow.rgb, rest)));\n out = over(out, premul(vec4f(frame.shadow.rgb, peak)));\n }\n\n return out;\n}\n";
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=shadow.wgsl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadow.wgsl.d.ts","sourceRoot":"","sources":["../../../../../src/views/swarm/gpu/shaders/shadow.wgsl.ts"],"names":[],"mappings":";AAGA,wBAgCE"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// The shader as a string module, so the package needs no bundler loader
|
|
2
|
+
// (esbuild in Godview, Vite in VibeField, tsc in both). `shadow.wgsl` beside it
|
|
3
|
+
// is the authoring copy; `shaders.test.ts` keeps the two identical.
|
|
4
|
+
export default `// Under the bodies: a working body's resting drop shadow, breathing between a
|
|
5
|
+
// rest and a peak layer over three seconds, a gaussian occupancy of the disc,
|
|
6
|
+
// which is what CSS box-shadow is.
|
|
7
|
+
|
|
8
|
+
const SHADOW_MARGIN: f32 = 40.0;
|
|
9
|
+
|
|
10
|
+
@vertex
|
|
11
|
+
fn vs(@builtin(vertex_index) vertex: u32, @builtin(instance_index) instance: u32) -> BodyVertex {
|
|
12
|
+
let flags = bodies[instance].flags.x;
|
|
13
|
+
return bodyQuad(vertex, instance, SHADOW_MARGIN, has(flags, F_SHADOW));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@fragment
|
|
17
|
+
fn fs(in: BodyVertex) -> @location(0) vec4f {
|
|
18
|
+
let body = bodies[in.index];
|
|
19
|
+
let flags = body.flags.x;
|
|
20
|
+
let r = body.posRadius.z * body.posRadius.w;
|
|
21
|
+
let p = in.local;
|
|
22
|
+
let time = frame.viewport.w;
|
|
23
|
+
var out = vec4f(0.0);
|
|
24
|
+
|
|
25
|
+
if (has(flags, F_SHADOW)) {
|
|
26
|
+
let k = (0.5 - 0.5 * cos(time * TAU / 3.0 + body.motion.y)) * frame.params.y;
|
|
27
|
+
let opacity = body.motion.w;
|
|
28
|
+
let rest = occupancy(length(p - vec2f(0.0, 8.0)) - r, 2.5) * frame.shadow.a * (1.0 - k) * opacity;
|
|
29
|
+
let peak = occupancy(length(p - vec2f(0.0, 12.0)) - r, 4.25) * frame.shadowPeak.a * k * opacity;
|
|
30
|
+
out = over(out, premul(vec4f(frame.shadow.rgb, rest)));
|
|
31
|
+
out = over(out, premul(vec4f(frame.shadow.rgb, peak)));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return out;
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
//# sourceMappingURL=shadow.wgsl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadow.wgsl.js","sourceRoot":"","sources":["../../../../../src/views/swarm/gpu/shaders/shadow.wgsl.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,gFAAgF;AAChF,oEAAoE;AACpE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCd,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: "// Glyphs and marks, one quad each, tinted by the instance. Type comes from the\n// rasterised atlas as coverage; vendor marks come from the signed-distance\n// atlas and are reconstructed at any size from the field.\n\nstruct Glyph {\n // x, y, width, height (CSS px)\n rect: vec4f,\n uv: vec4f,\n color: vec4f,\n // x: 0 = coverage from the glyph atlas, 1 = signed distance from the marks;\n // y: the field's px range on screen (pxRange \u00D7 quad px / tile texels)\n params: vec4f,\n};\n\n@group(1) @binding(0) var<storage, read> glyphs: array<Glyph>;\n@group(1) @binding(1) var atlas: texture_2d<f32>;\n@group(1) @binding(2) var atlasSampler: sampler;\n@group(1) @binding(3) var marks: texture_2d<f32>;\n\nstruct GlyphVertex {\n @builtin(position) position: vec4f,\n @location(0) uv: vec2f,\n @location(1) @interpolate(flat) index: u32,\n};\n\n@vertex\nfn vs(@builtin(vertex_index) vertex: u32, @builtin(instance_index) instance: u32) -> GlyphVertex {\n let glyph = glyphs[instance];\n let corner = quadCorner(vertex) * 0.5 + 0.5;\n var out: GlyphVertex;\n out.position = cssToClip(glyph.rect.xy + corner * glyph.rect.zw);\n out.uv = mix(glyph.uv.xy, glyph.uv.zw, corner);\n out.index = instance;\n return out;\n}\n\n@fragment\nfn fs(in: GlyphVertex) -> @location(0) vec4f {\n let glyph = glyphs[in.index];\n // Both taps stay in uniform control flow; the select picks one.\n let alpha = textureSample(atlas, atlasSampler, in.uv).a;\n let field = textureSample(marks, atlasSampler, in.uv).r;\n let fromField = clamp(glyph.params.y * (field - 0.5) + 0.5, 0.0, 1.0);\n let coverage = select(alpha, fromField, glyph.params.x > 0.5);\n return premul(glyph.color) * coverage;\n}\n";
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=text.wgsl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.wgsl.d.ts","sourceRoot":"","sources":["../../../../../src/views/swarm/gpu/shaders/text.wgsl.ts"],"names":[],"mappings":";AAGA,wBA8CE"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// The shader as a string module, so the package needs no bundler loader
|
|
2
|
+
// (esbuild in Godview, Vite in VibeField, tsc in both). `text.wgsl` beside it
|
|
3
|
+
// is the authoring copy; `shaders.test.ts` keeps the two identical.
|
|
4
|
+
export default `// Glyphs and marks, one quad each, tinted by the instance. Type comes from the
|
|
5
|
+
// rasterised atlas as coverage; vendor marks come from the signed-distance
|
|
6
|
+
// atlas and are reconstructed at any size from the field.
|
|
7
|
+
|
|
8
|
+
struct Glyph {
|
|
9
|
+
// x, y, width, height (CSS px)
|
|
10
|
+
rect: vec4f,
|
|
11
|
+
uv: vec4f,
|
|
12
|
+
color: vec4f,
|
|
13
|
+
// x: 0 = coverage from the glyph atlas, 1 = signed distance from the marks;
|
|
14
|
+
// y: the field's px range on screen (pxRange × quad px / tile texels)
|
|
15
|
+
params: vec4f,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
@group(1) @binding(0) var<storage, read> glyphs: array<Glyph>;
|
|
19
|
+
@group(1) @binding(1) var atlas: texture_2d<f32>;
|
|
20
|
+
@group(1) @binding(2) var atlasSampler: sampler;
|
|
21
|
+
@group(1) @binding(3) var marks: texture_2d<f32>;
|
|
22
|
+
|
|
23
|
+
struct GlyphVertex {
|
|
24
|
+
@builtin(position) position: vec4f,
|
|
25
|
+
@location(0) uv: vec2f,
|
|
26
|
+
@location(1) @interpolate(flat) index: u32,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
@vertex
|
|
30
|
+
fn vs(@builtin(vertex_index) vertex: u32, @builtin(instance_index) instance: u32) -> GlyphVertex {
|
|
31
|
+
let glyph = glyphs[instance];
|
|
32
|
+
let corner = quadCorner(vertex) * 0.5 + 0.5;
|
|
33
|
+
var out: GlyphVertex;
|
|
34
|
+
out.position = cssToClip(glyph.rect.xy + corner * glyph.rect.zw);
|
|
35
|
+
out.uv = mix(glyph.uv.xy, glyph.uv.zw, corner);
|
|
36
|
+
out.index = instance;
|
|
37
|
+
return out;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@fragment
|
|
41
|
+
fn fs(in: GlyphVertex) -> @location(0) vec4f {
|
|
42
|
+
let glyph = glyphs[in.index];
|
|
43
|
+
// Both taps stay in uniform control flow; the select picks one.
|
|
44
|
+
let alpha = textureSample(atlas, atlasSampler, in.uv).a;
|
|
45
|
+
let field = textureSample(marks, atlasSampler, in.uv).r;
|
|
46
|
+
let fromField = clamp(glyph.params.y * (field - 0.5) + 0.5, 0.0, 1.0);
|
|
47
|
+
let coverage = select(alpha, fromField, glyph.params.x > 0.5);
|
|
48
|
+
return premul(glyph.color) * coverage;
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
//# sourceMappingURL=text.wgsl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.wgsl.js","sourceRoot":"","sources":["../../../../../src/views/swarm/gpu/shaders/text.wgsl.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,8EAA8E;AAC9E,oEAAoE;AACpE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8Cd,CAAC"}
|