@supersoniks/concorde 4.9.98-visual-stack.0 → 4.9.98-visual-stack.2
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/.gitlab-ci.yml +0 -13
- package/build-infos.json +1 -1
- package/concorde-3d.bundle.js +201 -152
- package/concorde-3d.es.js +14688 -13906
- package/concorde-core.bundle.js +557 -622
- package/concorde-core.es.js +6025 -5575
- package/concorde-hugging-face-infer.bundle.js +1 -1
- package/concorde-hugging-face-infer.es.js +1 -1
- package/concorde-interactive.bundle.js +1162 -0
- package/concorde-interactive.es.js +10723 -0
- package/concorde-shader.bundle.js +31 -20
- package/concorde-shader.es.js +2773 -2547
- package/concorde-webgpu.bundle.js +43 -32
- package/concorde-webgpu.es.js +1819 -1553
- package/dist/concorde-3d.bundle.js +201 -152
- package/dist/concorde-3d.es.js +14688 -13906
- package/dist/concorde-core.bundle.js +557 -622
- package/dist/concorde-core.es.js +6025 -5575
- package/dist/concorde-hugging-face-infer.bundle.js +1 -1
- package/dist/concorde-hugging-face-infer.es.js +1 -1
- package/dist/concorde-interactive.bundle.js +1162 -0
- package/dist/concorde-interactive.es.js +10723 -0
- package/dist/concorde-shader.bundle.js +31 -20
- package/dist/concorde-shader.es.js +2773 -2547
- package/dist/concorde-webgpu.bundle.js +43 -32
- package/dist/concorde-webgpu.es.js +1819 -1553
- package/dist/docs-mock-api-sw.js +5 -1
- package/dist/docs-mock-api-sw.js.map +2 -2
- package/dist/js/addons/interactive.js +6 -0
- package/dist/js/addons/interactive.js.map +1 -0
- package/dist/js/core/components/functional/3d/3d.js +90 -2
- package/dist/js/core/components/functional/3d/3d.js.map +1 -1
- package/dist/js/core/components/functional/3d/constants.js +1 -0
- package/dist/js/core/components/functional/3d/constants.js.map +1 -1
- package/dist/js/core/components/functional/3d/ensure.js +6 -3
- package/dist/js/core/components/functional/3d/ensure.js.map +1 -1
- package/dist/js/core/components/functional/3d/form-params.js +2 -0
- package/dist/js/core/components/functional/3d/form-params.js.map +1 -1
- package/dist/js/core/components/functional/3d/life.js +2 -1
- package/dist/js/core/components/functional/3d/life.js.map +1 -1
- package/dist/js/core/components/functional/3d/out-publish.js +3 -2
- package/dist/js/core/components/functional/3d/out-publish.js.map +1 -1
- package/dist/js/core/components/functional/3d/playback.js +6 -1
- package/dist/js/core/components/functional/3d/playback.js.map +1 -1
- package/dist/js/core/components/functional/3d/post-bind.js +207 -0
- package/dist/js/core/components/functional/3d/post-bind.js.map +1 -0
- package/dist/js/core/components/functional/3d/post-channels.js +39 -0
- package/dist/js/core/components/functional/3d/post-channels.js.map +1 -0
- package/dist/js/core/components/functional/3d/post-fx.js +495 -0
- package/dist/js/core/components/functional/3d/post-fx.js.map +1 -0
- package/dist/js/core/components/functional/3d/props.js +142 -0
- package/dist/js/core/components/functional/3d/props.js.map +1 -1
- package/dist/js/core/components/functional/3d/reload.js +2 -0
- package/dist/js/core/components/functional/3d/reload.js.map +1 -1
- package/dist/js/core/components/functional/3d/runtime.js +80 -3
- package/dist/js/core/components/functional/3d/runtime.js.map +1 -1
- package/dist/js/core/components/functional/3d/scene-runtime.js +1 -1
- package/dist/js/core/components/functional/3d/scene-runtime.js.map +1 -1
- package/dist/js/core/components/functional/3d/tune.js +21 -0
- package/dist/js/core/components/functional/3d/tune.js.map +1 -1
- package/dist/js/core/components/functional/3d/updated.js +13 -1
- package/dist/js/core/components/functional/3d/updated.js.map +1 -1
- package/dist/js/core/components/functional/if/if.js +65 -7
- package/dist/js/core/components/functional/if/if.js.map +1 -1
- package/dist/js/core/components/functional/interactive/action.js +96 -0
- package/dist/js/core/components/functional/interactive/action.js.map +1 -0
- package/dist/js/core/components/functional/interactive/gamepad.js +206 -0
- package/dist/js/core/components/functional/interactive/gamepad.js.map +1 -0
- package/dist/js/core/components/functional/interactive/gesture.js +148 -0
- package/dist/js/core/components/functional/interactive/gesture.js.map +1 -0
- package/dist/js/core/components/functional/interactive/helpers.js +82 -0
- package/dist/js/core/components/functional/interactive/helpers.js.map +1 -0
- package/dist/js/core/components/functional/interactive/index.js +20 -0
- package/dist/js/core/components/functional/interactive/index.js.map +1 -0
- package/dist/js/core/components/functional/interactive/keyboard.js +183 -0
- package/dist/js/core/components/functional/interactive/keyboard.js.map +1 -0
- package/dist/js/core/components/functional/interactive/matrix.js +201 -0
- package/dist/js/core/components/functional/interactive/matrix.js.map +1 -0
- package/dist/js/core/components/functional/interactive/registry.js +28 -0
- package/dist/js/core/components/functional/interactive/registry.js.map +1 -0
- package/dist/js/core/components/functional/interactive/store.js +264 -0
- package/dist/js/core/components/functional/interactive/store.js.map +1 -0
- package/dist/js/core/components/functional/interactive/ticker.js +182 -0
- package/dist/js/core/components/functional/interactive/ticker.js.map +1 -0
- package/dist/js/core/components/functional/shader/gl-runtime.js +128 -14
- package/dist/js/core/components/functional/shader/gl-runtime.js.map +1 -1
- package/dist/js/core/components/functional/shader/shader.js +154 -57
- package/dist/js/core/components/functional/shader/shader.js.map +1 -1
- package/dist/js/core/components/functional/shader/shadertoy-prelude.js +39 -5
- package/dist/js/core/components/functional/shader/shadertoy-prelude.js.map +1 -1
- package/dist/js/core/components/functional/shader/types.js +58 -7
- package/dist/js/core/components/functional/shader/types.js.map +1 -1
- package/dist/js/core/components/functional/value/value.js +49 -4
- package/dist/js/core/components/functional/value/value.js.map +1 -1
- package/dist/js/core/components/functional/webgpu/gl-fallback.js +27 -6
- package/dist/js/core/components/functional/webgpu/gl-fallback.js.map +1 -1
- package/dist/js/core/components/functional/webgpu/gpu-runtime.js +115 -13
- package/dist/js/core/components/functional/webgpu/gpu-runtime.js.map +1 -1
- package/dist/js/core/components/functional/webgpu/helpers.js +8 -2
- package/dist/js/core/components/functional/webgpu/helpers.js.map +1 -1
- package/dist/js/core/components/functional/webgpu/webgpu.js +34 -1
- package/dist/js/core/components/functional/webgpu/webgpu.js.map +1 -1
- package/dist/js/core/components/ui/_css/rounded.js +34 -0
- package/dist/js/core/components/ui/_css/rounded.js.map +1 -0
- package/dist/js/core/components/ui/_css/type.js +44 -0
- package/dist/js/core/components/ui/_css/type.js.map +1 -1
- package/dist/js/core/components/ui/_i18n/ui-aria-labels.js +95 -0
- package/dist/js/core/components/ui/_i18n/ui-aria-labels.js.map +1 -0
- package/dist/js/core/components/ui/alert/alert.js +72 -87
- package/dist/js/core/components/ui/alert/alert.js.map +1 -1
- package/dist/js/core/components/ui/alert-messages/alert-messages.js +1 -0
- package/dist/js/core/components/ui/alert-messages/alert-messages.js.map +1 -1
- package/dist/js/core/components/ui/badge/badge.js +29 -80
- package/dist/js/core/components/ui/badge/badge.js.map +1 -1
- package/dist/js/core/components/ui/button/button.js +8 -7
- package/dist/js/core/components/ui/button/button.js.map +1 -1
- package/dist/js/core/components/ui/card/card-header.js +7 -2
- package/dist/js/core/components/ui/card/card-header.js.map +1 -1
- package/dist/js/core/components/ui/divider/divider.js +1 -1
- package/dist/js/core/components/ui/divider/divider.js.map +1 -1
- package/dist/js/core/components/ui/form/checkbox/checkbox.js +4 -20
- package/dist/js/core/components/ui/form/checkbox/checkbox.js.map +1 -1
- package/dist/js/core/components/ui/form/fieldset/legend-description.js +1 -1
- package/dist/js/core/components/ui/form/fieldset/legend.js +1 -1
- package/dist/js/core/components/ui/form/input/input.js +12 -15
- package/dist/js/core/components/ui/form/input/input.js.map +1 -1
- package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js +363 -158
- package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js.map +1 -1
- package/dist/js/core/components/ui/form/radio/radio.js +1 -1
- package/dist/js/core/components/ui/form/select/select.js +3 -6
- package/dist/js/core/components/ui/form/select/select.js.map +1 -1
- package/dist/js/core/components/ui/form/textarea/textarea.js +1 -2
- package/dist/js/core/components/ui/form/textarea/textarea.js.map +1 -1
- package/dist/js/core/components/ui/image/image.js +9 -37
- package/dist/js/core/components/ui/image/image.js.map +1 -1
- package/dist/js/core/components/ui/link/link.js +25 -26
- package/dist/js/core/components/ui/link/link.js.map +1 -1
- package/dist/js/core/components/ui/modal/modal-close.js +3 -12
- package/dist/js/core/components/ui/modal/modal-close.js.map +1 -1
- package/dist/js/core/components/ui/modal/modal.js +18 -18
- package/dist/js/core/components/ui/modal/modal.js.map +1 -1
- package/dist/js/core/components/ui/pop/pop.js +131 -112
- package/dist/js/core/components/ui/pop/pop.js.map +1 -1
- package/dist/js/core/components/ui/table/table.js.map +1 -1
- package/dist/js/core/components/ui/theme/theme.js +1 -1
- package/dist/js/core/components/ui/toast/dismissed.js +9 -0
- package/dist/js/core/components/ui/toast/dismissed.js.map +1 -0
- package/dist/js/core/components/ui/toast/render-content.js +14 -0
- package/dist/js/core/components/ui/toast/render-content.js.map +1 -0
- package/dist/js/core/components/ui/toast/toast-item.js +150 -96
- package/dist/js/core/components/ui/toast/toast-item.js.map +1 -1
- package/dist/js/core/components/ui/toast/toast.js +41 -13
- package/dist/js/core/components/ui/toast/toast.js.map +1 -1
- package/dist/js/core/components/ui/tooltip/tooltip.js +144 -143
- package/dist/js/core/components/ui/tooltip/tooltip.js.map +1 -1
- package/dist/js/core/decorators/subscriber/ancestorAttribute.js.map +1 -1
- package/dist/js/core/decorators/subscriber/derive.js +3 -1
- package/dist/js/core/decorators/subscriber/derive.js.map +1 -1
- package/dist/js/core/mixins/Fetcher.js.map +1 -1
- package/dist/js/core/mixins/FormCheckable.js +1 -8
- package/dist/js/core/mixins/FormCheckable.js.map +1 -1
- package/dist/js/core/mixins/FormElement.js +26 -53
- package/dist/js/core/mixins/FormElement.js.map +1 -1
- package/dist/js/core/utils/AncestorAttributeObserver.js +130 -55
- package/dist/js/core/utils/AncestorAttributeObserver.js.map +1 -1
- package/dist/js/core/utils/LocationHandler.js +1 -1
- package/dist/js/core/utils/LocationHandler.js.map +1 -1
- package/dist/js/core/utils/dismissed.js +23 -0
- package/dist/js/core/utils/dismissed.js.map +1 -0
- package/dist/js/core/utils/mediaRef.js +37 -0
- package/dist/js/core/utils/mediaRef.js.map +1 -1
- package/dist/js/core/utils/positioning.js +110 -0
- package/dist/js/core/utils/positioning.js.map +1 -0
- package/dist/js/directives.js +1 -2
- package/dist/js/directives.js.map +1 -1
- package/dist/types/addons/interactive.d.ts +6 -0
- package/dist/types/addons/interactive.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/3d.d.ts +26 -3
- package/dist/types/core/components/functional/3d/3d.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/constants.d.ts +1 -1
- package/dist/types/core/components/functional/3d/constants.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/ensure.d.ts +3 -0
- package/dist/types/core/components/functional/3d/ensure.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/form-params.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/life.d.ts +2 -0
- package/dist/types/core/components/functional/3d/life.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/out-publish.d.ts +1 -0
- package/dist/types/core/components/functional/3d/out-publish.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/playback.d.ts +9 -0
- package/dist/types/core/components/functional/3d/playback.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/post-bind.d.ts +52 -0
- package/dist/types/core/components/functional/3d/post-bind.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/post-channels.d.ts +40 -0
- package/dist/types/core/components/functional/3d/post-channels.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/post-fx.d.ts +73 -0
- package/dist/types/core/components/functional/3d/post-fx.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/props.d.ts +42 -0
- package/dist/types/core/components/functional/3d/props.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/reload.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/runtime.d.ts +16 -1
- package/dist/types/core/components/functional/3d/runtime.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/scene-runtime.d.ts +1 -1
- package/dist/types/core/components/functional/3d/scene-runtime.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/tune.d.ts +5 -0
- package/dist/types/core/components/functional/3d/tune.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/types.d.ts +9 -0
- package/dist/types/core/components/functional/3d/types.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/updated.d.ts.map +1 -1
- package/dist/types/core/components/functional/if/if.d.ts +14 -5
- package/dist/types/core/components/functional/if/if.d.ts.map +1 -1
- package/dist/types/core/components/functional/interactive/action.d.ts +22 -0
- package/dist/types/core/components/functional/interactive/action.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/gamepad.d.ts +37 -0
- package/dist/types/core/components/functional/interactive/gamepad.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/gesture.d.ts +26 -0
- package/dist/types/core/components/functional/interactive/gesture.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/helpers.d.ts +23 -0
- package/dist/types/core/components/functional/interactive/helpers.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/index.d.ts +20 -0
- package/dist/types/core/components/functional/interactive/index.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/keyboard.d.ts +37 -0
- package/dist/types/core/components/functional/interactive/keyboard.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/matrix.d.ts +31 -0
- package/dist/types/core/components/functional/interactive/matrix.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/registry.d.ts +23 -0
- package/dist/types/core/components/functional/interactive/registry.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/store.d.ts +46 -0
- package/dist/types/core/components/functional/interactive/store.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/ticker.d.ts +33 -0
- package/dist/types/core/components/functional/interactive/ticker.d.ts.map +1 -0
- package/dist/types/core/components/functional/shader/gl-runtime.d.ts +33 -1
- package/dist/types/core/components/functional/shader/gl-runtime.d.ts.map +1 -1
- package/dist/types/core/components/functional/shader/shader.d.ts +28 -7
- package/dist/types/core/components/functional/shader/shader.d.ts.map +1 -1
- package/dist/types/core/components/functional/shader/shadertoy-prelude.d.ts +16 -2
- package/dist/types/core/components/functional/shader/shadertoy-prelude.d.ts.map +1 -1
- package/dist/types/core/components/functional/shader/types.d.ts +29 -5
- package/dist/types/core/components/functional/shader/types.d.ts.map +1 -1
- package/dist/types/core/components/functional/value/value.d.ts +6 -0
- package/dist/types/core/components/functional/value/value.d.ts.map +1 -1
- package/dist/types/core/components/functional/webgpu/gl-fallback.d.ts +4 -0
- package/dist/types/core/components/functional/webgpu/gl-fallback.d.ts.map +1 -1
- package/dist/types/core/components/functional/webgpu/gpu-runtime.d.ts +14 -0
- package/dist/types/core/components/functional/webgpu/gpu-runtime.d.ts.map +1 -1
- package/dist/types/core/components/functional/webgpu/helpers.d.ts +1 -0
- package/dist/types/core/components/functional/webgpu/helpers.d.ts.map +1 -1
- package/dist/types/core/components/functional/webgpu/webgpu.d.ts +7 -1
- package/dist/types/core/components/functional/webgpu/webgpu.d.ts.map +1 -1
- package/dist/types/core/components/ui/_css/rounded.d.ts +3 -0
- package/dist/types/core/components/ui/_css/rounded.d.ts.map +1 -0
- package/dist/types/core/components/ui/_css/type.d.ts +13 -0
- package/dist/types/core/components/ui/_css/type.d.ts.map +1 -1
- package/dist/types/core/components/ui/_i18n/ui-aria-labels.d.ts +83 -0
- package/dist/types/core/components/ui/_i18n/ui-aria-labels.d.ts.map +1 -0
- package/dist/types/core/components/ui/alert/alert.d.ts +14 -12
- package/dist/types/core/components/ui/alert/alert.d.ts.map +1 -1
- package/dist/types/core/components/ui/alert-messages/alert-messages.d.ts.map +1 -1
- package/dist/types/core/components/ui/badge/badge.d.ts +1 -1
- package/dist/types/core/components/ui/badge/badge.d.ts.map +1 -1
- package/dist/types/core/components/ui/button/button.d.ts +13 -29
- package/dist/types/core/components/ui/button/button.d.ts.map +1 -1
- package/dist/types/core/components/ui/card/card-header.d.ts.map +1 -1
- package/dist/types/core/components/ui/divider/divider.d.ts +2 -1
- package/dist/types/core/components/ui/divider/divider.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts +25 -73
- package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/input/input.d.ts +14 -29
- package/dist/types/core/components/ui/form/input/input.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +63 -65
- package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/radio/radio.d.ts +1 -1
- package/dist/types/core/components/ui/form/select/select.d.ts +3 -5
- package/dist/types/core/components/ui/form/select/select.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/textarea/textarea.d.ts +12 -28
- package/dist/types/core/components/ui/form/textarea/textarea.d.ts.map +1 -1
- package/dist/types/core/components/ui/image/image.d.ts +2 -1
- package/dist/types/core/components/ui/image/image.d.ts.map +1 -1
- package/dist/types/core/components/ui/link/link.d.ts +10 -9
- package/dist/types/core/components/ui/link/link.d.ts.map +1 -1
- package/dist/types/core/components/ui/modal/modal-close.d.ts +2 -2
- package/dist/types/core/components/ui/modal/modal-close.d.ts.map +1 -1
- package/dist/types/core/components/ui/pop/pop.d.ts +12 -4
- package/dist/types/core/components/ui/pop/pop.d.ts.map +1 -1
- package/dist/types/core/components/ui/table/table.d.ts +2 -1
- package/dist/types/core/components/ui/table/table.d.ts.map +1 -1
- package/dist/types/core/components/ui/toast/dismissed.d.ts +3 -0
- package/dist/types/core/components/ui/toast/dismissed.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/render-content.d.ts +7 -0
- package/dist/types/core/components/ui/toast/render-content.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/toast-item.d.ts +26 -9
- package/dist/types/core/components/ui/toast/toast-item.d.ts.map +1 -1
- package/dist/types/core/components/ui/toast/toast.d.ts +6 -3
- package/dist/types/core/components/ui/toast/toast.d.ts.map +1 -1
- package/dist/types/core/components/ui/toast/types.d.ts +12 -2
- package/dist/types/core/components/ui/toast/types.d.ts.map +1 -1
- package/dist/types/core/components/ui/tooltip/tooltip.d.ts +19 -11
- package/dist/types/core/components/ui/tooltip/tooltip.d.ts.map +1 -1
- package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts +3 -4
- package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts.map +1 -1
- package/dist/types/core/decorators/subscriber/derive.d.ts.map +1 -1
- package/dist/types/core/mixins/FormCheckable.d.ts +10 -27
- package/dist/types/core/mixins/FormCheckable.d.ts.map +1 -1
- package/dist/types/core/mixins/FormElement.d.ts +21 -10
- package/dist/types/core/mixins/FormElement.d.ts.map +1 -1
- package/dist/types/core/mixins/FormInput.d.ts +11 -27
- package/dist/types/core/mixins/FormInput.d.ts.map +1 -1
- package/dist/types/core/utils/AncestorAttributeObserver.d.ts +17 -9
- package/dist/types/core/utils/AncestorAttributeObserver.d.ts.map +1 -1
- package/dist/types/core/utils/LocationHandler.d.ts +3 -2
- package/dist/types/core/utils/LocationHandler.d.ts.map +1 -1
- package/dist/types/core/utils/dismissed.d.ts +3 -0
- package/dist/types/core/utils/dismissed.d.ts.map +1 -0
- package/dist/types/core/utils/mediaRef.d.ts +15 -0
- package/dist/types/core/utils/mediaRef.d.ts.map +1 -1
- package/dist/types/core/utils/positioning.d.ts +44 -0
- package/dist/types/core/utils/positioning.d.ts.map +1 -0
- package/dist/types/directives.d.ts +1 -3
- package/dist/types/directives.d.ts.map +1 -1
- package/dist/types/mixins.d.ts +22 -55
- package/dist/types/mixins.d.ts.map +1 -1
- package/docs/assets/{index-FmK4JaIM.js → index-D8MVWqY6.js} +946 -687
- package/docs/assets/index-DiD0qYvE.css +1 -0
- package/docs/crawl/core/components/ui/form/input-autocomplete/input-autocomplete.html +17 -85
- package/docs/crawl/docs/_misc/formelement-subscriber-removal.html +1 -1
- package/docs/crawl/hubs/form-components.html +13 -11
- package/docs/docs-mock-api-sw.js +5 -1
- package/docs/docs-mock-api-sw.js.map +2 -2
- package/docs/index.html +2 -2
- package/docs/llms-full.txt +12 -38
- package/docs/llms.txt +1 -1
- package/docs/src/core/components/functional/sdui/sdui.md +0 -0
- package/docs/src/core/components/ui/form/checkbox/checkbox.md +0 -0
- package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +14 -118
- package/docs/src/docs/_getting-started/create-a-component.md +0 -0
- package/docs/src/docs/_misc/formelement-subscriber-removal.md +1 -1
- package/docs/src/docs/search/docs-search.json +195 -200
- package/docs/src/tsconfig.json +324 -0
- package/gitlab/job_tests.sh +25 -12
- package/index.html +3 -3
- package/package.json +217 -9
- package/public/docs-mock-api-sw.js +5 -1
- package/public/docs-mock-api-sw.js.map +2 -2
- package/scripts/build-addons.mjs +2 -2
- package/scripts/post-build.mjs +9 -0
- package/src/addons/interactive.ts +5 -0
- package/src/core/components/functional/3d/3d.md +34 -1
- package/src/core/components/functional/3d/3d.spec.ts +42 -0
- package/src/core/components/functional/3d/3d.ts +101 -3
- package/src/core/components/functional/3d/constants.ts +1 -0
- package/src/core/components/functional/3d/ensure.ts +11 -3
- package/src/core/components/functional/3d/form-params.ts +2 -0
- package/src/core/components/functional/3d/life.ts +4 -1
- package/src/core/components/functional/3d/out-publish.ts +4 -3
- package/src/core/components/functional/3d/playback.ts +13 -1
- package/src/core/components/functional/3d/post-bind.ts +262 -0
- package/src/core/components/functional/3d/post-channels.spec.ts +36 -0
- package/src/core/components/functional/3d/post-channels.ts +69 -0
- package/src/core/components/functional/3d/post-fx.ts +594 -0
- package/src/core/components/functional/3d/props.ts +45 -0
- package/src/core/components/functional/3d/reload.ts +2 -0
- package/src/core/components/functional/3d/runtime.ts +93 -4
- package/src/core/components/functional/3d/scene-runtime.ts +3 -0
- package/src/core/components/functional/3d/tune.ts +21 -0
- package/src/core/components/functional/3d/types.ts +9 -0
- package/src/core/components/functional/3d/updated.ts +17 -1
- package/src/core/components/functional/if/if.ts +54 -7
- package/src/core/components/functional/interactive/action.ts +84 -0
- package/src/core/components/functional/interactive/gamepad.ts +197 -0
- package/src/core/components/functional/interactive/gesture.ts +136 -0
- package/src/core/components/functional/interactive/helpers.spec.ts +50 -0
- package/src/core/components/functional/interactive/helpers.ts +97 -0
- package/src/core/components/functional/interactive/index.ts +25 -0
- package/src/core/components/functional/interactive/interactive.md +33 -0
- package/src/core/components/functional/interactive/keyboard.ts +171 -0
- package/src/core/components/functional/interactive/matrix.ts +185 -0
- package/src/core/components/functional/interactive/registry.ts +46 -0
- package/src/core/components/functional/interactive/store.ts +264 -0
- package/src/core/components/functional/interactive/ticker.ts +171 -0
- package/src/core/components/functional/list/list.ts +0 -0
- package/src/core/components/functional/shader/gl-runtime.ts +169 -12
- package/src/core/components/functional/shader/shader.md +27 -4
- package/src/core/components/functional/shader/shader.spec.ts +267 -0
- package/src/core/components/functional/shader/shader.ts +177 -55
- package/src/core/components/functional/shader/shadertoy-prelude.ts +49 -5
- package/src/core/components/functional/shader/types.ts +89 -12
- package/src/core/components/functional/subscriber/subscriber.ts +0 -0
- package/src/core/components/functional/value/value.ts +44 -4
- package/src/core/components/functional/webgpu/gl-fallback.ts +28 -4
- package/src/core/components/functional/webgpu/gpu-runtime.ts +154 -18
- package/src/core/components/functional/webgpu/helpers.ts +8 -2
- package/src/core/components/functional/webgpu/webgpu.md +13 -2
- package/src/core/components/functional/webgpu/webgpu.spec.ts +37 -0
- package/src/core/components/functional/webgpu/webgpu.ts +39 -1
- package/src/core/components/ui/_css/rounded.ts +36 -0
- package/src/core/components/ui/_css/type.ts +49 -0
- package/src/core/components/ui/_i18n/ui-aria-labels.ts +104 -0
- package/src/core/components/ui/alert/alert.md +128 -72
- package/src/core/components/ui/alert/alert.spec.ts +145 -0
- package/src/core/components/ui/alert/alert.ts +86 -91
- package/src/core/components/ui/alert-messages/alert-messages.ts +1 -1
- package/src/core/components/ui/badge/badge.md +126 -78
- package/src/core/components/ui/badge/badge.ts +29 -81
- package/src/core/components/ui/button/button.md +1 -0
- package/src/core/components/ui/button/button.ts +12 -10
- package/src/core/components/ui/card/card-header.ts +7 -2
- package/src/core/components/ui/card/card.md +120 -65
- package/src/core/components/ui/divider/divider.ts +4 -9
- package/src/core/components/ui/form/checkbox/checkbox.md +1 -1
- package/src/core/components/ui/form/checkbox/checkbox.ts +4 -20
- package/src/core/components/ui/form/fieldset/legend-description.ts +1 -1
- package/src/core/components/ui/form/fieldset/legend.ts +1 -1
- package/src/core/components/ui/form/input/input.md +1 -1
- package/src/core/components/ui/form/input/input.ts +25 -27
- package/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +14 -118
- package/src/core/components/ui/form/input-autocomplete/input-autocomplete.ts +419 -187
- package/src/core/components/ui/form/radio/radio.ts +1 -1
- package/src/core/components/ui/form/select/select.ts +3 -6
- package/src/core/components/ui/form/textarea/textarea.md +1 -1
- package/src/core/components/ui/form/textarea/textarea.ts +1 -2
- package/src/core/components/ui/image/image.md +147 -53
- package/src/core/components/ui/image/image.ts +10 -44
- package/src/core/components/ui/link/link.md +2 -2
- package/src/core/components/ui/link/link.ts +42 -37
- package/src/core/components/ui/modal/modal-close.ts +8 -12
- package/src/core/components/ui/modal/modal.ts +18 -18
- package/src/core/components/ui/pop/pop.md +105 -1
- package/src/core/components/ui/pop/pop.ts +145 -141
- package/src/core/components/ui/table/table.ts +2 -8
- package/src/core/components/ui/theme/theme.ts +1 -1
- package/src/core/components/ui/toast/dismissed.ts +14 -0
- package/src/core/components/ui/toast/render-content.ts +13 -0
- package/src/core/components/ui/toast/toast-item.ts +179 -103
- package/src/core/components/ui/toast/toast.ts +58 -21
- package/src/core/components/ui/toast/types.ts +14 -2
- package/src/core/components/ui/tooltip/tooltip.ts +176 -154
- package/src/core/decorators/subscriber/ancestorAttribute.spec.ts +26 -0
- package/src/core/decorators/subscriber/ancestorAttribute.ts +3 -4
- package/src/core/decorators/subscriber/derive.ts +3 -3
- package/src/core/mixins/Fetcher.ts +1 -1
- package/src/core/mixins/FormCheckable.ts +1 -8
- package/src/core/mixins/FormElement.ts +74 -76
- package/src/core/mixins/Subscriber.ts +0 -0
- package/src/core/utils/AncestorAttributeObserver.ts +183 -70
- package/src/core/utils/DataBindObserver.ts +0 -0
- package/src/core/utils/LocationHandler.ts +12 -5
- package/src/core/utils/Objects.ts +0 -0
- package/src/core/utils/dismissed.ts +22 -0
- package/src/core/utils/mediaRef.spec.ts +25 -0
- package/src/core/utils/mediaRef.ts +45 -0
- package/src/core/utils/positioning.spec.ts +208 -0
- package/src/core/utils/positioning.ts +183 -0
- package/src/directives.ts +1 -3
- package/src/docs/_core-concept/dataFlow.md +1 -1
- package/src/docs/_decorators/ancestor-attribute.md +3 -2
- package/src/docs/_getting-started/concorde-outside.md +3 -3
- package/src/docs/_misc/formelement-subscriber-removal.md +115 -0
- package/src/docs/_misc/html-integration.md +2 -0
- package/src/docs/_misc/visual-stack.md +19 -1
- package/src/docs/code.ts +3 -1
- package/src/docs/components/docs-demo-sources.ts +88 -0
- package/src/docs/docs.ts +3 -0
- package/src/docs/example/docs-3d-post-depth-demo.ts +68 -0
- package/src/docs/example/docs-3d-webgpu-live-demo.ts +83 -0
- package/src/docs/example/docs-harris-webgpu-demo.ts +53 -55
- package/src/docs/example/docs-input-autocomplete-demos.ts +110 -0
- package/src/docs/mock-api/router.ts +17 -1
- package/src/docs/navigation/navigation.ts +4 -0
- package/src/docs/search/docs-search.json +922 -1762
- package/src/docs/tailwind/css/tailwind.css +13 -6
- package/src/tsconfig.json +162 -6
- package/src/tsconfig.tsbuildinfo +1 -1
- package/tailwind.config.js +50 -3
- package/vite/config.js +23 -35
- package/vite.config.mts +5 -0
- package/vitest.setup.ts +49 -13
- package/docs/assets/index-BZiZXMU-.css +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css, html, LitElement } from "lit";
|
|
2
2
|
import { customElement, property, state } from "lit/decorators.js";
|
|
3
3
|
import HTML from "@supersoniks/concorde/core/utils/HTML";
|
|
4
|
-
import { revokeMediaUrls, toMediaUrl, mediaElementKey, lookupLiveElement } from "@supersoniks/concorde/core/utils/mediaRef";
|
|
4
|
+
import { revokeMediaUrls, toMediaUrl, mediaElementKey, lookupLiveElement, FrameConsumerRegistry } from "@supersoniks/concorde/core/utils/mediaRef";
|
|
5
5
|
import { PublisherManager } from "@supersoniks/concorde/utils";
|
|
6
6
|
import {
|
|
7
7
|
parseChannelSource,
|
|
@@ -9,6 +9,8 @@ import {
|
|
|
9
9
|
} from "./gl-runtime";
|
|
10
10
|
import {
|
|
11
11
|
PassChannels,
|
|
12
|
+
ReleaseOffscreen,
|
|
13
|
+
ShaderBufferFormat,
|
|
12
14
|
ShaderCompileError,
|
|
13
15
|
ShaderExtractItem,
|
|
14
16
|
ShaderExtractOutput,
|
|
@@ -18,17 +20,61 @@ import {
|
|
|
18
20
|
ShaderRoi,
|
|
19
21
|
ShaderSources,
|
|
20
22
|
SonicShaderOutput,
|
|
23
|
+
channelsUseSelf,
|
|
21
24
|
findPeaks,
|
|
22
25
|
meanRgba,
|
|
26
|
+
parseBufferFormat,
|
|
23
27
|
parseExtractPass,
|
|
24
28
|
parseHoverParam,
|
|
29
|
+
parseReleaseOffscreen,
|
|
25
30
|
roiToPixels,
|
|
31
|
+
rgbaToUint8,
|
|
32
|
+
shouldReleaseWhenOffscreen,
|
|
26
33
|
} from "./types";
|
|
27
34
|
|
|
28
35
|
const tagName = "sonic-shader";
|
|
29
36
|
|
|
30
37
|
const MAX_PATCH_PX = 128;
|
|
31
38
|
|
|
39
|
+
/** Clés qui forcent une recompilation / recreate FBO. */
|
|
40
|
+
const PROGRAM_KEYS = [
|
|
41
|
+
"image",
|
|
42
|
+
"bufferA",
|
|
43
|
+
"bufferB",
|
|
44
|
+
"bufferC",
|
|
45
|
+
"bufferD",
|
|
46
|
+
"common",
|
|
47
|
+
"bufferFormat",
|
|
48
|
+
] as const;
|
|
49
|
+
|
|
50
|
+
/** Clés qui ne font que re-lier les textures (pas de rebuild). */
|
|
51
|
+
const CHANNEL_KEYS = [
|
|
52
|
+
"channel0",
|
|
53
|
+
"channel1",
|
|
54
|
+
"channel2",
|
|
55
|
+
"channel3",
|
|
56
|
+
"imageCh0",
|
|
57
|
+
"imageCh1",
|
|
58
|
+
"imageCh2",
|
|
59
|
+
"imageCh3",
|
|
60
|
+
"bufferACh0",
|
|
61
|
+
"bufferACh1",
|
|
62
|
+
"bufferACh2",
|
|
63
|
+
"bufferACh3",
|
|
64
|
+
"bufferBCh0",
|
|
65
|
+
"bufferBCh1",
|
|
66
|
+
"bufferBCh2",
|
|
67
|
+
"bufferBCh3",
|
|
68
|
+
"bufferCCh0",
|
|
69
|
+
"bufferCCh1",
|
|
70
|
+
"bufferCCh2",
|
|
71
|
+
"bufferCCh3",
|
|
72
|
+
"bufferDCh0",
|
|
73
|
+
"bufferDCh1",
|
|
74
|
+
"bufferDCh2",
|
|
75
|
+
"bufferDCh3",
|
|
76
|
+
] as const;
|
|
77
|
+
|
|
32
78
|
/**
|
|
33
79
|
* Champs méta publiés vers le out-dataProvider.
|
|
34
80
|
* `param0…3` sont exclus du gate « consommateur » : un `sonic-input name="param0"`
|
|
@@ -294,12 +340,32 @@ export class SonicShader extends LitElement {
|
|
|
294
340
|
/** Vitesse d’easing hover on/off (1/s, défaut 10). */
|
|
295
341
|
@property({ type: Number, attribute: "hover-speed" }) hoverSpeed = 10;
|
|
296
342
|
/**
|
|
297
|
-
*
|
|
298
|
-
*
|
|
343
|
+
* Hors viewport : libère textures/FBO (garde le contexte).
|
|
344
|
+
* `auto` (défaut) : ne libère pas si une passe lit `self`.
|
|
345
|
+
* `true` / `false` forcent le comportement.
|
|
299
346
|
*/
|
|
300
|
-
@property({
|
|
301
|
-
|
|
347
|
+
@property({
|
|
348
|
+
attribute: "release-offscreen",
|
|
349
|
+
converter: {
|
|
350
|
+
fromAttribute: (value: string | null) => parseReleaseOffscreen(value),
|
|
351
|
+
toAttribute: (value: ReleaseOffscreen) => {
|
|
352
|
+
if (value === "auto") return "auto";
|
|
353
|
+
if (value === false) return "false";
|
|
354
|
+
return "";
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
})
|
|
358
|
+
releaseOffscreen: ReleaseOffscreen = "auto";
|
|
302
359
|
@property({ type: Number, attribute: "dpr-max" }) dprMax = 2;
|
|
360
|
+
/**
|
|
361
|
+
* Format des buffers A–D : `rgba8` (défaut) | `rgba16f` | `rgba32f`.
|
|
362
|
+
* Attribut reflété `active-buffer-format` = format réellement utilisé.
|
|
363
|
+
*/
|
|
364
|
+
@property({ attribute: "buffer-format" })
|
|
365
|
+
bufferFormat: ShaderBufferFormat | string = "rgba8";
|
|
366
|
+
/** Format actif après repli éventuel (lecture seule, reflect). */
|
|
367
|
+
@property({ attribute: "active-buffer-format", reflect: true })
|
|
368
|
+
activeBufferFormat: ShaderBufferFormat = "rgba8";
|
|
303
369
|
|
|
304
370
|
/** Generic float uniforms `uParam0`…`uParam3` (no shader rebuild). */
|
|
305
371
|
@property({ type: Number, attribute: "param0" }) param0 = 0;
|
|
@@ -399,6 +465,9 @@ export class SonicShader extends LitElement {
|
|
|
399
465
|
private resizeObserver: ResizeObserver | null = null;
|
|
400
466
|
private intersectionObserver: IntersectionObserver | null = null;
|
|
401
467
|
private rebuildToken = 0;
|
|
468
|
+
/** Annule un `rebindChannels` en vol si rebuild / release intervient. */
|
|
469
|
+
private rebindToken = 0;
|
|
470
|
+
private frameConsumers = new FrameConsumerRegistry();
|
|
402
471
|
private ready = false;
|
|
403
472
|
private formPublisher: ReturnType<typeof PublisherManager.get> | null = null;
|
|
404
473
|
private outPublisher: ReturnType<typeof PublisherManager.get> | null = null;
|
|
@@ -479,9 +548,11 @@ export class SonicShader extends LitElement {
|
|
|
479
548
|
}
|
|
480
549
|
this.pendingRevokeUrls = [];
|
|
481
550
|
this.stopLoop();
|
|
551
|
+
this.frameConsumers.clear();
|
|
482
552
|
this.resizeObserver?.disconnect();
|
|
483
553
|
this.intersectionObserver?.disconnect();
|
|
484
554
|
this.rebuildToken++;
|
|
555
|
+
this.rebindToken++;
|
|
485
556
|
this.ready = false;
|
|
486
557
|
this.releasing = true;
|
|
487
558
|
this.runtime?.dispose(true); // libère le slot navigateur
|
|
@@ -505,7 +576,7 @@ export class SonicShader extends LitElement {
|
|
|
505
576
|
this.bindOutPublisher();
|
|
506
577
|
this.bindExtractPublisher();
|
|
507
578
|
requestAnimationFrame(() => {
|
|
508
|
-
if (this.inView || !this.
|
|
579
|
+
if (this.inView || !this.wantsReleaseOffscreen()) {
|
|
509
580
|
void this.ensureRuntime();
|
|
510
581
|
}
|
|
511
582
|
});
|
|
@@ -513,44 +584,19 @@ export class SonicShader extends LitElement {
|
|
|
513
584
|
|
|
514
585
|
protected updated(changed: Map<string, unknown>) {
|
|
515
586
|
if (!this.runtime) return;
|
|
516
|
-
const
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
"bufferB",
|
|
520
|
-
"bufferC",
|
|
521
|
-
"bufferD",
|
|
522
|
-
"common",
|
|
523
|
-
"channel0",
|
|
524
|
-
"channel1",
|
|
525
|
-
"channel2",
|
|
526
|
-
"channel3",
|
|
527
|
-
"imageCh0",
|
|
528
|
-
"imageCh1",
|
|
529
|
-
"imageCh2",
|
|
530
|
-
"imageCh3",
|
|
531
|
-
"bufferACh0",
|
|
532
|
-
"bufferACh1",
|
|
533
|
-
"bufferACh2",
|
|
534
|
-
"bufferACh3",
|
|
535
|
-
"bufferBCh0",
|
|
536
|
-
"bufferBCh1",
|
|
537
|
-
"bufferBCh2",
|
|
538
|
-
"bufferBCh3",
|
|
539
|
-
"bufferCCh0",
|
|
540
|
-
"bufferCCh1",
|
|
541
|
-
"bufferCCh2",
|
|
542
|
-
"bufferCCh3",
|
|
543
|
-
"bufferDCh0",
|
|
544
|
-
"bufferDCh1",
|
|
545
|
-
"bufferDCh2",
|
|
546
|
-
"bufferDCh3",
|
|
547
|
-
];
|
|
548
|
-
if (shaderKeys.some((k) => changed.has(k))) {
|
|
587
|
+
const programChanged = PROGRAM_KEYS.some((k) => changed.has(k));
|
|
588
|
+
const channelChanged = CHANNEL_KEYS.some((k) => changed.has(k));
|
|
589
|
+
if (programChanged) {
|
|
549
590
|
void this.rebuild();
|
|
591
|
+
} else if (channelChanged) {
|
|
592
|
+
void this.rebindChannels();
|
|
550
593
|
}
|
|
551
594
|
if (changed.has("play")) {
|
|
552
595
|
this.syncPlayback();
|
|
553
596
|
}
|
|
597
|
+
if (changed.has("releaseOffscreen") || channelChanged) {
|
|
598
|
+
this.syncVisibility();
|
|
599
|
+
}
|
|
554
600
|
if (
|
|
555
601
|
changed.has("dataProvider") ||
|
|
556
602
|
changed.has("outDataProvider") ||
|
|
@@ -696,6 +742,7 @@ export class SonicShader extends LitElement {
|
|
|
696
742
|
*/
|
|
697
743
|
private releaseRuntime() {
|
|
698
744
|
this.rebuildToken++;
|
|
745
|
+
this.rebindToken++;
|
|
699
746
|
this.stopLoop();
|
|
700
747
|
this.ready = false;
|
|
701
748
|
this.releasing = true;
|
|
@@ -752,6 +799,7 @@ export class SonicShader extends LitElement {
|
|
|
752
799
|
e.preventDefault();
|
|
753
800
|
if (this.releasing) return;
|
|
754
801
|
this.rebuildToken++;
|
|
802
|
+
this.rebindToken++;
|
|
755
803
|
this.stopLoop();
|
|
756
804
|
this.ready = false;
|
|
757
805
|
this.runtime = null;
|
|
@@ -766,7 +814,8 @@ export class SonicShader extends LitElement {
|
|
|
766
814
|
if (this.runtime && !this.runtime.isLost) return;
|
|
767
815
|
this.runtime = null;
|
|
768
816
|
await this.updateComplete;
|
|
769
|
-
if (!this.isConnected || (!this.inView && this.
|
|
817
|
+
if (!this.isConnected || (!this.inView && this.wantsReleaseOffscreen()))
|
|
818
|
+
return;
|
|
770
819
|
|
|
771
820
|
const canvas = this.getCanvas();
|
|
772
821
|
if (!canvas) return;
|
|
@@ -775,6 +824,9 @@ export class SonicShader extends LitElement {
|
|
|
775
824
|
this.errorMessage = "";
|
|
776
825
|
this.runtime = new ShaderToyRuntime(canvas);
|
|
777
826
|
this.runtime.setElementResolver((key) => this.lookupElement(key));
|
|
827
|
+
this.activeBufferFormat = this.runtime.setBufferFormat(
|
|
828
|
+
parseBufferFormat(this.bufferFormat),
|
|
829
|
+
);
|
|
778
830
|
this.bindContextEvents();
|
|
779
831
|
this.syncSize();
|
|
780
832
|
await this.rebuild();
|
|
@@ -784,7 +836,7 @@ export class SonicShader extends LitElement {
|
|
|
784
836
|
}
|
|
785
837
|
|
|
786
838
|
private syncVisibility() {
|
|
787
|
-
if (!this.inView && this.
|
|
839
|
+
if (!this.inView && this.wantsReleaseOffscreen()) {
|
|
788
840
|
this.releaseRuntime();
|
|
789
841
|
return;
|
|
790
842
|
}
|
|
@@ -871,8 +923,72 @@ export class SonicShader extends LitElement {
|
|
|
871
923
|
return [...new Set(keys)];
|
|
872
924
|
}
|
|
873
925
|
|
|
926
|
+
/** Enregistre les producteurs live (`sonic-3d`…) pour play-offscreen auto. */
|
|
927
|
+
private syncFrameConsumers(channels: Map<ShaderPassId, PassChannels>) {
|
|
928
|
+
const els = this.collectElementKeys(channels).map((k) =>
|
|
929
|
+
this.lookupElement(k),
|
|
930
|
+
);
|
|
931
|
+
this.frameConsumers.sync(els);
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
/** Map canaux courante (tous les passes). */
|
|
935
|
+
private collectPassChannels(): Map<ShaderPassId, PassChannels> {
|
|
936
|
+
const channels = new Map<ShaderPassId, PassChannels>();
|
|
937
|
+
for (const pass of [
|
|
938
|
+
"bufferA",
|
|
939
|
+
"bufferB",
|
|
940
|
+
"bufferC",
|
|
941
|
+
"bufferD",
|
|
942
|
+
"image",
|
|
943
|
+
] as ShaderPassId[]) {
|
|
944
|
+
channels.set(pass, this.buildChannels(pass));
|
|
945
|
+
}
|
|
946
|
+
return channels;
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
/** `true` si hors viewport on doit libérer textures/FBO. */
|
|
950
|
+
private wantsReleaseOffscreen(): boolean {
|
|
951
|
+
return shouldReleaseWhenOffscreen(
|
|
952
|
+
this.releaseOffscreen,
|
|
953
|
+
channelsUseSelf(this.collectPassChannels().values()),
|
|
954
|
+
);
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* Re-lie les canaux sans recompiler ni vider les FBO (Vague A Lot 2).
|
|
959
|
+
*/
|
|
960
|
+
private async rebindChannels() {
|
|
961
|
+
if (!this.runtime || this.runtime.isLost || !this.image.trim()) return;
|
|
962
|
+
if (!this.ready) {
|
|
963
|
+
void this.rebuild();
|
|
964
|
+
return;
|
|
965
|
+
}
|
|
966
|
+
const token = ++this.rebindToken;
|
|
967
|
+
const channels = this.collectPassChannels();
|
|
968
|
+
try {
|
|
969
|
+
const urls = this.collectUrls(channels);
|
|
970
|
+
await this.runtime.ensureTextures(urls);
|
|
971
|
+
for (const key of this.collectElementKeys(channels)) {
|
|
972
|
+
this.runtime.ensureElementTexture(key);
|
|
973
|
+
}
|
|
974
|
+
if (token !== this.rebindToken || !this.runtime || this.runtime.isLost) {
|
|
975
|
+
return;
|
|
976
|
+
}
|
|
977
|
+
this.syncFrameConsumers(channels);
|
|
978
|
+
const aspectHint =
|
|
979
|
+
this.channel0.startsWith("#") ? "" : this.channel0 || urls[0];
|
|
980
|
+
this.applyAspectRatio(aspectHint);
|
|
981
|
+
this.runtime.setPassChannels(channels);
|
|
982
|
+
this.syncSize();
|
|
983
|
+
} catch (err) {
|
|
984
|
+
if (token !== this.rebindToken) return;
|
|
985
|
+
this.emitError(err);
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
|
|
874
989
|
private async rebuild() {
|
|
875
990
|
if (!this.runtime || this.runtime.isLost || !this.image.trim()) return;
|
|
991
|
+
this.rebindToken++;
|
|
876
992
|
const token = ++this.rebuildToken;
|
|
877
993
|
this.errorMessage = "";
|
|
878
994
|
const sources: ShaderSources = {
|
|
@@ -883,18 +999,12 @@ export class SonicShader extends LitElement {
|
|
|
883
999
|
bufferC: this.bufferC,
|
|
884
1000
|
bufferD: this.bufferD,
|
|
885
1001
|
};
|
|
886
|
-
const channels =
|
|
887
|
-
for (const pass of [
|
|
888
|
-
"bufferA",
|
|
889
|
-
"bufferB",
|
|
890
|
-
"bufferC",
|
|
891
|
-
"bufferD",
|
|
892
|
-
"image",
|
|
893
|
-
] as ShaderPassId[]) {
|
|
894
|
-
channels.set(pass, this.buildChannels(pass));
|
|
895
|
-
}
|
|
1002
|
+
const channels = this.collectPassChannels();
|
|
896
1003
|
try {
|
|
897
1004
|
this.syncSize();
|
|
1005
|
+
this.activeBufferFormat = this.runtime.setBufferFormat(
|
|
1006
|
+
parseBufferFormat(this.bufferFormat),
|
|
1007
|
+
);
|
|
898
1008
|
const urls = this.collectUrls(channels);
|
|
899
1009
|
await this.runtime.ensureTextures(urls);
|
|
900
1010
|
for (const key of this.collectElementKeys(channels)) {
|
|
@@ -903,6 +1013,7 @@ export class SonicShader extends LitElement {
|
|
|
903
1013
|
if (token !== this.rebuildToken || !this.runtime || this.runtime.isLost) {
|
|
904
1014
|
return;
|
|
905
1015
|
}
|
|
1016
|
+
this.syncFrameConsumers(channels);
|
|
906
1017
|
const aspectHint =
|
|
907
1018
|
this.channel0.startsWith("#") ? "" : this.channel0 || urls[0];
|
|
908
1019
|
this.applyAspectRatio(aspectHint);
|
|
@@ -1312,8 +1423,8 @@ export class SonicShader extends LitElement {
|
|
|
1312
1423
|
: this.runtime.readBufferRect(pass, px.x, px.y, px.w, px.h);
|
|
1313
1424
|
if (!rect) continue;
|
|
1314
1425
|
// Copie : le buffer WebGL peut être réutilisé / invalidé ensuite
|
|
1315
|
-
const rgba =
|
|
1316
|
-
const mean = meanRgba(
|
|
1426
|
+
const rgba = rgbaToUint8(rect.data);
|
|
1427
|
+
const mean = meanRgba(rect.data);
|
|
1317
1428
|
const item: ShaderExtractItem = {
|
|
1318
1429
|
id: roi.id || `${source}-${px.x}-${px.y}`,
|
|
1319
1430
|
x: this.round3(rect.x / bufW),
|
|
@@ -1410,7 +1521,11 @@ export class SonicShader extends LitElement {
|
|
|
1410
1521
|
if (typeof score === "number") item.score = this.round3(score);
|
|
1411
1522
|
if (this.extractBitmaps) {
|
|
1412
1523
|
const token = this.rebuildToken;
|
|
1413
|
-
const url = await rgbaToBlobUrl(
|
|
1524
|
+
const url = await rgbaToBlobUrl(
|
|
1525
|
+
rgbaToUint8(rect.data),
|
|
1526
|
+
rect.width,
|
|
1527
|
+
rect.height,
|
|
1528
|
+
);
|
|
1414
1529
|
if (token !== this.rebuildToken || !this.isConnected) {
|
|
1415
1530
|
if (url) revokeMediaUrls([url]);
|
|
1416
1531
|
return null;
|
|
@@ -1581,10 +1696,12 @@ export class SonicShader extends LitElement {
|
|
|
1581
1696
|
}
|
|
1582
1697
|
}
|
|
1583
1698
|
|
|
1584
|
-
export { parseChannelSource, ShaderToyRuntime, shouldUploadElementFrame } from "./gl-runtime";
|
|
1699
|
+
export { parseChannelSource, ShaderToyRuntime, shouldUploadElementFrame, resolveBufferGlFormat, resetBufferFormatWarnFlag } from "./gl-runtime";
|
|
1585
1700
|
export { buildFragmentSource } from "./shadertoy-prelude";
|
|
1586
1701
|
export type {
|
|
1587
1702
|
ChannelSource,
|
|
1703
|
+
ReleaseOffscreen,
|
|
1704
|
+
ShaderBufferFormat,
|
|
1588
1705
|
ShaderExtractItem,
|
|
1589
1706
|
ShaderExtractOutput,
|
|
1590
1707
|
ShaderExtractPass,
|
|
@@ -1609,11 +1726,16 @@ export {
|
|
|
1609
1726
|
mediaElementKey,
|
|
1610
1727
|
} from "@supersoniks/concorde/core/utils/mediaRef";
|
|
1611
1728
|
export {
|
|
1729
|
+
channelsUseSelf,
|
|
1612
1730
|
findPeaks,
|
|
1613
1731
|
meanRgba,
|
|
1732
|
+
parseBufferFormat,
|
|
1614
1733
|
parseExtractPass,
|
|
1615
1734
|
parseHoverParam,
|
|
1735
|
+
parseReleaseOffscreen,
|
|
1616
1736
|
roiToPixels,
|
|
1737
|
+
rgbaToUint8,
|
|
1738
|
+
shouldReleaseWhenOffscreen,
|
|
1617
1739
|
ShaderCompileError,
|
|
1618
1740
|
} from "./types";
|
|
1619
1741
|
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ShaderToy-compatible GLSL ES 3.0 prelude (fragment body, sans `#version`).
|
|
3
|
+
* - `sonic-shader` préfixe `#version 300 es` via `buildFragmentSource`.
|
|
4
|
+
* - `sonic-3d` post passe le corps à Three `RawShaderMaterial` (GLSL3).
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const GLSL_VERSION_300 = `#version 300 es
|
|
8
|
+
`;
|
|
9
|
+
|
|
10
|
+
/** Corps des uniforms / out (sans version). */
|
|
11
|
+
export const SHADERTOY_FRAGMENT_BODY = `precision highp float;
|
|
4
12
|
precision highp int;
|
|
5
13
|
precision mediump sampler2D;
|
|
6
14
|
|
|
@@ -22,11 +30,26 @@ uniform float uParam0;
|
|
|
22
30
|
uniform float uParam1;
|
|
23
31
|
uniform float uParam2;
|
|
24
32
|
uniform float uParam3;
|
|
33
|
+
/** Near / far caméra (0 dans sonic-shader standalone). */
|
|
34
|
+
uniform float uNear;
|
|
35
|
+
uniform float uFar;
|
|
25
36
|
|
|
26
37
|
out vec4 sonicFragColor;
|
|
27
38
|
|
|
39
|
+
/** Profondeur linéaire monde depuis une DepthTexture (0–1). */
|
|
40
|
+
float sonicLinearDepth(float d) {
|
|
41
|
+
float z = d * 2.0 - 1.0;
|
|
42
|
+
float n = max(uNear, 1e-4);
|
|
43
|
+
float f = max(uFar, n + 1e-4);
|
|
44
|
+
return (2.0 * n * f) / (f + n - z * (f - n));
|
|
45
|
+
}
|
|
46
|
+
|
|
28
47
|
`;
|
|
29
48
|
|
|
49
|
+
/** @deprecated Préférer SHADERTOY_FRAGMENT_BODY + buildFragmentSource. */
|
|
50
|
+
export const SHADERTOY_FRAGMENT_PRELUDE =
|
|
51
|
+
GLSL_VERSION_300 + SHADERTOY_FRAGMENT_BODY;
|
|
52
|
+
|
|
30
53
|
export const SHADERTOY_FRAGMENT_EPILOGUE = `
|
|
31
54
|
void main() {
|
|
32
55
|
mainImage(sonicFragColor, gl_FragCoord.xy);
|
|
@@ -41,12 +64,33 @@ void main() {
|
|
|
41
64
|
}
|
|
42
65
|
`;
|
|
43
66
|
|
|
44
|
-
|
|
67
|
+
/** Vertex Three RawShaderMaterial GLSL3 (fullscreen triangle via PlaneGeometry 2×2). */
|
|
68
|
+
export const THREE_FULLSCREEN_VERTEX = `precision highp float;
|
|
69
|
+
in vec3 position;
|
|
70
|
+
void main() {
|
|
71
|
+
gl_Position = vec4(position.xy, 0.0, 1.0);
|
|
72
|
+
}
|
|
73
|
+
`;
|
|
74
|
+
|
|
75
|
+
export function buildFragmentBody(common: string, userCode: string): string {
|
|
45
76
|
return (
|
|
46
|
-
|
|
77
|
+
SHADERTOY_FRAGMENT_BODY +
|
|
47
78
|
(common ? common + "\n" : "") +
|
|
48
79
|
userCode +
|
|
49
80
|
"\n" +
|
|
50
81
|
SHADERTOY_FRAGMENT_EPILOGUE
|
|
51
82
|
);
|
|
52
83
|
}
|
|
84
|
+
|
|
85
|
+
/** Source fragment WebGL2 native (`sonic-shader`). */
|
|
86
|
+
export function buildFragmentSource(common: string, userCode: string): string {
|
|
87
|
+
return GLSL_VERSION_300 + buildFragmentBody(common, userCode);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** Source fragment pour Three RawShaderMaterial (GLSL3, sans #version). */
|
|
91
|
+
export function buildThreeFragmentSource(
|
|
92
|
+
common: string,
|
|
93
|
+
userCode: string,
|
|
94
|
+
): string {
|
|
95
|
+
return buildFragmentBody(common, userCode);
|
|
96
|
+
}
|
|
@@ -5,6 +5,57 @@ export type ShaderPassId =
|
|
|
5
5
|
| "bufferC"
|
|
6
6
|
| "bufferD";
|
|
7
7
|
|
|
8
|
+
/** Format interne des buffers A–D (Image = toujours le canvas RGBA8). */
|
|
9
|
+
export type ShaderBufferFormat = "rgba8" | "rgba16f" | "rgba32f";
|
|
10
|
+
|
|
11
|
+
export function parseBufferFormat(
|
|
12
|
+
value: string | null | undefined,
|
|
13
|
+
): ShaderBufferFormat {
|
|
14
|
+
const s = (value ?? "").trim().toLowerCase();
|
|
15
|
+
if (s === "rgba16f" || s === "rgba16" || s === "half") return "rgba16f";
|
|
16
|
+
if (s === "rgba32f" || s === "rgba32" || s === "float") return "rgba32f";
|
|
17
|
+
return "rgba8";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Hors viewport : libérer textures/FBO ?
|
|
22
|
+
* - `true` / `false` — forcé
|
|
23
|
+
* - `auto` (défaut) — libère sauf si une passe lit `self` (état conservé)
|
|
24
|
+
*/
|
|
25
|
+
export type ReleaseOffscreen = boolean | "auto";
|
|
26
|
+
|
|
27
|
+
export function parseReleaseOffscreen(
|
|
28
|
+
value: string | null | undefined,
|
|
29
|
+
): ReleaseOffscreen {
|
|
30
|
+
if (value == null) return "auto";
|
|
31
|
+
const s = value.trim().toLowerCase();
|
|
32
|
+
if (s === "auto") return "auto";
|
|
33
|
+
if (s === "false" || s === "0") return false;
|
|
34
|
+
// attribut booléen présent (`""`) ou `"true"`
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Au moins un canal `self` (feedback frame précédente). */
|
|
39
|
+
export function channelsUseSelf(
|
|
40
|
+
channels: Iterable<readonly ChannelSource[]>,
|
|
41
|
+
): boolean {
|
|
42
|
+
for (const chs of channels) {
|
|
43
|
+
for (const c of chs) {
|
|
44
|
+
if (c.kind === "self") return true;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function shouldReleaseWhenOffscreen(
|
|
51
|
+
mode: ReleaseOffscreen,
|
|
52
|
+
usesSelf: boolean,
|
|
53
|
+
): boolean {
|
|
54
|
+
if (mode === false) return false;
|
|
55
|
+
if (mode === true) return true;
|
|
56
|
+
return !usesSelf;
|
|
57
|
+
}
|
|
58
|
+
|
|
8
59
|
export type ChannelSource =
|
|
9
60
|
| { kind: "url"; url: string }
|
|
10
61
|
| { kind: "buffer"; buffer: Exclude<ShaderPassId, "image"> }
|
|
@@ -161,10 +212,18 @@ export type SonicShaderConfig = {
|
|
|
161
212
|
dprMax?: number;
|
|
162
213
|
|
|
163
214
|
/**
|
|
164
|
-
*
|
|
215
|
+
* Format des buffers A–D : `rgba8` (défaut) \| `rgba16f` \| `rgba32f`.
|
|
216
|
+
* Requis pour des valeurs signées / hors [0,1] (ex. tenseur Harris).
|
|
217
|
+
* Repli auto en `rgba8` si `EXT_color_buffer_float` manque.
|
|
218
|
+
*/
|
|
219
|
+
bufferFormat?: ShaderBufferFormat;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Hors viewport : libère textures/FBO, sans loseContext.
|
|
223
|
+
* `auto` (défaut) : ne libère pas si une passe lit `self`.
|
|
165
224
|
* Le slot navigateur est libéré au disconnect.
|
|
166
225
|
*/
|
|
167
|
-
releaseOffscreen?:
|
|
226
|
+
releaseOffscreen?: ReleaseOffscreen;
|
|
168
227
|
};
|
|
169
228
|
|
|
170
229
|
/** Parse `hover-param` → slot ou `null` si désactivé / invalide. */
|
|
@@ -274,7 +333,8 @@ export type ReadRectResult = {
|
|
|
274
333
|
y: number;
|
|
275
334
|
width: number;
|
|
276
335
|
height: number;
|
|
277
|
-
|
|
336
|
+
/** `Uint8Array` (RGBA8) ou `Float32Array` (buffers flottants). */
|
|
337
|
+
data: Uint8Array | Float32Array;
|
|
278
338
|
};
|
|
279
339
|
|
|
280
340
|
/** Parse `extract-source` / `extract-mask` → pass id ou null. */
|
|
@@ -295,9 +355,10 @@ export function parseExtractPass(
|
|
|
295
355
|
/**
|
|
296
356
|
* NMS simple sur canal R (RGBA row-major, origine bas-gauche comme WebGL).
|
|
297
357
|
* Retourne peaks triés par score décroissant.
|
|
358
|
+
* Accepte Uint8 (0–255) ou Float32 (scores déjà dans ~[0,1]).
|
|
298
359
|
*/
|
|
299
360
|
export function findPeaks(
|
|
300
|
-
data: Uint8Array,
|
|
361
|
+
data: Uint8Array | Float32Array,
|
|
301
362
|
width: number,
|
|
302
363
|
height: number,
|
|
303
364
|
options: FindPeaksOptions = {},
|
|
@@ -308,13 +369,15 @@ export function findPeaks(
|
|
|
308
369
|
if (maxCount === 0 || width < 1 || height < 1 || data.length < width * height * 4) {
|
|
309
370
|
return [];
|
|
310
371
|
}
|
|
311
|
-
const
|
|
372
|
+
const isFloat = data instanceof Float32Array;
|
|
373
|
+
const thr = isFloat ? threshold : threshold * 255;
|
|
374
|
+
const toScore = (v: number) => (isFloat ? v : v / 255);
|
|
312
375
|
const candidates: ShaderPeak[] = [];
|
|
313
376
|
for (let y = 1; y < height - 1; y++) {
|
|
314
377
|
for (let x = 1; x < width - 1; x++) {
|
|
315
378
|
const i = (y * width + x) * 4;
|
|
316
379
|
const v = data[i];
|
|
317
|
-
if (v <
|
|
380
|
+
if (v < thr) continue;
|
|
318
381
|
// Local max 3×3
|
|
319
382
|
let isMax = true;
|
|
320
383
|
for (let dy = -1; dy <= 1 && isMax; dy++) {
|
|
@@ -327,7 +390,7 @@ export function findPeaks(
|
|
|
327
390
|
}
|
|
328
391
|
}
|
|
329
392
|
}
|
|
330
|
-
if (isMax) candidates.push({ x, y, score: v
|
|
393
|
+
if (isMax) candidates.push({ x, y, score: toScore(v) });
|
|
331
394
|
}
|
|
332
395
|
}
|
|
333
396
|
candidates.sort((a, b) => b.score - a.score);
|
|
@@ -403,7 +466,7 @@ export function roiToPixels(
|
|
|
403
466
|
return { x: px, y: py, w: pw, h: ph };
|
|
404
467
|
}
|
|
405
468
|
|
|
406
|
-
export function meanRgba(data: Uint8Array): {
|
|
469
|
+
export function meanRgba(data: Uint8Array | Float32Array): {
|
|
407
470
|
r: number;
|
|
408
471
|
g: number;
|
|
409
472
|
b: number;
|
|
@@ -412,6 +475,7 @@ export function meanRgba(data: Uint8Array): {
|
|
|
412
475
|
} {
|
|
413
476
|
const n = Math.floor(data.length / 4);
|
|
414
477
|
if (n < 1) return { r: 0, g: 0, b: 0, a: 0, luma: 0 };
|
|
478
|
+
const isFloat = data instanceof Float32Array;
|
|
415
479
|
let r = 0;
|
|
416
480
|
let g = 0;
|
|
417
481
|
let b = 0;
|
|
@@ -423,10 +487,11 @@ export function meanRgba(data: Uint8Array): {
|
|
|
423
487
|
b += data[o + 2];
|
|
424
488
|
a += data[o + 3];
|
|
425
489
|
}
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
490
|
+
const scale = isFloat ? n : n * 255;
|
|
491
|
+
r /= scale;
|
|
492
|
+
g /= scale;
|
|
493
|
+
b /= scale;
|
|
494
|
+
a /= scale;
|
|
430
495
|
return {
|
|
431
496
|
r,
|
|
432
497
|
g,
|
|
@@ -436,6 +501,18 @@ export function meanRgba(data: Uint8Array): {
|
|
|
436
501
|
};
|
|
437
502
|
}
|
|
438
503
|
|
|
504
|
+
/** Convertit un buffer RGBA (byte ou float 0–1) en Uint8 pour canvas / blob. */
|
|
505
|
+
export function rgbaToUint8(
|
|
506
|
+
data: Uint8Array | Float32Array,
|
|
507
|
+
): Uint8Array {
|
|
508
|
+
if (data instanceof Uint8Array) return data;
|
|
509
|
+
const out = new Uint8Array(data.length);
|
|
510
|
+
for (let i = 0; i < data.length; i++) {
|
|
511
|
+
out[i] = Math.max(0, Math.min(255, Math.round(data[i] * 255)));
|
|
512
|
+
}
|
|
513
|
+
return out;
|
|
514
|
+
}
|
|
515
|
+
|
|
439
516
|
export class ShaderCompileError extends Error {
|
|
440
517
|
constructor(
|
|
441
518
|
message: string,
|
|
File without changes
|