@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
|
@@ -7,9 +7,11 @@ import {
|
|
|
7
7
|
ChannelSource,
|
|
8
8
|
PassChannels,
|
|
9
9
|
ReadRectResult,
|
|
10
|
+
ShaderBufferFormat,
|
|
10
11
|
ShaderCompileError,
|
|
11
12
|
ShaderPassId,
|
|
12
13
|
ShaderSources,
|
|
14
|
+
parseBufferFormat,
|
|
13
15
|
} from "./types";
|
|
14
16
|
|
|
15
17
|
const PASS_ORDER: ShaderPassId[] = [
|
|
@@ -235,27 +237,110 @@ function getUniforms(
|
|
|
235
237
|
};
|
|
236
238
|
}
|
|
237
239
|
|
|
240
|
+
type BufferGlFormat = {
|
|
241
|
+
requested: ShaderBufferFormat;
|
|
242
|
+
active: ShaderBufferFormat;
|
|
243
|
+
internal: number;
|
|
244
|
+
format: number;
|
|
245
|
+
type: number;
|
|
246
|
+
filter: number;
|
|
247
|
+
float: boolean;
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
let warnedFloatFallback = false;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Résout le format GPU des buffers A–D.
|
|
254
|
+
* Exporté pour tests (mock `getExtension`).
|
|
255
|
+
*/
|
|
256
|
+
export function resolveBufferGlFormat(
|
|
257
|
+
gl: WebGL2RenderingContext,
|
|
258
|
+
requested: ShaderBufferFormat,
|
|
259
|
+
): BufferGlFormat {
|
|
260
|
+
const want = parseBufferFormat(requested);
|
|
261
|
+
if (want === "rgba8") {
|
|
262
|
+
return {
|
|
263
|
+
requested: want,
|
|
264
|
+
active: "rgba8",
|
|
265
|
+
internal: gl.RGBA8,
|
|
266
|
+
format: gl.RGBA,
|
|
267
|
+
type: gl.UNSIGNED_BYTE,
|
|
268
|
+
filter: gl.LINEAR,
|
|
269
|
+
float: false,
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
const ext = gl.getExtension("EXT_color_buffer_float");
|
|
273
|
+
if (!ext) {
|
|
274
|
+
if (!warnedFloatFallback) {
|
|
275
|
+
warnedFloatFallback = true;
|
|
276
|
+
console.warn(
|
|
277
|
+
`[sonic-shader] buffer-format="${want}" indisponible (pas d'EXT_color_buffer_float) → rgba8`,
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
return resolveBufferGlFormat(gl, "rgba8");
|
|
281
|
+
}
|
|
282
|
+
if (want === "rgba16f") {
|
|
283
|
+
return {
|
|
284
|
+
requested: want,
|
|
285
|
+
active: "rgba16f",
|
|
286
|
+
internal: gl.RGBA16F,
|
|
287
|
+
format: gl.RGBA,
|
|
288
|
+
type: gl.HALF_FLOAT,
|
|
289
|
+
filter: gl.LINEAR,
|
|
290
|
+
float: true,
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
// rgba32f
|
|
294
|
+
const linearOk = !!gl.getExtension("OES_texture_float_linear");
|
|
295
|
+
return {
|
|
296
|
+
requested: want,
|
|
297
|
+
active: "rgba32f",
|
|
298
|
+
internal: gl.RGBA32F,
|
|
299
|
+
format: gl.RGBA,
|
|
300
|
+
type: gl.FLOAT,
|
|
301
|
+
filter: linearOk ? gl.LINEAR : gl.NEAREST,
|
|
302
|
+
float: true,
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/** Reset du warn unique (tests). */
|
|
307
|
+
export function resetBufferFormatWarnFlag() {
|
|
308
|
+
warnedFloatFallback = false;
|
|
309
|
+
}
|
|
310
|
+
|
|
238
311
|
function createEmptyTexture(
|
|
239
312
|
gl: WebGL2RenderingContext,
|
|
240
313
|
width: number,
|
|
241
314
|
height: number,
|
|
315
|
+
fmt?: BufferGlFormat,
|
|
242
316
|
): WebGLTexture {
|
|
317
|
+
const f =
|
|
318
|
+
fmt ??
|
|
319
|
+
({
|
|
320
|
+
requested: "rgba8",
|
|
321
|
+
active: "rgba8",
|
|
322
|
+
internal: gl.RGBA8,
|
|
323
|
+
format: gl.RGBA,
|
|
324
|
+
type: gl.UNSIGNED_BYTE,
|
|
325
|
+
filter: gl.LINEAR,
|
|
326
|
+
float: false,
|
|
327
|
+
} satisfies BufferGlFormat);
|
|
243
328
|
const tex = gl.createTexture();
|
|
244
329
|
if (!tex) throw new Error("Unable to create texture");
|
|
245
330
|
gl.bindTexture(gl.TEXTURE_2D, tex);
|
|
246
|
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER,
|
|
247
|
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER,
|
|
331
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, f.filter);
|
|
332
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, f.filter);
|
|
248
333
|
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
|
|
249
334
|
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
|
|
250
335
|
gl.texImage2D(
|
|
251
336
|
gl.TEXTURE_2D,
|
|
252
337
|
0,
|
|
253
|
-
|
|
338
|
+
f.internal,
|
|
254
339
|
width,
|
|
255
340
|
height,
|
|
256
341
|
0,
|
|
257
|
-
|
|
258
|
-
|
|
342
|
+
f.format,
|
|
343
|
+
f.type,
|
|
259
344
|
null,
|
|
260
345
|
);
|
|
261
346
|
return tex;
|
|
@@ -287,10 +372,11 @@ function createPingPong(
|
|
|
287
372
|
gl: WebGL2RenderingContext,
|
|
288
373
|
width: number,
|
|
289
374
|
height: number,
|
|
375
|
+
fmt: BufferGlFormat,
|
|
290
376
|
): PingPong {
|
|
291
377
|
const textures: [WebGLTexture, WebGLTexture] = [
|
|
292
|
-
createEmptyTexture(gl, width, height),
|
|
293
|
-
createEmptyTexture(gl, width, height),
|
|
378
|
+
createEmptyTexture(gl, width, height, fmt),
|
|
379
|
+
createEmptyTexture(gl, width, height, fmt),
|
|
294
380
|
];
|
|
295
381
|
const framebuffers: [WebGLFramebuffer, WebGLFramebuffer] = [
|
|
296
382
|
createFramebuffer(gl, textures[0]),
|
|
@@ -349,6 +435,7 @@ export class ShaderToyRuntime {
|
|
|
349
435
|
private activePasses: ShaderPassId[] = [];
|
|
350
436
|
private blackTexture: WebGLTexture | null = null;
|
|
351
437
|
private elementResolver: ((key: string) => Element | null) | null = null;
|
|
438
|
+
private bufferFmt: BufferGlFormat;
|
|
352
439
|
|
|
353
440
|
constructor(canvas: HTMLCanvasElement) {
|
|
354
441
|
const gl = canvas.getContext("webgl2", {
|
|
@@ -364,6 +451,7 @@ export class ShaderToyRuntime {
|
|
|
364
451
|
}
|
|
365
452
|
this.canvas = canvas;
|
|
366
453
|
this.gl = gl;
|
|
454
|
+
this.bufferFmt = resolveBufferGlFormat(gl, "rgba8");
|
|
367
455
|
this.initGeometry();
|
|
368
456
|
this.blackTexture = createEmptyTexture(gl, 1, 1);
|
|
369
457
|
gl.bindTexture(gl.TEXTURE_2D, this.blackTexture);
|
|
@@ -380,6 +468,42 @@ export class ShaderToyRuntime {
|
|
|
380
468
|
);
|
|
381
469
|
}
|
|
382
470
|
|
|
471
|
+
/** Format réellement utilisé pour les buffers A–D (après repli éventuel). */
|
|
472
|
+
get activeBufferFormat(): ShaderBufferFormat {
|
|
473
|
+
return this.bufferFmt.active;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Change le format des buffers A–D. Recrée les FBO si la taille est déjà connue.
|
|
478
|
+
* Retourne le format actif (peut différer si extension manquante).
|
|
479
|
+
*/
|
|
480
|
+
setBufferFormat(requested: ShaderBufferFormat): ShaderBufferFormat {
|
|
481
|
+
const next = resolveBufferGlFormat(this.gl, requested);
|
|
482
|
+
if (
|
|
483
|
+
next.active === this.bufferFmt.active &&
|
|
484
|
+
next.filter === this.bufferFmt.filter
|
|
485
|
+
) {
|
|
486
|
+
this.bufferFmt = next;
|
|
487
|
+
return next.active;
|
|
488
|
+
}
|
|
489
|
+
this.bufferFmt = next;
|
|
490
|
+
if (this.width >= 1 && this.height >= 1) {
|
|
491
|
+
for (const id of BUFFER_PASSES) {
|
|
492
|
+
const existing = this.buffers.get(id);
|
|
493
|
+
if (existing) destroyPingPong(this.gl, existing);
|
|
494
|
+
if (this.programs.has(id)) {
|
|
495
|
+
this.buffers.set(
|
|
496
|
+
id,
|
|
497
|
+
createPingPong(this.gl, this.width, this.height, this.bufferFmt),
|
|
498
|
+
);
|
|
499
|
+
} else {
|
|
500
|
+
this.buffers.delete(id);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
return next.active;
|
|
505
|
+
}
|
|
506
|
+
|
|
383
507
|
/** True si le contexte a été perdu / déjà disposé. */
|
|
384
508
|
get isLost(): boolean {
|
|
385
509
|
return this.gl.isContextLost();
|
|
@@ -416,7 +540,10 @@ export class ShaderToyRuntime {
|
|
|
416
540
|
const existing = this.buffers.get(id);
|
|
417
541
|
if (existing) destroyPingPong(this.gl, existing);
|
|
418
542
|
if (this.programs.has(id)) {
|
|
419
|
-
this.buffers.set(
|
|
543
|
+
this.buffers.set(
|
|
544
|
+
id,
|
|
545
|
+
createPingPong(this.gl, w, h, this.bufferFmt),
|
|
546
|
+
);
|
|
420
547
|
}
|
|
421
548
|
}
|
|
422
549
|
}
|
|
@@ -458,7 +585,10 @@ export class ShaderToyRuntime {
|
|
|
458
585
|
if (pass !== "image" && this.width > 0) {
|
|
459
586
|
const prev = this.buffers.get(pass);
|
|
460
587
|
if (prev) destroyPingPong(this.gl, prev);
|
|
461
|
-
this.buffers.set(
|
|
588
|
+
this.buffers.set(
|
|
589
|
+
pass,
|
|
590
|
+
createPingPong(this.gl, this.width, this.height, this.bufferFmt),
|
|
591
|
+
);
|
|
462
592
|
}
|
|
463
593
|
}
|
|
464
594
|
|
|
@@ -471,6 +601,18 @@ export class ShaderToyRuntime {
|
|
|
471
601
|
}
|
|
472
602
|
}
|
|
473
603
|
|
|
604
|
+
/**
|
|
605
|
+
* Met à jour les bindings de canaux sans recompiler les programmes.
|
|
606
|
+
* Les URLs / clés `#élément` absentes des textures sont allouées à la demande
|
|
607
|
+
* (via `ensureTextures` / `ensureElementTexture` côté composant).
|
|
608
|
+
*/
|
|
609
|
+
setPassChannels(channels: Map<ShaderPassId, PassChannels>) {
|
|
610
|
+
if (this.gl.isContextLost()) {
|
|
611
|
+
throw new Error("WebGL context lost");
|
|
612
|
+
}
|
|
613
|
+
this.passChannels = channels;
|
|
614
|
+
}
|
|
615
|
+
|
|
474
616
|
async ensureTextures(urls: string[]) {
|
|
475
617
|
const unique = [...new Set(urls.filter(Boolean))];
|
|
476
618
|
await Promise.all(unique.map((url) => this.loadTexture(url)));
|
|
@@ -846,6 +988,7 @@ export class ShaderToyRuntime {
|
|
|
846
988
|
|
|
847
989
|
/**
|
|
848
990
|
* Lit un rectangle d’un buffer ping-pong (dernier write) ou de l’Image (`pass === "image"`).
|
|
991
|
+
* Les buffers flottants renvoient un `Float32Array` ; Image / rgba8 → `Uint8Array`.
|
|
849
992
|
*/
|
|
850
993
|
readBufferRect(
|
|
851
994
|
pass: ShaderPassId,
|
|
@@ -857,7 +1000,14 @@ export class ShaderToyRuntime {
|
|
|
857
1000
|
if (pass === "image") return this.readRect(x, y, w, h);
|
|
858
1001
|
const pp = this.buffers.get(pass);
|
|
859
1002
|
if (!pp) return null;
|
|
860
|
-
return this.readFramebufferRect(
|
|
1003
|
+
return this.readFramebufferRect(
|
|
1004
|
+
pp.framebuffers[pp.index],
|
|
1005
|
+
x,
|
|
1006
|
+
y,
|
|
1007
|
+
w,
|
|
1008
|
+
h,
|
|
1009
|
+
this.bufferFmt.float,
|
|
1010
|
+
);
|
|
861
1011
|
}
|
|
862
1012
|
|
|
863
1013
|
/**
|
|
@@ -876,6 +1026,7 @@ export class ShaderToyRuntime {
|
|
|
876
1026
|
y: number,
|
|
877
1027
|
w: number,
|
|
878
1028
|
h: number,
|
|
1029
|
+
asFloat = false,
|
|
879
1030
|
): ReadRectResult | null {
|
|
880
1031
|
const gl = this.gl;
|
|
881
1032
|
if (gl.isContextLost() || this.width < 1 || this.height < 1) return null;
|
|
@@ -895,9 +1046,15 @@ export class ShaderToyRuntime {
|
|
|
895
1046
|
if (px + pw > this.width) pw = this.width - px;
|
|
896
1047
|
if (py + ph > this.height) ph = this.height - py;
|
|
897
1048
|
if (pw < 1 || ph < 1) return null;
|
|
898
|
-
const data = new Uint8Array(pw * ph * 4);
|
|
899
1049
|
gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
|
|
900
|
-
|
|
1050
|
+
let data: Uint8Array | Float32Array;
|
|
1051
|
+
if (asFloat) {
|
|
1052
|
+
data = new Float32Array(pw * ph * 4);
|
|
1053
|
+
gl.readPixels(px, py, pw, ph, gl.RGBA, gl.FLOAT, data);
|
|
1054
|
+
} else {
|
|
1055
|
+
data = new Uint8Array(pw * ph * 4);
|
|
1056
|
+
gl.readPixels(px, py, pw, ph, gl.RGBA, gl.UNSIGNED_BYTE, data);
|
|
1057
|
+
}
|
|
901
1058
|
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
|
|
902
1059
|
return { x: px, y: py, width: pw, height: ph, data };
|
|
903
1060
|
}
|
|
@@ -44,8 +44,8 @@ Live 3D → shader (no JPEG): [Visual stack](#docs/_misc/visual-stack.md/visual-
|
|
|
44
44
|
|--------|-----------|
|
|
45
45
|
| Sortie d’un effet → entrée du suivant | `image-ch0="buffer-a"` (ou `buffer-b`… / `self`) — **même contexte GPU**, FBO ping-pong |
|
|
46
46
|
| Scene 3D / autre canvas → post | `channel0="#plateau"` — copie `texImage2D` chaque `frameSeq` |
|
|
47
|
-
| Params / sync UI | `dataProvider` → `uParam0…3` **et** canaux (`channel0`, `bufferACh0`…) — string URL, `#id`, ou `SonicMediaRef` (`url` / `element`) |
|
|
48
|
-
| Hors viewport | `release-offscreen` (défaut)
|
|
47
|
+
| Params / sync UI | `dataProvider` → `uParam0…3` **et** canaux (`channel0`, `bufferACh0`…) — string URL, `#id`, ou `SonicMediaRef` (`url` / `element`). Changer un canal ne recompile pas (rebind). |
|
|
48
|
+
| Hors viewport | `release-offscreen` : `auto` (défaut) libère sauf si une passe lit `self` ; `true` / `false` forcent |
|
|
49
49
|
|
|
50
50
|
Les passes intermédiaires sont **déjà offscreen** (FBO). Pas besoin d’un second `sonic-shader` invisible pour du multipass interne.
|
|
51
51
|
|
|
@@ -138,6 +138,22 @@ onExtract() {
|
|
|
138
138
|
|
|
139
139
|
Live Harris → patches → WebGPU: [Visual stack](#docs/_misc/visual-stack.md/visual-stack).
|
|
140
140
|
|
|
141
|
+
## Précision des buffers (`buffer-format`)
|
|
142
|
+
|
|
143
|
+
Par défaut, les buffers A–D sont en **RGBA8** (unsigned). Un tenseur Harris naïf (`Ix*Ix`, `Iy*Iy`, `Ix*Iy`) **perd le signe** de `IxIy` et sature les carrés → bords au lieu de coins.
|
|
144
|
+
|
|
145
|
+
| Valeur | Usage |
|
|
146
|
+
|--------|--------|
|
|
147
|
+
| `rgba8` (défaut) | Couleur / masques 0–1 |
|
|
148
|
+
| `rgba16f` | Calculs signés (Harris, gradients) — recommandé |
|
|
149
|
+
| `rgba32f` | Haute précision ; filtrage `NEAREST` si `OES_texture_float_linear` manque |
|
|
150
|
+
|
|
151
|
+
Repli auto en `rgba8` si `EXT_color_buffer_float` est absent (`console.warn` une fois). L’attribut reflété `active-buffer-format` indique le format réellement utilisé. La passe Image reste le canvas RGBA8.
|
|
152
|
+
|
|
153
|
+
```html
|
|
154
|
+
<sonic-shader buffer-format="rgba16f" buffer-a="…" …></sonic-shader>
|
|
155
|
+
```
|
|
156
|
+
|
|
141
157
|
## API typée (`SonicShaderConfig`)
|
|
142
158
|
|
|
143
159
|
| Champ / attribut | Type | Rôle |
|
|
@@ -145,6 +161,7 @@ Live Harris → patches → WebGPU: [Visual stack](#docs/_misc/visual-stack.md/v
|
|
|
145
161
|
| `image` | `string` | GLSL pass Image (**requis**, propriété JS) |
|
|
146
162
|
| `bufferA`…`bufferD` / `buffer-a`… | `string` | Passes multipass |
|
|
147
163
|
| `common` | `string` | GLSL partagé |
|
|
164
|
+
| `bufferFormat` / `buffer-format` | `rgba8` \| `rgba16f` \| `rgba32f` | Format buffers A–D (défaut `rgba8`) ; `active-buffer-format` reflète le format réellement utilisé |
|
|
148
165
|
| `channel0`…`channel3` | `string` | URLs, `#id` élément, ou refs buffers (toutes passes) |
|
|
149
166
|
| `imageCh0`… / `image-ch0`… | `string` | Override canal : URL, `#id`, `self`, `buffer-a`…, `none` |
|
|
150
167
|
| `play` | `boolean` | Boucle RAF (défaut `true`) |
|
|
@@ -170,7 +187,13 @@ Live Harris → patches → WebGPU: [Visual stack](#docs/_misc/visual-stack.md/v
|
|
|
170
187
|
| `extractDataProvider` / `extract-data-provider` | `string` | Publisher extract (défaut = out) |
|
|
171
188
|
| `aspectRatio` / `aspect-ratio` | `string` | Ratio CSS forcé |
|
|
172
189
|
| `dprMax` / `dpr-max` | `number` | Plafond DPR (défaut `2`) |
|
|
173
|
-
| `releaseOffscreen` / `release-offscreen` | `boolean` | Hors viewport : libère textures/FBO (garde le contexte). `dispose` + loseContext au disconnect
|
|
190
|
+
| `releaseOffscreen` / `release-offscreen` | `boolean` \| `"auto"` | Hors viewport : libère textures/FBO (garde le contexte). `auto` (défaut) : ne libère pas si une passe lit `self`. `dispose` + loseContext au disconnect |
|
|
191
|
+
|
|
192
|
+
## État et visibilité
|
|
193
|
+
|
|
194
|
+
Un shader qui garde un état via `self` (feedback frame précédente) n’est plus réinitialisé quand il sort de l’écran : avec `release-offscreen="auto"` (défaut), seuls le RAF et les vidéos sont mis en pause ; les FBO restent. Forcer `release-offscreen` (attribut booléen / `true`) restaure l’ancien comportement (libération hors viewport même avec `self`).
|
|
195
|
+
|
|
196
|
+
Changer `channel0…3` / `*-ch*` re-lie les textures **sans** recompiler ni vider les buffers.
|
|
174
197
|
|
|
175
198
|
## Markup
|
|
176
199
|
|
|
@@ -184,7 +207,7 @@ Live Harris → patches → WebGPU: [Visual stack](#docs/_misc/visual-stack.md/v
|
|
|
184
207
|
hover-speed="12"
|
|
185
208
|
play
|
|
186
209
|
play-on-hover
|
|
187
|
-
release-offscreen
|
|
210
|
+
release-offscreen="auto"
|
|
188
211
|
channel0="/docs/shader-samples/color.jpg"
|
|
189
212
|
></sonic-shader>
|
|
190
213
|
</template>
|
|
@@ -8,6 +8,88 @@ import { buildFragmentSource } from "./shadertoy-prelude";
|
|
|
8
8
|
import "./shader";
|
|
9
9
|
import { SonicShader, channelFormValue } from "./shader";
|
|
10
10
|
|
|
11
|
+
describe("parseBufferFormat", () => {
|
|
12
|
+
it("accepte rgba8 / rgba16f / rgba32f", async () => {
|
|
13
|
+
const { parseBufferFormat } = await import("./types");
|
|
14
|
+
expect(parseBufferFormat("rgba8")).toBe("rgba8");
|
|
15
|
+
expect(parseBufferFormat("rgba16f")).toBe("rgba16f");
|
|
16
|
+
expect(parseBufferFormat("half")).toBe("rgba16f");
|
|
17
|
+
expect(parseBufferFormat("rgba32f")).toBe("rgba32f");
|
|
18
|
+
expect(parseBufferFormat("float")).toBe("rgba32f");
|
|
19
|
+
expect(parseBufferFormat("")).toBe("rgba8");
|
|
20
|
+
expect(parseBufferFormat("nope")).toBe("rgba8");
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
describe("resolveBufferGlFormat", () => {
|
|
25
|
+
it("reste rgba8 sans extension float", async () => {
|
|
26
|
+
const { resolveBufferGlFormat, resetBufferFormatWarnFlag } = await import(
|
|
27
|
+
"./gl-runtime"
|
|
28
|
+
);
|
|
29
|
+
resetBufferFormatWarnFlag();
|
|
30
|
+
const gl = {
|
|
31
|
+
RGBA8: 0x8058,
|
|
32
|
+
RGBA16F: 0x881a,
|
|
33
|
+
RGBA32F: 0x8814,
|
|
34
|
+
RGBA: 0x1908,
|
|
35
|
+
UNSIGNED_BYTE: 0x1401,
|
|
36
|
+
HALF_FLOAT: 0x140b,
|
|
37
|
+
FLOAT: 0x1406,
|
|
38
|
+
LINEAR: 0x2601,
|
|
39
|
+
NEAREST: 0x2600,
|
|
40
|
+
getExtension: () => null,
|
|
41
|
+
} as unknown as WebGL2RenderingContext;
|
|
42
|
+
const warn = vi.spyOn(console, "warn").mockImplementation(() => {});
|
|
43
|
+
const fmt = resolveBufferGlFormat(gl, "rgba16f");
|
|
44
|
+
expect(fmt.active).toBe("rgba8");
|
|
45
|
+
expect(fmt.float).toBe(false);
|
|
46
|
+
expect(warn).toHaveBeenCalledOnce();
|
|
47
|
+
warn.mockRestore();
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it("accepte rgba16f avec EXT_color_buffer_float", async () => {
|
|
51
|
+
const { resolveBufferGlFormat, resetBufferFormatWarnFlag } = await import(
|
|
52
|
+
"./gl-runtime"
|
|
53
|
+
);
|
|
54
|
+
resetBufferFormatWarnFlag();
|
|
55
|
+
const gl = {
|
|
56
|
+
RGBA8: 0x8058,
|
|
57
|
+
RGBA16F: 0x881a,
|
|
58
|
+
RGBA32F: 0x8814,
|
|
59
|
+
RGBA: 0x1908,
|
|
60
|
+
UNSIGNED_BYTE: 0x1401,
|
|
61
|
+
HALF_FLOAT: 0x140b,
|
|
62
|
+
FLOAT: 0x1406,
|
|
63
|
+
LINEAR: 0x2601,
|
|
64
|
+
NEAREST: 0x2600,
|
|
65
|
+
getExtension: (name: string) =>
|
|
66
|
+
name === "EXT_color_buffer_float" ? {} : null,
|
|
67
|
+
} as unknown as WebGL2RenderingContext;
|
|
68
|
+
const fmt = resolveBufferGlFormat(gl, "rgba16f");
|
|
69
|
+
expect(fmt.active).toBe("rgba16f");
|
|
70
|
+
expect(fmt.float).toBe(true);
|
|
71
|
+
expect(fmt.type).toBe(gl.HALF_FLOAT);
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
describe("findPeaks float", () => {
|
|
76
|
+
it("lit des scores Float32 déjà normalisés", async () => {
|
|
77
|
+
const { findPeaks } = await import("./types");
|
|
78
|
+
const w = 8;
|
|
79
|
+
const h = 8;
|
|
80
|
+
const data = new Float32Array(w * h * 4);
|
|
81
|
+
data[(3 * w + 3) * 4] = 0.9;
|
|
82
|
+
data[(3 * w + 4) * 4] = 0.4;
|
|
83
|
+
const peaks = findPeaks(data, w, h, {
|
|
84
|
+
threshold: 0.5,
|
|
85
|
+
maxCount: 2,
|
|
86
|
+
minDistance: 2,
|
|
87
|
+
});
|
|
88
|
+
expect(peaks.length).toBeGreaterThanOrEqual(1);
|
|
89
|
+
expect(peaks[0].score).toBeCloseTo(0.9, 5);
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
|
|
11
93
|
describe("parseChannelSource", () => {
|
|
12
94
|
it("résout self / buffers / url / fallback", () => {
|
|
13
95
|
expect(parseChannelSource("self", "")).toEqual({ kind: "self" });
|
|
@@ -224,6 +306,39 @@ describe("meanRgba", () => {
|
|
|
224
306
|
});
|
|
225
307
|
});
|
|
226
308
|
|
|
309
|
+
describe("release-offscreen auto / self", () => {
|
|
310
|
+
it("parseReleaseOffscreen", async () => {
|
|
311
|
+
const { parseReleaseOffscreen } = await import("./types");
|
|
312
|
+
expect(parseReleaseOffscreen(null)).toBe("auto");
|
|
313
|
+
expect(parseReleaseOffscreen("auto")).toBe("auto");
|
|
314
|
+
expect(parseReleaseOffscreen("")).toBe(true);
|
|
315
|
+
expect(parseReleaseOffscreen("true")).toBe(true);
|
|
316
|
+
expect(parseReleaseOffscreen("false")).toBe(false);
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
it("shouldReleaseWhenOffscreen", async () => {
|
|
320
|
+
const { shouldReleaseWhenOffscreen } = await import("./types");
|
|
321
|
+
expect(shouldReleaseWhenOffscreen("auto", true)).toBe(false);
|
|
322
|
+
expect(shouldReleaseWhenOffscreen("auto", false)).toBe(true);
|
|
323
|
+
expect(shouldReleaseWhenOffscreen(true, true)).toBe(true);
|
|
324
|
+
expect(shouldReleaseWhenOffscreen(false, false)).toBe(false);
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
it("channelsUseSelf détecte self", async () => {
|
|
328
|
+
const { channelsUseSelf } = await import("./types");
|
|
329
|
+
expect(
|
|
330
|
+
channelsUseSelf([
|
|
331
|
+
[{ kind: "url", url: "/a.png" }, { kind: "none" }, { kind: "none" }, { kind: "none" }],
|
|
332
|
+
]),
|
|
333
|
+
).toBe(false);
|
|
334
|
+
expect(
|
|
335
|
+
channelsUseSelf([
|
|
336
|
+
[{ kind: "self" }, { kind: "none" }, { kind: "none" }, { kind: "none" }],
|
|
337
|
+
]),
|
|
338
|
+
).toBe(true);
|
|
339
|
+
});
|
|
340
|
+
});
|
|
341
|
+
|
|
227
342
|
describe("SonicShader", () => {
|
|
228
343
|
afterEach(() => {
|
|
229
344
|
document.body.innerHTML = "";
|
|
@@ -365,4 +480,156 @@ describe("SonicShader", () => {
|
|
|
365
480
|
expect(el.shadowRoot?.querySelector("canvas")).toBeTruthy();
|
|
366
481
|
}
|
|
367
482
|
});
|
|
483
|
+
|
|
484
|
+
it("changement de canal → rebindChannels, pas rebuild", async () => {
|
|
485
|
+
const el = TestUtils.bootstrap(
|
|
486
|
+
`<sonic-shader style="width:32px;height:32px"></sonic-shader>`,
|
|
487
|
+
true,
|
|
488
|
+
)[0] as SonicShader;
|
|
489
|
+
el.image =
|
|
490
|
+
"void mainImage(out vec4 fragColor, in vec2 fragCoord){ fragColor=vec4(1.0); }";
|
|
491
|
+
await el.updateComplete;
|
|
492
|
+
|
|
493
|
+
const rt = {
|
|
494
|
+
isLost: false,
|
|
495
|
+
setPassChannels: vi.fn(),
|
|
496
|
+
ensureTextures: vi.fn(async () => {}),
|
|
497
|
+
ensureElementTexture: vi.fn(),
|
|
498
|
+
resize: vi.fn(),
|
|
499
|
+
dispose: vi.fn(),
|
|
500
|
+
setVideosPlaying: vi.fn(),
|
|
501
|
+
};
|
|
502
|
+
const internal = el as unknown as {
|
|
503
|
+
runtime: typeof rt;
|
|
504
|
+
ready: boolean;
|
|
505
|
+
rebuild: () => Promise<void>;
|
|
506
|
+
rebindChannels: () => Promise<void>;
|
|
507
|
+
drawFrame: (now: number) => void;
|
|
508
|
+
};
|
|
509
|
+
internal.runtime = rt;
|
|
510
|
+
internal.ready = true;
|
|
511
|
+
vi.spyOn(internal, "drawFrame").mockImplementation(() => {});
|
|
512
|
+
|
|
513
|
+
const rebuildSpy = vi.spyOn(internal, "rebuild");
|
|
514
|
+
const rebindSpy = vi.spyOn(internal, "rebindChannels");
|
|
515
|
+
rebuildSpy.mockClear();
|
|
516
|
+
rebindSpy.mockClear();
|
|
517
|
+
rt.setPassChannels.mockClear();
|
|
518
|
+
|
|
519
|
+
el.bufferACh1 = "#autre";
|
|
520
|
+
await el.updateComplete;
|
|
521
|
+
await new Promise((r) => setTimeout(r, 0));
|
|
522
|
+
|
|
523
|
+
expect(rebuildSpy).not.toHaveBeenCalled();
|
|
524
|
+
expect(rebindSpy).toHaveBeenCalled();
|
|
525
|
+
expect(rt.setPassChannels).toHaveBeenCalled();
|
|
526
|
+
});
|
|
527
|
+
|
|
528
|
+
it("release-offscreen=auto : conserve le runtime si self hors écran", async () => {
|
|
529
|
+
const el = TestUtils.bootstrap(
|
|
530
|
+
`<sonic-shader release-offscreen="auto" style="width:32px;height:32px"></sonic-shader>`,
|
|
531
|
+
true,
|
|
532
|
+
)[0] as SonicShader;
|
|
533
|
+
await el.updateComplete;
|
|
534
|
+
expect(el.releaseOffscreen).toBe("auto");
|
|
535
|
+
|
|
536
|
+
const dispose = vi.fn();
|
|
537
|
+
const rt = {
|
|
538
|
+
isLost: false,
|
|
539
|
+
dispose,
|
|
540
|
+
setVideosPlaying: vi.fn(),
|
|
541
|
+
setPassChannels: vi.fn(),
|
|
542
|
+
ensureTextures: vi.fn(async () => {}),
|
|
543
|
+
ensureElementTexture: vi.fn(),
|
|
544
|
+
resize: vi.fn(),
|
|
545
|
+
};
|
|
546
|
+
const internal = el as unknown as {
|
|
547
|
+
runtime: typeof rt | null;
|
|
548
|
+
ready: boolean;
|
|
549
|
+
inView: boolean;
|
|
550
|
+
syncVisibility: () => void;
|
|
551
|
+
drawFrame: (now: number) => void;
|
|
552
|
+
};
|
|
553
|
+
internal.runtime = rt;
|
|
554
|
+
internal.ready = true;
|
|
555
|
+
internal.inView = true;
|
|
556
|
+
vi.spyOn(internal, "drawFrame").mockImplementation(() => {});
|
|
557
|
+
|
|
558
|
+
el.bufferACh0 = "self";
|
|
559
|
+
await el.updateComplete;
|
|
560
|
+
await new Promise((r) => setTimeout(r, 0));
|
|
561
|
+
|
|
562
|
+
internal.inView = false;
|
|
563
|
+
internal.syncVisibility();
|
|
564
|
+
expect(dispose).not.toHaveBeenCalled();
|
|
565
|
+
expect(internal.runtime).toBe(rt);
|
|
566
|
+
});
|
|
567
|
+
|
|
568
|
+
it("release-offscreen=auto : libère hors écran sans self", async () => {
|
|
569
|
+
const el = TestUtils.bootstrap(
|
|
570
|
+
`<sonic-shader release-offscreen="auto" style="width:32px;height:32px"></sonic-shader>`,
|
|
571
|
+
true,
|
|
572
|
+
)[0] as SonicShader;
|
|
573
|
+
await el.updateComplete;
|
|
574
|
+
const dispose = vi.fn();
|
|
575
|
+
const rt = {
|
|
576
|
+
isLost: false,
|
|
577
|
+
dispose,
|
|
578
|
+
setVideosPlaying: vi.fn(),
|
|
579
|
+
};
|
|
580
|
+
const internal = el as unknown as {
|
|
581
|
+
runtime: typeof rt | null;
|
|
582
|
+
ready: boolean;
|
|
583
|
+
inView: boolean;
|
|
584
|
+
syncVisibility: () => void;
|
|
585
|
+
drawFrame: (now: number) => void;
|
|
586
|
+
};
|
|
587
|
+
internal.runtime = rt;
|
|
588
|
+
internal.ready = true;
|
|
589
|
+
internal.inView = false;
|
|
590
|
+
vi.spyOn(internal, "drawFrame").mockImplementation(() => {});
|
|
591
|
+
internal.syncVisibility();
|
|
592
|
+
expect(dispose).toHaveBeenCalledWith(false);
|
|
593
|
+
expect(internal.runtime).toBeNull();
|
|
594
|
+
});
|
|
595
|
+
|
|
596
|
+
it("release-offscreen=true : libère même avec self", async () => {
|
|
597
|
+
const el = TestUtils.bootstrap(
|
|
598
|
+
`<sonic-shader release-offscreen style="width:32px;height:32px"></sonic-shader>`,
|
|
599
|
+
true,
|
|
600
|
+
)[0] as SonicShader;
|
|
601
|
+
await el.updateComplete;
|
|
602
|
+
expect(el.releaseOffscreen).toBe(true);
|
|
603
|
+
|
|
604
|
+
const dispose = vi.fn();
|
|
605
|
+
const rt = {
|
|
606
|
+
isLost: false,
|
|
607
|
+
dispose,
|
|
608
|
+
setVideosPlaying: vi.fn(),
|
|
609
|
+
setPassChannels: vi.fn(),
|
|
610
|
+
ensureTextures: vi.fn(async () => {}),
|
|
611
|
+
ensureElementTexture: vi.fn(),
|
|
612
|
+
resize: vi.fn(),
|
|
613
|
+
};
|
|
614
|
+
const internal = el as unknown as {
|
|
615
|
+
runtime: typeof rt | null;
|
|
616
|
+
ready: boolean;
|
|
617
|
+
inView: boolean;
|
|
618
|
+
syncVisibility: () => void;
|
|
619
|
+
drawFrame: (now: number) => void;
|
|
620
|
+
};
|
|
621
|
+
internal.runtime = rt;
|
|
622
|
+
internal.ready = true;
|
|
623
|
+
internal.inView = true;
|
|
624
|
+
vi.spyOn(internal, "drawFrame").mockImplementation(() => {});
|
|
625
|
+
|
|
626
|
+
el.bufferACh0 = "self";
|
|
627
|
+
await el.updateComplete;
|
|
628
|
+
await new Promise((r) => setTimeout(r, 0));
|
|
629
|
+
|
|
630
|
+
internal.inView = false;
|
|
631
|
+
internal.syncVisibility();
|
|
632
|
+
expect(dispose).toHaveBeenCalledWith(false);
|
|
633
|
+
expect(internal.runtime).toBeNull();
|
|
634
|
+
});
|
|
368
635
|
});
|