@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
|
@@ -85,7 +85,9 @@ Le viewer lit `asset` ou `src` depuis le DP — la source (fetch, upload, HF) n
|
|
|
85
85
|
| `fit` | Fit bbox après load (défaut true) |
|
|
86
86
|
| `pick` | Survol highlight + clic → event `pick` + `hit*` ; double-clic = fit |
|
|
87
87
|
| `play` / `play-on-hover` | Boucle RAF |
|
|
88
|
-
| `
|
|
88
|
+
| `play-offscreen` | Garde RAF / runtime hors viewport (pont live `#id`) |
|
|
89
|
+
| `release-offscreen` | Dispose renderer hors viewport (défaut true) sauf si `play-offscreen` / consommateur live |
|
|
90
|
+
| `damping` | Inertie OrbitControls (défaut `0.08`, `0` = off) |
|
|
89
91
|
| `dpr-max` | Cap devicePixelRatio (défaut 2) |
|
|
90
92
|
| `dataProvider` / `out-data-provider` | Entrée / sortie |
|
|
91
93
|
| `out-interval` | Throttle publication ms (défaut 80) |
|
|
@@ -126,3 +128,34 @@ No shared WebGL context between `sonic-3d` and `sonic-shader`.
|
|
|
126
128
|
```
|
|
127
129
|
|
|
128
130
|
Demo: [Visual stack — 3D → shader live](#docs/_misc/visual-stack.md/visual-stack).
|
|
131
|
+
|
|
132
|
+
Un `sonic-shader` / `sonic-webgpu` qui pointe `#id` s’enregistre via `registerFrameConsumer` : le 3D **continue hors viewport** (pas de dispose). Option explicite : `play-offscreen`.
|
|
133
|
+
|
|
134
|
+
### Arrêt net
|
|
135
|
+
|
|
136
|
+
`el.stopMotion()` coupe `autoRotate` et l’inertie OrbitControls. Quand la caméra est immobile depuis ~8 frames : event `rest` + champ out `moving: 0|1`. Attribut `damping` (défaut `0.08`, `0` = off).
|
|
137
|
+
|
|
138
|
+
## Post FX (in-viewer)
|
|
139
|
+
|
|
140
|
+
When `post-image` is set, the scene renders to an offscreen target with a **depth texture**, then ShaderToy-style passes run inside the same Three context (`post-buffer-a`…`post-image`). Same GLSL as `sonic-shader` (`mainImage`, `iChannel0–3`, `uParam0–3`, `sonicLinearDepth`).
|
|
141
|
+
|
|
142
|
+
| Channel token | Source |
|
|
143
|
+
|---------------|--------|
|
|
144
|
+
| `scene` (default ch0) | Color render target |
|
|
145
|
+
| `depth` | Depth texture from the scene pass |
|
|
146
|
+
| `buffer-a`…`d` | Ping-pong buffers |
|
|
147
|
+
| URL / `#id` | External texture (same as shader live bridge) |
|
|
148
|
+
|
|
149
|
+
```html
|
|
150
|
+
<sonic-3d
|
|
151
|
+
post-image="…GLSL…"
|
|
152
|
+
post-image-ch0="scene"
|
|
153
|
+
post-image-ch1="depth"
|
|
154
|
+
param0="0.5"
|
|
155
|
+
post-scale="1"
|
|
156
|
+
></sonic-3d>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Demo: [Visual stack — post depth edges](#docs/_misc/visual-stack.md/visual-stack).
|
|
160
|
+
|
|
161
|
+
Pick / orbit still use scene geometry; `frame-out` captures the **final** canvas after post.
|
|
@@ -169,3 +169,45 @@ describe("orbit.wheelAffectsZoom", () => {
|
|
|
169
169
|
expect(orbit.wheelAffectsZoom(atMaxZoom, 1)).toBe(true);
|
|
170
170
|
});
|
|
171
171
|
});
|
|
172
|
+
|
|
173
|
+
describe("wantsOffscreenPlay / frame consumers", () => {
|
|
174
|
+
it("playOffscreen ou consumers → true", async () => {
|
|
175
|
+
const { wantsOffscreenPlay } = await import("./playback");
|
|
176
|
+
expect(wantsOffscreenPlay({ playOffscreen: false, frameConsumerCount: 0 })).toBe(
|
|
177
|
+
false,
|
|
178
|
+
);
|
|
179
|
+
expect(wantsOffscreenPlay({ playOffscreen: true, frameConsumerCount: 0 })).toBe(
|
|
180
|
+
true,
|
|
181
|
+
);
|
|
182
|
+
expect(wantsOffscreenPlay({ playOffscreen: false, frameConsumerCount: 1 })).toBe(
|
|
183
|
+
true,
|
|
184
|
+
);
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
it("registerFrameConsumer incrémente le compteur", async () => {
|
|
188
|
+
const el = TestUtils.bootstrap(
|
|
189
|
+
`<sonic-3d style="width:64px;height:64px"></sonic-3d>`,
|
|
190
|
+
true,
|
|
191
|
+
)[0] as Sonic3d;
|
|
192
|
+
await el.updateComplete;
|
|
193
|
+
expect(el.frameConsumerCount).toBe(0);
|
|
194
|
+
const token = {};
|
|
195
|
+
el.registerFrameConsumer(token);
|
|
196
|
+
expect(el.frameConsumerCount).toBe(1);
|
|
197
|
+
expect(el.playOffscreen).toBe(false);
|
|
198
|
+
el.unregisterFrameConsumer(token);
|
|
199
|
+
expect(el.frameConsumerCount).toBe(0);
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
it("stopMotion coupe autoRotate", async () => {
|
|
203
|
+
const el = TestUtils.bootstrap(
|
|
204
|
+
`<sonic-3d auto-rotate style="width:64px;height:64px"></sonic-3d>`,
|
|
205
|
+
true,
|
|
206
|
+
)[0] as Sonic3d;
|
|
207
|
+
await el.updateComplete;
|
|
208
|
+
expect(el.autoRotate).toBe(true);
|
|
209
|
+
el.stopMotion();
|
|
210
|
+
expect(el.autoRotate).toBe(false);
|
|
211
|
+
expect(el.moving).toBe(0);
|
|
212
|
+
});
|
|
213
|
+
});
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { html } from "lit";
|
|
2
2
|
import { customElement, state } from "lit/decorators.js";
|
|
3
3
|
import { PublisherManager } from "@supersoniks/concorde/utils";
|
|
4
|
+
import { ensure } from "./ensure";
|
|
4
5
|
import { formBind, type FormOrbit } from "./form-bind";
|
|
5
6
|
import { life } from "./life";
|
|
6
7
|
import { outPublish } from "./out-publish";
|
|
8
|
+
import { postBind } from "./post-bind";
|
|
7
9
|
import type { SceneHit } from "./pick";
|
|
8
10
|
import { playback } from "./playback";
|
|
9
11
|
import { pointer } from "./pointer";
|
|
@@ -13,6 +15,8 @@ import { sonic3dStyles } from "./styles";
|
|
|
13
15
|
import { propUpdate } from "./updated";
|
|
14
16
|
import { wire } from "./wire";
|
|
15
17
|
|
|
18
|
+
/** Frames sans mouvement avant `rest` / `moving=0`. */
|
|
19
|
+
const REST_STILL_FRAMES = 8;
|
|
16
20
|
/**
|
|
17
21
|
* Viewer 3D Concorde (Three.js) — glTF/GLB, caméra orbit/perspective/ortho,
|
|
18
22
|
* outputs dataProvider paresseux. Opt-in : `@supersoniks/concorde/3d`.
|
|
@@ -21,7 +25,7 @@ import { wire } from "./wire";
|
|
|
21
25
|
export class Sonic3d extends Sonic3dProps {
|
|
22
26
|
static styles = sonic3dStyles;
|
|
23
27
|
|
|
24
|
-
@state()
|
|
28
|
+
@state() errorMessage = "";
|
|
25
29
|
|
|
26
30
|
/** État runtime partagé avec les helpers (lu ici pour noUnusedLocals). */
|
|
27
31
|
runtime: SceneRuntime | null = null;
|
|
@@ -48,7 +52,20 @@ export class Sonic3d extends Sonic3dProps {
|
|
|
48
52
|
snapshotSeq = 0;
|
|
49
53
|
/** Contrat SonicFrameSource — incrémenté après chaque render. */
|
|
50
54
|
frameSeq = 0;
|
|
55
|
+
lastDrawAt = 0;
|
|
51
56
|
lastFormOrbit: FormOrbit | null = null;
|
|
57
|
+
/** Consommateurs live (`registerFrameConsumer`). */
|
|
58
|
+
private frameConsumers = new Set<object>();
|
|
59
|
+
/** 1 si caméra en mouvement, 0 sinon (publié en out). */
|
|
60
|
+
moving = 0;
|
|
61
|
+
private stillFrames = 0;
|
|
62
|
+
private lastMotionYaw = NaN;
|
|
63
|
+
private lastMotionPitch = NaN;
|
|
64
|
+
private lastMotionDist = NaN;
|
|
65
|
+
|
|
66
|
+
get frameConsumerCount() {
|
|
67
|
+
return this.frameConsumers.size;
|
|
68
|
+
}
|
|
52
69
|
|
|
53
70
|
onFormMutation = () => {
|
|
54
71
|
const data = (this.formPublisher?.get() ?? {}) as Record<string, unknown>;
|
|
@@ -137,9 +154,87 @@ export class Sonic3d extends Sonic3dProps {
|
|
|
137
154
|
private drawFrame(now: number) {
|
|
138
155
|
if (!this.runtime || !this.ready) return;
|
|
139
156
|
this.frame++;
|
|
157
|
+
const time = (now - this.startTime) / 1000;
|
|
158
|
+
const timeDelta = Math.max(0, (now - this.lastDrawAt) / 1000);
|
|
159
|
+
this.lastDrawAt = now;
|
|
160
|
+
postBind.syncFrame(this as never, time, timeDelta, this.frame);
|
|
140
161
|
this.runtime.render();
|
|
141
162
|
this.frameSeq++;
|
|
142
|
-
|
|
163
|
+
this.trackMotion(time);
|
|
164
|
+
outPublish.maybePublish(this as never, now, time);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Enregistre un consommateur live (`sonic-shader` / `sonic-webgpu` via `#id`).
|
|
169
|
+
* Garde le RAF hors viewport tant qu’il reste au moins un token.
|
|
170
|
+
*/
|
|
171
|
+
registerFrameConsumer(token: object = {}) {
|
|
172
|
+
this.frameConsumers.add(token);
|
|
173
|
+
ensure.syncVisibility(this as never);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
unregisterFrameConsumer(token: object = {}) {
|
|
177
|
+
this.frameConsumers.delete(token);
|
|
178
|
+
ensure.syncVisibility(this as never);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Coupe `autoRotate` + inertie OrbitControls.
|
|
183
|
+
* Émet `rest` si la caméra était en mouvement.
|
|
184
|
+
*/
|
|
185
|
+
stopMotion() {
|
|
186
|
+
this.autoRotate = false;
|
|
187
|
+
this.runtime?.stopMotion();
|
|
188
|
+
this.stillFrames = REST_STILL_FRAMES;
|
|
189
|
+
if (this.moving !== 0) {
|
|
190
|
+
this.moving = 0;
|
|
191
|
+
this.dispatchEvent(
|
|
192
|
+
new CustomEvent("rest", {
|
|
193
|
+
detail: { moving: 0 },
|
|
194
|
+
bubbles: true,
|
|
195
|
+
composed: true,
|
|
196
|
+
}),
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
this.syncPlayback();
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
private trackMotion(time: number) {
|
|
203
|
+
if (!this.runtime) return;
|
|
204
|
+
const snap = this.runtime.snapshot({
|
|
205
|
+
time,
|
|
206
|
+
frame: this.frame,
|
|
207
|
+
hovering: this.hovering ? 1 : 0,
|
|
208
|
+
pointerX: this.pointerX,
|
|
209
|
+
pointerY: this.pointerY,
|
|
210
|
+
hit: this.lastHit,
|
|
211
|
+
});
|
|
212
|
+
const eps = 1e-5;
|
|
213
|
+
const still =
|
|
214
|
+
Number.isFinite(this.lastMotionYaw) &&
|
|
215
|
+
Math.abs(snap.yaw - this.lastMotionYaw) < eps &&
|
|
216
|
+
Math.abs(snap.pitch - this.lastMotionPitch) < eps &&
|
|
217
|
+
Math.abs(snap.distance - this.lastMotionDist) < eps &&
|
|
218
|
+
!this.autoRotate;
|
|
219
|
+
this.lastMotionYaw = snap.yaw;
|
|
220
|
+
this.lastMotionPitch = snap.pitch;
|
|
221
|
+
this.lastMotionDist = snap.distance;
|
|
222
|
+
if (still) {
|
|
223
|
+
this.stillFrames++;
|
|
224
|
+
if (this.stillFrames >= REST_STILL_FRAMES && this.moving !== 0) {
|
|
225
|
+
this.moving = 0;
|
|
226
|
+
this.dispatchEvent(
|
|
227
|
+
new CustomEvent("rest", {
|
|
228
|
+
detail: { moving: 0, yaw: snap.yaw, pitch: snap.pitch },
|
|
229
|
+
bubbles: true,
|
|
230
|
+
composed: true,
|
|
231
|
+
}),
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
} else {
|
|
235
|
+
this.stillFrames = 0;
|
|
236
|
+
this.moving = 1;
|
|
237
|
+
}
|
|
143
238
|
}
|
|
144
239
|
|
|
145
240
|
/** Contrat SonicFrameSource — canvas Three (preserveDrawingBuffer). */
|
|
@@ -170,12 +265,15 @@ export type {
|
|
|
170
265
|
Sonic3dConfig,
|
|
171
266
|
Sonic3dOutput,
|
|
172
267
|
} from "./types";
|
|
173
|
-
export type { SonicMediaRef, SonicFrameSource } from "@supersoniks/concorde/core/utils/mediaRef";
|
|
268
|
+
export type { SonicMediaRef, SonicFrameSource, SonicFrameConsumerHost } from "@supersoniks/concorde/core/utils/mediaRef";
|
|
174
269
|
export {
|
|
175
270
|
toMediaUrl,
|
|
176
271
|
cloneMediaRef,
|
|
177
272
|
isFrameSource,
|
|
273
|
+
isFrameConsumerHost,
|
|
274
|
+
FrameConsumerRegistry,
|
|
178
275
|
} from "@supersoniks/concorde/core/utils/mediaRef";
|
|
276
|
+
export { wantsOffscreenPlay } from "./playback";
|
|
179
277
|
export { frameCapture } from "./frame-capture";
|
|
180
278
|
export { frameSource } from "./frame-source";
|
|
181
279
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Sonic3dCameraMode } from "./constants";
|
|
2
2
|
import { parse } from "./parse";
|
|
3
|
-
import { playback } from "./playback";
|
|
3
|
+
import { playback, wantsOffscreenPlay } from "./playback";
|
|
4
4
|
import { reload } from "./reload";
|
|
5
5
|
import { SceneRuntime } from "./scene-runtime";
|
|
6
6
|
|
|
@@ -16,10 +16,13 @@ export type EnsureHost = {
|
|
|
16
16
|
maxDistance: number;
|
|
17
17
|
minPolar: number;
|
|
18
18
|
maxPolar: number;
|
|
19
|
+
damping: number;
|
|
19
20
|
loadToken: number;
|
|
20
21
|
ready: boolean;
|
|
21
22
|
inView: boolean;
|
|
22
23
|
releaseOffscreen: boolean;
|
|
24
|
+
playOffscreen: boolean;
|
|
25
|
+
frameConsumerCount: number;
|
|
23
26
|
getBoundingClientRect: () => DOMRect;
|
|
24
27
|
clientWidth: number;
|
|
25
28
|
clientHeight: number;
|
|
@@ -52,6 +55,7 @@ async function ensureRuntime(host: EnsureHost) {
|
|
|
52
55
|
minPolar: reload.degToRad(host.minPolar),
|
|
53
56
|
maxPolar: reload.degToRad(host.maxPolar),
|
|
54
57
|
});
|
|
58
|
+
host.runtime.setDamping(host.damping);
|
|
55
59
|
reload.applyOrbitLimits(host as never);
|
|
56
60
|
syncSize(host);
|
|
57
61
|
await reload.run(host as never);
|
|
@@ -71,11 +75,15 @@ function releaseRuntime(host: EnsureHost) {
|
|
|
71
75
|
}
|
|
72
76
|
|
|
73
77
|
function syncVisibility(host: EnsureHost) {
|
|
74
|
-
|
|
78
|
+
const keepOffscreen = wantsOffscreenPlay(host);
|
|
79
|
+
if (!host.inView && host.releaseOffscreen && !keepOffscreen) {
|
|
75
80
|
releaseRuntime(host);
|
|
76
81
|
return;
|
|
77
82
|
}
|
|
78
|
-
if (
|
|
83
|
+
if (
|
|
84
|
+
(!host.runtime || host.runtime.isLost) &&
|
|
85
|
+
(host.inView || keepOffscreen || !host.releaseOffscreen)
|
|
86
|
+
) {
|
|
79
87
|
void ensureRuntime(host);
|
|
80
88
|
return;
|
|
81
89
|
}
|
|
@@ -2,6 +2,7 @@ import { ORBIT_CHANGE_EPSILON } from "./constants";
|
|
|
2
2
|
import { formFields } from "./form-fields";
|
|
3
3
|
import { parse } from "./parse";
|
|
4
4
|
import { playback } from "./playback";
|
|
5
|
+
import { postBind } from "./post-bind";
|
|
5
6
|
import { reload } from "./reload";
|
|
6
7
|
import type { SceneRuntime } from "./runtime";
|
|
7
8
|
import type { Sonic3dAsset, Sonic3dCameraMode } from "./types";
|
|
@@ -91,6 +92,7 @@ function applyFormParams(host: FormBindHost, data: Record<string, unknown>) {
|
|
|
91
92
|
|
|
92
93
|
formFields.pushToRuntime(host, data);
|
|
93
94
|
applyFormOrbit(host, data);
|
|
95
|
+
postBind.applyFormPost(host as never, data);
|
|
94
96
|
if (needReload) void reload.run(host as never);
|
|
95
97
|
}
|
|
96
98
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PublisherManager } from "@supersoniks/concorde/utils";
|
|
2
2
|
import { ensure } from "./ensure";
|
|
3
3
|
import { formBind } from "./form-bind";
|
|
4
|
+
import { wantsOffscreenPlay } from "./playback";
|
|
4
5
|
import type { SceneRuntime } from "./runtime";
|
|
5
6
|
|
|
6
7
|
/** Host Lit pour cycle de vie / observers / bind DP. */
|
|
@@ -9,6 +10,8 @@ export type LifeHost = {
|
|
|
9
10
|
dataProvider: string;
|
|
10
11
|
outDataProvider: string;
|
|
11
12
|
releaseOffscreen: boolean;
|
|
13
|
+
playOffscreen: boolean;
|
|
14
|
+
frameConsumerCount: number;
|
|
12
15
|
inView: boolean;
|
|
13
16
|
runtime: SceneRuntime | null;
|
|
14
17
|
camera: string;
|
|
@@ -86,7 +89,7 @@ function firstUpdated(host: LifeHost) {
|
|
|
86
89
|
bindFormProvider(host);
|
|
87
90
|
bindOutPublisher(host);
|
|
88
91
|
requestAnimationFrame(() => {
|
|
89
|
-
if (host.inView || !host.releaseOffscreen) {
|
|
92
|
+
if (host.inView || !host.releaseOffscreen || wantsOffscreenPlay(host)) {
|
|
90
93
|
void ensure.ensureRuntime(host as never);
|
|
91
94
|
}
|
|
92
95
|
});
|
|
@@ -33,6 +33,7 @@ export type OutPublishHost = {
|
|
|
33
33
|
pointerY: number;
|
|
34
34
|
lastHit: SceneHit | null;
|
|
35
35
|
fov: number;
|
|
36
|
+
moving: number;
|
|
36
37
|
formPublisher: OutPublisherLike | null;
|
|
37
38
|
bindOutPublisher: () => void;
|
|
38
39
|
dispatchEvent: (event: Event) => boolean;
|
|
@@ -64,7 +65,7 @@ function shouldSkipFormControlOutWrite(
|
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
function buildOutput(host: OutPublishHost, time: number): Sonic3dOutput {
|
|
67
|
-
|
|
68
|
+
const base =
|
|
68
69
|
host.runtime?.snapshot({
|
|
69
70
|
time,
|
|
70
71
|
frame: host.frame,
|
|
@@ -91,8 +92,8 @@ function buildOutput(host: OutPublishHost, time: number): Sonic3dOutput {
|
|
|
91
92
|
distance: 0,
|
|
92
93
|
yaw: 0,
|
|
93
94
|
pitch: 0,
|
|
94
|
-
}
|
|
95
|
-
|
|
95
|
+
};
|
|
96
|
+
return { ...base, moving: host.moving };
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
function writePayload(host: OutPublishHost, payload: Sonic3dOutput) {
|
|
@@ -8,10 +8,21 @@ export type PlaybackHost = {
|
|
|
8
8
|
playOnHover: boolean;
|
|
9
9
|
hovering: boolean;
|
|
10
10
|
autoRotate: boolean;
|
|
11
|
+
playOffscreen: boolean;
|
|
12
|
+
/** Nombre de consommateurs live (`registerFrameConsumer`). */
|
|
13
|
+
frameConsumerCount: number;
|
|
11
14
|
raf: number;
|
|
12
15
|
drawFrame: (now: number) => void;
|
|
13
16
|
};
|
|
14
17
|
|
|
18
|
+
/** Hors écran : jouer si `play-offscreen` ou au moins un consommateur live. */
|
|
19
|
+
export function wantsOffscreenPlay(host: {
|
|
20
|
+
playOffscreen: boolean;
|
|
21
|
+
frameConsumerCount: number;
|
|
22
|
+
}): boolean {
|
|
23
|
+
return !!host.playOffscreen || host.frameConsumerCount > 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
15
26
|
function prefersReducedMotion(): boolean {
|
|
16
27
|
return (
|
|
17
28
|
typeof matchMedia === "function" &&
|
|
@@ -22,7 +33,7 @@ function prefersReducedMotion(): boolean {
|
|
|
22
33
|
function shouldAnimate(host: PlaybackHost): boolean {
|
|
23
34
|
if (!host.play) return false;
|
|
24
35
|
if (!host.ready) return false;
|
|
25
|
-
if (!host.inView) return false;
|
|
36
|
+
if (!host.inView && !wantsOffscreenPlay(host)) return false;
|
|
26
37
|
if (!host.runtime) return false;
|
|
27
38
|
if (prefersReducedMotion()) return false;
|
|
28
39
|
if (host.playOnHover) return host.hovering;
|
|
@@ -64,6 +75,7 @@ function syncPlayback(host: PlaybackHost, loop: () => void) {
|
|
|
64
75
|
export const playback = {
|
|
65
76
|
prefersReducedMotion,
|
|
66
77
|
shouldAnimate,
|
|
78
|
+
wantsOffscreenPlay,
|
|
67
79
|
syncAutoRotate,
|
|
68
80
|
syncPlayback,
|
|
69
81
|
stopLoop,
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Construit la config PostFx depuis les props Lit / form DP.
|
|
3
|
+
*/
|
|
4
|
+
import { lookupLiveElement } from "@supersoniks/concorde/core/utils/mediaRef";
|
|
5
|
+
import {
|
|
6
|
+
clampPostScale,
|
|
7
|
+
parsePostChannelSource,
|
|
8
|
+
type PostChannels,
|
|
9
|
+
type PostPassId,
|
|
10
|
+
type PostSources,
|
|
11
|
+
} from "./post-channels";
|
|
12
|
+
import type { PostFxConfig } from "./post-fx";
|
|
13
|
+
import type { SceneRuntime } from "./runtime";
|
|
14
|
+
|
|
15
|
+
export type PostBindHost = {
|
|
16
|
+
postImage: string;
|
|
17
|
+
postBufferA: string;
|
|
18
|
+
postBufferB: string;
|
|
19
|
+
postBufferC: string;
|
|
20
|
+
postBufferD: string;
|
|
21
|
+
postCommon: string;
|
|
22
|
+
postImageCh0: string;
|
|
23
|
+
postImageCh1: string;
|
|
24
|
+
postImageCh2: string;
|
|
25
|
+
postImageCh3: string;
|
|
26
|
+
postBufferACh0: string;
|
|
27
|
+
postBufferACh1: string;
|
|
28
|
+
postBufferACh2: string;
|
|
29
|
+
postBufferACh3: string;
|
|
30
|
+
postBufferBCh0: string;
|
|
31
|
+
postBufferBCh1: string;
|
|
32
|
+
postBufferBCh2: string;
|
|
33
|
+
postBufferBCh3: string;
|
|
34
|
+
postBufferCCh0: string;
|
|
35
|
+
postBufferCCh1: string;
|
|
36
|
+
postBufferCCh2: string;
|
|
37
|
+
postBufferCCh3: string;
|
|
38
|
+
postBufferDCh0: string;
|
|
39
|
+
postBufferDCh1: string;
|
|
40
|
+
postBufferDCh2: string;
|
|
41
|
+
postBufferDCh3: string;
|
|
42
|
+
postScale: number;
|
|
43
|
+
param0: number;
|
|
44
|
+
param1: number;
|
|
45
|
+
param2: number;
|
|
46
|
+
param3: number;
|
|
47
|
+
runtime: SceneRuntime | null;
|
|
48
|
+
errorMessage: string;
|
|
49
|
+
getRootNode: () => Node;
|
|
50
|
+
dispatchEvent: (event: Event) => boolean;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const POST_PROP_KEYS = [
|
|
54
|
+
"postImage",
|
|
55
|
+
"postBufferA",
|
|
56
|
+
"postBufferB",
|
|
57
|
+
"postBufferC",
|
|
58
|
+
"postBufferD",
|
|
59
|
+
"postCommon",
|
|
60
|
+
"postImageCh0",
|
|
61
|
+
"postImageCh1",
|
|
62
|
+
"postImageCh2",
|
|
63
|
+
"postImageCh3",
|
|
64
|
+
"postBufferACh0",
|
|
65
|
+
"postBufferACh1",
|
|
66
|
+
"postBufferACh2",
|
|
67
|
+
"postBufferACh3",
|
|
68
|
+
"postBufferBCh0",
|
|
69
|
+
"postBufferBCh1",
|
|
70
|
+
"postBufferBCh2",
|
|
71
|
+
"postBufferBCh3",
|
|
72
|
+
"postBufferCCh0",
|
|
73
|
+
"postBufferCCh1",
|
|
74
|
+
"postBufferCCh2",
|
|
75
|
+
"postBufferCCh3",
|
|
76
|
+
"postBufferDCh0",
|
|
77
|
+
"postBufferDCh1",
|
|
78
|
+
"postBufferDCh2",
|
|
79
|
+
"postBufferDCh3",
|
|
80
|
+
"postScale",
|
|
81
|
+
] as const;
|
|
82
|
+
|
|
83
|
+
function buildChannels(host: PostBindHost, pass: PostPassId): PostChannels {
|
|
84
|
+
const fallbacks = ["", "", "", ""];
|
|
85
|
+
// image defaults ch0=scene via parse empty+slot0
|
|
86
|
+
let overrides: string[] = ["", "", "", ""];
|
|
87
|
+
if (pass === "image") {
|
|
88
|
+
overrides = [
|
|
89
|
+
host.postImageCh0,
|
|
90
|
+
host.postImageCh1,
|
|
91
|
+
host.postImageCh2,
|
|
92
|
+
host.postImageCh3,
|
|
93
|
+
];
|
|
94
|
+
} else if (pass === "bufferA") {
|
|
95
|
+
overrides = [
|
|
96
|
+
host.postBufferACh0,
|
|
97
|
+
host.postBufferACh1,
|
|
98
|
+
host.postBufferACh2,
|
|
99
|
+
host.postBufferACh3,
|
|
100
|
+
];
|
|
101
|
+
} else if (pass === "bufferB") {
|
|
102
|
+
overrides = [
|
|
103
|
+
host.postBufferBCh0,
|
|
104
|
+
host.postBufferBCh1,
|
|
105
|
+
host.postBufferBCh2,
|
|
106
|
+
host.postBufferBCh3,
|
|
107
|
+
];
|
|
108
|
+
} else if (pass === "bufferC") {
|
|
109
|
+
overrides = [
|
|
110
|
+
host.postBufferCCh0,
|
|
111
|
+
host.postBufferCCh1,
|
|
112
|
+
host.postBufferCCh2,
|
|
113
|
+
host.postBufferCCh3,
|
|
114
|
+
];
|
|
115
|
+
} else {
|
|
116
|
+
overrides = [
|
|
117
|
+
host.postBufferDCh0,
|
|
118
|
+
host.postBufferDCh1,
|
|
119
|
+
host.postBufferDCh2,
|
|
120
|
+
host.postBufferDCh3,
|
|
121
|
+
];
|
|
122
|
+
}
|
|
123
|
+
return [0, 1, 2, 3].map((i) =>
|
|
124
|
+
parsePostChannelSource(
|
|
125
|
+
overrides[i],
|
|
126
|
+
fallbacks[i],
|
|
127
|
+
i as 0 | 1 | 2 | 3,
|
|
128
|
+
),
|
|
129
|
+
) as PostChannels;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function buildConfig(host: PostBindHost): PostFxConfig | null {
|
|
133
|
+
if (!host.postImage.trim()) return null;
|
|
134
|
+
const sources: PostSources = {
|
|
135
|
+
common: host.postCommon,
|
|
136
|
+
image: host.postImage,
|
|
137
|
+
bufferA: host.postBufferA,
|
|
138
|
+
bufferB: host.postBufferB,
|
|
139
|
+
bufferC: host.postBufferC,
|
|
140
|
+
bufferD: host.postBufferD,
|
|
141
|
+
};
|
|
142
|
+
const channels = new Map<PostPassId, PostChannels>();
|
|
143
|
+
for (const pass of [
|
|
144
|
+
"bufferA",
|
|
145
|
+
"bufferB",
|
|
146
|
+
"bufferC",
|
|
147
|
+
"bufferD",
|
|
148
|
+
"image",
|
|
149
|
+
] as PostPassId[]) {
|
|
150
|
+
channels.set(pass, buildChannels(host, pass));
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
sources,
|
|
154
|
+
channels,
|
|
155
|
+
scale: clampPostScale(host.postScale),
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function lookupElement(host: PostBindHost, key: string): Element | null {
|
|
160
|
+
if (!key.startsWith("#")) return null;
|
|
161
|
+
const live = lookupLiveElement(key);
|
|
162
|
+
if (live) return live;
|
|
163
|
+
const id = key.slice(1);
|
|
164
|
+
if (!id || id.startsWith("__sonic_frame_")) return null;
|
|
165
|
+
const root = host.getRootNode();
|
|
166
|
+
if (root instanceof Document || root instanceof ShadowRoot) {
|
|
167
|
+
const el = root.getElementById(id);
|
|
168
|
+
if (el) return el;
|
|
169
|
+
}
|
|
170
|
+
return typeof document !== "undefined" ? document.getElementById(id) : null;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function applyConfig(host: PostBindHost) {
|
|
174
|
+
if (!host.runtime) return;
|
|
175
|
+
host.runtime.setPostElementResolver((key) => lookupElement(host, key));
|
|
176
|
+
try {
|
|
177
|
+
host.runtime.setPostConfig(buildConfig(host));
|
|
178
|
+
if (host.errorMessage.startsWith("Post FX")) host.errorMessage = "";
|
|
179
|
+
} catch (err) {
|
|
180
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
181
|
+
host.errorMessage = `Post FX: ${message}`;
|
|
182
|
+
const pass =
|
|
183
|
+
err && typeof err === "object" && "pass" in err
|
|
184
|
+
? String((err as { pass: string }).pass)
|
|
185
|
+
: "image";
|
|
186
|
+
const infoLog =
|
|
187
|
+
err && typeof err === "object" && "infoLog" in err
|
|
188
|
+
? String((err as { infoLog: string }).infoLog)
|
|
189
|
+
: "";
|
|
190
|
+
host.dispatchEvent(
|
|
191
|
+
new CustomEvent("error", {
|
|
192
|
+
detail: { message, pass, infoLog },
|
|
193
|
+
bubbles: true,
|
|
194
|
+
composed: true,
|
|
195
|
+
}),
|
|
196
|
+
);
|
|
197
|
+
try {
|
|
198
|
+
host.runtime.setPostConfig(null);
|
|
199
|
+
} catch {
|
|
200
|
+
/* ignore */
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function syncFrame(
|
|
206
|
+
host: PostBindHost,
|
|
207
|
+
time: number,
|
|
208
|
+
timeDelta: number,
|
|
209
|
+
frame: number,
|
|
210
|
+
mouse: [number, number, number, number] = [0, 0, 0, 0],
|
|
211
|
+
) {
|
|
212
|
+
host.runtime?.setPostFrame({
|
|
213
|
+
time,
|
|
214
|
+
timeDelta,
|
|
215
|
+
frame,
|
|
216
|
+
mouse,
|
|
217
|
+
params: [host.param0, host.param1, host.param2, host.param3],
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function propsChanged(
|
|
222
|
+
changed: Map<string | number | symbol, unknown>,
|
|
223
|
+
): boolean {
|
|
224
|
+
return POST_PROP_KEYS.some((k) => changed.has(k));
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/** Applique param0…3 + post* depuis un DP form. */
|
|
228
|
+
function applyFormPost(host: PostBindHost, data: Record<string, unknown>) {
|
|
229
|
+
let touched = false;
|
|
230
|
+
for (const k of ["param0", "param1", "param2", "param3"] as const) {
|
|
231
|
+
if (k in data && typeof data[k] === "number") {
|
|
232
|
+
host[k] = data[k] as number;
|
|
233
|
+
touched = true;
|
|
234
|
+
} else if (k in data && typeof data[k] === "string") {
|
|
235
|
+
const n = Number(data[k]);
|
|
236
|
+
if (Number.isFinite(n)) {
|
|
237
|
+
host[k] = n;
|
|
238
|
+
touched = true;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
for (const k of POST_PROP_KEYS) {
|
|
243
|
+
if (!(k in data)) continue;
|
|
244
|
+
const v = data[k];
|
|
245
|
+
if (k === "postScale" && (typeof v === "number" || typeof v === "string")) {
|
|
246
|
+
host.postScale = clampPostScale(Number(v));
|
|
247
|
+
touched = true;
|
|
248
|
+
} else if (typeof v === "string") {
|
|
249
|
+
(host as unknown as Record<string, string>)[k] = v;
|
|
250
|
+
touched = true;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
if (touched) applyConfig(host);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export const postBind = {
|
|
257
|
+
applyConfig,
|
|
258
|
+
syncFrame,
|
|
259
|
+
propsChanged,
|
|
260
|
+
applyFormPost,
|
|
261
|
+
POST_PROP_KEYS,
|
|
262
|
+
} as const;
|