@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
|
@@ -34,8 +34,19 @@ export class Sonic3dProps extends LitElement {
|
|
|
34
34
|
@property({ type: Boolean }) pick = false;
|
|
35
35
|
@property({ type: Boolean, reflect: true }) play = true;
|
|
36
36
|
@property({ type: Boolean, attribute: "play-on-hover" }) playOnHover = false;
|
|
37
|
+
/**
|
|
38
|
+
* Garde le RAF / runtime hors viewport (pont live `#id`).
|
|
39
|
+
* Aussi auto si un consommateur a appelé `registerFrameConsumer`.
|
|
40
|
+
*/
|
|
41
|
+
@property({ type: Boolean, attribute: "play-offscreen" })
|
|
42
|
+
playOffscreen = false;
|
|
37
43
|
@property({ type: Boolean, attribute: "release-offscreen" })
|
|
38
44
|
releaseOffscreen = true;
|
|
45
|
+
/**
|
|
46
|
+
* Inertie OrbitControls (`dampingFactor`). `0` = pas d’inertie.
|
|
47
|
+
* Défaut `0.08`.
|
|
48
|
+
*/
|
|
49
|
+
@property({ type: Number }) damping = 0.08;
|
|
39
50
|
@property({ type: Number, attribute: "dpr-max" }) dprMax = 2;
|
|
40
51
|
@property({ type: String, attribute: "aspect-ratio" }) aspectRatio = "";
|
|
41
52
|
@property({ type: String }) dataProvider = "";
|
|
@@ -47,4 +58,38 @@ export class Sonic3dProps extends LitElement {
|
|
|
47
58
|
snapshotInterval = DEFAULT_SNAPSHOT_INTERVAL_MS;
|
|
48
59
|
/** Publie `frameUrl` / `snapshot` (canvas) pour chaînage shader / jsonata. */
|
|
49
60
|
@property({ type: Boolean, attribute: "frame-out" }) frameOut = false;
|
|
61
|
+
|
|
62
|
+
/* —— Post FX (Lot 2) : passes ShaderToy dans le contexte Three —— */
|
|
63
|
+
@property({ attribute: "post-image" }) postImage = "";
|
|
64
|
+
@property({ attribute: "post-buffer-a" }) postBufferA = "";
|
|
65
|
+
@property({ attribute: "post-buffer-b" }) postBufferB = "";
|
|
66
|
+
@property({ attribute: "post-buffer-c" }) postBufferC = "";
|
|
67
|
+
@property({ attribute: "post-buffer-d" }) postBufferD = "";
|
|
68
|
+
@property({ attribute: "post-common" }) postCommon = "";
|
|
69
|
+
@property({ attribute: "post-image-ch0" }) postImageCh0 = "";
|
|
70
|
+
@property({ attribute: "post-image-ch1" }) postImageCh1 = "";
|
|
71
|
+
@property({ attribute: "post-image-ch2" }) postImageCh2 = "";
|
|
72
|
+
@property({ attribute: "post-image-ch3" }) postImageCh3 = "";
|
|
73
|
+
@property({ attribute: "post-buffer-a-ch0" }) postBufferACh0 = "";
|
|
74
|
+
@property({ attribute: "post-buffer-a-ch1" }) postBufferACh1 = "";
|
|
75
|
+
@property({ attribute: "post-buffer-a-ch2" }) postBufferACh2 = "";
|
|
76
|
+
@property({ attribute: "post-buffer-a-ch3" }) postBufferACh3 = "";
|
|
77
|
+
@property({ attribute: "post-buffer-b-ch0" }) postBufferBCh0 = "";
|
|
78
|
+
@property({ attribute: "post-buffer-b-ch1" }) postBufferBCh1 = "";
|
|
79
|
+
@property({ attribute: "post-buffer-b-ch2" }) postBufferBCh2 = "";
|
|
80
|
+
@property({ attribute: "post-buffer-b-ch3" }) postBufferBCh3 = "";
|
|
81
|
+
@property({ attribute: "post-buffer-c-ch0" }) postBufferCCh0 = "";
|
|
82
|
+
@property({ attribute: "post-buffer-c-ch1" }) postBufferCCh1 = "";
|
|
83
|
+
@property({ attribute: "post-buffer-c-ch2" }) postBufferCCh2 = "";
|
|
84
|
+
@property({ attribute: "post-buffer-c-ch3" }) postBufferCCh3 = "";
|
|
85
|
+
@property({ attribute: "post-buffer-d-ch0" }) postBufferDCh0 = "";
|
|
86
|
+
@property({ attribute: "post-buffer-d-ch1" }) postBufferDCh1 = "";
|
|
87
|
+
@property({ attribute: "post-buffer-d-ch2" }) postBufferDCh2 = "";
|
|
88
|
+
@property({ attribute: "post-buffer-d-ch3" }) postBufferDCh3 = "";
|
|
89
|
+
@property({ type: Number }) param0 = 0;
|
|
90
|
+
@property({ type: Number }) param1 = 0;
|
|
91
|
+
@property({ type: Number }) param2 = 0;
|
|
92
|
+
@property({ type: Number }) param3 = 0;
|
|
93
|
+
/** Échelle des cibles post (0.25–1, défaut 1). */
|
|
94
|
+
@property({ type: Number, attribute: "post-scale" }) postScale = 1;
|
|
50
95
|
}
|
|
@@ -2,6 +2,7 @@ import { PublisherManager } from "@supersoniks/concorde/utils";
|
|
|
2
2
|
import { asset } from "./asset";
|
|
3
3
|
import type { FormOrbit } from "./form-params";
|
|
4
4
|
import { frameSource } from "./frame-source";
|
|
5
|
+
import { postBind } from "./post-bind";
|
|
5
6
|
import { playback } from "./playback";
|
|
6
7
|
import type { SceneRuntime } from "./runtime";
|
|
7
8
|
import type { Sonic3dAsset } from "./types";
|
|
@@ -49,6 +50,7 @@ async function run(host: ReloadHost) {
|
|
|
49
50
|
host.runtime.render();
|
|
50
51
|
host.frameSeq++;
|
|
51
52
|
host.syncPlayback();
|
|
53
|
+
postBind.applyConfig(host as never);
|
|
52
54
|
frameSource.maybePublish(host as never);
|
|
53
55
|
host.dispatchEvent(
|
|
54
56
|
new CustomEvent("ready", {
|
|
@@ -6,14 +6,22 @@ import { bootScene } from "./boot";
|
|
|
6
6
|
import { ops, type OpsCtx } from "./ops";
|
|
7
7
|
import type { SceneRuntimeOptions } from "./opts";
|
|
8
8
|
import type { SceneHit } from "./pick";
|
|
9
|
+
import {
|
|
10
|
+
PostFxCompileError,
|
|
11
|
+
PostFxPipeline,
|
|
12
|
+
type PostFxConfig,
|
|
13
|
+
type PostFxUniforms,
|
|
14
|
+
} from "./post-fx";
|
|
9
15
|
import { tune, type TuneCtx } from "./tune";
|
|
10
16
|
import type { Sonic3dAsset, Sonic3dOutput } from "./types";
|
|
11
17
|
import { view, type ViewCtx } from "./view";
|
|
12
18
|
|
|
13
19
|
export type { SceneHit, SceneRuntimeOptions };
|
|
20
|
+
export { PostFxCompileError };
|
|
21
|
+
export type { PostFxConfig, PostFxUniforms };
|
|
14
22
|
|
|
15
23
|
/**
|
|
16
|
-
* Runtime Three.js encapsulé : renderer, scène, caméra, load, fit, pick.
|
|
24
|
+
* Runtime Three.js encapsulé : renderer, scène, caméra, load, fit, pick, post FX.
|
|
17
25
|
* Le composant Lit gère RAF / viewport / DP.
|
|
18
26
|
*/
|
|
19
27
|
export class SceneRuntime {
|
|
@@ -46,6 +54,19 @@ export class SceneRuntime {
|
|
|
46
54
|
private highlighted: THREE.Mesh | null = null;
|
|
47
55
|
private prevEmissive = new THREE.Color();
|
|
48
56
|
private prevEmissiveIntensity = 0;
|
|
57
|
+
private postFx: PostFxPipeline;
|
|
58
|
+
private lastCssW = 1;
|
|
59
|
+
private lastCssH = 1;
|
|
60
|
+
private damping = 0.08;
|
|
61
|
+
private postFrame: PostFxUniforms = {
|
|
62
|
+
time: 0,
|
|
63
|
+
timeDelta: 1 / 60,
|
|
64
|
+
frame: 0,
|
|
65
|
+
mouse: [0, 0, 0, 0],
|
|
66
|
+
params: [0, 0, 0, 0],
|
|
67
|
+
near: 0.1,
|
|
68
|
+
far: 100,
|
|
69
|
+
};
|
|
49
70
|
|
|
50
71
|
constructor(opts: SceneRuntimeOptions) {
|
|
51
72
|
const b = bootScene(opts);
|
|
@@ -62,9 +83,32 @@ export class SceneRuntime {
|
|
|
62
83
|
this.fov = b.fov;
|
|
63
84
|
this.fitEnabled = b.fitEnabled;
|
|
64
85
|
this.limits = b.limits;
|
|
86
|
+
this.postFx = new PostFxPipeline(this.renderer);
|
|
65
87
|
this.applyCameraMode(this.mode);
|
|
66
88
|
if (b.autoRotate) this.setAutoRotate(true);
|
|
67
|
-
void [
|
|
89
|
+
void [
|
|
90
|
+
this.canvas,
|
|
91
|
+
this.perspCam,
|
|
92
|
+
this.orthoCam,
|
|
93
|
+
this.root,
|
|
94
|
+
this.content,
|
|
95
|
+
this.lights,
|
|
96
|
+
this.loader,
|
|
97
|
+
this.loadToken,
|
|
98
|
+
this.blobUrl,
|
|
99
|
+
this.dprMax,
|
|
100
|
+
this.fov,
|
|
101
|
+
this.fitEnabled,
|
|
102
|
+
this.limits,
|
|
103
|
+
this.bbox,
|
|
104
|
+
this.target,
|
|
105
|
+
this.raycaster,
|
|
106
|
+
this.pointerNdc,
|
|
107
|
+
this.highlighted,
|
|
108
|
+
this.prevEmissive,
|
|
109
|
+
this.prevEmissiveIntensity,
|
|
110
|
+
this.unbindWheelRelay,
|
|
111
|
+
];
|
|
68
112
|
}
|
|
69
113
|
|
|
70
114
|
get ready() {
|
|
@@ -79,6 +123,9 @@ export class SceneRuntime {
|
|
|
79
123
|
get isLost() {
|
|
80
124
|
return this.renderer.getContext()?.isContextLost?.() ?? false;
|
|
81
125
|
}
|
|
126
|
+
get hasPostFx() {
|
|
127
|
+
return this.postFx.isEnabled;
|
|
128
|
+
}
|
|
82
129
|
|
|
83
130
|
setDprMax(v: number) {
|
|
84
131
|
tune.setDprMax(this.asTuneCtx(), v);
|
|
@@ -95,6 +142,15 @@ export class SceneRuntime {
|
|
|
95
142
|
setAutoRotate(v: boolean) {
|
|
96
143
|
tune.setAutoRotate(this.asTuneCtx(), v);
|
|
97
144
|
}
|
|
145
|
+
setDamping(v: number) {
|
|
146
|
+
this.damping = Number.isFinite(v) ? Math.max(0, v) : 0.08;
|
|
147
|
+
tune.setDamping(this.asTuneCtx(), this.damping);
|
|
148
|
+
}
|
|
149
|
+
/** Coupe autoRotate + inertie OrbitControls. */
|
|
150
|
+
stopMotion() {
|
|
151
|
+
tune.setAutoRotate(this.asTuneCtx(), false);
|
|
152
|
+
tune.stopMotion(this.asTuneCtx());
|
|
153
|
+
}
|
|
98
154
|
setOrbitLimits(opts: Parameters<typeof tune.setOrbitLimits>[1]) {
|
|
99
155
|
tune.setOrbitLimits(this.asTuneCtx(), opts);
|
|
100
156
|
}
|
|
@@ -104,9 +160,17 @@ export class SceneRuntime {
|
|
|
104
160
|
|
|
105
161
|
applyCameraMode(mode: Sonic3dCameraMode) {
|
|
106
162
|
view.applyCameraMode(this.asViewCtx(), mode);
|
|
163
|
+
tune.setDamping(this.asTuneCtx(), this.damping);
|
|
107
164
|
}
|
|
108
165
|
resize(cssW: number, cssH: number) {
|
|
166
|
+
this.lastCssW = cssW;
|
|
167
|
+
this.lastCssH = cssH;
|
|
109
168
|
view.resize(this.asViewCtx(), cssW, cssH);
|
|
169
|
+
const dpr = Math.min(
|
|
170
|
+
typeof window !== "undefined" ? window.devicePixelRatio || 1 : 1,
|
|
171
|
+
this.dprMax,
|
|
172
|
+
);
|
|
173
|
+
this.postFx.resize(cssW * dpr, cssH * dpr);
|
|
110
174
|
}
|
|
111
175
|
async load(asset: Sonic3dAsset | null) {
|
|
112
176
|
return ops.runLoad(this.asOpsCtx(), asset);
|
|
@@ -114,9 +178,34 @@ export class SceneRuntime {
|
|
|
114
178
|
fitToContent() {
|
|
115
179
|
ops.fitToContent(this.asOpsCtx());
|
|
116
180
|
}
|
|
181
|
+
|
|
182
|
+
setPostConfig(config: PostFxConfig | null) {
|
|
183
|
+
this.postFx.setConfig(config);
|
|
184
|
+
if (config && this.lastCssW > 0) {
|
|
185
|
+
this.resize(this.lastCssW, this.lastCssH);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
setPostElementResolver(fn: ((key: string) => Element | null) | null) {
|
|
190
|
+
this.postFx.setElementResolver(fn);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
setPostFrame(frame: Partial<PostFxUniforms>) {
|
|
194
|
+
Object.assign(this.postFrame, frame);
|
|
195
|
+
const cam = this.activeCam as THREE.PerspectiveCamera;
|
|
196
|
+
if ("near" in cam && "far" in cam) {
|
|
197
|
+
this.postFrame.near = cam.near;
|
|
198
|
+
this.postFrame.far = cam.far;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
117
202
|
render() {
|
|
118
203
|
this.controls?.update();
|
|
119
|
-
|
|
204
|
+
if (this.postFx.isEnabled) {
|
|
205
|
+
this.postFx.render(this.scene, this.activeCam, this.postFrame);
|
|
206
|
+
} else {
|
|
207
|
+
this.renderer.render(this.scene, this.activeCam);
|
|
208
|
+
}
|
|
120
209
|
}
|
|
121
210
|
pick(normX: number, normY: number): SceneHit | null {
|
|
122
211
|
return ops.pick(this.asOpsCtx(), normX, normY);
|
|
@@ -138,6 +227,7 @@ export class SceneRuntime {
|
|
|
138
227
|
return ops.buildSnapshot(this.asOpsCtx(), base);
|
|
139
228
|
}
|
|
140
229
|
dispose(loseContext = false) {
|
|
230
|
+
this.postFx.dispose();
|
|
141
231
|
ops.dispose(this.asOpsCtx(), loseContext);
|
|
142
232
|
}
|
|
143
233
|
|
|
@@ -145,4 +235,3 @@ export class SceneRuntime {
|
|
|
145
235
|
private asViewCtx = () => this as unknown as ViewCtx;
|
|
146
236
|
private asOpsCtx = () => this as unknown as OpsCtx;
|
|
147
237
|
}
|
|
148
|
-
|
|
@@ -37,6 +37,25 @@ function setAutoRotate(ctx: TuneCtx, v: boolean) {
|
|
|
37
37
|
if (ctx.controls) ctx.controls.autoRotate = v;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
function setDamping(ctx: TuneCtx, v: number) {
|
|
41
|
+
if (!ctx.controls) return;
|
|
42
|
+
const d = Number.isFinite(v) ? Math.max(0, v) : 0.08;
|
|
43
|
+
ctx.controls.enableDamping = d > 0;
|
|
44
|
+
ctx.controls.dampingFactor = d > 0 ? d : 0.08;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** Coupe autoRotate + vide l’inertie OrbitControls. */
|
|
48
|
+
function stopMotion(ctx: TuneCtx) {
|
|
49
|
+
if (!ctx.controls) return;
|
|
50
|
+
ctx.controls.autoRotate = false;
|
|
51
|
+
const wasDamping = ctx.controls.enableDamping;
|
|
52
|
+
const factor = ctx.controls.dampingFactor;
|
|
53
|
+
ctx.controls.enableDamping = false;
|
|
54
|
+
ctx.controls.update();
|
|
55
|
+
ctx.controls.enableDamping = wasDamping;
|
|
56
|
+
ctx.controls.dampingFactor = factor;
|
|
57
|
+
}
|
|
58
|
+
|
|
40
59
|
function setOrbitLimits(ctx: TuneCtx, opts: Partial<OrbitLimits>) {
|
|
41
60
|
ctx.limits = orbit.mergeLimits(ctx.limits, opts);
|
|
42
61
|
orbit.applyLimitsToControls(ctx.controls, ctx.limits);
|
|
@@ -67,6 +86,8 @@ export const tune = {
|
|
|
67
86
|
setFov,
|
|
68
87
|
setFit,
|
|
69
88
|
setAutoRotate,
|
|
89
|
+
setDamping,
|
|
90
|
+
stopMotion,
|
|
70
91
|
setOrbitLimits,
|
|
71
92
|
setOrbitSpherical,
|
|
72
93
|
} as const;
|
|
@@ -65,6 +65,13 @@ export type Sonic3dConfig = {
|
|
|
65
65
|
playOnHover?: boolean;
|
|
66
66
|
/** Libère le renderer hors viewport (défaut true). */
|
|
67
67
|
releaseOffscreen?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Garde RAF / runtime hors viewport (pont live).
|
|
70
|
+
* Aussi auto via `registerFrameConsumer`.
|
|
71
|
+
*/
|
|
72
|
+
playOffscreen?: boolean;
|
|
73
|
+
/** Inertie OrbitControls (défaut 0.08, 0 = off). */
|
|
74
|
+
damping?: number;
|
|
68
75
|
dprMax?: number;
|
|
69
76
|
aspectRatio?: string;
|
|
70
77
|
|
|
@@ -124,6 +131,8 @@ export type Sonic3dOutput = {
|
|
|
124
131
|
distance: number;
|
|
125
132
|
yaw: number;
|
|
126
133
|
pitch: number;
|
|
134
|
+
/** 1 si la caméra bouge (orbit / inertie / autoRotate), sinon 0. */
|
|
135
|
+
moving?: number;
|
|
127
136
|
/** Présents après un pick réussi. */
|
|
128
137
|
hitX?: number;
|
|
129
138
|
hitY?: number;
|
|
@@ -3,6 +3,7 @@ import type { LifeHost } from "./life";
|
|
|
3
3
|
import { life } from "./life";
|
|
4
4
|
import { parse } from "./parse";
|
|
5
5
|
import { playback } from "./playback";
|
|
6
|
+
import { postBind } from "./post-bind";
|
|
6
7
|
import { reload } from "./reload";
|
|
7
8
|
|
|
8
9
|
function hasAny(
|
|
@@ -61,10 +62,25 @@ function updated(
|
|
|
61
62
|
if (changed.has("autoRotate") || changed.has("play")) {
|
|
62
63
|
playback.syncAutoRotate(host as never);
|
|
63
64
|
}
|
|
64
|
-
if (
|
|
65
|
+
if (
|
|
66
|
+
changed.has("play") ||
|
|
67
|
+
changed.has("playOnHover") ||
|
|
68
|
+
changed.has("playOffscreen")
|
|
69
|
+
) {
|
|
65
70
|
host.syncPlayback();
|
|
66
71
|
}
|
|
72
|
+
if (changed.has("playOffscreen") || changed.has("releaseOffscreen")) {
|
|
73
|
+
ensure.syncVisibility(host as never);
|
|
74
|
+
}
|
|
75
|
+
if (changed.has("damping") && host.runtime) {
|
|
76
|
+
host.runtime.setDamping(
|
|
77
|
+
(host as unknown as { damping: number }).damping,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
67
80
|
if (changed.has("src") || changed.has("asset")) void reload.run(host as never);
|
|
81
|
+
if (postBind.propsChanged(changed)) {
|
|
82
|
+
postBind.applyConfig(host as never);
|
|
83
|
+
}
|
|
68
84
|
}
|
|
69
85
|
|
|
70
86
|
export const propUpdate = { updated } as const;
|
|
@@ -1,23 +1,70 @@
|
|
|
1
1
|
import {css, html, LitElement, nothing} from "lit";
|
|
2
2
|
import {customElement, property} from "lit/decorators.js";
|
|
3
|
-
|
|
3
|
+
import {Subscriber} from "@supersoniks/concorde/mixins";
|
|
4
|
+
|
|
5
|
+
const tagName = "sonic-if";
|
|
6
|
+
|
|
7
|
+
function pathGet(obj: unknown, path: string): unknown {
|
|
8
|
+
if (!path) return obj;
|
|
9
|
+
let cur: any = obj;
|
|
10
|
+
for (const p of path.split(".").filter(Boolean)) {
|
|
11
|
+
if (cur == null) return undefined;
|
|
12
|
+
cur = cur[p];
|
|
13
|
+
}
|
|
14
|
+
return cur;
|
|
15
|
+
}
|
|
16
|
+
|
|
4
17
|
/**
|
|
5
|
-
*
|
|
18
|
+
* Affiche le slot si `.condition` est true **ou** via attributs SDUI
|
|
19
|
+
* `dataProvider` + `key` (+ `equals` / `not` / `truthy` / `gt` / `lt`).
|
|
6
20
|
*/
|
|
7
21
|
@customElement(tagName)
|
|
8
|
-
export class SonicIF extends LitElement {
|
|
22
|
+
export class SonicIF extends Subscriber(LitElement) {
|
|
9
23
|
static styles = css`
|
|
10
24
|
:host {
|
|
11
25
|
display: contents;
|
|
12
26
|
}
|
|
13
27
|
`;
|
|
14
28
|
|
|
15
|
-
/**
|
|
16
|
-
* Le contenu s'affiche si la condition est évaluée à true.
|
|
17
|
-
*/
|
|
29
|
+
/** Mode Lit classique. */
|
|
18
30
|
@property({type: Boolean}) condition = false;
|
|
31
|
+
|
|
32
|
+
@property({type: String}) key = "";
|
|
33
|
+
|
|
34
|
+
@property({type: String}) equals = "";
|
|
35
|
+
|
|
36
|
+
@property({type: String}) not = "";
|
|
37
|
+
|
|
38
|
+
@property({type: Boolean}) truthy = false;
|
|
39
|
+
|
|
40
|
+
@property({type: String}) gt = "";
|
|
41
|
+
|
|
42
|
+
@property({type: String}) lt = "";
|
|
43
|
+
|
|
44
|
+
private attrMode(): boolean {
|
|
45
|
+
return Boolean(
|
|
46
|
+
this.dataProvider &&
|
|
47
|
+
(this.key ||
|
|
48
|
+
this.truthy ||
|
|
49
|
+
this.equals !== "" ||
|
|
50
|
+
this.not !== "" ||
|
|
51
|
+
this.gt !== "" ||
|
|
52
|
+
this.lt !== ""),
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
private show(): boolean {
|
|
57
|
+
if (!this.attrMode()) return this.condition;
|
|
58
|
+
const value = pathGet(this.props, this.key);
|
|
59
|
+
if (this.equals !== "") return String(value) === this.equals;
|
|
60
|
+
if (this.not !== "") return String(value) !== this.not;
|
|
61
|
+
if (this.gt !== "") return Number(value) > Number(this.gt);
|
|
62
|
+
if (this.lt !== "") return Number(value) < Number(this.lt);
|
|
63
|
+
return Boolean(value);
|
|
64
|
+
}
|
|
65
|
+
|
|
19
66
|
render() {
|
|
20
|
-
if (!this.
|
|
67
|
+
if (!this.show()) return nothing;
|
|
21
68
|
return html` <slot></slot> `;
|
|
22
69
|
}
|
|
23
70
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { LitElement, css, html } from "lit";
|
|
2
|
+
import { customElement, property } from "lit/decorators.js";
|
|
3
|
+
import { dispatch, type SonicActionMessage } from "./registry";
|
|
4
|
+
|
|
5
|
+
const tagName = "sonic-action";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Wrapper clic → dispatch vers un store.
|
|
9
|
+
* `hold-repeat="170,50"` pour d-pad tactile.
|
|
10
|
+
*/
|
|
11
|
+
@customElement(tagName)
|
|
12
|
+
export class SonicAction extends LitElement {
|
|
13
|
+
static styles = css`
|
|
14
|
+
:host {
|
|
15
|
+
display: contents;
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
@property({ type: String })
|
|
20
|
+
target = "";
|
|
21
|
+
|
|
22
|
+
@property({ type: String })
|
|
23
|
+
type = "";
|
|
24
|
+
|
|
25
|
+
@property({ type: Object })
|
|
26
|
+
payload: unknown = null;
|
|
27
|
+
|
|
28
|
+
@property({ type: String, attribute: "hold-repeat" })
|
|
29
|
+
holdRepeat = "";
|
|
30
|
+
|
|
31
|
+
@property({ type: Boolean, attribute: "dispatch-event" })
|
|
32
|
+
dispatchEventFlag = false;
|
|
33
|
+
|
|
34
|
+
private holdTimer: number | null = null;
|
|
35
|
+
private holdInterval: number | null = null;
|
|
36
|
+
|
|
37
|
+
private onPointerDown = (e: PointerEvent) => {
|
|
38
|
+
if (e.button != null && e.button !== 0) return;
|
|
39
|
+
this.emit();
|
|
40
|
+
const parts = this.holdRepeat.split(",").map((s) => Number(s.trim()));
|
|
41
|
+
if (parts.length === 2 && parts.every((n) => Number.isFinite(n))) {
|
|
42
|
+
const [delay, interval] = parts;
|
|
43
|
+
this.holdTimer = window.setTimeout(() => {
|
|
44
|
+
this.emit();
|
|
45
|
+
this.holdInterval = window.setInterval(() => this.emit(), Math.max(16, interval));
|
|
46
|
+
}, Math.max(0, delay));
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
private onPointerUp = () => this.clearHold();
|
|
51
|
+
|
|
52
|
+
private clearHold(): void {
|
|
53
|
+
if (this.holdTimer != null) clearTimeout(this.holdTimer);
|
|
54
|
+
if (this.holdInterval != null) clearInterval(this.holdInterval);
|
|
55
|
+
this.holdTimer = null;
|
|
56
|
+
this.holdInterval = null;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
private emit(): void {
|
|
60
|
+
if (!this.type) return;
|
|
61
|
+
const action: SonicActionMessage = { type: this.type, payload: this.payload };
|
|
62
|
+
if (this.target) dispatch(this.target, action);
|
|
63
|
+
if (this.dispatchEventFlag) {
|
|
64
|
+
this.dispatchEvent(
|
|
65
|
+
new CustomEvent("sonic-action", {
|
|
66
|
+
detail: action,
|
|
67
|
+
bubbles: true,
|
|
68
|
+
composed: true,
|
|
69
|
+
}),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
render() {
|
|
75
|
+
return html`<slot
|
|
76
|
+
@pointerdown=${this.onPointerDown}
|
|
77
|
+
@pointerup=${this.onPointerUp}
|
|
78
|
+
@pointercancel=${this.onPointerUp}
|
|
79
|
+
@pointerleave=${this.onPointerUp}
|
|
80
|
+
></slot>`;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export default SonicAction;
|