react-native-webrtc-kaleidoscope 2.0.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE.md +8 -8
- package/README.md +185 -56
- package/android/build.gradle +13 -0
- package/android/src/main/java/com/simiancraft/kaleidoscope/CompositeLayers.kt +127 -0
- package/android/src/main/java/com/simiancraft/kaleidoscope/EffectTuning.kt +69 -69
- package/android/src/main/java/com/simiancraft/kaleidoscope/KaleidoscopeModule.kt +86 -33
- package/android/src/main/java/com/simiancraft/kaleidoscope/Registration.kt +23 -64
- package/android/src/main/java/com/simiancraft/kaleidoscope/effects/CompositeFactory.kt +691 -0
- package/android/src/main/java/com/simiancraft/kaleidoscope/effects/LayerShaders.kt +30 -0
- package/android/src/main/java/com/simiancraft/kaleidoscope/effects/TransformFactory.kt +248 -200
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/Egl.kt +82 -70
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/Fbo.kt +50 -47
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/FramePipeline.kt +106 -105
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/GlDebug.kt +23 -23
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/GlProgram.kt +76 -57
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/Ingest.kt +92 -71
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/Orientation.kt +25 -25
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/Shaders.kt +57 -76
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/ShadersGenerated.kt +1162 -25
- package/android/src/main/java/com/simiancraft/kaleidoscope/segmentation/Mask.kt +254 -242
- package/android/src/main/java/com/simiancraft/kaleidoscope/segmentation/MaskTuning.kt +28 -25
- package/android/src/main/java/com/simiancraft/kaleidoscope/segmentation/SegmentationEngine.kt +104 -98
- package/android/src/test/java/com/simiancraft/kaleidoscope/CompositeLayersTest.kt +165 -0
- package/app.plugin.js +9 -255
- package/catalog/composites/clouds/clouds.controls.tsx +19 -0
- package/catalog/composites/clouds/clouds.ts +32 -0
- package/catalog/composites/corporate-blobs/corporate-blobs.controls.tsx +24 -0
- package/catalog/composites/corporate-blobs/corporate-blobs.thumb.webp +0 -0
- package/catalog/composites/corporate-blobs/corporate-blobs.ts +51 -0
- package/catalog/composites/corporate-blobs/corporate-blobs.web.ts +42 -0
- package/catalog/composites/fairy-cave/fairy-cave.controls.tsx +33 -0
- package/catalog/composites/fairy-cave/fairy-cave.thumb.webp +0 -0
- package/catalog/composites/fairy-cave/fairy-cave.ts +53 -0
- package/catalog/composites/fairy-cave/fairy-cave.web.ts +47 -0
- package/catalog/composites/fairy-grotto/fairy-grotto.controls.tsx +34 -0
- package/catalog/composites/fairy-grotto/fairy-grotto.thumb.webp +0 -0
- package/catalog/composites/fairy-grotto/fairy-grotto.ts +54 -0
- package/catalog/composites/fairy-grotto/fairy-grotto.web.ts +47 -0
- package/catalog/composites/fairy-hollow/fairy-hollow.controls.tsx +34 -0
- package/catalog/composites/fairy-hollow/fairy-hollow.thumb.webp +0 -0
- package/catalog/composites/fairy-hollow/fairy-hollow.ts +55 -0
- package/catalog/composites/fairy-hollow/fairy-hollow.web.ts +47 -0
- package/catalog/composites/nebula/nebula.controls.tsx +19 -0
- package/catalog/composites/nebula/nebula.thumb.webp +0 -0
- package/catalog/composites/nebula/nebula.ts +37 -0
- package/catalog/composites/nebula/nebula.web.ts +30 -0
- package/catalog/composites/observation-deck/observation-deck.controls.tsx +28 -0
- package/catalog/composites/observation-deck/observation-deck.thumb.webp +0 -0
- package/catalog/composites/observation-deck/observation-deck.ts +59 -0
- package/catalog/composites/observation-deck/observation-deck.web.ts +50 -0
- package/catalog/composites/simianlights/simianlights.controls.tsx +19 -0
- package/catalog/composites/simianlights/simianlights.thumb.webp +0 -0
- package/catalog/composites/simianlights/simianlights.ts +34 -0
- package/catalog/composites/simianlights/simianlights.web.ts +29 -0
- package/catalog/composites/underwater/underwater.controls.tsx +19 -0
- package/catalog/composites/underwater/underwater.thumb.webp +0 -0
- package/catalog/composites/underwater/underwater.ts +42 -0
- package/catalog/composites/underwater/underwater.web.ts +36 -0
- package/catalog/composites/wizard-tower/wizard-tower.controls.tsx +23 -0
- package/catalog/composites/wizard-tower/wizard-tower.thumb.webp +0 -0
- package/catalog/composites/wizard-tower/wizard-tower.ts +44 -0
- package/catalog/composites/wizard-tower/wizard-tower.web.ts +35 -0
- package/catalog/composites/wizard-tower-night/wizard-tower-night.controls.tsx +22 -0
- package/catalog/composites/wizard-tower-night/wizard-tower-night.thumb.webp +0 -0
- package/catalog/composites/wizard-tower-night/wizard-tower-night.ts +43 -0
- package/catalog/composites/wizard-tower-night/wizard-tower-night.web.ts +35 -0
- package/catalog/images/README.md +188 -0
- package/catalog/images/corporate/corporate-logo.thumb.webp +0 -0
- package/catalog/images/corporate/corporate-logo.ts +6 -0
- package/catalog/images/corporate/corporate-logo.web.ts +7 -0
- package/catalog/images/corporate/corporate-logo.webp +0 -0
- package/catalog/images/debug/debug-resolutions.thumb.webp +0 -0
- package/catalog/images/debug/debug-resolutions.ts +6 -0
- package/catalog/images/debug/debug-resolutions.web.ts +7 -0
- package/catalog/images/fairy-caves/grotto.thumb.webp +0 -0
- package/catalog/images/fairy-caves/grotto.ts +6 -0
- package/catalog/images/fairy-caves/grotto.web.ts +7 -0
- package/catalog/images/fairy-caves/grotto.webp +0 -0
- package/catalog/images/fairy-caves/hollow.thumb.webp +0 -0
- package/catalog/images/fairy-caves/hollow.ts +6 -0
- package/catalog/images/fairy-caves/hollow.web.ts +7 -0
- package/catalog/images/fairy-caves/hollow.webp +0 -0
- package/catalog/images/fairy-caves/treehouse-2.thumb.webp +0 -0
- package/catalog/images/fairy-caves/treehouse-2.ts +6 -0
- package/catalog/images/fairy-caves/treehouse-2.web.ts +7 -0
- package/catalog/images/fairy-caves/treehouse-2.webp +0 -0
- package/catalog/images/fairy-caves/treehouse-3.thumb.webp +0 -0
- package/catalog/images/fairy-caves/treehouse-3.ts +6 -0
- package/catalog/images/fairy-caves/treehouse-3.web.ts +7 -0
- package/catalog/images/fairy-caves/treehouse-3.webp +0 -0
- package/catalog/images/fairy-caves/treehouse.thumb.webp +0 -0
- package/catalog/images/fairy-caves/treehouse.ts +6 -0
- package/catalog/images/fairy-caves/treehouse.web.ts +7 -0
- package/catalog/images/fairy-caves/treehouse.webp +0 -0
- package/catalog/images/home/home-dark.thumb.webp +0 -0
- package/catalog/images/home/home-dark.ts +6 -0
- package/catalog/images/home/home-dark.web.ts +7 -0
- package/catalog/images/home/home-light.thumb.webp +0 -0
- package/catalog/images/home/home-light.ts +6 -0
- package/catalog/images/home/home-light.web.ts +7 -0
- package/catalog/images/image-ids.ts +42 -0
- package/catalog/images/image.types.ts +5 -0
- package/catalog/images/index.ts +7 -0
- package/catalog/images/nature/landscape-dark.thumb.webp +0 -0
- package/catalog/images/nature/landscape-dark.ts +6 -0
- package/catalog/images/nature/landscape-dark.web.ts +7 -0
- package/catalog/images/nature/landscape-light.thumb.webp +0 -0
- package/catalog/images/nature/landscape-light.ts +6 -0
- package/catalog/images/nature/landscape-light.web.ts +7 -0
- package/catalog/images/office/office-dark.thumb.webp +0 -0
- package/catalog/images/office/office-dark.ts +6 -0
- package/catalog/images/office/office-dark.web.ts +7 -0
- package/catalog/images/office/office-light.thumb.webp +0 -0
- package/catalog/images/office/office-light.ts +6 -0
- package/catalog/images/office/office-light.web.ts +7 -0
- package/catalog/images/sci-fi/sci-fi-light.thumb.webp +0 -0
- package/catalog/images/sci-fi/sci-fi-light.ts +6 -0
- package/catalog/images/sci-fi/sci-fi-light.web.ts +7 -0
- package/catalog/images/simiancraft/simiancraft-dark-transparency.thumb.webp +0 -0
- package/catalog/images/simiancraft/simiancraft-dark-transparency.ts +6 -0
- package/catalog/images/simiancraft/simiancraft-dark-transparency.web.ts +9 -0
- package/catalog/images/simiancraft/simiancraft-dark-transparency.webp +0 -0
- package/catalog/images/simiancraft/simiancraft-dark.thumb.webp +0 -0
- package/catalog/images/simiancraft/simiancraft-dark.ts +6 -0
- package/catalog/images/simiancraft/simiancraft-dark.web.ts +7 -0
- package/catalog/images/simiancraft/simiancraft-light-transparency.thumb.webp +0 -0
- package/catalog/images/simiancraft/simiancraft-light-transparency.ts +6 -0
- package/catalog/images/simiancraft/simiancraft-light-transparency.web.ts +9 -0
- package/catalog/images/simiancraft/simiancraft-light-transparency.webp +0 -0
- package/catalog/images/simiancraft/simiancraft-light.thumb.webp +0 -0
- package/catalog/images/simiancraft/simiancraft-light.ts +6 -0
- package/catalog/images/simiancraft/simiancraft-light.web.ts +7 -0
- package/catalog/images/spaceship/observation-deck.thumb.webp +0 -0
- package/catalog/images/spaceship/observation-deck.ts +6 -0
- package/catalog/images/spaceship/observation-deck.web.ts +7 -0
- package/catalog/images/spaceship/observation-deck.webp +0 -0
- package/catalog/images/underwater/oceanscape-dark.thumb.webp +0 -0
- package/catalog/images/underwater/oceanscape-dark.ts +6 -0
- package/catalog/images/underwater/oceanscape-dark.web.ts +7 -0
- package/catalog/images/underwater/oceanscape-dark.webp +0 -0
- package/catalog/images/wizard-tower/wizard-tower-1.thumb.webp +0 -0
- package/catalog/images/wizard-tower/wizard-tower-1.ts +6 -0
- package/catalog/images/wizard-tower/wizard-tower-1.web.ts +7 -0
- package/catalog/images/wizard-tower/wizard-tower-1.webp +0 -0
- package/catalog/images/wizard-tower/wizard-tower-2.thumb.webp +0 -0
- package/catalog/images/wizard-tower/wizard-tower-2.ts +6 -0
- package/catalog/images/wizard-tower/wizard-tower-2.web.ts +7 -0
- package/catalog/images/wizard-tower/wizard-tower-2.webp +0 -0
- package/catalog/images/wizard-tower/wizard-tower-night.thumb.webp +0 -0
- package/catalog/images/wizard-tower/wizard-tower-night.ts +6 -0
- package/catalog/images/wizard-tower/wizard-tower-night.web.ts +7 -0
- package/catalog/images/wizard-tower/wizard-tower-night.webp +0 -0
- package/catalog/shaders/README.md +114 -0
- package/catalog/shaders/_shared/composite-blit.frag +26 -0
- package/catalog/shaders/_shared/composite-camera.frag +17 -0
- package/catalog/shaders/_shared/composite-image.frag +23 -0
- package/catalog/shaders/_shared/composite-masked.frag +26 -0
- package/catalog/shaders/_shared/composite-subject.frag +27 -0
- package/catalog/shaders/_shared/passthrough.vert +27 -0
- package/catalog/shaders/_shared/transform.frag +27 -0
- package/catalog/shaders/_shared/types.ts +63 -0
- package/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.form.tsx +37 -0
- package/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.frag +123 -0
- package/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.ts +106 -0
- package/catalog/shaders/blur/blur.form.tsx +29 -0
- package/catalog/shaders/blur/blur.ts +32 -0
- package/catalog/shaders/blur/composite-blur.frag +42 -0
- package/catalog/shaders/clouds/clouds.form.tsx +39 -0
- package/catalog/shaders/clouds/clouds.frag +128 -0
- package/catalog/shaders/clouds/clouds.presets.md +37 -0
- package/catalog/shaders/clouds/clouds.ts +124 -0
- package/catalog/shaders/corporate-blobs/corporate-blobs.form.tsx +44 -0
- package/catalog/shaders/corporate-blobs/corporate-blobs.frag +224 -0
- package/catalog/shaders/corporate-blobs/corporate-blobs.ts +136 -0
- package/catalog/shaders/fireflies/fireflies.form.tsx +33 -0
- package/catalog/shaders/fireflies/fireflies.frag +68 -0
- package/catalog/shaders/fireflies/fireflies.ts +61 -0
- package/catalog/shaders/godrays/godrays.form.tsx +37 -0
- package/catalog/shaders/godrays/godrays.frag +85 -0
- package/catalog/shaders/godrays/godrays.ts +105 -0
- package/catalog/shaders/index.ts +78 -0
- package/catalog/shaders/light-beams-and-motes/light-beams-and-motes.form.tsx +55 -0
- package/catalog/shaders/light-beams-and-motes/light-beams-and-motes.frag +262 -0
- package/catalog/shaders/light-beams-and-motes/light-beams-and-motes.ts +137 -0
- package/catalog/shaders/nebula/nebula.form.tsx +34 -0
- package/catalog/shaders/nebula/nebula.frag +151 -0
- package/catalog/shaders/nebula/nebula.ts +74 -0
- package/catalog/shaders/plasma/plasma.form.tsx +32 -0
- package/catalog/shaders/plasma/plasma.frag +55 -0
- package/catalog/shaders/plasma/plasma.ts +44 -0
- package/catalog/shaders/simianlights/simianlights.form.tsx +34 -0
- package/catalog/shaders/simianlights/simianlights.frag +151 -0
- package/catalog/shaders/simianlights/simianlights.ts +73 -0
- package/dist/catalog/composites/clouds/clouds.controls.d.ts +3 -0
- package/dist/catalog/composites/clouds/clouds.controls.d.ts.map +1 -0
- package/dist/catalog/composites/clouds/clouds.controls.js +11 -0
- package/dist/catalog/composites/clouds/clouds.controls.js.map +1 -0
- package/dist/catalog/composites/clouds/clouds.d.ts +26 -0
- package/dist/catalog/composites/clouds/clouds.d.ts.map +1 -0
- package/dist/catalog/composites/clouds/clouds.js +33 -0
- package/dist/catalog/composites/clouds/clouds.js.map +1 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.controls.d.ts +3 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.controls.d.ts.map +1 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.controls.js +13 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.controls.js.map +1 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.d.ts +37 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.d.ts.map +1 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.js +52 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.js.map +1 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.thumb.webp +0 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.web.d.ts +37 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.web.d.ts.map +1 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.web.js +46 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.web.js.map +1 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.controls.d.ts +3 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.controls.d.ts.map +1 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.controls.js +13 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.controls.js.map +1 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.d.ts +42 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.d.ts.map +1 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.js +54 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.js.map +1 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.thumb.webp +0 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.web.d.ts +42 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.web.d.ts.map +1 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.web.js +51 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.web.js.map +1 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.controls.d.ts +3 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.controls.d.ts.map +1 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.controls.js +14 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.controls.js.map +1 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.d.ts +42 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.d.ts.map +1 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.js +55 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.js.map +1 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.thumb.webp +0 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.web.d.ts +42 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.web.d.ts.map +1 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.web.js +51 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.web.js.map +1 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.controls.d.ts +3 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.controls.d.ts.map +1 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.controls.js +14 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.controls.js.map +1 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.d.ts +42 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.d.ts.map +1 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.js +56 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.js.map +1 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.thumb.webp +0 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.web.d.ts +42 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.web.d.ts.map +1 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.web.js +51 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.web.js.map +1 -0
- package/dist/catalog/composites/nebula/nebula.controls.d.ts +3 -0
- package/dist/catalog/composites/nebula/nebula.controls.d.ts.map +1 -0
- package/dist/catalog/composites/nebula/nebula.controls.js +11 -0
- package/dist/catalog/composites/nebula/nebula.controls.js.map +1 -0
- package/dist/catalog/composites/nebula/nebula.d.ts +22 -0
- package/dist/catalog/composites/nebula/nebula.d.ts.map +1 -0
- package/dist/catalog/composites/nebula/nebula.js +38 -0
- package/dist/catalog/composites/nebula/nebula.js.map +1 -0
- package/dist/catalog/composites/nebula/nebula.thumb.webp +0 -0
- package/dist/catalog/composites/nebula/nebula.web.d.ts +22 -0
- package/dist/catalog/composites/nebula/nebula.web.d.ts.map +1 -0
- package/dist/catalog/composites/nebula/nebula.web.js +34 -0
- package/dist/catalog/composites/nebula/nebula.web.js.map +1 -0
- package/dist/catalog/composites/observation-deck/observation-deck.controls.d.ts +3 -0
- package/dist/catalog/composites/observation-deck/observation-deck.controls.d.ts.map +1 -0
- package/dist/catalog/composites/observation-deck/observation-deck.controls.js +13 -0
- package/dist/catalog/composites/observation-deck/observation-deck.controls.js.map +1 -0
- package/dist/catalog/composites/observation-deck/observation-deck.d.ts +41 -0
- package/dist/catalog/composites/observation-deck/observation-deck.d.ts.map +1 -0
- package/dist/catalog/composites/observation-deck/observation-deck.js +60 -0
- package/dist/catalog/composites/observation-deck/observation-deck.js.map +1 -0
- package/dist/catalog/composites/observation-deck/observation-deck.thumb.webp +0 -0
- package/dist/catalog/composites/observation-deck/observation-deck.web.d.ts +41 -0
- package/dist/catalog/composites/observation-deck/observation-deck.web.d.ts.map +1 -0
- package/dist/catalog/composites/observation-deck/observation-deck.web.js +54 -0
- package/dist/catalog/composites/observation-deck/observation-deck.web.js.map +1 -0
- package/dist/catalog/composites/simianlights/simianlights.controls.d.ts +3 -0
- package/dist/catalog/composites/simianlights/simianlights.controls.d.ts.map +1 -0
- package/dist/catalog/composites/simianlights/simianlights.controls.js +11 -0
- package/dist/catalog/composites/simianlights/simianlights.controls.js.map +1 -0
- package/dist/catalog/composites/simianlights/simianlights.d.ts +22 -0
- package/dist/catalog/composites/simianlights/simianlights.d.ts.map +1 -0
- package/dist/catalog/composites/simianlights/simianlights.js +30 -0
- package/dist/catalog/composites/simianlights/simianlights.js.map +1 -0
- package/dist/catalog/composites/simianlights/simianlights.thumb.webp +0 -0
- package/dist/catalog/composites/simianlights/simianlights.web.d.ts +22 -0
- package/dist/catalog/composites/simianlights/simianlights.web.d.ts.map +1 -0
- package/dist/catalog/composites/simianlights/simianlights.web.js +33 -0
- package/dist/catalog/composites/simianlights/simianlights.web.js.map +1 -0
- package/dist/catalog/composites/underwater/underwater.controls.d.ts +3 -0
- package/dist/catalog/composites/underwater/underwater.controls.d.ts.map +1 -0
- package/dist/catalog/composites/underwater/underwater.controls.js +11 -0
- package/dist/catalog/composites/underwater/underwater.controls.js.map +1 -0
- package/dist/catalog/composites/underwater/underwater.d.ts +30 -0
- package/dist/catalog/composites/underwater/underwater.d.ts.map +1 -0
- package/dist/catalog/composites/underwater/underwater.js +43 -0
- package/dist/catalog/composites/underwater/underwater.js.map +1 -0
- package/dist/catalog/composites/underwater/underwater.thumb.webp +0 -0
- package/dist/catalog/composites/underwater/underwater.web.d.ts +30 -0
- package/dist/catalog/composites/underwater/underwater.web.d.ts.map +1 -0
- package/dist/catalog/composites/underwater/underwater.web.js +40 -0
- package/dist/catalog/composites/underwater/underwater.web.js.map +1 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.controls.d.ts +3 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.controls.d.ts.map +1 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.controls.js +15 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.controls.js.map +1 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.d.ts +31 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.d.ts.map +1 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.js +45 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.js.map +1 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.thumb.webp +0 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.web.d.ts +31 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.web.d.ts.map +1 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.web.js +39 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.web.js.map +1 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.controls.d.ts +3 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.controls.d.ts.map +1 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.controls.js +14 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.controls.js.map +1 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.d.ts +31 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.d.ts.map +1 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.js +44 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.js.map +1 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.thumb.webp +0 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.web.d.ts +31 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.web.d.ts.map +1 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.web.js +39 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.web.js.map +1 -0
- package/dist/catalog/images/corporate/corporate-logo.d.ts +3 -0
- package/dist/catalog/images/corporate/corporate-logo.d.ts.map +1 -0
- package/dist/catalog/images/corporate/corporate-logo.js +8 -0
- package/dist/catalog/images/corporate/corporate-logo.js.map +1 -0
- package/dist/catalog/images/corporate/corporate-logo.thumb.webp +0 -0
- package/dist/catalog/images/corporate/corporate-logo.web.d.ts +3 -0
- package/dist/catalog/images/corporate/corporate-logo.web.d.ts.map +1 -0
- package/dist/catalog/images/corporate/corporate-logo.web.js +12 -0
- package/dist/catalog/images/corporate/corporate-logo.web.js.map +1 -0
- package/dist/catalog/images/corporate/corporate-logo.webp +0 -0
- package/dist/catalog/images/debug/debug-resolutions.d.ts +3 -0
- package/dist/catalog/images/debug/debug-resolutions.d.ts.map +1 -0
- package/dist/catalog/images/debug/debug-resolutions.js +8 -0
- package/dist/catalog/images/debug/debug-resolutions.js.map +1 -0
- package/dist/catalog/images/debug/debug-resolutions.thumb.webp +0 -0
- package/dist/catalog/images/debug/debug-resolutions.web.d.ts +3 -0
- package/dist/catalog/images/debug/debug-resolutions.web.d.ts.map +1 -0
- package/dist/catalog/images/debug/debug-resolutions.web.js +12 -0
- package/dist/catalog/images/debug/debug-resolutions.web.js.map +1 -0
- package/dist/catalog/images/fairy-caves/grotto.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/grotto.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/grotto.js +8 -0
- package/dist/catalog/images/fairy-caves/grotto.js.map +1 -0
- package/dist/catalog/images/fairy-caves/grotto.thumb.webp +0 -0
- package/dist/catalog/images/fairy-caves/grotto.web.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/grotto.web.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/grotto.web.js +12 -0
- package/dist/catalog/images/fairy-caves/grotto.web.js.map +1 -0
- package/dist/catalog/images/fairy-caves/grotto.webp +0 -0
- package/dist/catalog/images/fairy-caves/hollow.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/hollow.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/hollow.js +8 -0
- package/dist/catalog/images/fairy-caves/hollow.js.map +1 -0
- package/dist/catalog/images/fairy-caves/hollow.thumb.webp +0 -0
- package/dist/catalog/images/fairy-caves/hollow.web.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/hollow.web.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/hollow.web.js +12 -0
- package/dist/catalog/images/fairy-caves/hollow.web.js.map +1 -0
- package/dist/catalog/images/fairy-caves/hollow.webp +0 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.js +8 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.js.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.thumb.webp +0 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.web.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.web.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.web.js +12 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.web.js.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.webp +0 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.js +8 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.js.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.thumb.webp +0 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.web.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.web.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.web.js +12 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.web.js.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.webp +0 -0
- package/dist/catalog/images/fairy-caves/treehouse.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/treehouse.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse.js +8 -0
- package/dist/catalog/images/fairy-caves/treehouse.js.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse.thumb.webp +0 -0
- package/dist/catalog/images/fairy-caves/treehouse.web.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/treehouse.web.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse.web.js +12 -0
- package/dist/catalog/images/fairy-caves/treehouse.web.js.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse.webp +0 -0
- package/dist/catalog/images/home/home-dark.d.ts +3 -0
- package/dist/catalog/images/home/home-dark.d.ts.map +1 -0
- package/dist/catalog/images/home/home-dark.js +8 -0
- package/dist/catalog/images/home/home-dark.js.map +1 -0
- package/dist/catalog/images/home/home-dark.thumb.webp +0 -0
- package/dist/catalog/images/home/home-dark.web.d.ts +3 -0
- package/dist/catalog/images/home/home-dark.web.d.ts.map +1 -0
- package/dist/catalog/images/home/home-dark.web.js +12 -0
- package/dist/catalog/images/home/home-dark.web.js.map +1 -0
- package/dist/catalog/images/home/home-light.d.ts +3 -0
- package/dist/catalog/images/home/home-light.d.ts.map +1 -0
- package/dist/catalog/images/home/home-light.js +8 -0
- package/dist/catalog/images/home/home-light.js.map +1 -0
- package/dist/catalog/images/home/home-light.thumb.webp +0 -0
- package/dist/catalog/images/home/home-light.web.d.ts +3 -0
- package/dist/catalog/images/home/home-light.web.d.ts.map +1 -0
- package/dist/catalog/images/home/home-light.web.js +12 -0
- package/dist/catalog/images/home/home-light.web.js.map +1 -0
- package/dist/catalog/images/image-ids.d.ts +3 -0
- package/dist/catalog/images/image-ids.d.ts.map +1 -0
- package/dist/catalog/images/image-ids.js +43 -0
- package/dist/catalog/images/image-ids.js.map +1 -0
- package/dist/catalog/images/image.types.d.ts +2 -0
- package/dist/catalog/images/image.types.d.ts.map +1 -0
- package/dist/catalog/images/image.types.js +3 -0
- package/dist/catalog/images/image.types.js.map +1 -0
- package/dist/catalog/images/index.d.ts +3 -0
- package/dist/catalog/images/index.d.ts.map +1 -0
- package/dist/catalog/images/index.js +10 -0
- package/dist/catalog/images/index.js.map +1 -0
- package/dist/catalog/images/nature/landscape-dark.d.ts +3 -0
- package/dist/catalog/images/nature/landscape-dark.d.ts.map +1 -0
- package/dist/catalog/images/nature/landscape-dark.js +8 -0
- package/dist/catalog/images/nature/landscape-dark.js.map +1 -0
- package/dist/catalog/images/nature/landscape-dark.thumb.webp +0 -0
- package/dist/catalog/images/nature/landscape-dark.web.d.ts +3 -0
- package/dist/catalog/images/nature/landscape-dark.web.d.ts.map +1 -0
- package/dist/catalog/images/nature/landscape-dark.web.js +12 -0
- package/dist/catalog/images/nature/landscape-dark.web.js.map +1 -0
- package/dist/catalog/images/nature/landscape-light.d.ts +3 -0
- package/dist/catalog/images/nature/landscape-light.d.ts.map +1 -0
- package/dist/catalog/images/nature/landscape-light.js +8 -0
- package/dist/catalog/images/nature/landscape-light.js.map +1 -0
- package/dist/catalog/images/nature/landscape-light.thumb.webp +0 -0
- package/dist/catalog/images/nature/landscape-light.web.d.ts +3 -0
- package/dist/catalog/images/nature/landscape-light.web.d.ts.map +1 -0
- package/dist/catalog/images/nature/landscape-light.web.js +12 -0
- package/dist/catalog/images/nature/landscape-light.web.js.map +1 -0
- package/dist/catalog/images/office/office-dark.d.ts +3 -0
- package/dist/catalog/images/office/office-dark.d.ts.map +1 -0
- package/dist/catalog/images/office/office-dark.js +8 -0
- package/dist/catalog/images/office/office-dark.js.map +1 -0
- package/dist/catalog/images/office/office-dark.thumb.webp +0 -0
- package/dist/catalog/images/office/office-dark.web.d.ts +3 -0
- package/dist/catalog/images/office/office-dark.web.d.ts.map +1 -0
- package/dist/catalog/images/office/office-dark.web.js +12 -0
- package/dist/catalog/images/office/office-dark.web.js.map +1 -0
- package/dist/catalog/images/office/office-light.d.ts +3 -0
- package/dist/catalog/images/office/office-light.d.ts.map +1 -0
- package/dist/catalog/images/office/office-light.js +8 -0
- package/dist/catalog/images/office/office-light.js.map +1 -0
- package/dist/catalog/images/office/office-light.thumb.webp +0 -0
- package/dist/catalog/images/office/office-light.web.d.ts +3 -0
- package/dist/catalog/images/office/office-light.web.d.ts.map +1 -0
- package/dist/catalog/images/office/office-light.web.js +12 -0
- package/dist/catalog/images/office/office-light.web.js.map +1 -0
- package/dist/catalog/images/sci-fi/sci-fi-light.d.ts +3 -0
- package/dist/catalog/images/sci-fi/sci-fi-light.d.ts.map +1 -0
- package/dist/catalog/images/sci-fi/sci-fi-light.js +8 -0
- package/dist/catalog/images/sci-fi/sci-fi-light.js.map +1 -0
- package/dist/catalog/images/sci-fi/sci-fi-light.thumb.webp +0 -0
- package/dist/catalog/images/sci-fi/sci-fi-light.web.d.ts +3 -0
- package/dist/catalog/images/sci-fi/sci-fi-light.web.d.ts.map +1 -0
- package/dist/catalog/images/sci-fi/sci-fi-light.web.js +12 -0
- package/dist/catalog/images/sci-fi/sci-fi-light.web.js.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.d.ts +3 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.d.ts.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.js +8 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.js.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.thumb.webp +0 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.web.d.ts +3 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.web.d.ts.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.web.js +12 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.web.js.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.webp +0 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark.d.ts +3 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark.d.ts.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark.js +8 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark.js.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark.thumb.webp +0 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark.web.d.ts +3 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark.web.d.ts.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark.web.js +12 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark.web.js.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.d.ts +3 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.d.ts.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.js +8 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.js.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.thumb.webp +0 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.web.d.ts +3 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.web.d.ts.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.web.js +12 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.web.js.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.webp +0 -0
- package/dist/catalog/images/simiancraft/simiancraft-light.d.ts +3 -0
- package/dist/catalog/images/simiancraft/simiancraft-light.d.ts.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-light.js +8 -0
- package/dist/catalog/images/simiancraft/simiancraft-light.js.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-light.thumb.webp +0 -0
- package/dist/catalog/images/simiancraft/simiancraft-light.web.d.ts +3 -0
- package/dist/catalog/images/simiancraft/simiancraft-light.web.d.ts.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-light.web.js +12 -0
- package/dist/catalog/images/simiancraft/simiancraft-light.web.js.map +1 -0
- package/dist/catalog/images/spaceship/observation-deck.d.ts +3 -0
- package/dist/catalog/images/spaceship/observation-deck.d.ts.map +1 -0
- package/dist/catalog/images/spaceship/observation-deck.js +8 -0
- package/dist/catalog/images/spaceship/observation-deck.js.map +1 -0
- package/dist/catalog/images/spaceship/observation-deck.thumb.webp +0 -0
- package/dist/catalog/images/spaceship/observation-deck.web.d.ts +3 -0
- package/dist/catalog/images/spaceship/observation-deck.web.d.ts.map +1 -0
- package/dist/catalog/images/spaceship/observation-deck.web.js +12 -0
- package/dist/catalog/images/spaceship/observation-deck.web.js.map +1 -0
- package/dist/catalog/images/spaceship/observation-deck.webp +0 -0
- package/dist/catalog/images/underwater/oceanscape-dark.d.ts +3 -0
- package/dist/catalog/images/underwater/oceanscape-dark.d.ts.map +1 -0
- package/dist/catalog/images/underwater/oceanscape-dark.js +8 -0
- package/dist/catalog/images/underwater/oceanscape-dark.js.map +1 -0
- package/dist/catalog/images/underwater/oceanscape-dark.thumb.webp +0 -0
- package/dist/catalog/images/underwater/oceanscape-dark.web.d.ts +3 -0
- package/dist/catalog/images/underwater/oceanscape-dark.web.d.ts.map +1 -0
- package/dist/catalog/images/underwater/oceanscape-dark.web.js +12 -0
- package/dist/catalog/images/underwater/oceanscape-dark.web.js.map +1 -0
- package/dist/catalog/images/underwater/oceanscape-dark.webp +0 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.d.ts +3 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.d.ts.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.js +8 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.js.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.thumb.webp +0 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.web.d.ts +3 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.web.d.ts.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.web.js +12 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.web.js.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.webp +0 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.d.ts +3 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.d.ts.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.js +8 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.js.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.thumb.webp +0 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.web.d.ts +3 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.web.d.ts.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.web.js +12 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.web.js.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.webp +0 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.d.ts +3 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.d.ts.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.js +8 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.js.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.thumb.webp +0 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.web.d.ts +3 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.web.d.ts.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.web.js +12 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.web.js.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.webp +0 -0
- package/dist/catalog/shaders/_shared/types.d.ts +38 -0
- package/dist/catalog/shaders/_shared/types.d.ts.map +1 -0
- package/dist/catalog/shaders/_shared/types.js +15 -0
- package/dist/catalog/shaders/_shared/types.js.map +1 -0
- package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.d.ts +26 -0
- package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.d.ts.map +1 -0
- package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.form.d.ts +3 -0
- package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.form.d.ts.map +1 -0
- package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.form.js +15 -0
- package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.form.js.map +1 -0
- package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.js +84 -0
- package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.js.map +1 -0
- package/dist/catalog/shaders/blur/blur.d.ts +15 -0
- package/dist/catalog/shaders/blur/blur.d.ts.map +1 -0
- package/dist/catalog/shaders/blur/blur.form.d.ts +3 -0
- package/dist/catalog/shaders/blur/blur.form.d.ts.map +1 -0
- package/dist/catalog/shaders/blur/blur.form.js +15 -0
- package/dist/catalog/shaders/blur/blur.form.js.map +1 -0
- package/dist/catalog/shaders/blur/blur.js +27 -0
- package/dist/catalog/shaders/blur/blur.js.map +1 -0
- package/dist/catalog/shaders/clouds/clouds.d.ts +34 -0
- package/dist/catalog/shaders/clouds/clouds.d.ts.map +1 -0
- package/dist/catalog/shaders/clouds/clouds.form.d.ts +3 -0
- package/dist/catalog/shaders/clouds/clouds.form.d.ts.map +1 -0
- package/dist/catalog/shaders/clouds/clouds.form.js +15 -0
- package/dist/catalog/shaders/clouds/clouds.form.js.map +1 -0
- package/dist/catalog/shaders/clouds/clouds.js +98 -0
- package/dist/catalog/shaders/clouds/clouds.js.map +1 -0
- package/dist/catalog/shaders/corporate-blobs/corporate-blobs.d.ts +40 -0
- package/dist/catalog/shaders/corporate-blobs/corporate-blobs.d.ts.map +1 -0
- package/dist/catalog/shaders/corporate-blobs/corporate-blobs.form.d.ts +3 -0
- package/dist/catalog/shaders/corporate-blobs/corporate-blobs.form.d.ts.map +1 -0
- package/dist/catalog/shaders/corporate-blobs/corporate-blobs.form.js +15 -0
- package/dist/catalog/shaders/corporate-blobs/corporate-blobs.form.js.map +1 -0
- package/dist/catalog/shaders/corporate-blobs/corporate-blobs.js +100 -0
- package/dist/catalog/shaders/corporate-blobs/corporate-blobs.js.map +1 -0
- package/dist/catalog/shaders/fireflies/fireflies.d.ts +18 -0
- package/dist/catalog/shaders/fireflies/fireflies.d.ts.map +1 -0
- package/dist/catalog/shaders/fireflies/fireflies.form.d.ts +3 -0
- package/dist/catalog/shaders/fireflies/fireflies.form.d.ts.map +1 -0
- package/dist/catalog/shaders/fireflies/fireflies.form.js +15 -0
- package/dist/catalog/shaders/fireflies/fireflies.form.js.map +1 -0
- package/dist/catalog/shaders/fireflies/fireflies.js +47 -0
- package/dist/catalog/shaders/fireflies/fireflies.js.map +1 -0
- package/dist/catalog/shaders/godrays/godrays.d.ts +26 -0
- package/dist/catalog/shaders/godrays/godrays.d.ts.map +1 -0
- package/dist/catalog/shaders/godrays/godrays.form.d.ts +3 -0
- package/dist/catalog/shaders/godrays/godrays.form.d.ts.map +1 -0
- package/dist/catalog/shaders/godrays/godrays.form.js +15 -0
- package/dist/catalog/shaders/godrays/godrays.form.js.map +1 -0
- package/dist/catalog/shaders/godrays/godrays.js +83 -0
- package/dist/catalog/shaders/godrays/godrays.js.map +1 -0
- package/dist/catalog/shaders/index.d.ts +73 -0
- package/dist/catalog/shaders/index.d.ts.map +1 -0
- package/dist/catalog/shaders/index.js +30 -0
- package/dist/catalog/shaders/index.js.map +1 -0
- package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.d.ts +44 -0
- package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.d.ts.map +1 -0
- package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.form.d.ts +3 -0
- package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.form.d.ts.map +1 -0
- package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.form.js +16 -0
- package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.form.js.map +1 -0
- package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.js +91 -0
- package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.js.map +1 -0
- package/dist/catalog/shaders/nebula/nebula.d.ts +20 -0
- package/dist/catalog/shaders/nebula/nebula.d.ts.map +1 -0
- package/dist/catalog/shaders/nebula/nebula.form.d.ts +3 -0
- package/dist/catalog/shaders/nebula/nebula.form.d.ts.map +1 -0
- package/dist/catalog/shaders/nebula/nebula.form.js +15 -0
- package/dist/catalog/shaders/nebula/nebula.form.js.map +1 -0
- package/dist/catalog/shaders/nebula/nebula.js +58 -0
- package/dist/catalog/shaders/nebula/nebula.js.map +1 -0
- package/dist/catalog/shaders/plasma/plasma.d.ts +16 -0
- package/dist/catalog/shaders/plasma/plasma.d.ts.map +1 -0
- package/dist/catalog/shaders/plasma/plasma.form.d.ts +3 -0
- package/dist/catalog/shaders/plasma/plasma.form.d.ts.map +1 -0
- package/dist/catalog/shaders/plasma/plasma.form.js +15 -0
- package/dist/catalog/shaders/plasma/plasma.form.js.map +1 -0
- package/dist/catalog/shaders/plasma/plasma.js +32 -0
- package/dist/catalog/shaders/plasma/plasma.js.map +1 -0
- package/dist/catalog/shaders/simianlights/simianlights.d.ts +20 -0
- package/dist/catalog/shaders/simianlights/simianlights.d.ts.map +1 -0
- package/dist/catalog/shaders/simianlights/simianlights.form.d.ts +3 -0
- package/dist/catalog/shaders/simianlights/simianlights.form.d.ts.map +1 -0
- package/dist/catalog/shaders/simianlights/simianlights.form.js +15 -0
- package/dist/catalog/shaders/simianlights/simianlights.form.js.map +1 -0
- package/dist/catalog/shaders/simianlights/simianlights.js +57 -0
- package/dist/catalog/shaders/simianlights/simianlights.js.map +1 -0
- package/dist/src/components/form/control-form.d.ts +37 -0
- package/dist/src/components/form/control-form.d.ts.map +1 -0
- package/dist/src/components/form/control-form.js +55 -0
- package/dist/src/components/form/control-form.js.map +1 -0
- package/dist/src/components/form/make-controls.d.ts +22 -0
- package/dist/src/components/form/make-controls.d.ts.map +1 -0
- package/dist/src/components/form/make-controls.js +19 -0
- package/dist/src/components/form/make-controls.js.map +1 -0
- package/dist/src/components/form/scope.d.ts +2 -0
- package/dist/src/components/form/scope.d.ts.map +1 -0
- package/dist/src/components/form/scope.js +11 -0
- package/dist/src/components/form/scope.js.map +1 -0
- package/dist/src/components/form/use-field.d.ts +10 -0
- package/dist/src/components/form/use-field.d.ts.map +1 -0
- package/dist/src/components/form/use-field.js +27 -0
- package/dist/src/components/form/use-field.js.map +1 -0
- package/dist/src/components/preset-book-menu/index.d.ts +52 -0
- package/dist/src/components/preset-book-menu/index.d.ts.map +1 -0
- package/dist/src/components/preset-book-menu/index.js +152 -0
- package/dist/src/components/preset-book-menu/index.js.map +1 -0
- package/dist/src/components/preset-book-menu/layout.d.ts +25 -0
- package/dist/src/components/preset-book-menu/layout.d.ts.map +1 -0
- package/dist/src/components/preset-book-menu/layout.js +19 -0
- package/dist/src/components/preset-book-menu/layout.js.map +1 -0
- package/dist/src/components/preset-book-menu/preset-book-menu.types.d.ts +88 -0
- package/dist/src/components/preset-book-menu/preset-book-menu.types.d.ts.map +1 -0
- package/dist/src/components/preset-book-menu/preset-book-menu.types.js +14 -0
- package/dist/src/components/preset-book-menu/preset-book-menu.types.js.map +1 -0
- package/dist/src/components/preset-book-menu/preset-grid.d.ts +16 -0
- package/dist/src/components/preset-book-menu/preset-grid.d.ts.map +1 -0
- package/dist/src/components/preset-book-menu/preset-grid.js +49 -0
- package/dist/src/components/preset-book-menu/preset-grid.js.map +1 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.d.ts +3 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.d.ts.map +1 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.js +28 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.js.map +1 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.types.d.ts +13 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.types.d.ts.map +1 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.types.js +5 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.types.js.map +1 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.web.d.ts +3 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.web.d.ts.map +1 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.web.js +17 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.web.js.map +1 -0
- package/dist/src/components/preset-control-panel/composite-layer-control-panel.d.ts +14 -0
- package/dist/src/components/preset-control-panel/composite-layer-control-panel.d.ts.map +1 -0
- package/dist/src/components/preset-control-panel/composite-layer-control-panel.js +36 -0
- package/dist/src/components/preset-control-panel/composite-layer-control-panel.js.map +1 -0
- package/dist/src/components/preset-control-panel/control-section.d.ts +9 -0
- package/dist/src/components/preset-control-panel/control-section.d.ts.map +1 -0
- package/dist/src/components/preset-control-panel/control-section.js +47 -0
- package/dist/src/components/preset-control-panel/control-section.js.map +1 -0
- package/dist/src/components/preset-control-panel/control.d.ts +10 -0
- package/dist/src/components/preset-control-panel/control.d.ts.map +1 -0
- package/dist/src/components/preset-control-panel/control.js +35 -0
- package/dist/src/components/preset-control-panel/control.js.map +1 -0
- package/dist/src/components/preset-control-panel/index.d.ts +14 -0
- package/dist/src/components/preset-control-panel/index.d.ts.map +1 -0
- package/dist/src/components/preset-control-panel/index.js +49 -0
- package/dist/src/components/preset-control-panel/index.js.map +1 -0
- package/dist/src/components/preset-control-panel/mask-control-panel.d.ts +11 -0
- package/dist/src/components/preset-control-panel/mask-control-panel.d.ts.map +1 -0
- package/dist/src/components/preset-control-panel/mask-control-panel.js +34 -0
- package/dist/src/components/preset-control-panel/mask-control-panel.js.map +1 -0
- package/dist/src/components/preset-control-panel/preset-control-panel.d.ts +12 -0
- package/dist/src/components/preset-control-panel/preset-control-panel.d.ts.map +1 -0
- package/dist/src/components/preset-control-panel/preset-control-panel.js +23 -0
- package/dist/src/components/preset-control-panel/preset-control-panel.js.map +1 -0
- package/dist/src/components/preset-control-panel/transform-control-panel.d.ts +14 -0
- package/dist/src/components/preset-control-panel/transform-control-panel.d.ts.map +1 -0
- package/dist/src/components/preset-control-panel/transform-control-panel.js +58 -0
- package/dist/src/components/preset-control-panel/transform-control-panel.js.map +1 -0
- package/dist/src/components/preset-tile/index.d.ts +24 -0
- package/dist/src/components/preset-tile/index.d.ts.map +1 -0
- package/dist/src/components/preset-tile/index.js +98 -0
- package/dist/src/components/preset-tile/index.js.map +1 -0
- package/dist/src/components/theme/provider.d.ts +18 -0
- package/dist/src/components/theme/provider.d.ts.map +1 -0
- package/dist/src/components/theme/provider.js +29 -0
- package/dist/src/components/theme/provider.js.map +1 -0
- package/dist/src/components/theme/slots.d.ts +17 -0
- package/dist/src/components/theme/slots.d.ts.map +1 -0
- package/dist/src/components/theme/slots.js +9 -0
- package/dist/src/components/theme/slots.js.map +1 -0
- package/dist/src/components/ui/button.d.ts +14 -0
- package/dist/src/components/ui/button.d.ts.map +1 -0
- package/dist/src/components/ui/button.js +29 -0
- package/dist/src/components/ui/button.js.map +1 -0
- package/dist/src/components/ui/color-picker.d.ts +12 -0
- package/dist/src/components/ui/color-picker.d.ts.map +1 -0
- package/dist/src/components/ui/color-picker.js +43 -0
- package/dist/src/components/ui/color-picker.js.map +1 -0
- package/dist/src/components/ui/index.d.ts +6 -0
- package/dist/src/components/ui/index.d.ts.map +1 -0
- package/dist/src/components/ui/index.js +18 -0
- package/dist/src/components/ui/index.js.map +1 -0
- package/dist/src/components/ui/label.d.ts +10 -0
- package/dist/src/components/ui/label.d.ts.map +1 -0
- package/dist/src/components/ui/label.js +14 -0
- package/dist/src/components/ui/label.js.map +1 -0
- package/dist/src/components/ui/point.d.ts +19 -0
- package/dist/src/components/ui/point.d.ts.map +1 -0
- package/dist/src/components/ui/point.js +52 -0
- package/dist/src/components/ui/point.js.map +1 -0
- package/dist/src/components/ui/polygon-field.d.ts +10 -0
- package/dist/src/components/ui/polygon-field.d.ts.map +1 -0
- package/dist/src/components/ui/polygon-field.js +50 -0
- package/dist/src/components/ui/polygon-field.js.map +1 -0
- package/dist/src/components/ui/readout.d.ts +10 -0
- package/dist/src/components/ui/readout.d.ts.map +1 -0
- package/dist/src/components/ui/readout.js +14 -0
- package/dist/src/components/ui/readout.js.map +1 -0
- package/dist/src/components/ui/slider-value.d.ts +8 -0
- package/dist/src/components/ui/slider-value.d.ts.map +1 -0
- package/dist/src/components/ui/slider-value.js +17 -0
- package/dist/src/components/ui/slider-value.js.map +1 -0
- package/dist/src/components/ui/slider.d.ts +15 -0
- package/dist/src/components/ui/slider.d.ts.map +1 -0
- package/dist/src/components/ui/slider.js +58 -0
- package/dist/src/components/ui/slider.js.map +1 -0
- package/dist/src/components/ui/switch.d.ts +8 -0
- package/dist/src/components/ui/switch.d.ts.map +1 -0
- package/dist/src/components/ui/switch.js +24 -0
- package/dist/src/components/ui/switch.js.map +1 -0
- package/dist/src/index.d.ts +18 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +187 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/index.web.d.ts +32 -0
- package/dist/src/index.web.d.ts.map +1 -0
- package/dist/src/index.web.js +119 -0
- package/dist/src/index.web.js.map +1 -0
- package/dist/src/kaleidoscope/controls.d.ts +24 -0
- package/dist/src/kaleidoscope/controls.d.ts.map +1 -0
- package/dist/src/kaleidoscope/controls.js +92 -0
- package/dist/src/kaleidoscope/controls.js.map +1 -0
- package/dist/src/kaleidoscope/effect.d.ts +4 -0
- package/dist/src/kaleidoscope/effect.d.ts.map +1 -0
- package/dist/src/kaleidoscope/effect.js +7 -0
- package/dist/src/kaleidoscope/effect.js.map +1 -0
- package/dist/src/kaleidoscope/effect.types.d.ts +47 -0
- package/dist/src/kaleidoscope/effect.types.d.ts.map +1 -0
- package/dist/src/kaleidoscope/effect.types.js +9 -0
- package/dist/src/kaleidoscope/effect.types.js.map +1 -0
- package/dist/src/kaleidoscope/shader-to-spec.d.ts +4 -0
- package/dist/src/kaleidoscope/shader-to-spec.d.ts.map +1 -0
- package/dist/src/kaleidoscope/shader-to-spec.js +17 -0
- package/dist/src/kaleidoscope/shader-to-spec.js.map +1 -0
- package/dist/src/kaleidoscope/types.d.ts +79 -0
- package/dist/src/kaleidoscope/types.d.ts.map +1 -0
- package/dist/src/kaleidoscope/types.js +18 -0
- package/dist/src/kaleidoscope/types.js.map +1 -0
- package/dist/src/kaleidoscope.preset-book.types.d.ts +86 -0
- package/dist/src/kaleidoscope.preset-book.types.d.ts.map +1 -0
- package/dist/src/kaleidoscope.preset-book.types.js +16 -0
- package/dist/src/kaleidoscope.preset-book.types.js.map +1 -0
- package/dist/src/lib/primitives.types.d.ts +3 -0
- package/dist/src/lib/primitives.types.d.ts.map +1 -0
- package/dist/src/lib/primitives.types.js +5 -0
- package/dist/src/lib/primitives.types.js.map +1 -0
- package/dist/src/lib/test-id.d.ts +30 -0
- package/dist/src/lib/test-id.d.ts.map +1 -0
- package/dist/src/lib/test-id.js +81 -0
- package/dist/src/lib/test-id.js.map +1 -0
- package/dist/src/livekit.d.ts +24 -0
- package/dist/src/livekit.d.ts.map +1 -0
- package/dist/src/livekit.js +63 -0
- package/dist/src/livekit.js.map +1 -0
- package/dist/src/nativewind.d.ts +7 -0
- package/dist/src/nativewind.d.ts.map +1 -0
- package/dist/src/nativewind.js +43 -0
- package/dist/src/nativewind.js.map +1 -0
- package/dist/web-driver/effects/composite.d.ts +14 -0
- package/dist/web-driver/effects/composite.d.ts.map +1 -0
- package/dist/web-driver/effects/composite.js +576 -0
- package/dist/web-driver/effects/composite.js.map +1 -0
- package/dist/web-driver/effects/layer-shaders.d.ts +2 -0
- package/dist/web-driver/effects/layer-shaders.d.ts.map +1 -0
- package/dist/web-driver/effects/layer-shaders.js +11 -0
- package/dist/web-driver/effects/layer-shaders.js.map +1 -0
- package/dist/web-driver/effects/transform.d.ts +4 -0
- package/dist/web-driver/effects/transform.d.ts.map +1 -0
- package/dist/web-driver/effects/transform.js +66 -0
- package/dist/web-driver/effects/transform.js.map +1 -0
- package/dist/web-driver/index.d.ts +6 -0
- package/dist/web-driver/index.d.ts.map +1 -0
- package/dist/web-driver/index.js +21 -0
- package/dist/web-driver/index.js.map +1 -0
- package/dist/web-driver/insertable-streams.d.ts.map +1 -0
- package/dist/web-driver/insertable-streams.js +68 -0
- package/dist/web-driver/insertable-streams.js.map +1 -0
- package/dist/web-driver/segmenter.d.ts.map +1 -0
- package/dist/web-driver/segmenter.js +89 -0
- package/dist/web-driver/segmenter.js.map +1 -0
- package/dist/web-driver/shaders.d.ts +2 -0
- package/dist/web-driver/shaders.d.ts.map +1 -0
- package/dist/web-driver/shaders.generated.d.ts +17 -0
- package/dist/web-driver/shaders.generated.d.ts.map +1 -0
- package/dist/web-driver/shaders.generated.js +1180 -0
- package/dist/web-driver/shaders.generated.js.map +1 -0
- package/dist/web-driver/shaders.js +28 -0
- package/dist/web-driver/shaders.js.map +1 -0
- package/dist/web-driver/tuning.d.ts.map +1 -0
- package/dist/web-driver/tuning.js +61 -0
- package/dist/web-driver/tuning.js.map +1 -0
- package/ios/Kaleidoscope.podspec +22 -15
- package/ios/KaleidoscopeModule/BundledImage.swift +39 -0
- package/ios/KaleidoscopeModule/CompositeLayers.swift +142 -0
- package/ios/KaleidoscopeModule/EffectTuning.swift +86 -86
- package/ios/KaleidoscopeModule/KaleidoscopeModule.swift +55 -27
- package/ios/KaleidoscopeModule/Registration.swift +36 -57
- package/ios/KaleidoscopeModule/effects/CompositeProcessor.swift +906 -0
- package/ios/KaleidoscopeModule/effects/FrameBridge.swift +25 -25
- package/ios/KaleidoscopeModule/effects/TransformProcessor.swift +127 -126
- package/ios/KaleidoscopeModule/gpu/CompositeRendering.swift +352 -0
- package/ios/KaleidoscopeModule/gpu/Ingest.swift +104 -102
- package/ios/KaleidoscopeModule/gpu/MetalRenderer.swift +473 -544
- package/ios/KaleidoscopeModule/gpu/Orientation.swift +41 -41
- package/ios/KaleidoscopeModule/gpu/ShaderLibrary.swift +100 -54
- package/ios/KaleidoscopeModule/gpu/TextureBridge.swift +245 -244
- package/ios/KaleidoscopeModule/segmentation/MaskTuning.swift +11 -11
- package/ios/KaleidoscopeModule/segmentation/Segmenter.swift +360 -359
- package/ios/KaleidoscopeModule/shaders/GENERATIVE.txt +9 -0
- package/ios/KaleidoscopeModule/shaders/SHADERS.txt +13 -2
- package/ios/KaleidoscopeModule/shaders/anamorphic-lensflare.metalsrc +47 -0
- package/ios/KaleidoscopeModule/shaders/clouds.metalsrc +185 -0
- package/ios/KaleidoscopeModule/shaders/composite-blit.metalsrc +22 -0
- package/ios/KaleidoscopeModule/shaders/composite-blur.metalsrc +93 -0
- package/ios/KaleidoscopeModule/shaders/composite-camera.metalsrc +22 -0
- package/ios/KaleidoscopeModule/shaders/composite-image.metalsrc +24 -0
- package/ios/KaleidoscopeModule/shaders/composite-masked.metalsrc +22 -0
- package/ios/KaleidoscopeModule/shaders/composite-subject.metalsrc +23 -0
- package/ios/KaleidoscopeModule/shaders/corporate-blobs.metalsrc +221 -0
- package/ios/KaleidoscopeModule/shaders/fireflies.metalsrc +44 -0
- package/ios/KaleidoscopeModule/shaders/godrays.metalsrc +46 -0
- package/ios/KaleidoscopeModule/shaders/light-beams-and-motes.metalsrc +316 -0
- package/ios/KaleidoscopeModule/shaders/nebula.metalsrc +45 -45
- package/ios/KaleidoscopeModule/shaders/plasma.metalsrc +26 -0
- package/ios/KaleidoscopeModule/shaders/simianlights.metalsrc +45 -45
- package/package.json +485 -115
- package/plugin/build/android/assets.js +45 -0
- package/plugin/build/android/index.js +34 -0
- package/plugin/build/index.js +39 -0
- package/plugin/build/ios/assets.js +110 -0
- package/plugin/build/ios/deployment-target.js +105 -0
- package/plugin/build/ios/index.js +63 -0
- package/plugin/build/ios/pods.js +73 -0
- package/plugin/build/lib/constants.js +15 -0
- package/plugin/build/lib/file-manipulation.js +57 -0
- package/plugin/build/lib/mods.js +36 -0
- package/plugin/build/lib/preset-book.js +215 -0
- package/plugin/build/lib/types.js +16 -0
- package/src/components/form/control-form.tsx +112 -0
- package/src/components/form/make-controls.ts +33 -0
- package/src/components/form/scope.ts +9 -0
- package/src/components/form/use-field.ts +35 -0
- package/src/components/preset-book-menu/index.tsx +286 -0
- package/src/components/preset-book-menu/layout.tsx +63 -0
- package/src/components/preset-book-menu/preset-book-menu.types.ts +112 -0
- package/src/components/preset-book-menu/preset-grid.tsx +80 -0
- package/src/components/preset-book-menu/resolve-image-uri.ts +31 -0
- package/src/components/preset-book-menu/resolve-image-uri.types.ts +18 -0
- package/src/components/preset-book-menu/resolve-image-uri.web.ts +15 -0
- package/src/components/preset-control-panel/composite-layer-control-panel.tsx +56 -0
- package/src/components/preset-control-panel/control-section.tsx +84 -0
- package/src/components/preset-control-panel/control.tsx +50 -0
- package/src/components/preset-control-panel/index.ts +31 -0
- package/src/components/preset-control-panel/mask-control-panel.tsx +93 -0
- package/src/components/preset-control-panel/preset-control-panel.tsx +48 -0
- package/src/components/preset-control-panel/transform-control-panel.tsx +146 -0
- package/src/components/preset-tile/index.tsx +160 -0
- package/src/components/theme/provider.tsx +50 -0
- package/src/components/theme/slots.ts +37 -0
- package/src/components/ui/button.tsx +54 -0
- package/src/components/ui/color-picker.tsx +74 -0
- package/src/components/ui/index.ts +10 -0
- package/src/components/ui/label.tsx +24 -0
- package/src/components/ui/point.tsx +116 -0
- package/src/components/ui/polygon-field.tsx +84 -0
- package/src/components/ui/readout.tsx +25 -0
- package/src/components/ui/slider-value.ts +15 -0
- package/src/components/ui/slider.tsx +98 -0
- package/src/components/ui/switch.tsx +40 -0
- package/src/index.ts +176 -95
- package/src/index.web.ts +126 -74
- package/src/kaleidoscope/controls.ts +127 -0
- package/src/kaleidoscope/effect.ts +5 -0
- package/src/kaleidoscope/effect.types.ts +63 -0
- package/src/kaleidoscope/shader-to-spec.ts +16 -0
- package/src/kaleidoscope/types.ts +101 -0
- package/src/kaleidoscope.preset-book.types.ts +105 -0
- package/src/lib/primitives.types.ts +5 -0
- package/src/lib/test-id.ts +81 -0
- package/src/livekit.ts +6 -4
- package/src/nativewind.ts +41 -0
- package/android/src/main/assets/backgrounds/stylized-dark.webp +0 -0
- package/android/src/main/java/com/simiancraft/kaleidoscope/effects/BackgroundImageFactory.kt +0 -365
- package/android/src/main/java/com/simiancraft/kaleidoscope/effects/BlurFactory.kt +0 -400
- package/dist/backgrounds/dark-office.d.ts +0 -3
- package/dist/backgrounds/dark-office.d.ts.map +0 -1
- package/dist/backgrounds/dark-office.js +0 -5
- package/dist/backgrounds/dark-office.js.map +0 -1
- package/dist/backgrounds/dark-office.web.d.ts +0 -3
- package/dist/backgrounds/dark-office.web.d.ts.map +0 -1
- package/dist/backgrounds/dark-office.web.js +0 -8
- package/dist/backgrounds/dark-office.web.js.map +0 -1
- package/dist/backgrounds/debug-resolutions.d.ts +0 -3
- package/dist/backgrounds/debug-resolutions.d.ts.map +0 -1
- package/dist/backgrounds/debug-resolutions.js +0 -6
- package/dist/backgrounds/debug-resolutions.js.map +0 -1
- package/dist/backgrounds/debug-resolutions.web.d.ts +0 -3
- package/dist/backgrounds/debug-resolutions.web.d.ts.map +0 -1
- package/dist/backgrounds/debug-resolutions.web.js +0 -8
- package/dist/backgrounds/debug-resolutions.web.js.map +0 -1
- package/dist/backgrounds/home-dark.d.ts +0 -3
- package/dist/backgrounds/home-dark.d.ts.map +0 -1
- package/dist/backgrounds/home-dark.js +0 -5
- package/dist/backgrounds/home-dark.js.map +0 -1
- package/dist/backgrounds/home-dark.web.d.ts +0 -3
- package/dist/backgrounds/home-dark.web.d.ts.map +0 -1
- package/dist/backgrounds/home-dark.web.js +0 -6
- package/dist/backgrounds/home-dark.web.js.map +0 -1
- package/dist/backgrounds/home-light.d.ts +0 -3
- package/dist/backgrounds/home-light.d.ts.map +0 -1
- package/dist/backgrounds/home-light.js +0 -5
- package/dist/backgrounds/home-light.js.map +0 -1
- package/dist/backgrounds/home-light.web.d.ts +0 -3
- package/dist/backgrounds/home-light.web.d.ts.map +0 -1
- package/dist/backgrounds/home-light.web.js +0 -6
- package/dist/backgrounds/home-light.web.js.map +0 -1
- package/dist/backgrounds/index.d.ts +0 -3
- package/dist/backgrounds/index.d.ts.map +0 -1
- package/dist/backgrounds/index.js +0 -6
- package/dist/backgrounds/index.js.map +0 -1
- package/dist/backgrounds/light-office.d.ts +0 -3
- package/dist/backgrounds/light-office.d.ts.map +0 -1
- package/dist/backgrounds/light-office.js +0 -5
- package/dist/backgrounds/light-office.js.map +0 -1
- package/dist/backgrounds/light-office.web.d.ts +0 -3
- package/dist/backgrounds/light-office.web.d.ts.map +0 -1
- package/dist/backgrounds/light-office.web.js +0 -8
- package/dist/backgrounds/light-office.web.js.map +0 -1
- package/dist/backgrounds/nature-dark.d.ts +0 -3
- package/dist/backgrounds/nature-dark.d.ts.map +0 -1
- package/dist/backgrounds/nature-dark.js +0 -5
- package/dist/backgrounds/nature-dark.js.map +0 -1
- package/dist/backgrounds/nature-dark.web.d.ts +0 -3
- package/dist/backgrounds/nature-dark.web.d.ts.map +0 -1
- package/dist/backgrounds/nature-dark.web.js +0 -6
- package/dist/backgrounds/nature-dark.web.js.map +0 -1
- package/dist/backgrounds/nature-light.d.ts +0 -3
- package/dist/backgrounds/nature-light.d.ts.map +0 -1
- package/dist/backgrounds/nature-light.js +0 -5
- package/dist/backgrounds/nature-light.js.map +0 -1
- package/dist/backgrounds/nature-light.web.d.ts +0 -3
- package/dist/backgrounds/nature-light.web.d.ts.map +0 -1
- package/dist/backgrounds/nature-light.web.js +0 -6
- package/dist/backgrounds/nature-light.web.js.map +0 -1
- package/dist/backgrounds/preset-source.types.d.ts +0 -2
- package/dist/backgrounds/preset-source.types.d.ts.map +0 -1
- package/dist/backgrounds/preset-source.types.js +0 -2
- package/dist/backgrounds/preset-source.types.js.map +0 -1
- package/dist/backgrounds/presets.d.ts +0 -3
- package/dist/backgrounds/presets.d.ts.map +0 -1
- package/dist/backgrounds/presets.js +0 -34
- package/dist/backgrounds/presets.js.map +0 -1
- package/dist/backgrounds/simiancraft-dark.d.ts +0 -3
- package/dist/backgrounds/simiancraft-dark.d.ts.map +0 -1
- package/dist/backgrounds/simiancraft-dark.js +0 -5
- package/dist/backgrounds/simiancraft-dark.js.map +0 -1
- package/dist/backgrounds/simiancraft-dark.web.d.ts +0 -3
- package/dist/backgrounds/simiancraft-dark.web.d.ts.map +0 -1
- package/dist/backgrounds/simiancraft-dark.web.js +0 -6
- package/dist/backgrounds/simiancraft-dark.web.js.map +0 -1
- package/dist/backgrounds/simiancraft-light.d.ts +0 -3
- package/dist/backgrounds/simiancraft-light.d.ts.map +0 -1
- package/dist/backgrounds/simiancraft-light.js +0 -5
- package/dist/backgrounds/simiancraft-light.js.map +0 -1
- package/dist/backgrounds/simiancraft-light.web.d.ts +0 -3
- package/dist/backgrounds/simiancraft-light.web.d.ts.map +0 -1
- package/dist/backgrounds/simiancraft-light.web.js +0 -6
- package/dist/backgrounds/simiancraft-light.web.js.map +0 -1
- package/dist/backgrounds/stylized-dark.d.ts +0 -3
- package/dist/backgrounds/stylized-dark.d.ts.map +0 -1
- package/dist/backgrounds/stylized-dark.js +0 -5
- package/dist/backgrounds/stylized-dark.js.map +0 -1
- package/dist/backgrounds/stylized-dark.web.d.ts +0 -3
- package/dist/backgrounds/stylized-dark.web.d.ts.map +0 -1
- package/dist/backgrounds/stylized-dark.web.js +0 -6
- package/dist/backgrounds/stylized-dark.web.js.map +0 -1
- package/dist/backgrounds/stylized-dark.webp +0 -0
- package/dist/backgrounds/stylized-light.d.ts +0 -3
- package/dist/backgrounds/stylized-light.d.ts.map +0 -1
- package/dist/backgrounds/stylized-light.js +0 -5
- package/dist/backgrounds/stylized-light.js.map +0 -1
- package/dist/backgrounds/stylized-light.web.d.ts +0 -3
- package/dist/backgrounds/stylized-light.web.d.ts.map +0 -1
- package/dist/backgrounds/stylized-light.web.js +0 -6
- package/dist/backgrounds/stylized-light.web.js.map +0 -1
- package/dist/index.d.ts +0 -42
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -155
- package/dist/index.js.map +0 -1
- package/dist/index.web.d.ts +0 -49
- package/dist/index.web.d.ts.map +0 -1
- package/dist/index.web.js +0 -113
- package/dist/index.web.js.map +0 -1
- package/dist/livekit.d.ts +0 -24
- package/dist/livekit.d.ts.map +0 -1
- package/dist/livekit.js +0 -57
- package/dist/livekit.js.map +0 -1
- package/dist/types.d.ts +0 -74
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -10
- package/dist/types.js.map +0 -1
- package/dist/web/blur-kernel.d.ts +0 -6
- package/dist/web/blur-kernel.d.ts.map +0 -1
- package/dist/web/blur-kernel.js +0 -41
- package/dist/web/blur-kernel.js.map +0 -1
- package/dist/web/effects/background-image.d.ts +0 -3
- package/dist/web/effects/background-image.d.ts.map +0 -1
- package/dist/web/effects/background-image.js +0 -284
- package/dist/web/effects/background-image.js.map +0 -1
- package/dist/web/effects/blur.d.ts +0 -3
- package/dist/web/effects/blur.d.ts.map +0 -1
- package/dist/web/effects/blur.js +0 -339
- package/dist/web/effects/blur.js.map +0 -1
- package/dist/web/effects/transform.d.ts +0 -4
- package/dist/web/effects/transform.d.ts.map +0 -1
- package/dist/web/effects/transform.js +0 -62
- package/dist/web/effects/transform.js.map +0 -1
- package/dist/web/insertable-streams.d.ts.map +0 -1
- package/dist/web/insertable-streams.js +0 -64
- package/dist/web/insertable-streams.js.map +0 -1
- package/dist/web/segmenter.d.ts.map +0 -1
- package/dist/web/segmenter.js +0 -83
- package/dist/web/segmenter.js.map +0 -1
- package/dist/web/shaders.d.ts +0 -2
- package/dist/web/shaders.d.ts.map +0 -1
- package/dist/web/shaders.generated.d.ts +0 -4
- package/dist/web/shaders.generated.d.ts.map +0 -1
- package/dist/web/shaders.generated.js +0 -54
- package/dist/web/shaders.generated.js.map +0 -1
- package/dist/web/shaders.js +0 -32
- package/dist/web/shaders.js.map +0 -1
- package/dist/web/tuning.d.ts.map +0 -1
- package/dist/web/tuning.js +0 -55
- package/dist/web/tuning.js.map +0 -1
- package/ios/KaleidoscopeModule/effects/BackgroundImageProcessor.swift +0 -293
- package/ios/KaleidoscopeModule/effects/BlurProcessor.swift +0 -238
- package/ios/KaleidoscopeModule/resources/backgrounds/dark-office.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/debug-resolutions.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/home-dark.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/home-light.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/light-office.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/nature-dark.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/nature-light.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/simiancraft-dark.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/simiancraft-light.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/stylized-dark.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/stylized-light.webp +0 -0
- package/ios/KaleidoscopeModule/shaders/blur.metalsrc +0 -72
- package/ios/KaleidoscopeModule/shaders/composite.metalsrc +0 -22
- package/src/backgrounds/README.md +0 -83
- package/src/backgrounds/dark-office.ts +0 -6
- package/src/backgrounds/dark-office.web.ts +0 -9
- package/src/backgrounds/dark-office.webp +0 -0
- package/src/backgrounds/debug-resolutions.ts +0 -7
- package/src/backgrounds/debug-resolutions.web.ts +0 -9
- package/src/backgrounds/debug-resolutions.webp +0 -0
- package/src/backgrounds/home-dark.ts +0 -6
- package/src/backgrounds/home-dark.web.ts +0 -7
- package/src/backgrounds/home-dark.webp +0 -0
- package/src/backgrounds/home-light.ts +0 -6
- package/src/backgrounds/home-light.web.ts +0 -7
- package/src/backgrounds/home-light.webp +0 -0
- package/src/backgrounds/index.ts +0 -7
- package/src/backgrounds/light-office.ts +0 -6
- package/src/backgrounds/light-office.web.ts +0 -9
- package/src/backgrounds/light-office.webp +0 -0
- package/src/backgrounds/nature-dark.ts +0 -6
- package/src/backgrounds/nature-dark.web.ts +0 -7
- package/src/backgrounds/nature-dark.webp +0 -0
- package/src/backgrounds/nature-light.ts +0 -6
- package/src/backgrounds/nature-light.web.ts +0 -7
- package/src/backgrounds/nature-light.webp +0 -0
- package/src/backgrounds/preset-source.types.ts +0 -5
- package/src/backgrounds/presets.ts +0 -36
- package/src/backgrounds/simiancraft-dark.ts +0 -6
- package/src/backgrounds/simiancraft-dark.web.ts +0 -7
- package/src/backgrounds/simiancraft-dark.webp +0 -0
- package/src/backgrounds/simiancraft-light.ts +0 -6
- package/src/backgrounds/simiancraft-light.web.ts +0 -7
- package/src/backgrounds/simiancraft-light.webp +0 -0
- package/src/backgrounds/stylized-dark.ts +0 -6
- package/src/backgrounds/stylized-dark.web.ts +0 -7
- package/src/backgrounds/stylized-dark.webp +0 -0
- package/src/backgrounds/stylized-light.ts +0 -6
- package/src/backgrounds/stylized-light.web.ts +0 -7
- package/src/backgrounds/stylized-light.webp +0 -0
- package/src/types.ts +0 -89
- package/src/web/blur-kernel.ts +0 -44
- package/src/web/effects/background-image.ts +0 -364
- package/src/web/effects/blur.ts +0 -430
- package/src/web/effects/transform.ts +0 -69
- package/src/web/insertable-streams.ts +0 -112
- package/src/web/segmenter.ts +0 -107
- package/src/web/shaders.generated.ts +0 -56
- package/src/web/shaders.ts +0 -31
- package/src/web/tuning.ts +0 -67
- /package/{src/backgrounds → catalog/images}/assets.d.ts +0 -0
- /package/{android/src/main/assets/backgrounds → catalog/images/debug}/debug-resolutions.webp +0 -0
- /package/{android/src/main/assets/backgrounds → catalog/images/home}/home-dark.webp +0 -0
- /package/{android/src/main/assets/backgrounds → catalog/images/home}/home-light.webp +0 -0
- /package/{android/src/main/assets/backgrounds/nature-dark.webp → catalog/images/nature/landscape-dark.webp} +0 -0
- /package/{android/src/main/assets/backgrounds/nature-light.webp → catalog/images/nature/landscape-light.webp} +0 -0
- /package/{android/src/main/assets/backgrounds/dark-office.webp → catalog/images/office/office-dark.webp} +0 -0
- /package/{android/src/main/assets/backgrounds/light-office.webp → catalog/images/office/office-light.webp} +0 -0
- /package/{android/src/main/assets/backgrounds/stylized-light.webp → catalog/images/sci-fi/sci-fi-light.webp} +0 -0
- /package/{android/src/main/assets/backgrounds → catalog/images/simiancraft}/simiancraft-dark.webp +0 -0
- /package/{android/src/main/assets/backgrounds → catalog/images/simiancraft}/simiancraft-light.webp +0 -0
- /package/dist/{backgrounds → catalog/images/debug}/debug-resolutions.webp +0 -0
- /package/dist/{backgrounds → catalog/images/home}/home-dark.webp +0 -0
- /package/dist/{backgrounds → catalog/images/home}/home-light.webp +0 -0
- /package/dist/{backgrounds/nature-dark.webp → catalog/images/nature/landscape-dark.webp} +0 -0
- /package/dist/{backgrounds/nature-light.webp → catalog/images/nature/landscape-light.webp} +0 -0
- /package/dist/{backgrounds/dark-office.webp → catalog/images/office/office-dark.webp} +0 -0
- /package/dist/{backgrounds/light-office.webp → catalog/images/office/office-light.webp} +0 -0
- /package/dist/{backgrounds/stylized-light.webp → catalog/images/sci-fi/sci-fi-light.webp} +0 -0
- /package/dist/{backgrounds → catalog/images/simiancraft}/simiancraft-dark.webp +0 -0
- /package/dist/{backgrounds → catalog/images/simiancraft}/simiancraft-light.webp +0 -0
- /package/dist/{web → web-driver}/insertable-streams.d.ts +0 -0
- /package/dist/{web → web-driver}/segmenter.d.ts +0 -0
- /package/dist/{web → web-driver}/tuning.d.ts +0 -0
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
// The drop-in composite picker (#28): tabs over the consumer's preset families,
|
|
2
|
+
// a left-hand category menu under the tabs, and a uniform tile grid filtered by
|
|
3
|
+
// the active family and category. Controlled selection; emit the chosen id, the
|
|
4
|
+
// host applies it. `usePresetBookMenu` is the orchestration (group the book by
|
|
5
|
+
// family/category, own the active tab and category) and is exported for BYO
|
|
6
|
+
// layouts.
|
|
7
|
+
|
|
8
|
+
import { useState } from 'react';
|
|
9
|
+
import { Pressable, StyleSheet, Text } from 'react-native';
|
|
10
|
+
import type { KaleidoscopePresetBook } from '../../kaleidoscope.preset-book.types';
|
|
11
|
+
import { categoryTestId, familyTestId } from '../../lib/test-id';
|
|
12
|
+
import { PresetBookMenuLayout } from './layout';
|
|
13
|
+
import type { Category, Family, PresetBookMenuProps, PresetView } from './preset-book-menu.types';
|
|
14
|
+
import { PresetGrid } from './preset-grid';
|
|
15
|
+
|
|
16
|
+
/** The grouping usePresetBookMenu returns; named so BYO-layout consumers can type it. */
|
|
17
|
+
export interface PresetBookMenuModel {
|
|
18
|
+
/** Distinct families present in the book, in first-appearance order. */
|
|
19
|
+
readonly families: ReadonlyArray<Family>;
|
|
20
|
+
/** The reconciled active family (survives a changed book; falls back to the first). */
|
|
21
|
+
readonly activeTab: Family | undefined;
|
|
22
|
+
/** Set the active family tab. */
|
|
23
|
+
readonly setActiveTab: (family: Family) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Categories (taxonomy[1]) within the active family, first-appearance order.
|
|
26
|
+
* Empty when the family is flat (every preset is depth-1).
|
|
27
|
+
*/
|
|
28
|
+
readonly categories: ReadonlyArray<Category>;
|
|
29
|
+
/** The reconciled active category, or undefined when the family is flat. */
|
|
30
|
+
readonly activeCategory: Category | undefined;
|
|
31
|
+
/** Set the active category. */
|
|
32
|
+
readonly setActiveCategory: (category: Category) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Presets to display: the active family narrowed to the active category, or
|
|
35
|
+
* every preset in the family when it is flat.
|
|
36
|
+
*/
|
|
37
|
+
readonly views: ReadonlyArray<PresetView>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Tabbed, preset-book-driven picker. Controlled selection; emits the chosen id
|
|
42
|
+
* and the host applies it.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* <PresetBookMenu
|
|
46
|
+
* presets={presets}
|
|
47
|
+
* value={art}
|
|
48
|
+
* onSelect={setArt}
|
|
49
|
+
* />
|
|
50
|
+
*/
|
|
51
|
+
export function PresetBookMenu<P extends KaleidoscopePresetBook>(props: PresetBookMenuProps<P>) {
|
|
52
|
+
// `className` (declared on PresetBookMenuProps) is intentionally not destructured: the
|
|
53
|
+
// ./nativewind cssInterop registration consumes it at the JSX boundary and
|
|
54
|
+
// merges the resolved classes into `style` before this body runs.
|
|
55
|
+
const {
|
|
56
|
+
presets,
|
|
57
|
+
value,
|
|
58
|
+
onSelect,
|
|
59
|
+
disabled = false,
|
|
60
|
+
renderTile,
|
|
61
|
+
labelFor,
|
|
62
|
+
tabLabelFor,
|
|
63
|
+
categoryLabelFor,
|
|
64
|
+
style,
|
|
65
|
+
} = props;
|
|
66
|
+
const {
|
|
67
|
+
families,
|
|
68
|
+
activeTab,
|
|
69
|
+
setActiveTab,
|
|
70
|
+
categories,
|
|
71
|
+
activeCategory,
|
|
72
|
+
setActiveCategory,
|
|
73
|
+
views,
|
|
74
|
+
} = usePresetBookMenu(presets, labelFor);
|
|
75
|
+
|
|
76
|
+
if (!activeTab) return null;
|
|
77
|
+
// The renderers speak string ids (PresetView.id); the public onSelect is
|
|
78
|
+
// narrowed to keyof P. Adapt once here so consumers need no cast (every id
|
|
79
|
+
// came from Object.keys(presets), so it is a real key).
|
|
80
|
+
const handleSelect = (id: string | null) => onSelect(id as (keyof P & string) | null);
|
|
81
|
+
|
|
82
|
+
return (
|
|
83
|
+
<PresetBookMenuLayout
|
|
84
|
+
style={style}
|
|
85
|
+
tabsZone={families.map((family) => (
|
|
86
|
+
<Tab
|
|
87
|
+
key={family}
|
|
88
|
+
label={tabLabelFor?.(family) ?? titleCase(family)}
|
|
89
|
+
active={family === activeTab}
|
|
90
|
+
disabled={disabled}
|
|
91
|
+
onPress={() => setActiveTab(family)}
|
|
92
|
+
testID={familyTestId(family)}
|
|
93
|
+
/>
|
|
94
|
+
))}
|
|
95
|
+
sidebarZone={
|
|
96
|
+
categories.length > 0
|
|
97
|
+
? categories.map((category) => (
|
|
98
|
+
<CategoryItem
|
|
99
|
+
key={category}
|
|
100
|
+
label={categoryLabelFor?.(category) ?? category}
|
|
101
|
+
active={category === activeCategory}
|
|
102
|
+
disabled={disabled}
|
|
103
|
+
onPress={() => setActiveCategory(category)}
|
|
104
|
+
testID={categoryTestId(activeTab, category)}
|
|
105
|
+
/>
|
|
106
|
+
))
|
|
107
|
+
: undefined
|
|
108
|
+
}
|
|
109
|
+
bodyZone={
|
|
110
|
+
<PresetGrid
|
|
111
|
+
presets={views}
|
|
112
|
+
value={value}
|
|
113
|
+
onSelect={handleSelect}
|
|
114
|
+
disabled={disabled}
|
|
115
|
+
renderTile={renderTile}
|
|
116
|
+
/>
|
|
117
|
+
}
|
|
118
|
+
/>
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Group a preset book by family and category, and own the active tab and
|
|
124
|
+
* category. The grouping is plain; no hand-rolled memo: React Compiler memoizes
|
|
125
|
+
* it when the library is compiled, and it is cheap to recompute otherwise. The
|
|
126
|
+
* active tab and category are reconciled every render: each survives as long as
|
|
127
|
+
* it is still in the book, else it falls back to the first; so swapping
|
|
128
|
+
* `presets`, or switching to a family that lacks the prior category, can't strand
|
|
129
|
+
* a dead selection.
|
|
130
|
+
*/
|
|
131
|
+
export function usePresetBookMenu<P extends KaleidoscopePresetBook>(
|
|
132
|
+
presets: P,
|
|
133
|
+
labelFor?: (id: keyof P & string) => string,
|
|
134
|
+
): PresetBookMenuModel {
|
|
135
|
+
const families: Family[] = [];
|
|
136
|
+
const viewsByFamily = new Map<Family, PresetView[]>();
|
|
137
|
+
const categoriesByFamily = new Map<Family, Category[]>();
|
|
138
|
+
const viewsByFamilyCategory = new Map<Family, Map<Category, PresetView[]>>();
|
|
139
|
+
for (const id of Object.keys(presets)) {
|
|
140
|
+
const preset = presets[id];
|
|
141
|
+
if (!preset) continue;
|
|
142
|
+
// taxonomy[0] is the family (tab); taxonomy[1], when present, is the
|
|
143
|
+
// category (left-hand menu). A depth-1 preset has no category.
|
|
144
|
+
const family = preset.taxonomy[0];
|
|
145
|
+
const category = preset.taxonomy[1];
|
|
146
|
+
const view: PresetView = {
|
|
147
|
+
id,
|
|
148
|
+
label: labelFor?.(id as keyof P & string) ?? preset.name,
|
|
149
|
+
family,
|
|
150
|
+
category,
|
|
151
|
+
source:
|
|
152
|
+
typeof preset.thumbnail === 'string' || typeof preset.thumbnail === 'number'
|
|
153
|
+
? preset.thumbnail
|
|
154
|
+
: undefined,
|
|
155
|
+
};
|
|
156
|
+
if (!viewsByFamily.has(family)) {
|
|
157
|
+
families.push(family);
|
|
158
|
+
viewsByFamily.set(family, []);
|
|
159
|
+
categoriesByFamily.set(family, []);
|
|
160
|
+
viewsByFamilyCategory.set(family, new Map());
|
|
161
|
+
}
|
|
162
|
+
viewsByFamily.get(family)?.push(view);
|
|
163
|
+
if (category !== undefined) {
|
|
164
|
+
const cats = categoriesByFamily.get(family);
|
|
165
|
+
const catViews = viewsByFamilyCategory.get(family);
|
|
166
|
+
if (cats && catViews && !catViews.has(category)) {
|
|
167
|
+
cats.push(category);
|
|
168
|
+
catViews.set(category, []);
|
|
169
|
+
}
|
|
170
|
+
catViews?.get(category)?.push(view);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
const [activeTab, setActiveTab] = useState<Family | undefined>(undefined);
|
|
175
|
+
const family = activeTab && families.includes(activeTab) ? activeTab : families[0];
|
|
176
|
+
const categories = (family && categoriesByFamily.get(family)) || [];
|
|
177
|
+
|
|
178
|
+
const [activeCategory, setActiveCategory] = useState<Category | undefined>(undefined);
|
|
179
|
+
const category =
|
|
180
|
+
activeCategory && categories.includes(activeCategory) ? activeCategory : categories[0];
|
|
181
|
+
|
|
182
|
+
const views = category
|
|
183
|
+
? (family && viewsByFamilyCategory.get(family)?.get(category)) || []
|
|
184
|
+
: (family && viewsByFamily.get(family)) || [];
|
|
185
|
+
|
|
186
|
+
return {
|
|
187
|
+
families,
|
|
188
|
+
activeTab: family,
|
|
189
|
+
setActiveTab,
|
|
190
|
+
categories,
|
|
191
|
+
activeCategory: category,
|
|
192
|
+
setActiveCategory,
|
|
193
|
+
views,
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
interface TabProps {
|
|
198
|
+
readonly label: string;
|
|
199
|
+
readonly active: boolean;
|
|
200
|
+
readonly disabled: boolean;
|
|
201
|
+
readonly onPress: () => void;
|
|
202
|
+
readonly testID: string;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function Tab({ label, active, disabled, onPress, testID }: TabProps) {
|
|
206
|
+
return (
|
|
207
|
+
<Pressable
|
|
208
|
+
accessibilityRole="tab"
|
|
209
|
+
accessibilityState={{ selected: active, disabled }}
|
|
210
|
+
testID={testID}
|
|
211
|
+
disabled={disabled}
|
|
212
|
+
onPress={onPress}
|
|
213
|
+
style={[styles.tab, active && styles.tabActive, disabled && styles.tabDisabled]}
|
|
214
|
+
>
|
|
215
|
+
<Text style={[styles.tabLabel, active && styles.tabLabelActive]}>{label}</Text>
|
|
216
|
+
</Pressable>
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
interface CategoryItemProps {
|
|
221
|
+
readonly label: string;
|
|
222
|
+
readonly active: boolean;
|
|
223
|
+
readonly disabled: boolean;
|
|
224
|
+
readonly onPress: () => void;
|
|
225
|
+
readonly testID: string;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function CategoryItem({ label, active, disabled, onPress, testID }: CategoryItemProps) {
|
|
229
|
+
return (
|
|
230
|
+
<Pressable
|
|
231
|
+
accessibilityRole="menuitem"
|
|
232
|
+
accessibilityState={{ selected: active, disabled }}
|
|
233
|
+
testID={testID}
|
|
234
|
+
disabled={disabled}
|
|
235
|
+
onPress={onPress}
|
|
236
|
+
style={[
|
|
237
|
+
styles.category,
|
|
238
|
+
active && styles.categoryActive,
|
|
239
|
+
disabled && styles.categoryDisabled,
|
|
240
|
+
]}
|
|
241
|
+
>
|
|
242
|
+
<Text style={[styles.categoryLabel, active && styles.categoryLabelActive]}>{label}</Text>
|
|
243
|
+
</Pressable>
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
function titleCase(s: string): string {
|
|
248
|
+
return s
|
|
249
|
+
.split('-')
|
|
250
|
+
.map((w) => (w ? w.charAt(0).toUpperCase() + w.slice(1) : w))
|
|
251
|
+
.join(' ');
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
const styles = StyleSheet.create({
|
|
255
|
+
tab: { paddingVertical: 6, paddingHorizontal: 12, borderRadius: 999, backgroundColor: '#1f1f1f' },
|
|
256
|
+
tabActive: { backgroundColor: '#333' },
|
|
257
|
+
tabDisabled: { opacity: 0.5 },
|
|
258
|
+
tabLabel: { color: '#999', fontSize: 12, fontWeight: '600' },
|
|
259
|
+
tabLabelActive: { color: '#fff' },
|
|
260
|
+
category: {
|
|
261
|
+
paddingVertical: 6,
|
|
262
|
+
paddingHorizontal: 10,
|
|
263
|
+
borderRadius: 8,
|
|
264
|
+
backgroundColor: '#1a1a1a',
|
|
265
|
+
},
|
|
266
|
+
categoryActive: { backgroundColor: '#2c2c2c' },
|
|
267
|
+
categoryDisabled: { opacity: 0.5 },
|
|
268
|
+
categoryLabel: { color: '#9a9a9a', fontSize: 12, fontWeight: '500' },
|
|
269
|
+
categoryLabelActive: { color: '#fff' },
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
export { PresetTile } from '../preset-tile';
|
|
273
|
+
// The `./picker` subpath barrel: the chassis above plus the composable parts and
|
|
274
|
+
// types a consumer can use to build a BYO layout.
|
|
275
|
+
export { PresetBookMenuLayout } from './layout';
|
|
276
|
+
export type {
|
|
277
|
+
Category,
|
|
278
|
+
Family,
|
|
279
|
+
PresetBookMenuProps,
|
|
280
|
+
PresetBookMenuSelection,
|
|
281
|
+
PresetBookMenuStyleProps,
|
|
282
|
+
PresetItemState,
|
|
283
|
+
PresetView,
|
|
284
|
+
RenderTile,
|
|
285
|
+
} from './preset-book-menu.types';
|
|
286
|
+
export { PresetGrid } from './preset-grid';
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// Zone container for the composite picker: a tab bar above, then (when the
|
|
2
|
+
// active family has categories) a left-hand category menu beside the body.
|
|
3
|
+
// Presentational only; the composite fills the zones.
|
|
4
|
+
|
|
5
|
+
import type { ReactNode } from 'react';
|
|
6
|
+
import { type StyleProp, StyleSheet, View, type ViewStyle } from 'react-native';
|
|
7
|
+
|
|
8
|
+
interface PresetBookMenuLayoutProps {
|
|
9
|
+
/**
|
|
10
|
+
* The family tab bar; conventionally a row of tab buttons, one per family.
|
|
11
|
+
* The layout already wraps this in a `tablist`-role row with flex/gap, so the
|
|
12
|
+
* filler should be the bare tab elements (don't add another row wrapper).
|
|
13
|
+
*/
|
|
14
|
+
readonly tabsZone: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* The category menu for the active family (a column of buttons, one per
|
|
17
|
+
* category). Omit (or pass nothing) for a flat family: the body then spans
|
|
18
|
+
* full width with no left column. The layout wraps this in the left column;
|
|
19
|
+
* the filler should be the bare item elements.
|
|
20
|
+
*/
|
|
21
|
+
readonly sidebarZone?: ReactNode;
|
|
22
|
+
/** The active family's renderer (a PresetGrid); fills the body column. */
|
|
23
|
+
readonly bodyZone: ReactNode;
|
|
24
|
+
/** NativeWind class for the container; resolved via the `./nativewind` interop. */
|
|
25
|
+
readonly className?: string | undefined;
|
|
26
|
+
readonly style?: StyleProp<ViewStyle> | undefined;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// `className` is consumed by the ./nativewind cssInterop at the boundary and
|
|
30
|
+
// arrives merged into `style`, so it is not destructured/read here.
|
|
31
|
+
export function PresetBookMenuLayout({
|
|
32
|
+
tabsZone,
|
|
33
|
+
sidebarZone,
|
|
34
|
+
bodyZone,
|
|
35
|
+
style,
|
|
36
|
+
}: PresetBookMenuLayoutProps) {
|
|
37
|
+
return (
|
|
38
|
+
<View style={[styles.container, style]}>
|
|
39
|
+
<View accessibilityRole="tablist" accessibilityLabel="Effect families" style={styles.tabs}>
|
|
40
|
+
{tabsZone}
|
|
41
|
+
</View>
|
|
42
|
+
{sidebarZone ? (
|
|
43
|
+
<View style={styles.split}>
|
|
44
|
+
<View accessibilityRole="menu" accessibilityLabel="Categories" style={styles.sidebar}>
|
|
45
|
+
{sidebarZone}
|
|
46
|
+
</View>
|
|
47
|
+
<View style={styles.bodyFlex}>{bodyZone}</View>
|
|
48
|
+
</View>
|
|
49
|
+
) : (
|
|
50
|
+
<View style={styles.body}>{bodyZone}</View>
|
|
51
|
+
)}
|
|
52
|
+
</View>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const styles = StyleSheet.create({
|
|
57
|
+
container: { gap: 8, width: '100%' },
|
|
58
|
+
tabs: { flexDirection: 'row', flexWrap: 'wrap', gap: 6 },
|
|
59
|
+
split: { flexDirection: 'row', gap: 12, width: '100%', alignItems: 'flex-start' },
|
|
60
|
+
sidebar: { flexShrink: 0, gap: 4, minWidth: 96 },
|
|
61
|
+
bodyFlex: { flex: 1 },
|
|
62
|
+
body: { width: '100%' },
|
|
63
|
+
});
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// Shared contract for the drop-in picker components (#28).
|
|
2
|
+
//
|
|
3
|
+
// These types are the seam between the composite picker, its family renderers,
|
|
4
|
+
// and the per-item leaves. The composite reads the consumer's preset book,
|
|
5
|
+
// flattens each preset to a `PresetView`, groups by `family` (the book entry's
|
|
6
|
+
// taxonomy root), and dispatches to a family-appropriate control. Selection is
|
|
7
|
+
// controlled: the
|
|
8
|
+
// component emits the chosen preset id; the host applies it via `kaleidoscope`.
|
|
9
|
+
//
|
|
10
|
+
// No runtime imports from platform-specific packages live here (it is the
|
|
11
|
+
// shared `.types.ts` for the platform-split resolver too); only `react` types.
|
|
12
|
+
|
|
13
|
+
import type { ReactNode } from 'react';
|
|
14
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
15
|
+
import type { KaleidoscopePresetBook } from '../../kaleidoscope.preset-book.types';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* A composite's family; the grouping (tab) axis. This is the book entry's
|
|
19
|
+
* taxonomy root (`taxonomy[0]`, e.g. 'Worlds', 'Backgrounds').
|
|
20
|
+
*/
|
|
21
|
+
export type Family = string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A composite's category; the second grouping axis under a family (the
|
|
25
|
+
* left-hand menu). This is the book entry's `taxonomy[1]` (e.g. 'Wizard Tower'
|
|
26
|
+
* under 'Worlds', 'Office' under 'Backgrounds'). Absent for a depth-1 preset.
|
|
27
|
+
*/
|
|
28
|
+
export type Category = string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* A preset flattened for display. `id` is the book key the picker emits and the
|
|
32
|
+
* effect dispatches by; `source` is a thumbnail source (the composite's
|
|
33
|
+
* `thumbnail`) when present, feeding the thumbnail tile/resolver.
|
|
34
|
+
*/
|
|
35
|
+
export interface PresetView {
|
|
36
|
+
readonly id: string;
|
|
37
|
+
readonly label: string;
|
|
38
|
+
readonly family: Family;
|
|
39
|
+
/** The preset's category (`taxonomy[1]`); undefined for a depth-1 preset. */
|
|
40
|
+
readonly category?: Category | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Thumbnail source (web URL or native preset name as `string`, or a Metro
|
|
43
|
+
* asset module id as `number`); present when the book entry has one.
|
|
44
|
+
*/
|
|
45
|
+
readonly source?: string | number | undefined;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The item's own interaction state, passed to a render-prop so a BYO tile/button
|
|
50
|
+
* can reflect it. This is the leaf's interaction surface (its own selected/press
|
|
51
|
+
* lifecycle), not a relayed parent-state flag.
|
|
52
|
+
*/
|
|
53
|
+
export interface PresetItemState {
|
|
54
|
+
readonly selected: boolean;
|
|
55
|
+
readonly disabled: boolean;
|
|
56
|
+
readonly onPress: () => void;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Render-prop for one preset tile. `uri` is the resolved thumbnail source
|
|
61
|
+
* (undefined renders the recessed variant); `testID` is the tile's deterministic
|
|
62
|
+
* `accessibilityIdentifier` (`kld.preset.<id>`), which a BYO tile should apply to
|
|
63
|
+
* its pressable root so Maestro can address it.
|
|
64
|
+
*/
|
|
65
|
+
export type RenderTile = (
|
|
66
|
+
preset: PresetView,
|
|
67
|
+
state: PresetItemState & {
|
|
68
|
+
readonly uri: string | number | undefined;
|
|
69
|
+
readonly testID: string;
|
|
70
|
+
},
|
|
71
|
+
) => ReactNode;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Controlled single-selection contract shared by every picker surface. `K` is
|
|
75
|
+
* the id type: the composite narrows it to `keyof P` so `value`/`onSelect` speak
|
|
76
|
+
* the book's keys (no cast at the call site), matching how `kaleidoscope(cmd)`
|
|
77
|
+
* narrows. Standalone primitives default `K` to `string`.
|
|
78
|
+
*/
|
|
79
|
+
export interface PresetBookMenuSelection<K extends string = string> {
|
|
80
|
+
/** The selected preset id, or null when nothing is selected. */
|
|
81
|
+
readonly value: K | null;
|
|
82
|
+
/**
|
|
83
|
+
* Emitted with the chosen id, or null when the selection is toggled off
|
|
84
|
+
* (clicking the selected item clears it, mapping to `kaleidoscope(null)`).
|
|
85
|
+
*/
|
|
86
|
+
readonly onSelect: (id: K | null) => void;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** Props common to the picker surfaces; styling and templating hooks. */
|
|
90
|
+
export interface PresetBookMenuStyleProps {
|
|
91
|
+
readonly disabled?: boolean | undefined;
|
|
92
|
+
/** Container class; resolved by NativeWind via the `./nativewind` interop. */
|
|
93
|
+
readonly className?: string | undefined;
|
|
94
|
+
/** Override the per-preset tile rendering (BYO tile). */
|
|
95
|
+
readonly renderTile?: RenderTile | undefined;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** Props for the drop-in composite picker (the tabbed kitchen sink). */
|
|
99
|
+
export interface PresetBookMenuProps<P extends KaleidoscopePresetBook = KaleidoscopePresetBook>
|
|
100
|
+
extends PresetBookMenuSelection<keyof P & string>,
|
|
101
|
+
PresetBookMenuStyleProps {
|
|
102
|
+
/** The consumer's preset book. */
|
|
103
|
+
readonly presets: P;
|
|
104
|
+
/** RN style override for the container; applied after the defaults. */
|
|
105
|
+
readonly style?: StyleProp<ViewStyle> | undefined;
|
|
106
|
+
/** Map a preset id to a display label; defaults to a title-cased id. */
|
|
107
|
+
readonly labelFor?: ((id: keyof P & string) => string) | undefined;
|
|
108
|
+
/** Label a family tab; defaults to a title-cased family name. */
|
|
109
|
+
readonly tabLabelFor?: ((family: Family) => string) | undefined;
|
|
110
|
+
/** Label a category menu item; defaults to the raw category string. */
|
|
111
|
+
readonly categoryLabelFor?: ((category: Category) => string) | undefined;
|
|
112
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// Family renderer: one family's presets as a uniform tile grid. Every family
|
|
2
|
+
// renders through this; the per-preset tile decides wallpaper-vs-recessed by
|
|
3
|
+
// whether it has a resolved thumbnail, so a family with no thumbnails just
|
|
4
|
+
// renders recessed buttons of the same footprint. The tile renderer is the
|
|
5
|
+
// `renderTile` slot or the default.
|
|
6
|
+
//
|
|
7
|
+
// The thumbnail URI comes from the platform-split `resolveImageUri`: the
|
|
8
|
+
// source URL on web, the in-bundle file:// URI on native; undefined for a preset
|
|
9
|
+
// with no thumbnail (the tile then renders its recessed variant).
|
|
10
|
+
|
|
11
|
+
import { Fragment } from 'react';
|
|
12
|
+
import { type StyleProp, StyleSheet, View, type ViewStyle } from 'react-native';
|
|
13
|
+
import { presetTileTestId } from '../../lib/test-id';
|
|
14
|
+
import { PresetTile } from '../preset-tile';
|
|
15
|
+
import type { PresetView, RenderTile } from './preset-book-menu.types';
|
|
16
|
+
import { resolveImageUri } from './resolve-image-uri';
|
|
17
|
+
|
|
18
|
+
interface PresetGridProps {
|
|
19
|
+
readonly presets: ReadonlyArray<PresetView>;
|
|
20
|
+
readonly value: string | null;
|
|
21
|
+
readonly onSelect: (id: string | null) => void;
|
|
22
|
+
readonly disabled?: boolean | undefined;
|
|
23
|
+
/** Override the tile rendering (BYO tile, e.g. to add a badge). */
|
|
24
|
+
readonly renderTile?: RenderTile | undefined;
|
|
25
|
+
/** NativeWind class for the grid container; resolved via the `./nativewind` interop. */
|
|
26
|
+
readonly className?: string | undefined;
|
|
27
|
+
readonly style?: StyleProp<ViewStyle> | undefined;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const defaultRenderTile: RenderTile = (preset, state) => (
|
|
31
|
+
<PresetTile
|
|
32
|
+
label={preset.label}
|
|
33
|
+
uri={state.uri}
|
|
34
|
+
selected={state.selected}
|
|
35
|
+
disabled={state.disabled}
|
|
36
|
+
onPress={state.onPress}
|
|
37
|
+
testID={state.testID}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
export function PresetGrid(props: PresetGridProps) {
|
|
42
|
+
const { presets, value, onSelect, disabled = false, renderTile, style } = props;
|
|
43
|
+
const renderItem = renderTile ?? defaultRenderTile;
|
|
44
|
+
// Resolve each preset's thumbnail URI; pure in (id, source), so React Compiler
|
|
45
|
+
// memoizes the map by `presets` when the library is compiled.
|
|
46
|
+
// The native resolver looks the thumbnail up by id in Bundle.main. For image
|
|
47
|
+
// presets the preset id and the thumbnail's bundle filename coincide (a
|
|
48
|
+
// background's image id IS its preset id); for composites they differ (the
|
|
49
|
+
// composite's thumb is bundled as `<composite-id>-thumb.webp`), so pass the
|
|
50
|
+
// source as the lookup key when it is a string and falls back to the preset
|
|
51
|
+
// id otherwise.
|
|
52
|
+
const uriById = new Map(
|
|
53
|
+
presets.map((p) => {
|
|
54
|
+
const lookupId = typeof p.source === 'string' ? p.source : p.id;
|
|
55
|
+
return [p.id, resolveImageUri(lookupId, p.source)] as const;
|
|
56
|
+
}),
|
|
57
|
+
);
|
|
58
|
+
return (
|
|
59
|
+
<View accessibilityRole="radiogroup" accessibilityLabel="Presets" style={[styles.grid, style]}>
|
|
60
|
+
{presets.map((preset) => {
|
|
61
|
+
const selected = value === preset.id;
|
|
62
|
+
return (
|
|
63
|
+
<Fragment key={preset.id}>
|
|
64
|
+
{renderItem(preset, {
|
|
65
|
+
selected,
|
|
66
|
+
disabled,
|
|
67
|
+
uri: uriById.get(preset.id),
|
|
68
|
+
onPress: () => onSelect(selected ? null : preset.id),
|
|
69
|
+
testID: presetTileTestId(preset.id),
|
|
70
|
+
})}
|
|
71
|
+
</Fragment>
|
|
72
|
+
);
|
|
73
|
+
})}
|
|
74
|
+
</View>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const styles = StyleSheet.create({
|
|
79
|
+
grid: { flexDirection: 'row', flexWrap: 'wrap', gap: 8, width: '100%' },
|
|
80
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Native variant: the prebuild copied the curated WebP to a conventional
|
|
2
|
+
// in-bundle location; the native module returns a displayable URI for it
|
|
3
|
+
// (Android `asset:///...` so Fresco's asset fetcher loads it, iOS the
|
|
4
|
+
// `Bundle.main` file URL). No second copy of the image.
|
|
5
|
+
//
|
|
6
|
+
// The `resolveImageUri` Expo function is optional here: a native build
|
|
7
|
+
// predating it (or a non-background effect build) simply lacks it, so guard with
|
|
8
|
+
// `?.` and fall back to the source (the preset name), which renders no thumbnail
|
|
9
|
+
// rather than crashing.
|
|
10
|
+
|
|
11
|
+
import { requireNativeModule } from 'expo-modules-core';
|
|
12
|
+
import type { ResolveImageUri } from './resolve-image-uri.types';
|
|
13
|
+
|
|
14
|
+
interface ImageUriModule {
|
|
15
|
+
readonly resolveImageUri?: (id: string) => string | null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Resolve the module once, lazily; it is registered at the Expo module's
|
|
19
|
+
// OnCreate, before any picker renders. Hoisted out of the per-call path so a
|
|
20
|
+
// grid of N tiles does not perform N module lookups per render.
|
|
21
|
+
let cachedModule: ImageUriModule | undefined;
|
|
22
|
+
const nativeModule = (): ImageUriModule =>
|
|
23
|
+
(cachedModule ??= requireNativeModule<ImageUriModule>('RnWebrtcKaleidoscope'));
|
|
24
|
+
|
|
25
|
+
export const resolveImageUri: ResolveImageUri = (id, source) => {
|
|
26
|
+
// A numeric source is a Metro asset module id (from `require('./foo.webp')`)
|
|
27
|
+
// and is consumable directly by `<Image source={number}>`; the native module
|
|
28
|
+
// resolves only string preset names, so pass numbers straight through.
|
|
29
|
+
if (typeof source === 'number') return source;
|
|
30
|
+
return nativeModule().resolveImageUri?.(id) ?? source;
|
|
31
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Shared contract for the platform-split thumbnail resolver. No runtime imports
|
|
2
|
+
// from platform-specific packages (web and native variants both import this).
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Resolve a displayable thumbnail source for a preset.
|
|
6
|
+
* - Web: the preset `source` is already a usable image URL; returned as-is.
|
|
7
|
+
* - Native: the bundled WebP lives at a conventional in-bundle location; the
|
|
8
|
+
* native module returns a `file://` URI for it (no second copy of the image).
|
|
9
|
+
* When `source` is a `number` (a Metro asset module id), it bypasses the
|
|
10
|
+
* native module and is returned as-is so `<Image source={number}>` can load
|
|
11
|
+
* it directly through Metro's asset pipeline.
|
|
12
|
+
* Returns `undefined` when no thumbnail can be resolved (the tile shows just its
|
|
13
|
+
* label).
|
|
14
|
+
*/
|
|
15
|
+
export type ResolveImageUri = (
|
|
16
|
+
id: string,
|
|
17
|
+
source: string | number | undefined,
|
|
18
|
+
) => string | number | undefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Web variant: the preset source is already a bundled image URL, so the
|
|
2
|
+
// thumbnail URI is the source itself.
|
|
3
|
+
//
|
|
4
|
+
// How this file gets picked over the native sibling: Metro resolves the bare
|
|
5
|
+
// `../resolve-image-uri` import to `.web.ts` via platform extensions; for
|
|
6
|
+
// non-Metro dist consumers it is selected by the top-level `browser` FIELD remap
|
|
7
|
+
// in package.json (dist/.../resolve-image-uri.js -> .web.js). That is a
|
|
8
|
+
// different mechanism than the `backgrounds/*` subpath `exports` browser
|
|
9
|
+
// CONDITIONS, because this file is reached by an internal relative import, not a
|
|
10
|
+
// subpath export. Adding another platform-split file under src/ui consumed via a
|
|
11
|
+
// bare import means extending that `browser` field, not adding an exports entry.
|
|
12
|
+
|
|
13
|
+
import type { ResolveImageUri } from './resolve-image-uri.types';
|
|
14
|
+
|
|
15
|
+
export const resolveImageUri: ResolveImageUri = (_id, source) => source;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// CompositeLayerControlPanel: render a shader's `*_CONTROLS` descriptor list as
|
|
2
|
+
// fields, in order, data-driven. This is the AUTO-FORM (the default when a shader
|
|
3
|
+
// ships no custom layout form): `<CompositeLayerControlPanel controls={CLOUDS_CONTROLS} />`.
|
|
4
|
+
// It maps every descriptor through the shared `dispatchControl`, so it handles
|
|
5
|
+
// every kind (color, float, switch, polygon) the same way `<Control>` does.
|
|
6
|
+
//
|
|
7
|
+
// KaleidoscopePreset-level customization is props: pass a filtered `controls`
|
|
8
|
+
// array to hide knobs, or `overrides` to narrow a control's range/label for this
|
|
9
|
+
// composite. For real layout (grouping, split, per-beam lists), a shader exports
|
|
10
|
+
// a custom form of `<Control uniform>`s instead of using this panel.
|
|
11
|
+
|
|
12
|
+
import { Fragment } from 'react';
|
|
13
|
+
import type { UniformControl } from '../../../catalog/shaders';
|
|
14
|
+
import { dispatchControl } from './control';
|
|
15
|
+
|
|
16
|
+
/** Per-uniform range/label override, keyed by uniform name. */
|
|
17
|
+
export type ControlOverride = {
|
|
18
|
+
readonly min?: number;
|
|
19
|
+
readonly max?: number;
|
|
20
|
+
readonly step?: number;
|
|
21
|
+
readonly label?: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type CompositeLayerControlPanelProps = {
|
|
25
|
+
readonly controls: readonly UniformControl[];
|
|
26
|
+
readonly overrides?: Readonly<Record<string, ControlOverride>>;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// Merge a preset override onto a descriptor. min/max/step only apply to float;
|
|
30
|
+
// label applies to any kind.
|
|
31
|
+
function withOverride(c: UniformControl, o?: ControlOverride): UniformControl {
|
|
32
|
+
if (!o) return c;
|
|
33
|
+
if (c.kind === 'float') {
|
|
34
|
+
return {
|
|
35
|
+
...c,
|
|
36
|
+
min: o.min ?? c.min,
|
|
37
|
+
max: o.max ?? c.max,
|
|
38
|
+
step: o.step ?? c.step,
|
|
39
|
+
label: o.label ?? c.label,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return o.label ? { ...c, label: o.label } : c;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function CompositeLayerControlPanel({
|
|
46
|
+
controls,
|
|
47
|
+
overrides,
|
|
48
|
+
}: CompositeLayerControlPanelProps) {
|
|
49
|
+
return (
|
|
50
|
+
<>
|
|
51
|
+
{controls.map((c) => (
|
|
52
|
+
<Fragment key={c.name}>{dispatchControl(withOverride(c, overrides?.[c.name]))}</Fragment>
|
|
53
|
+
))}
|
|
54
|
+
</>
|
|
55
|
+
);
|
|
56
|
+
}
|