react-native-webrtc-kaleidoscope 2.0.0 → 2.1.0
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
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,yDAAyD;AACzD,EAAE;AACF,6EAA6E;AAC7E,0EAA0E;AAC1E,8FAA8F;AAC9F,mEAAmE;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAA0B,YAAY,EAAE,MAAM,SAAS,CAAC;AAW/D,qEAAqE;AACrE,0EAA0E;AAC1E,6BAA6B;AAC7B,MAAM,YAAY,GAAG,GAA6B,EAAE,CAClD,mBAAmB,CAA2B,sBAAsB,CAAC,CAAC;AAExE;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAa,EAAQ,EAAE;IAClD,YAAY,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAa,EAAQ,EAAE;IACrD,YAAY,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;AACxC,CAAC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAa,EAAQ,EAAE;IACtD,YAAY,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACzC,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,KAAa,EAAQ,EAAE;IACpE,YAAY,EAAE,CAAC,8BAA8B,CAAC,KAAK,CAAC,CAAC;AACvD,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAc,EAAQ,EAAE;IACrD,YAAY,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AACvC,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAS,EAAE;IAC1C,YAAY,EAAE,CAAC,iBAAiB,EAAE,CAAC;AACrC,CAAC,CAAC;AA8BF,+EAA+E;AAC/E,wEAAwE;AACxE,6EAA6E;AAC7E,4DAA4D;AAC5D,0EAA0E;AAC1E,yEAAyE;AACzE,wDAAwD;AACxD,EAAE;AACF,0EAA0E;AAC1E,+EAA+E;AAC/E,4EAA4E;AAC5E,wEAAwE;AACxE,EAAE;AACF,sEAAsE;AACtE,8EAA8E;AAC9E,2EAA2E;AAC3E,uEAAuE;AACvE,2EAA2E;AAC3E,iFAAiF;AACjF,MAAM,iBAAiB,GAAsB,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;AAE7F,8EAA8E;AAC9E,8EAA8E;AAC9E,iEAAiE;AACjE,MAAM,8BAA8B,GAAsB;IACxD,GAAG,iBAAiB;IACpB,MAAM;IACN,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAoB,IAAI,EAAE,CAAC;CAChE,CAAC;AAEF,MAAM,qBAAqB,GAAG,GAAsB,EAAE,CACpD,QAAQ,CAAC,EAAE,KAAK,SAAS,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,EAAE,CAAC;AAE3F,MAAM,yBAAyB,GAAwB,IAAI,GAAG,CAAC,qBAAqB,EAAE,CAAC,CAAC;AAExF,MAAM,gBAAgB,GAAG,CAAC,IAAqC,EAAU,EAAE;IACzE,kEAAkE;IAClE,sFAAsF;IACtF,IAAI,IAAI,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;QACrC,OAAO,oBAAoB,IAAI,CAAC,MAAM,EAAE,CAAC;IAC3C,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,CAAC;AACnB,CAAC,CAAC;AAEF,6EAA6E;AAC7E,4EAA4E;AAC5E,+EAA+E;AAC/E,0EAA0E;AAC1E,+EAA+E;AAC/E,wCAAwC;AACxC,MAAM,2BAA2B,GAAG,IAAI,OAAO,EAAkB,CAAC;AAElE,MAAM,CAAC,MAAM,iBAAiB,GAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IACrE,MAAM,CAAC,GAAG,KAAiD,CAAC;IAC5D,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,CAAC;IACD,IAAI,OAAO,CAAC,CAAC,gBAAgB,KAAK,UAAU,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK,CACb,8FAA8F,CAC/F,CAAC;IACJ,CAAC;IACD,0EAA0E;IAC1E,yEAAyE;IACzE,wCAAwC;IACxC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACvE,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAEvE,yEAAyE;IACzE,0EAA0E;IAC1E,4EAA4E;IAC5E,6BAA6B;IAC7B,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,2BAA2B,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,SAAS,EAAE,CAAC;QACzD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,2BAA2B,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAElD,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1E,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO,CAAC,IAAI,CACV,0EAA0E,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YAC9F,yDAAyD,CAC5D,CAAC;IACJ,CAAC;IACD,6CAA6C;IAC7C,qEAAqE;IACrE,gEAAgE;IAChE,yEAAyE;IACzE,uEAAuE;IACvE,yEAAyE;IACzE,sEAAsE;IACtE,iEAAiE;IACjE,sEAAsE;IACtE,yEAAyE;IACzE,wEAAwE;IACxE,4DAA4D;IAC5D,sEAAsE;IACtE,2CAA2C;IAC3C,MAAM,UAAU,GAAiC,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IACnF,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC5D,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Native entry point. Metro picks this up via package.json \"react-native\"\n// and the \".\" subpath export's \"react-native\" condition.\n//\n// Thin facade over `track._setVideoEffects(names)` from react-native-webrtc.\n// Native frame processors are registered at app boot by the Expo Module's\n// OnCreate hook (see android/.../KaleidoscopeModule.kt and ios/.../KaleidoscopeModule.swift);\n// this facade just dispatches into the existing upstream registry.\n\nimport { requireNativeModule } from 'expo-modules-core';\nimport { Platform } from 'react-native';\nimport { BACKGROUND_PRESETS } from './backgrounds';\nimport { type ApplyVideoEffects, toEffectSpec } from './types';\n\ninterface KaleidoscopeNativeModule {\n setBlurSigma: (value: number) => void;\n setMaskHardness: (value: number) => void;\n setMaskThreshold: (value: number) => void;\n setSegmentationTargetShortSide: (value: number) => void;\n setDebugTiming: (value: boolean) => void;\n resetEffectTuning: () => void;\n}\n\n// Lazy because the module is not available during pure-JS tests; the\n// getter throws if you call a setter outside a real native runtime, which\n// is the right failure mode.\nconst nativeModule = (): KaleidoscopeNativeModule =>\n requireNativeModule<KaleidoscopeNativeModule>('RnWebrtcKaleidoscope');\n\n/**\n * Set the Gaussian sigma for the blur effect. Higher = softer blur.\n * Clamped to [0.5, 7] (the useful range before the linear-sampled kernel\n * truncates and bands). Default 5.\n */\nexport const setBlurSigma = (value: number): void => {\n nativeModule().setBlurSigma(value);\n};\n\n/**\n * Set the mask smoothstep hardness for blur and background-image\n * composites, in [0, 1]. 0 = soft halo, 1 = near-step edge. Default 0.5.\n */\nexport const setMaskHardness = (value: number): void => {\n nativeModule().setMaskHardness(value);\n};\n\n/**\n * Set the mask smoothstep threshold (center of the transition) in\n * [0.05, 0.95]. 0.5 is neutral. Higher values reject low-confidence\n * pixels (helps tighten the silhouette against chair-edge noise);\n * lower values are more inclusive. Optimal value is platform-specific:\n * all three platforms run MediaPipe selfie segmentation, but the input\n * downscale and API variant differ and produce different confidence\n * distributions.\n */\nexport const setMaskThreshold = (value: number): void => {\n nativeModule().setMaskThreshold(value);\n};\n\n/**\n * Set the segmentation input short-side (px). The person mask is computed from\n * an input downscaled to this; lower = cheaper segmentation (helps on older\n * devices like the A11), softer mask edge. Default 384, clamped [128, 1080]\n * identically on both native platforms. Native only; the web pipeline ignores it.\n */\nexport const setSegmentationTargetShortSide = (value: number): void => {\n nativeModule().setSegmentationTargetShortSide(value);\n};\n\n/**\n * Toggle native per-frame GPU/segmentation timing logs (off by default). iOS\n * logs under os_log \"Perf\"; Android under the \"Perf\" logcat tag.\n */\nexport const setDebugTiming = (value: boolean): void => {\n nativeModule().setDebugTiming(value);\n};\n\n/**\n * Reset all effect tuning parameters to library defaults.\n */\nexport const resetEffectTuning = (): void => {\n nativeModule().resetEffectTuning();\n};\n\nexport type { BackgroundPresetName } from './backgrounds';\nexport type {\n ApplyVideoEffects,\n BackgroundImageSpec,\n BlurSpec,\n EffectInput,\n EffectName,\n EffectSpec,\n TransformName,\n TransformSpec,\n} from './types';\n\ninterface WebRTCTrackExtensions {\n remote?: boolean;\n // Upstream's typed signature is `string[]`, but the platforms diverge on\n // how to clear effects:\n // - Android: passing `null` takes the\n // `videoSource.setVideoProcessor(null)` branch (the only correct clear\n // path); passing `[]` crashes EglRenderer.\n // - iOS: the Obj-C method declares `names` as `nonnull NSArray<NSString *>`,\n // so `null` violates the bridge contract; `[]` is the supported clear\n // value (iOS's `VideoEffectProcessor` with no processors is a\n // passthrough).\n // We type the parameter as the union so the facade can platform-split at\n // the call site. See `applyVideoEffects` below.\n _setVideoEffects?: (names: ReadonlyArray<string> | null) => void;\n}\n\n// Effect names registered native-side in Registration.kt / Registration.swift.\n// Anything not in this list gets filtered out before reaching upstream,\n// because rn-webrtc's setVideoEffects calls ProcessorProvider.getProcessor()\n// and filters nulls into an empty list, which then hits the\n// VideoEffectProcessor empty-processors-list bug (refcount goes negative,\n// EglRenderer crashes one frame later). Until each effect ships a native\n// factory, dropping its name here is the safe behavior.\n//\n// Background-image preset names come from src/backgrounds.ts; the encoder\n// turns `{name:'background-image', source:'dark-office'}` into the flat-string\n// `'background-image-dark-office'` because the rn-webrtc native registry is\n// keyed by flat strings (parameterization via uniforms is a follow-up).\n//\n// iOS registers the same effects via ios/.../Registration.swift. Each\n// platform's allowlist matches exactly what its native Registration installs;\n// anything else is filtered out before reaching upstream so a name with no\n// registered processor never triggers the empty-processors-list crash.\n// The four geometric transform ops share one native processor per platform\n// (TransformFactory on Android, TransformProcessor on iOS); each is a flat name.\nconst TRANSFORM_EFFECTS: readonly string[] = ['flip-x', 'flip-y', 'rotate-cw', 'rotate-ccw'];\n\n// Android (Registration.kt) and iOS (Registration.swift) install an identical\n// effect set, so one list covers both natives. If the platforms ever diverge,\n// split this back into per-platform lists keyed off Platform.OS.\nconst NATIVE_REGISTERED_EFFECTS_LIST: readonly string[] = [\n ...TRANSFORM_EFFECTS,\n 'blur',\n ...BACKGROUND_PRESETS.map((name) => `background-image-${name}`),\n];\n\nconst registeredForPlatform = (): readonly string[] =>\n Platform.OS === 'android' || Platform.OS === 'ios' ? NATIVE_REGISTERED_EFFECTS_LIST : [];\n\nconst NATIVE_REGISTERED_EFFECTS: ReadonlySet<string> = new Set(registeredForPlatform());\n\nconst specToNativeName = (spec: ReturnType<typeof toEffectSpec>): string => {\n // background-image uses one registered factory per source preset.\n // {name: 'background-image', source: 'dark-office'} -> 'background-image-dark-office'\n if (spec.name === 'background-image') {\n return `background-image-${spec.source}`;\n }\n return spec.name;\n};\n\n// Last effect set applied to each track, as a stable signature. Used to skip\n// redundant native calls: rn-webrtc rebuilds the native frame processors on\n// EVERY _setVideoEffects call (Android constructs a fresh processor per call),\n// so re-issuing an unchanged set (a React re-render, an idempotent effect\n// hook) churns GL + segmentation resources for no reason. The WeakMap lets the\n// entry be collected when the track is.\nconst lastAppliedSignatureByTrack = new WeakMap<object, string>();\n\nexport const applyVideoEffects: ApplyVideoEffects = (track, effects) => {\n const t = track as MediaStreamTrack & WebRTCTrackExtensions;\n if (t.remote) {\n throw new Error('kaleidoscope: cannot apply effects to remote tracks');\n }\n if (typeof t._setVideoEffects !== 'function') {\n throw new Error(\n 'kaleidoscope: track has no _setVideoEffects method (is react-native-webrtc >=124 installed?)',\n );\n }\n // Native side currently only consumes effect names. Spec parameters (blur\n // sigma, etc.) are dropped here; they wire through in a follow-up commit\n // once the GPU effects accept uniforms.\n const allNames = effects.map((e) => specToNativeName(toEffectSpec(e)));\n const names = allNames.filter((n) => NATIVE_REGISTERED_EFFECTS.has(n));\n\n // Dedup against the last set applied to this track. Order is significant\n // (effects chain in array order), so the signature preserves it. Skip the\n // native call when nothing changed; the first call for any given set always\n // proceeds (no prior entry).\n const signature = names.join('\\n');\n if (lastAppliedSignatureByTrack.get(track) === signature) {\n return track;\n }\n lastAppliedSignatureByTrack.set(track, signature);\n\n const dropped = allNames.filter((n) => !NATIVE_REGISTERED_EFFECTS.has(n));\n if (dropped.length > 0) {\n console.warn(\n `kaleidoscope: dropping effects not registered on this native platform: ${dropped.join(', ')}. ` +\n 'Web has its own registry; this is a native-only filter.',\n );\n }\n // Platforms diverge on how to clear effects:\n // - Android: rn-webrtc 124 has a bug where passing `[]` installs a\n // VideoEffectProcessor with an empty processors list, whose\n // onFrameCaptured then double-releases the input frame (retain once,\n // release twice) and crashes EglRenderer one frame later. The only\n // correct clear is `null`, which takes the upstream else-branch that\n // resets the processor via `videoSource.setVideoProcessor(null)`.\n // - iOS: the upstream Obj-C `_setVideoEffects` method declares\n // `names` as `(nonnull NSArray<NSString *> *)`, so passing `null`\n // violates the React Native bridge's nonnull contract. The supported\n // clear value is `[]`, which iOS's VideoEffectProcessor treats as a\n // passthrough (no double-release bug on this platform).\n // The explicit type annotation is required — without it TS widens the\n // empty-array literal to `never[] | null`.\n const clearValue: ReadonlyArray<string> | null = Platform.OS === 'ios' ? [] : null;\n t._setVideoEffects(names.length === 0 ? clearValue : names);\n return track;\n};\n"]}
|
package/dist/index.web.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { type ApplyVideoEffects, type EffectInput } from './types';
|
|
2
|
-
import { type DisposablePipeline } from './web/insertable-streams';
|
|
3
|
-
/**
|
|
4
|
-
* Set the Gaussian sigma for the blur effect. Higher = softer blur.
|
|
5
|
-
* Clamped to [0.5, 7] (the useful range before the linear-sampled kernel
|
|
6
|
-
* truncates and bands). Default 5.
|
|
7
|
-
*/
|
|
8
|
-
export declare const setBlurSigma: (value: number) => void;
|
|
9
|
-
/**
|
|
10
|
-
* Set the mask smoothstep hardness for blur and background-image
|
|
11
|
-
* composites, in [0, 1]. 0 = soft halo, 1 = near-step edge. Default 0.5.
|
|
12
|
-
*/
|
|
13
|
-
export declare const setMaskHardness: (value: number) => void;
|
|
14
|
-
/**
|
|
15
|
-
* Set the mask smoothstep threshold (center of the transition) in
|
|
16
|
-
* [0.05, 0.95]. 0.5 is neutral. Higher values reject low-confidence
|
|
17
|
-
* pixels; lower values are more inclusive. Optimal value is platform-
|
|
18
|
-
* specific because each segmentation model has a different confidence
|
|
19
|
-
* distribution.
|
|
20
|
-
*/
|
|
21
|
-
export declare const setMaskThreshold: (value: number) => void;
|
|
22
|
-
/**
|
|
23
|
-
* Set the segmentation input short-side (px). Native-only knob (lower =
|
|
24
|
-
* cheaper segmentation on older devices); stored on web for API parity but
|
|
25
|
-
* the web MediaPipe pipeline does not consume it.
|
|
26
|
-
*/
|
|
27
|
-
export declare const setSegmentationTargetShortSide: (value: number) => void;
|
|
28
|
-
/**
|
|
29
|
-
* Toggle native per-frame timing logs (off by default). No-op effect on web
|
|
30
|
-
* beyond storing the flag.
|
|
31
|
-
*/
|
|
32
|
-
export declare const setDebugTiming: (value: boolean) => void;
|
|
33
|
-
/**
|
|
34
|
-
* Reset all effect tuning parameters to library defaults.
|
|
35
|
-
*/
|
|
36
|
-
export declare const resetEffectTuning: () => void;
|
|
37
|
-
export type { BackgroundPresetName } from './backgrounds';
|
|
38
|
-
export type { ApplyVideoEffects, BackgroundImageSpec, BlurSpec, EffectInput, EffectName, EffectSpec, TransformName, TransformSpec, } from './types';
|
|
39
|
-
/**
|
|
40
|
-
* Like `applyVideoEffects`, but also returns a `dispose()` that tears down every
|
|
41
|
-
* Insertable-Streams stage (stops each generator and aborts each pipe). The
|
|
42
|
-
* LiveKit adapter (`react-native-webrtc-kaleidoscope/livekit`) uses this so a
|
|
43
|
-
* camera flip (restart) or unpublish (destroy) does not leak generators. The
|
|
44
|
-
* page-shared segmenter and WebGL state are module singletons reused across
|
|
45
|
-
* stages, so they are intentionally NOT torn down here.
|
|
46
|
-
*/
|
|
47
|
-
export declare const applyVideoEffectsDisposable: (track: MediaStreamTrack, effects: ReadonlyArray<EffectInput>) => DisposablePipeline;
|
|
48
|
-
export declare const applyVideoEffects: ApplyVideoEffects;
|
|
49
|
-
//# sourceMappingURL=index.web.d.ts.map
|
package/dist/index.web.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../src/index.web.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,WAAW,EAAiC,MAAM,SAAS,CAAC;AAIlG,OAAO,EAEL,KAAK,kBAAkB,EAExB,MAAM,0BAA0B,CAAC;AAGlC;;;;GAIG;AACH,eAAO,MAAM,YAAY,UAAW,MAAM,KAAG,IAE5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,UAAW,MAAM,KAAG,IAE/C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,UAAW,MAAM,KAAG,IAEhD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,UAAW,MAAM,KAAG,IAE9D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,UAAW,OAAO,KAAG,IAE/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAO,IAEpC,CAAC;AAEF,YAAY,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,UAAU,EACV,UAAU,EACV,aAAa,EACb,aAAa,GACd,MAAM,SAAS,CAAC;AAkBjB;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,UAC/B,gBAAgB,WACd,aAAa,CAAC,WAAW,CAAC,KAClC,kBA0BF,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,iBACmB,CAAC","sourcesContent":["// Web entry point (source). This builds to `dist/index.web.js`, which web\n// bundlers resolve through the package's `browser` export condition. With an\n// `exports` map present, that condition supersedes platform-extension\n// resolution; the `.web.ts` suffix here is just our source convention, not what\n// selects this file at consume time.\n//\n// applyVideoEffects(track, effects) wires an Insertable-Streams pipeline that\n// chains each effect's transform and returns a new MediaStreamTrack carrying\n// the transformed frames. Pass the returned track to a `<video>` element or\n// to `RTCRtpSender.replaceTrack(...)`.\n\nimport { type ApplyVideoEffects, type EffectInput, type EffectSpec, toEffectSpec } from './types';\nimport { makeBackgroundImage } from './web/effects/background-image';\nimport { blur } from './web/effects/blur';\nimport { makeTransform } from './web/effects/transform';\nimport {\n applyEffectToTrack,\n type DisposablePipeline,\n type FrameTransform,\n} from './web/insertable-streams';\nimport { tuning } from './web/tuning';\n\n/**\n * Set the Gaussian sigma for the blur effect. Higher = softer blur.\n * Clamped to [0.5, 7] (the useful range before the linear-sampled kernel\n * truncates and bands). Default 5.\n */\nexport const setBlurSigma = (value: number): void => {\n tuning.setBlurSigma(value);\n};\n\n/**\n * Set the mask smoothstep hardness for blur and background-image\n * composites, in [0, 1]. 0 = soft halo, 1 = near-step edge. Default 0.5.\n */\nexport const setMaskHardness = (value: number): void => {\n tuning.setMaskHardness(value);\n};\n\n/**\n * Set the mask smoothstep threshold (center of the transition) in\n * [0.05, 0.95]. 0.5 is neutral. Higher values reject low-confidence\n * pixels; lower values are more inclusive. Optimal value is platform-\n * specific because each segmentation model has a different confidence\n * distribution.\n */\nexport const setMaskThreshold = (value: number): void => {\n tuning.setMaskThreshold(value);\n};\n\n/**\n * Set the segmentation input short-side (px). Native-only knob (lower =\n * cheaper segmentation on older devices); stored on web for API parity but\n * the web MediaPipe pipeline does not consume it.\n */\nexport const setSegmentationTargetShortSide = (value: number): void => {\n tuning.setSegmentationTargetShortSide(value);\n};\n\n/**\n * Toggle native per-frame timing logs (off by default). No-op effect on web\n * beyond storing the flag.\n */\nexport const setDebugTiming = (value: boolean): void => {\n tuning.setDebugTiming(value);\n};\n\n/**\n * Reset all effect tuning parameters to library defaults.\n */\nexport const resetEffectTuning = (): void => {\n tuning.reset();\n};\n\nexport type { BackgroundPresetName } from './backgrounds';\nexport type {\n ApplyVideoEffects,\n BackgroundImageSpec,\n BlurSpec,\n EffectInput,\n EffectName,\n EffectSpec,\n TransformName,\n TransformSpec,\n} from './types';\n\nconst specToTransform = (spec: EffectSpec): FrameTransform => {\n switch (spec.name) {\n case 'flip-x':\n case 'flip-y':\n case 'rotate-cw':\n case 'rotate-ccw':\n return makeTransform(spec.name);\n case 'blur':\n // Blur strength comes from the global tuning state (setBlurSigma), not\n // the spec; the spec carries no parameters.\n return blur;\n case 'background-image':\n return makeBackgroundImage(spec.source);\n }\n};\n\n/**\n * Like `applyVideoEffects`, but also returns a `dispose()` that tears down every\n * Insertable-Streams stage (stops each generator and aborts each pipe). The\n * LiveKit adapter (`react-native-webrtc-kaleidoscope/livekit`) uses this so a\n * camera flip (restart) or unpublish (destroy) does not leak generators. The\n * page-shared segmenter and WebGL state are module singletons reused across\n * stages, so they are intentionally NOT torn down here.\n */\nexport const applyVideoEffectsDisposable = (\n track: MediaStreamTrack,\n effects: ReadonlyArray<EffectInput>,\n): DisposablePipeline => {\n if (!track || track.kind !== 'video') {\n throw new Error('kaleidoscope: applyVideoEffects requires a video MediaStreamTrack');\n }\n if (effects.length === 0) {\n return { track, dispose: () => {} };\n }\n\n let current = track;\n const disposers: Array<() => void> = [];\n for (const input of effects) {\n const spec = toEffectSpec(input);\n const transform = specToTransform(spec);\n const stage = applyEffectToTrack(current, transform);\n current = stage.track;\n disposers.push(stage.dispose);\n }\n return {\n track: current,\n dispose: () => {\n // Tear down in reverse so downstream stages stop before their sources.\n for (const dispose of disposers.reverse()) {\n dispose();\n }\n },\n };\n};\n\nexport const applyVideoEffects: ApplyVideoEffects = (track, effects) =>\n applyVideoEffectsDisposable(track, effects).track;\n"]}
|
package/dist/index.web.js
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
// Web entry point (source). This builds to `dist/index.web.js`, which web
|
|
2
|
-
// bundlers resolve through the package's `browser` export condition. With an
|
|
3
|
-
// `exports` map present, that condition supersedes platform-extension
|
|
4
|
-
// resolution; the `.web.ts` suffix here is just our source convention, not what
|
|
5
|
-
// selects this file at consume time.
|
|
6
|
-
//
|
|
7
|
-
// applyVideoEffects(track, effects) wires an Insertable-Streams pipeline that
|
|
8
|
-
// chains each effect's transform and returns a new MediaStreamTrack carrying
|
|
9
|
-
// the transformed frames. Pass the returned track to a `<video>` element or
|
|
10
|
-
// to `RTCRtpSender.replaceTrack(...)`.
|
|
11
|
-
import { toEffectSpec } from './types';
|
|
12
|
-
import { makeBackgroundImage } from './web/effects/background-image';
|
|
13
|
-
import { blur } from './web/effects/blur';
|
|
14
|
-
import { makeTransform } from './web/effects/transform';
|
|
15
|
-
import { applyEffectToTrack, } from './web/insertable-streams';
|
|
16
|
-
import { tuning } from './web/tuning';
|
|
17
|
-
/**
|
|
18
|
-
* Set the Gaussian sigma for the blur effect. Higher = softer blur.
|
|
19
|
-
* Clamped to [0.5, 7] (the useful range before the linear-sampled kernel
|
|
20
|
-
* truncates and bands). Default 5.
|
|
21
|
-
*/
|
|
22
|
-
export const setBlurSigma = (value) => {
|
|
23
|
-
tuning.setBlurSigma(value);
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Set the mask smoothstep hardness for blur and background-image
|
|
27
|
-
* composites, in [0, 1]. 0 = soft halo, 1 = near-step edge. Default 0.5.
|
|
28
|
-
*/
|
|
29
|
-
export const setMaskHardness = (value) => {
|
|
30
|
-
tuning.setMaskHardness(value);
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* Set the mask smoothstep threshold (center of the transition) in
|
|
34
|
-
* [0.05, 0.95]. 0.5 is neutral. Higher values reject low-confidence
|
|
35
|
-
* pixels; lower values are more inclusive. Optimal value is platform-
|
|
36
|
-
* specific because each segmentation model has a different confidence
|
|
37
|
-
* distribution.
|
|
38
|
-
*/
|
|
39
|
-
export const setMaskThreshold = (value) => {
|
|
40
|
-
tuning.setMaskThreshold(value);
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Set the segmentation input short-side (px). Native-only knob (lower =
|
|
44
|
-
* cheaper segmentation on older devices); stored on web for API parity but
|
|
45
|
-
* the web MediaPipe pipeline does not consume it.
|
|
46
|
-
*/
|
|
47
|
-
export const setSegmentationTargetShortSide = (value) => {
|
|
48
|
-
tuning.setSegmentationTargetShortSide(value);
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* Toggle native per-frame timing logs (off by default). No-op effect on web
|
|
52
|
-
* beyond storing the flag.
|
|
53
|
-
*/
|
|
54
|
-
export const setDebugTiming = (value) => {
|
|
55
|
-
tuning.setDebugTiming(value);
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Reset all effect tuning parameters to library defaults.
|
|
59
|
-
*/
|
|
60
|
-
export const resetEffectTuning = () => {
|
|
61
|
-
tuning.reset();
|
|
62
|
-
};
|
|
63
|
-
const specToTransform = (spec) => {
|
|
64
|
-
switch (spec.name) {
|
|
65
|
-
case 'flip-x':
|
|
66
|
-
case 'flip-y':
|
|
67
|
-
case 'rotate-cw':
|
|
68
|
-
case 'rotate-ccw':
|
|
69
|
-
return makeTransform(spec.name);
|
|
70
|
-
case 'blur':
|
|
71
|
-
// Blur strength comes from the global tuning state (setBlurSigma), not
|
|
72
|
-
// the spec; the spec carries no parameters.
|
|
73
|
-
return blur;
|
|
74
|
-
case 'background-image':
|
|
75
|
-
return makeBackgroundImage(spec.source);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Like `applyVideoEffects`, but also returns a `dispose()` that tears down every
|
|
80
|
-
* Insertable-Streams stage (stops each generator and aborts each pipe). The
|
|
81
|
-
* LiveKit adapter (`react-native-webrtc-kaleidoscope/livekit`) uses this so a
|
|
82
|
-
* camera flip (restart) or unpublish (destroy) does not leak generators. The
|
|
83
|
-
* page-shared segmenter and WebGL state are module singletons reused across
|
|
84
|
-
* stages, so they are intentionally NOT torn down here.
|
|
85
|
-
*/
|
|
86
|
-
export const applyVideoEffectsDisposable = (track, effects) => {
|
|
87
|
-
if (!track || track.kind !== 'video') {
|
|
88
|
-
throw new Error('kaleidoscope: applyVideoEffects requires a video MediaStreamTrack');
|
|
89
|
-
}
|
|
90
|
-
if (effects.length === 0) {
|
|
91
|
-
return { track, dispose: () => { } };
|
|
92
|
-
}
|
|
93
|
-
let current = track;
|
|
94
|
-
const disposers = [];
|
|
95
|
-
for (const input of effects) {
|
|
96
|
-
const spec = toEffectSpec(input);
|
|
97
|
-
const transform = specToTransform(spec);
|
|
98
|
-
const stage = applyEffectToTrack(current, transform);
|
|
99
|
-
current = stage.track;
|
|
100
|
-
disposers.push(stage.dispose);
|
|
101
|
-
}
|
|
102
|
-
return {
|
|
103
|
-
track: current,
|
|
104
|
-
dispose: () => {
|
|
105
|
-
// Tear down in reverse so downstream stages stop before their sources.
|
|
106
|
-
for (const dispose of disposers.reverse()) {
|
|
107
|
-
dispose();
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
export const applyVideoEffects = (track, effects) => applyVideoEffectsDisposable(track, effects).track;
|
|
113
|
-
//# sourceMappingURL=index.web.js.map
|
package/dist/index.web.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.js","sourceRoot":"","sources":["../src/index.web.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,6EAA6E;AAC7E,sEAAsE;AACtE,gFAAgF;AAChF,qCAAqC;AACrC,EAAE;AACF,8EAA8E;AAC9E,6EAA6E;AAC7E,4EAA4E;AAC5E,uCAAuC;AAEvC,OAAO,EAA6D,YAAY,EAAE,MAAM,SAAS,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EACL,kBAAkB,GAGnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAa,EAAQ,EAAE;IAClD,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAa,EAAQ,EAAE;IACrD,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAa,EAAQ,EAAE;IACtD,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,KAAa,EAAQ,EAAE;IACpE,MAAM,CAAC,8BAA8B,CAAC,KAAK,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAc,EAAQ,EAAE;IACrD,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAS,EAAE;IAC1C,MAAM,CAAC,KAAK,EAAE,CAAC;AACjB,CAAC,CAAC;AAcF,MAAM,eAAe,GAAG,CAAC,IAAgB,EAAkB,EAAE;IAC3D,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,KAAK,QAAQ,CAAC;QACd,KAAK,QAAQ,CAAC;QACd,KAAK,WAAW,CAAC;QACjB,KAAK,YAAY;YACf,OAAO,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClC,KAAK,MAAM;YACT,uEAAuE;YACvE,4CAA4C;YAC5C,OAAO,IAAI,CAAC;QACd,KAAK,kBAAkB;YACrB,OAAO,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC;AACH,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,KAAuB,EACvB,OAAmC,EACf,EAAE;IACtB,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QACrC,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;IACvF,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,CAAC;IACtC,CAAC;IAED,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,MAAM,SAAS,GAAsB,EAAE,CAAC;IACxC,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,MAAM,IAAI,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;QACjC,MAAM,SAAS,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;QACxC,MAAM,KAAK,GAAG,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACrD,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC;QACtB,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IACD,OAAO;QACL,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,GAAG,EAAE;YACZ,uEAAuE;YACvE,KAAK,MAAM,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,EAAE,CAAC;gBAC1C,OAAO,EAAE,CAAC;YACZ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CACrE,2BAA2B,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC","sourcesContent":["// Web entry point (source). This builds to `dist/index.web.js`, which web\n// bundlers resolve through the package's `browser` export condition. With an\n// `exports` map present, that condition supersedes platform-extension\n// resolution; the `.web.ts` suffix here is just our source convention, not what\n// selects this file at consume time.\n//\n// applyVideoEffects(track, effects) wires an Insertable-Streams pipeline that\n// chains each effect's transform and returns a new MediaStreamTrack carrying\n// the transformed frames. Pass the returned track to a `<video>` element or\n// to `RTCRtpSender.replaceTrack(...)`.\n\nimport { type ApplyVideoEffects, type EffectInput, type EffectSpec, toEffectSpec } from './types';\nimport { makeBackgroundImage } from './web/effects/background-image';\nimport { blur } from './web/effects/blur';\nimport { makeTransform } from './web/effects/transform';\nimport {\n applyEffectToTrack,\n type DisposablePipeline,\n type FrameTransform,\n} from './web/insertable-streams';\nimport { tuning } from './web/tuning';\n\n/**\n * Set the Gaussian sigma for the blur effect. Higher = softer blur.\n * Clamped to [0.5, 7] (the useful range before the linear-sampled kernel\n * truncates and bands). Default 5.\n */\nexport const setBlurSigma = (value: number): void => {\n tuning.setBlurSigma(value);\n};\n\n/**\n * Set the mask smoothstep hardness for blur and background-image\n * composites, in [0, 1]. 0 = soft halo, 1 = near-step edge. Default 0.5.\n */\nexport const setMaskHardness = (value: number): void => {\n tuning.setMaskHardness(value);\n};\n\n/**\n * Set the mask smoothstep threshold (center of the transition) in\n * [0.05, 0.95]. 0.5 is neutral. Higher values reject low-confidence\n * pixels; lower values are more inclusive. Optimal value is platform-\n * specific because each segmentation model has a different confidence\n * distribution.\n */\nexport const setMaskThreshold = (value: number): void => {\n tuning.setMaskThreshold(value);\n};\n\n/**\n * Set the segmentation input short-side (px). Native-only knob (lower =\n * cheaper segmentation on older devices); stored on web for API parity but\n * the web MediaPipe pipeline does not consume it.\n */\nexport const setSegmentationTargetShortSide = (value: number): void => {\n tuning.setSegmentationTargetShortSide(value);\n};\n\n/**\n * Toggle native per-frame timing logs (off by default). No-op effect on web\n * beyond storing the flag.\n */\nexport const setDebugTiming = (value: boolean): void => {\n tuning.setDebugTiming(value);\n};\n\n/**\n * Reset all effect tuning parameters to library defaults.\n */\nexport const resetEffectTuning = (): void => {\n tuning.reset();\n};\n\nexport type { BackgroundPresetName } from './backgrounds';\nexport type {\n ApplyVideoEffects,\n BackgroundImageSpec,\n BlurSpec,\n EffectInput,\n EffectName,\n EffectSpec,\n TransformName,\n TransformSpec,\n} from './types';\n\nconst specToTransform = (spec: EffectSpec): FrameTransform => {\n switch (spec.name) {\n case 'flip-x':\n case 'flip-y':\n case 'rotate-cw':\n case 'rotate-ccw':\n return makeTransform(spec.name);\n case 'blur':\n // Blur strength comes from the global tuning state (setBlurSigma), not\n // the spec; the spec carries no parameters.\n return blur;\n case 'background-image':\n return makeBackgroundImage(spec.source);\n }\n};\n\n/**\n * Like `applyVideoEffects`, but also returns a `dispose()` that tears down every\n * Insertable-Streams stage (stops each generator and aborts each pipe). The\n * LiveKit adapter (`react-native-webrtc-kaleidoscope/livekit`) uses this so a\n * camera flip (restart) or unpublish (destroy) does not leak generators. The\n * page-shared segmenter and WebGL state are module singletons reused across\n * stages, so they are intentionally NOT torn down here.\n */\nexport const applyVideoEffectsDisposable = (\n track: MediaStreamTrack,\n effects: ReadonlyArray<EffectInput>,\n): DisposablePipeline => {\n if (!track || track.kind !== 'video') {\n throw new Error('kaleidoscope: applyVideoEffects requires a video MediaStreamTrack');\n }\n if (effects.length === 0) {\n return { track, dispose: () => {} };\n }\n\n let current = track;\n const disposers: Array<() => void> = [];\n for (const input of effects) {\n const spec = toEffectSpec(input);\n const transform = specToTransform(spec);\n const stage = applyEffectToTrack(current, transform);\n current = stage.track;\n disposers.push(stage.dispose);\n }\n return {\n track: current,\n dispose: () => {\n // Tear down in reverse so downstream stages stop before their sources.\n for (const dispose of disposers.reverse()) {\n dispose();\n }\n },\n };\n};\n\nexport const applyVideoEffects: ApplyVideoEffects = (track, effects) =>\n applyVideoEffectsDisposable(track, effects).track;\n"]}
|
package/dist/livekit.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { ProcessorOptions, Track, TrackProcessor } from 'livekit-client';
|
|
2
|
-
import type { EffectInput } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* A LiveKit `TrackProcessor` that applies Kaleidoscope video effects to a local
|
|
5
|
-
* camera track. Construct it with the same effect inputs `applyVideoEffects`
|
|
6
|
-
* accepts (bare names like `'blur'` or full `EffectSpec` objects), then pass it
|
|
7
|
-
* to `localTrack.setProcessor(processor)`.
|
|
8
|
-
*
|
|
9
|
-
* `restart` (camera flip / source change) and `destroy` (unpublish) tear down
|
|
10
|
-
* the prior Insertable-Streams pipeline, so repeated flips do not leak
|
|
11
|
-
* generators. The page-shared segmenter and WebGL state are module singletons
|
|
12
|
-
* reused across pipelines, so they are intentionally retained.
|
|
13
|
-
*/
|
|
14
|
-
export declare class KaleidoscopeProcessor implements TrackProcessor<Track.Kind.Video> {
|
|
15
|
-
readonly name = "kaleidoscope";
|
|
16
|
-
processedTrack?: MediaStreamTrack;
|
|
17
|
-
private readonly effects;
|
|
18
|
-
private disposePipeline;
|
|
19
|
-
constructor(effects: ReadonlyArray<EffectInput>);
|
|
20
|
-
init(opts: ProcessorOptions<Track.Kind.Video>): Promise<void>;
|
|
21
|
-
restart(opts: ProcessorOptions<Track.Kind.Video>): Promise<void>;
|
|
22
|
-
destroy(): Promise<void>;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=livekit.d.ts.map
|
package/dist/livekit.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"livekit.d.ts","sourceRoot":"","sources":["../src/livekit.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;;;;;;GAUG;AACH,qBAAa,qBAAsB,YAAW,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;IAC5E,QAAQ,CAAC,IAAI,kBAAkB;IAC/B,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAElC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6B;IACrD,OAAO,CAAC,eAAe,CAA6B;IAEpD,YAAY,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,EAE9C;IAEK,IAAI,CAAC,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAIlE;IAEK,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAGrE;IAEK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAI7B;CACF","sourcesContent":["// Opt-in LiveKit adapter, exported from the `react-native-webrtc-kaleidoscope/livekit`\n// subpath. It wraps the web Insertable-Streams pipeline in LiveKit's\n// TrackProcessor interface so consumers do not have to hand-write the glue.\n//\n// Why this exists: the core web API is `applyVideoEffects(track) -> newTrack`,\n// which assumes the caller owns the RTCRtpSender and calls replaceTrack itself.\n// LiveKit owns the sender, so consumers go through `track.setProcessor(...)`\n// instead. This adapter is that bridge:\n//\n// import { KaleidoscopeProcessor } from 'react-native-webrtc-kaleidoscope/livekit';\n// await localVideoTrack.setProcessor(new KaleidoscopeProcessor(['blur']));\n//\n// `livekit-client` is an OPTIONAL peer dependency: the import below is type-only\n// (erased at build), so the published JS has no runtime dependency on LiveKit\n// and the agnostic core stays decoupled. Only consumers that import this subpath\n// need livekit-client installed (they already have it).\n//\n// This adapter is web-only: it builds on MediaStreamTrackProcessor /\n// MediaStreamTrackGenerator (Insertable Streams), which exist in Chromium-based\n// browsers. On unsupported environments the underlying pipeline throws a typed\n// error at init().\n\nimport type { ProcessorOptions, Track, TrackProcessor } from 'livekit-client';\nimport { applyVideoEffectsDisposable } from './index.web';\nimport type { EffectInput } from './types';\n\n/**\n * A LiveKit `TrackProcessor` that applies Kaleidoscope video effects to a local\n * camera track. Construct it with the same effect inputs `applyVideoEffects`\n * accepts (bare names like `'blur'` or full `EffectSpec` objects), then pass it\n * to `localTrack.setProcessor(processor)`.\n *\n * `restart` (camera flip / source change) and `destroy` (unpublish) tear down\n * the prior Insertable-Streams pipeline, so repeated flips do not leak\n * generators. The page-shared segmenter and WebGL state are module singletons\n * reused across pipelines, so they are intentionally retained.\n */\nexport class KaleidoscopeProcessor implements TrackProcessor<Track.Kind.Video> {\n readonly name = 'kaleidoscope';\n processedTrack?: MediaStreamTrack;\n\n private readonly effects: ReadonlyArray<EffectInput>;\n private disposePipeline: (() => void) | null = null;\n\n constructor(effects: ReadonlyArray<EffectInput>) {\n this.effects = effects;\n }\n\n async init(opts: ProcessorOptions<Track.Kind.Video>): Promise<void> {\n const { track, dispose } = applyVideoEffectsDisposable(opts.track, this.effects);\n this.processedTrack = track;\n this.disposePipeline = dispose;\n }\n\n async restart(opts: ProcessorOptions<Track.Kind.Video>): Promise<void> {\n await this.destroy();\n await this.init(opts);\n }\n\n async destroy(): Promise<void> {\n this.disposePipeline?.();\n this.disposePipeline = null;\n this.processedTrack = undefined;\n }\n}\n"]}
|
package/dist/livekit.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
// Opt-in LiveKit adapter, exported from the `react-native-webrtc-kaleidoscope/livekit`
|
|
2
|
-
// subpath. It wraps the web Insertable-Streams pipeline in LiveKit's
|
|
3
|
-
// TrackProcessor interface so consumers do not have to hand-write the glue.
|
|
4
|
-
//
|
|
5
|
-
// Why this exists: the core web API is `applyVideoEffects(track) -> newTrack`,
|
|
6
|
-
// which assumes the caller owns the RTCRtpSender and calls replaceTrack itself.
|
|
7
|
-
// LiveKit owns the sender, so consumers go through `track.setProcessor(...)`
|
|
8
|
-
// instead. This adapter is that bridge:
|
|
9
|
-
//
|
|
10
|
-
// import { KaleidoscopeProcessor } from 'react-native-webrtc-kaleidoscope/livekit';
|
|
11
|
-
// await localVideoTrack.setProcessor(new KaleidoscopeProcessor(['blur']));
|
|
12
|
-
//
|
|
13
|
-
// `livekit-client` is an OPTIONAL peer dependency: the import below is type-only
|
|
14
|
-
// (erased at build), so the published JS has no runtime dependency on LiveKit
|
|
15
|
-
// and the agnostic core stays decoupled. Only consumers that import this subpath
|
|
16
|
-
// need livekit-client installed (they already have it).
|
|
17
|
-
//
|
|
18
|
-
// This adapter is web-only: it builds on MediaStreamTrackProcessor /
|
|
19
|
-
// MediaStreamTrackGenerator (Insertable Streams), which exist in Chromium-based
|
|
20
|
-
// browsers. On unsupported environments the underlying pipeline throws a typed
|
|
21
|
-
// error at init().
|
|
22
|
-
import { applyVideoEffectsDisposable } from './index.web';
|
|
23
|
-
/**
|
|
24
|
-
* A LiveKit `TrackProcessor` that applies Kaleidoscope video effects to a local
|
|
25
|
-
* camera track. Construct it with the same effect inputs `applyVideoEffects`
|
|
26
|
-
* accepts (bare names like `'blur'` or full `EffectSpec` objects), then pass it
|
|
27
|
-
* to `localTrack.setProcessor(processor)`.
|
|
28
|
-
*
|
|
29
|
-
* `restart` (camera flip / source change) and `destroy` (unpublish) tear down
|
|
30
|
-
* the prior Insertable-Streams pipeline, so repeated flips do not leak
|
|
31
|
-
* generators. The page-shared segmenter and WebGL state are module singletons
|
|
32
|
-
* reused across pipelines, so they are intentionally retained.
|
|
33
|
-
*/
|
|
34
|
-
export class KaleidoscopeProcessor {
|
|
35
|
-
name = 'kaleidoscope';
|
|
36
|
-
processedTrack;
|
|
37
|
-
effects;
|
|
38
|
-
disposePipeline = null;
|
|
39
|
-
constructor(effects) {
|
|
40
|
-
this.effects = effects;
|
|
41
|
-
}
|
|
42
|
-
async init(opts) {
|
|
43
|
-
const { track, dispose } = applyVideoEffectsDisposable(opts.track, this.effects);
|
|
44
|
-
this.processedTrack = track;
|
|
45
|
-
this.disposePipeline = dispose;
|
|
46
|
-
}
|
|
47
|
-
async restart(opts) {
|
|
48
|
-
await this.destroy();
|
|
49
|
-
await this.init(opts);
|
|
50
|
-
}
|
|
51
|
-
async destroy() {
|
|
52
|
-
this.disposePipeline?.();
|
|
53
|
-
this.disposePipeline = null;
|
|
54
|
-
this.processedTrack = undefined;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
//# sourceMappingURL=livekit.js.map
|
package/dist/livekit.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"livekit.js","sourceRoot":"","sources":["../src/livekit.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,qEAAqE;AACrE,4EAA4E;AAC5E,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,6EAA6E;AAC7E,wCAAwC;AACxC,EAAE;AACF,sFAAsF;AACtF,6EAA6E;AAC7E,EAAE;AACF,iFAAiF;AACjF,8EAA8E;AAC9E,iFAAiF;AACjF,wDAAwD;AACxD,EAAE;AACF,qEAAqE;AACrE,gFAAgF;AAChF,+EAA+E;AAC/E,mBAAmB;AAGnB,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAG1D;;;;;;;;;;GAUG;AACH,MAAM,OAAO,qBAAqB;IACvB,IAAI,GAAG,cAAc,CAAC;IAC/B,cAAc,CAAoB;IAEjB,OAAO,CAA6B;IAC7C,eAAe,GAAwB,IAAI,CAAC;IAEpD,YAAY,OAAmC;QAC7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAAwC;QACjD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,2BAA2B,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACjF,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC5B,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC;IACjC,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,IAAwC;QACpD,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACrB,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,OAAO;QACX,IAAI,CAAC,eAAe,EAAE,EAAE,CAAC;QACzB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;IAClC,CAAC;CACF","sourcesContent":["// Opt-in LiveKit adapter, exported from the `react-native-webrtc-kaleidoscope/livekit`\n// subpath. It wraps the web Insertable-Streams pipeline in LiveKit's\n// TrackProcessor interface so consumers do not have to hand-write the glue.\n//\n// Why this exists: the core web API is `applyVideoEffects(track) -> newTrack`,\n// which assumes the caller owns the RTCRtpSender and calls replaceTrack itself.\n// LiveKit owns the sender, so consumers go through `track.setProcessor(...)`\n// instead. This adapter is that bridge:\n//\n// import { KaleidoscopeProcessor } from 'react-native-webrtc-kaleidoscope/livekit';\n// await localVideoTrack.setProcessor(new KaleidoscopeProcessor(['blur']));\n//\n// `livekit-client` is an OPTIONAL peer dependency: the import below is type-only\n// (erased at build), so the published JS has no runtime dependency on LiveKit\n// and the agnostic core stays decoupled. Only consumers that import this subpath\n// need livekit-client installed (they already have it).\n//\n// This adapter is web-only: it builds on MediaStreamTrackProcessor /\n// MediaStreamTrackGenerator (Insertable Streams), which exist in Chromium-based\n// browsers. On unsupported environments the underlying pipeline throws a typed\n// error at init().\n\nimport type { ProcessorOptions, Track, TrackProcessor } from 'livekit-client';\nimport { applyVideoEffectsDisposable } from './index.web';\nimport type { EffectInput } from './types';\n\n/**\n * A LiveKit `TrackProcessor` that applies Kaleidoscope video effects to a local\n * camera track. Construct it with the same effect inputs `applyVideoEffects`\n * accepts (bare names like `'blur'` or full `EffectSpec` objects), then pass it\n * to `localTrack.setProcessor(processor)`.\n *\n * `restart` (camera flip / source change) and `destroy` (unpublish) tear down\n * the prior Insertable-Streams pipeline, so repeated flips do not leak\n * generators. The page-shared segmenter and WebGL state are module singletons\n * reused across pipelines, so they are intentionally retained.\n */\nexport class KaleidoscopeProcessor implements TrackProcessor<Track.Kind.Video> {\n readonly name = 'kaleidoscope';\n processedTrack?: MediaStreamTrack;\n\n private readonly effects: ReadonlyArray<EffectInput>;\n private disposePipeline: (() => void) | null = null;\n\n constructor(effects: ReadonlyArray<EffectInput>) {\n this.effects = effects;\n }\n\n async init(opts: ProcessorOptions<Track.Kind.Video>): Promise<void> {\n const { track, dispose } = applyVideoEffectsDisposable(opts.track, this.effects);\n this.processedTrack = track;\n this.disposePipeline = dispose;\n }\n\n async restart(opts: ProcessorOptions<Track.Kind.Video>): Promise<void> {\n await this.destroy();\n await this.init(opts);\n }\n\n async destroy(): Promise<void> {\n this.disposePipeline?.();\n this.disposePipeline = null;\n this.processedTrack = undefined;\n }\n}\n"]}
|
package/dist/types.d.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Effect specs are parameterized objects. Each effect's shape carries the
|
|
3
|
-
* uniforms its shader needs; the library exposes one shader per effect family
|
|
4
|
-
* (blur, background-image, etc.) and consumers pick uniform values per call.
|
|
5
|
-
*/
|
|
6
|
-
import type { BackgroundPresetName } from './backgrounds';
|
|
7
|
-
/**
|
|
8
|
-
* Geometric reorientation of the frame: an axis flip or a 90-degree rotation.
|
|
9
|
-
* The operation IS the effect name (parameterless), which keeps it compatible
|
|
10
|
-
* with the bare-string input form and the flat-string native registry. On web
|
|
11
|
-
* these run in display space (the reference behavior); native pipelines correct
|
|
12
|
-
* for the camera buffer's rotation so the on-screen result matches everywhere.
|
|
13
|
-
*/
|
|
14
|
-
export type TransformName = 'flip-x' | 'flip-y' | 'rotate-cw' | 'rotate-ccw';
|
|
15
|
-
export type TransformSpec = {
|
|
16
|
-
readonly name: TransformName;
|
|
17
|
-
};
|
|
18
|
-
export type BlurSpec = {
|
|
19
|
-
readonly name: 'blur';
|
|
20
|
-
};
|
|
21
|
-
export type BackgroundImageSpec = {
|
|
22
|
-
readonly name: 'background-image';
|
|
23
|
-
/**
|
|
24
|
-
* Either a bundled preset name (autocompleted; see src/backgrounds.ts) or
|
|
25
|
-
* a free-form URL / data URI. Web accepts both; native only resolves
|
|
26
|
-
* bundled preset names because the upstream rn-webrtc registry takes flat
|
|
27
|
-
* strings, not URIs.
|
|
28
|
-
*
|
|
29
|
-
* The `string & {}` trick preserves preset-name autocomplete while still
|
|
30
|
-
* permitting arbitrary URL inputs without a separate union branch.
|
|
31
|
-
*
|
|
32
|
-
* SECURITY (web): a URL/data-URI `source` is fetched in the page origin and
|
|
33
|
-
* decoded to a texture. If you wire this from end-user input, validate the
|
|
34
|
-
* URL yourself; the library does not allowlist fetch targets. Decoded
|
|
35
|
-
* dimensions are capped and the per-source cache is bounded, but an
|
|
36
|
-
* unvalidated `source` can still issue a same-origin request you did not
|
|
37
|
-
* intend.
|
|
38
|
-
*/
|
|
39
|
-
readonly source: BackgroundPresetName | (string & {});
|
|
40
|
-
};
|
|
41
|
-
export type EffectSpec = TransformSpec | BlurSpec | BackgroundImageSpec;
|
|
42
|
-
/**
|
|
43
|
-
* Legacy alias for the discriminant. Useful for typed switch statements and
|
|
44
|
-
* the bare-string call shape (`applyVideoEffects(track, ['blur'])`).
|
|
45
|
-
*/
|
|
46
|
-
export type EffectName = EffectSpec['name'];
|
|
47
|
-
/**
|
|
48
|
-
* applyVideoEffects accepts either a bare effect name (no params; library
|
|
49
|
-
* picks sensible defaults) or a full EffectSpec object with parameters.
|
|
50
|
-
*/
|
|
51
|
-
export type EffectInput = EffectSpec | EffectName;
|
|
52
|
-
/**
|
|
53
|
-
* Apply zero or more effects to a local `MediaStreamTrack`.
|
|
54
|
-
*
|
|
55
|
-
* - Native: thin facade over `track._setVideoEffects(names)` from
|
|
56
|
-
* `react-native-webrtc`. Returns the same track reference; mutation is in place.
|
|
57
|
-
* Effects are tuned globally via the tuning setters (setBlurSigma, etc.),
|
|
58
|
-
* not via per-call spec parameters.
|
|
59
|
-
* - Web: builds an Insertable-Streams pipeline with `MediaStreamTrackProcessor`
|
|
60
|
-
* and `MediaStreamTrackGenerator` and returns a NEW track carrying the
|
|
61
|
-
* transformed frames. Replace the upstream sender's track with the return value
|
|
62
|
-
* (`sender.replaceTrack(returnedTrack)`) to apply effects to a peer connection,
|
|
63
|
-
* or attach it to a `<video>` element for local preview.
|
|
64
|
-
*
|
|
65
|
-
* Throws on remote tracks, unknown effect names, missing platform capabilities
|
|
66
|
-
* (web: Insertable Streams; native: peer-dep `_setVideoEffects`), or non-video
|
|
67
|
-
* tracks.
|
|
68
|
-
*/
|
|
69
|
-
export type ApplyVideoEffects = (track: MediaStreamTrack, effects: ReadonlyArray<EffectInput>) => MediaStreamTrack;
|
|
70
|
-
/**
|
|
71
|
-
* Normalize an EffectInput (bare name or spec) into an EffectSpec.
|
|
72
|
-
*/
|
|
73
|
-
export declare const toEffectSpec: (input: EffectInput) => EffectSpec;
|
|
74
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAE1D;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,YAAY,CAAC;AAE7E,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CAGvB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,MAAM,EAAE,oBAAoB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;CACvD,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,QAAQ,GAAG,mBAAmB,CAAC;AAExE;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAE5C;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC;AAElD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAC9B,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,KAChC,gBAAgB,CAAC;AAEtB;;GAEG;AACH,eAAO,MAAM,YAAY,UAAW,WAAW,KAAG,UACmB,CAAC","sourcesContent":["/**\n * Effect specs are parameterized objects. Each effect's shape carries the\n * uniforms its shader needs; the library exposes one shader per effect family\n * (blur, background-image, etc.) and consumers pick uniform values per call.\n */\n\nimport type { BackgroundPresetName } from './backgrounds';\n\n/**\n * Geometric reorientation of the frame: an axis flip or a 90-degree rotation.\n * The operation IS the effect name (parameterless), which keeps it compatible\n * with the bare-string input form and the flat-string native registry. On web\n * these run in display space (the reference behavior); native pipelines correct\n * for the camera buffer's rotation so the on-screen result matches everywhere.\n */\nexport type TransformName = 'flip-x' | 'flip-y' | 'rotate-cw' | 'rotate-ccw';\n\nexport type TransformSpec = {\n readonly name: TransformName;\n};\n\nexport type BlurSpec = {\n readonly name: 'blur';\n // Blur strength is tuned globally via the tuning setters (setBlurSigma),\n // not per-call; there is no per-spec parameter.\n};\n\nexport type BackgroundImageSpec = {\n readonly name: 'background-image';\n /**\n * Either a bundled preset name (autocompleted; see src/backgrounds.ts) or\n * a free-form URL / data URI. Web accepts both; native only resolves\n * bundled preset names because the upstream rn-webrtc registry takes flat\n * strings, not URIs.\n *\n * The `string & {}` trick preserves preset-name autocomplete while still\n * permitting arbitrary URL inputs without a separate union branch.\n *\n * SECURITY (web): a URL/data-URI `source` is fetched in the page origin and\n * decoded to a texture. If you wire this from end-user input, validate the\n * URL yourself; the library does not allowlist fetch targets. Decoded\n * dimensions are capped and the per-source cache is bounded, but an\n * unvalidated `source` can still issue a same-origin request you did not\n * intend.\n */\n readonly source: BackgroundPresetName | (string & {});\n};\n\nexport type EffectSpec = TransformSpec | BlurSpec | BackgroundImageSpec;\n\n/**\n * Legacy alias for the discriminant. Useful for typed switch statements and\n * the bare-string call shape (`applyVideoEffects(track, ['blur'])`).\n */\nexport type EffectName = EffectSpec['name'];\n\n/**\n * applyVideoEffects accepts either a bare effect name (no params; library\n * picks sensible defaults) or a full EffectSpec object with parameters.\n */\nexport type EffectInput = EffectSpec | EffectName;\n\n/**\n * Apply zero or more effects to a local `MediaStreamTrack`.\n *\n * - Native: thin facade over `track._setVideoEffects(names)` from\n * `react-native-webrtc`. Returns the same track reference; mutation is in place.\n * Effects are tuned globally via the tuning setters (setBlurSigma, etc.),\n * not via per-call spec parameters.\n * - Web: builds an Insertable-Streams pipeline with `MediaStreamTrackProcessor`\n * and `MediaStreamTrackGenerator` and returns a NEW track carrying the\n * transformed frames. Replace the upstream sender's track with the return value\n * (`sender.replaceTrack(returnedTrack)`) to apply effects to a peer connection,\n * or attach it to a `<video>` element for local preview.\n *\n * Throws on remote tracks, unknown effect names, missing platform capabilities\n * (web: Insertable Streams; native: peer-dep `_setVideoEffects`), or non-video\n * tracks.\n */\nexport type ApplyVideoEffects = (\n track: MediaStreamTrack,\n effects: ReadonlyArray<EffectInput>,\n) => MediaStreamTrack;\n\n/**\n * Normalize an EffectInput (bare name or spec) into an EffectSpec.\n */\nexport const toEffectSpec = (input: EffectInput): EffectSpec =>\n typeof input === 'string' ? ({ name: input } as EffectSpec) : input;\n"]}
|
package/dist/types.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Effect specs are parameterized objects. Each effect's shape carries the
|
|
3
|
-
* uniforms its shader needs; the library exposes one shader per effect family
|
|
4
|
-
* (blur, background-image, etc.) and consumers pick uniform values per call.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Normalize an EffectInput (bare name or spec) into an EffectSpec.
|
|
8
|
-
*/
|
|
9
|
-
export const toEffectSpec = (input) => typeof input === 'string' ? { name: input } : input;
|
|
10
|
-
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgFH;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAkB,EAAc,EAAE,CAC7D,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAE,EAAE,IAAI,EAAE,KAAK,EAAiB,CAAC,CAAC,CAAC,KAAK,CAAC","sourcesContent":["/**\n * Effect specs are parameterized objects. Each effect's shape carries the\n * uniforms its shader needs; the library exposes one shader per effect family\n * (blur, background-image, etc.) and consumers pick uniform values per call.\n */\n\nimport type { BackgroundPresetName } from './backgrounds';\n\n/**\n * Geometric reorientation of the frame: an axis flip or a 90-degree rotation.\n * The operation IS the effect name (parameterless), which keeps it compatible\n * with the bare-string input form and the flat-string native registry. On web\n * these run in display space (the reference behavior); native pipelines correct\n * for the camera buffer's rotation so the on-screen result matches everywhere.\n */\nexport type TransformName = 'flip-x' | 'flip-y' | 'rotate-cw' | 'rotate-ccw';\n\nexport type TransformSpec = {\n readonly name: TransformName;\n};\n\nexport type BlurSpec = {\n readonly name: 'blur';\n // Blur strength is tuned globally via the tuning setters (setBlurSigma),\n // not per-call; there is no per-spec parameter.\n};\n\nexport type BackgroundImageSpec = {\n readonly name: 'background-image';\n /**\n * Either a bundled preset name (autocompleted; see src/backgrounds.ts) or\n * a free-form URL / data URI. Web accepts both; native only resolves\n * bundled preset names because the upstream rn-webrtc registry takes flat\n * strings, not URIs.\n *\n * The `string & {}` trick preserves preset-name autocomplete while still\n * permitting arbitrary URL inputs without a separate union branch.\n *\n * SECURITY (web): a URL/data-URI `source` is fetched in the page origin and\n * decoded to a texture. If you wire this from end-user input, validate the\n * URL yourself; the library does not allowlist fetch targets. Decoded\n * dimensions are capped and the per-source cache is bounded, but an\n * unvalidated `source` can still issue a same-origin request you did not\n * intend.\n */\n readonly source: BackgroundPresetName | (string & {});\n};\n\nexport type EffectSpec = TransformSpec | BlurSpec | BackgroundImageSpec;\n\n/**\n * Legacy alias for the discriminant. Useful for typed switch statements and\n * the bare-string call shape (`applyVideoEffects(track, ['blur'])`).\n */\nexport type EffectName = EffectSpec['name'];\n\n/**\n * applyVideoEffects accepts either a bare effect name (no params; library\n * picks sensible defaults) or a full EffectSpec object with parameters.\n */\nexport type EffectInput = EffectSpec | EffectName;\n\n/**\n * Apply zero or more effects to a local `MediaStreamTrack`.\n *\n * - Native: thin facade over `track._setVideoEffects(names)` from\n * `react-native-webrtc`. Returns the same track reference; mutation is in place.\n * Effects are tuned globally via the tuning setters (setBlurSigma, etc.),\n * not via per-call spec parameters.\n * - Web: builds an Insertable-Streams pipeline with `MediaStreamTrackProcessor`\n * and `MediaStreamTrackGenerator` and returns a NEW track carrying the\n * transformed frames. Replace the upstream sender's track with the return value\n * (`sender.replaceTrack(returnedTrack)`) to apply effects to a peer connection,\n * or attach it to a `<video>` element for local preview.\n *\n * Throws on remote tracks, unknown effect names, missing platform capabilities\n * (web: Insertable Streams; native: peer-dep `_setVideoEffects`), or non-video\n * tracks.\n */\nexport type ApplyVideoEffects = (\n track: MediaStreamTrack,\n effects: ReadonlyArray<EffectInput>,\n) => MediaStreamTrack;\n\n/**\n * Normalize an EffectInput (bare name or spec) into an EffectSpec.\n */\nexport const toEffectSpec = (input: EffectInput): EffectSpec =>\n typeof input === 'string' ? ({ name: input } as EffectSpec) : input;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"blur-kernel.d.ts","sourceRoot":"","sources":["../../src/web/blur-kernel.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,WAAW,IAAI,CAAC;AAU7B,eAAO,MAAM,iBAAiB,UACrB,MAAM,KACZ;IAAE,OAAO,EAAE,YAAY,CAAC;IAAC,OAAO,EAAE,YAAY,CAAA;CAsBhD,CAAC","sourcesContent":["// Pure 9-tap separable Gaussian kernel math. Extracted so it is unit-testable\n// in isolation (no WebGL/DOM imports) and shared by the web blur effect.\n//\n// Mirrors Android's BlurFactory.ensureKernel exactly so web, Android, and iOS\n// run the identical blur.frag: tap spacing 2.0, weight = exp(-x^2 / 2σ^2),\n// normalized by (w0 + 2·Σ w[1..]) because the shader samples vUv ± offset and\n// adds each side tap twice. Given a sigma it returns fresh arrays; the caller\n// caches by sigma (the kernel only changes when the blur slider moves).\n\nexport const KERNEL_TAPS = 5;\n\n// Linear-sampled separable Gaussian. A dense Gaussian over texels 0..8 is\n// collapsed into 5 entries: the center plus 4 bilinear pairs of adjacent\n// texels (1,2), (3,4), (5,6), (7,8). Each pair becomes one fractional-offset\n// fetch whose bilinear blend reproduces the two texels' weighted sum, so the\n// shader issues 9 fetches per pass instead of 17. offsets[0] is the center\n// (0). Normalized so center + 2*Σ(pairs) == 1 (the shader samples vUv ±\n// offset and adds each side). Mirrors Android BlurFactory.ensureKernel and iOS\n// BlurKernel.ensure exactly.\nexport const computeBlurKernel = (\n sigma: number,\n): { weights: Float32Array; offsets: Float32Array } => {\n const g = (t: number): number => Math.exp(-(t * t) / (2 * sigma * sigma));\n const offsets = new Float32Array(KERNEL_TAPS);\n const raw = new Array<number>(KERNEL_TAPS);\n offsets[0] = 0;\n raw[0] = g(0);\n let sum = raw[0];\n for (let p = 1; p < KERNEL_TAPS; p++) {\n const a = 2 * p - 1;\n const b = 2 * p;\n const wa = g(a);\n const wb = g(b);\n const w = wa + wb;\n offsets[p] = (a * wa + b * wb) / w;\n raw[p] = w;\n sum += 2 * w;\n }\n const weights = new Float32Array(KERNEL_TAPS);\n for (let i = 0; i < KERNEL_TAPS; i++) {\n weights[i] = (raw[i] ?? 0) / sum;\n }\n return { weights, offsets };\n};\n"]}
|
package/dist/web/blur-kernel.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
// Pure 9-tap separable Gaussian kernel math. Extracted so it is unit-testable
|
|
2
|
-
// in isolation (no WebGL/DOM imports) and shared by the web blur effect.
|
|
3
|
-
//
|
|
4
|
-
// Mirrors Android's BlurFactory.ensureKernel exactly so web, Android, and iOS
|
|
5
|
-
// run the identical blur.frag: tap spacing 2.0, weight = exp(-x^2 / 2σ^2),
|
|
6
|
-
// normalized by (w0 + 2·Σ w[1..]) because the shader samples vUv ± offset and
|
|
7
|
-
// adds each side tap twice. Given a sigma it returns fresh arrays; the caller
|
|
8
|
-
// caches by sigma (the kernel only changes when the blur slider moves).
|
|
9
|
-
export const KERNEL_TAPS = 5;
|
|
10
|
-
// Linear-sampled separable Gaussian. A dense Gaussian over texels 0..8 is
|
|
11
|
-
// collapsed into 5 entries: the center plus 4 bilinear pairs of adjacent
|
|
12
|
-
// texels (1,2), (3,4), (5,6), (7,8). Each pair becomes one fractional-offset
|
|
13
|
-
// fetch whose bilinear blend reproduces the two texels' weighted sum, so the
|
|
14
|
-
// shader issues 9 fetches per pass instead of 17. offsets[0] is the center
|
|
15
|
-
// (0). Normalized so center + 2*Σ(pairs) == 1 (the shader samples vUv ±
|
|
16
|
-
// offset and adds each side). Mirrors Android BlurFactory.ensureKernel and iOS
|
|
17
|
-
// BlurKernel.ensure exactly.
|
|
18
|
-
export const computeBlurKernel = (sigma) => {
|
|
19
|
-
const g = (t) => Math.exp(-(t * t) / (2 * sigma * sigma));
|
|
20
|
-
const offsets = new Float32Array(KERNEL_TAPS);
|
|
21
|
-
const raw = new Array(KERNEL_TAPS);
|
|
22
|
-
offsets[0] = 0;
|
|
23
|
-
raw[0] = g(0);
|
|
24
|
-
let sum = raw[0];
|
|
25
|
-
for (let p = 1; p < KERNEL_TAPS; p++) {
|
|
26
|
-
const a = 2 * p - 1;
|
|
27
|
-
const b = 2 * p;
|
|
28
|
-
const wa = g(a);
|
|
29
|
-
const wb = g(b);
|
|
30
|
-
const w = wa + wb;
|
|
31
|
-
offsets[p] = (a * wa + b * wb) / w;
|
|
32
|
-
raw[p] = w;
|
|
33
|
-
sum += 2 * w;
|
|
34
|
-
}
|
|
35
|
-
const weights = new Float32Array(KERNEL_TAPS);
|
|
36
|
-
for (let i = 0; i < KERNEL_TAPS; i++) {
|
|
37
|
-
weights[i] = (raw[i] ?? 0) / sum;
|
|
38
|
-
}
|
|
39
|
-
return { weights, offsets };
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=blur-kernel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"blur-kernel.js","sourceRoot":"","sources":["../../src/web/blur-kernel.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,yEAAyE;AACzE,EAAE;AACF,8EAA8E;AAC9E,2EAA2E;AAC3E,8EAA8E;AAC9E,8EAA8E;AAC9E,wEAAwE;AAExE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC;AAE7B,0EAA0E;AAC1E,yEAAyE;AACzE,6EAA6E;AAC7E,6EAA6E;AAC7E,2EAA2E;AAC3E,wEAAwE;AACxE,+EAA+E;AAC/E,6BAA6B;AAC7B,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,KAAa,EACqC,EAAE;IACpD,MAAM,CAAC,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;IAC1E,MAAM,OAAO,GAAG,IAAI,YAAY,CAAC,WAAW,CAAC,CAAC;IAC9C,MAAM,GAAG,GAAG,IAAI,KAAK,CAAS,WAAW,CAAC,CAAC;IAC3C,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACf,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACd,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAChB,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAChB,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAChB,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;QAClB,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;QACnC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;IACD,MAAM,OAAO,GAAG,IAAI,YAAY,CAAC,WAAW,CAAC,CAAC;IAC9C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC;IACnC,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AAC9B,CAAC,CAAC","sourcesContent":["// Pure 9-tap separable Gaussian kernel math. Extracted so it is unit-testable\n// in isolation (no WebGL/DOM imports) and shared by the web blur effect.\n//\n// Mirrors Android's BlurFactory.ensureKernel exactly so web, Android, and iOS\n// run the identical blur.frag: tap spacing 2.0, weight = exp(-x^2 / 2σ^2),\n// normalized by (w0 + 2·Σ w[1..]) because the shader samples vUv ± offset and\n// adds each side tap twice. Given a sigma it returns fresh arrays; the caller\n// caches by sigma (the kernel only changes when the blur slider moves).\n\nexport const KERNEL_TAPS = 5;\n\n// Linear-sampled separable Gaussian. A dense Gaussian over texels 0..8 is\n// collapsed into 5 entries: the center plus 4 bilinear pairs of adjacent\n// texels (1,2), (3,4), (5,6), (7,8). Each pair becomes one fractional-offset\n// fetch whose bilinear blend reproduces the two texels' weighted sum, so the\n// shader issues 9 fetches per pass instead of 17. offsets[0] is the center\n// (0). Normalized so center + 2*Σ(pairs) == 1 (the shader samples vUv ±\n// offset and adds each side). Mirrors Android BlurFactory.ensureKernel and iOS\n// BlurKernel.ensure exactly.\nexport const computeBlurKernel = (\n sigma: number,\n): { weights: Float32Array; offsets: Float32Array } => {\n const g = (t: number): number => Math.exp(-(t * t) / (2 * sigma * sigma));\n const offsets = new Float32Array(KERNEL_TAPS);\n const raw = new Array<number>(KERNEL_TAPS);\n offsets[0] = 0;\n raw[0] = g(0);\n let sum = raw[0];\n for (let p = 1; p < KERNEL_TAPS; p++) {\n const a = 2 * p - 1;\n const b = 2 * p;\n const wa = g(a);\n const wb = g(b);\n const w = wa + wb;\n offsets[p] = (a * wa + b * wb) / w;\n raw[p] = w;\n sum += 2 * w;\n }\n const weights = new Float32Array(KERNEL_TAPS);\n for (let i = 0; i < KERNEL_TAPS; i++) {\n weights[i] = (raw[i] ?? 0) / sum;\n }\n return { weights, offsets };\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"background-image.d.ts","sourceRoot":"","sources":["../../../src/web/effects/background-image.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAiP5D,eAAO,MAAM,mBAAmB,WAAY,MAAM,KAAG,cA8GpD,CAAC","sourcesContent":["// Web background-image effect. Same composite pattern as the blur effect:\n// MediaPipe Selfie Segmentation produces a person mask, then a WebGL2\n// composite shader mixes the original camera frame and the background image\n// based on the mask.\n//\n// Difference from blur: instead of generating the background from two\n// Gaussian passes on the camera, the background is a still image loaded\n// once from the URL the consumer passes in. Cached per-source URL.\n//\n// Shader source lives in src/web/shaders.ts; MediaPipe loader in\n// src/web/segmenter.ts.\n\nimport type { FrameTransform } from '../insertable-streams';\nimport { getLatestMask, loadSegmenter, requestMaskIfIdle } from '../segmenter';\nimport { COMPOSITE_FRAG_SRC, PASSTHROUGH_VERT_SRC } from '../shaders';\nimport { maskSmoothstepRange, tuning } from '../tuning';\n\n// Uniform locations queried once at link, not via getUniformLocation per frame\n// (mirrors src/web/effects/blur.ts; the composite shader is identical).\ntype CompositeProgram = {\n prog: WebGLProgram;\n uOriginal: WebGLUniformLocation | null;\n uBackground: WebGLUniformLocation | null;\n uMask: WebGLUniformLocation | null;\n uBgUvScale: WebGLUniformLocation | null;\n uBgUvOffset: WebGLUniformLocation | null;\n uMaskUvScale: WebGLUniformLocation | null;\n uMaskUvOffset: WebGLUniformLocation | null;\n uMaskLo: WebGLUniformLocation | null;\n uMaskHi: WebGLUniformLocation | null;\n};\n\ntype GpuState = {\n gl: WebGL2RenderingContext;\n canvas: OffscreenCanvas;\n width: number;\n height: number;\n program: CompositeProgram;\n textures: {\n original: WebGLTexture;\n mask: WebGLTexture;\n background: WebGLTexture;\n };\n};\n\nconst compileShader = (gl: WebGL2RenderingContext, type: number, source: string): WebGLShader => {\n const shader = gl.createShader(type);\n if (!shader) throw new Error('kaleidoscope: gl.createShader returned null');\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n const log = gl.getShaderInfoLog(shader) ?? '(no info log)';\n gl.deleteShader(shader);\n throw new Error(`kaleidoscope: shader compile failed: ${log}\\n---\\n${source}`);\n }\n return shader;\n};\n\nconst linkProgram = (\n gl: WebGL2RenderingContext,\n vertSrc: string,\n fragSrc: string,\n): WebGLProgram => {\n const vs = compileShader(gl, gl.VERTEX_SHADER, vertSrc);\n const fs = compileShader(gl, gl.FRAGMENT_SHADER, fragSrc);\n const prog = gl.createProgram();\n if (!prog) throw new Error('kaleidoscope: gl.createProgram returned null');\n gl.attachShader(prog, vs);\n gl.attachShader(prog, fs);\n gl.linkProgram(prog);\n gl.detachShader(prog, vs);\n gl.detachShader(prog, fs);\n gl.deleteShader(vs);\n gl.deleteShader(fs);\n if (!gl.getProgramParameter(prog, gl.LINK_STATUS)) {\n const log = gl.getProgramInfoLog(prog) ?? '(no info log)';\n gl.deleteProgram(prog);\n throw new Error(`kaleidoscope: program link failed: ${log}`);\n }\n return prog;\n};\n\nconst linkCompositeProgram = (gl: WebGL2RenderingContext): CompositeProgram => {\n const prog = linkProgram(gl, PASSTHROUGH_VERT_SRC, COMPOSITE_FRAG_SRC);\n return {\n prog,\n uOriginal: gl.getUniformLocation(prog, 'uOriginal'),\n uBackground: gl.getUniformLocation(prog, 'uBackground'),\n uMask: gl.getUniformLocation(prog, 'uMask'),\n uBgUvScale: gl.getUniformLocation(prog, 'uBgUvScale'),\n uBgUvOffset: gl.getUniformLocation(prog, 'uBgUvOffset'),\n uMaskUvScale: gl.getUniformLocation(prog, 'uMaskUvScale'),\n uMaskUvOffset: gl.getUniformLocation(prog, 'uMaskUvOffset'),\n uMaskLo: gl.getUniformLocation(prog, 'uMaskLo'),\n uMaskHi: gl.getUniformLocation(prog, 'uMaskHi'),\n };\n};\n\nconst createTexture = (gl: WebGL2RenderingContext, width: number, height: number): WebGLTexture => {\n const tex = gl.createTexture();\n if (!tex) throw new Error('kaleidoscope: gl.createTexture returned null');\n gl.bindTexture(gl.TEXTURE_2D, tex);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n return tex;\n};\n\nconst uploadTexture = (\n gl: WebGL2RenderingContext,\n tex: WebGLTexture,\n source: TexImageSource,\n flipY: boolean,\n): void => {\n gl.bindTexture(gl.TEXTURE_2D, tex);\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, source);\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);\n};\n\n// --- Per-source caching ----------------------------------------------------\n\ntype CacheEntry = {\n state: GpuState | null;\n // The bg image is staged onto an OffscreenCanvas at load time because\n // UNPACK_FLIP_Y_WEBGL is silently a no-op on ImageBitmaps; we want\n // flipY to actually flip on upload, and it works on canvas sources.\n imagePromise: Promise<{ canvas: OffscreenCanvas; width: number; height: number }>;\n inputCanvas2D: OffscreenCanvas | null;\n inputCtx2D: OffscreenCanvasRenderingContext2D | null;\n};\n\nconst cache = new Map<string, CacheEntry>();\n\n// SECURITY: `source` is consumer-supplied and may be an arbitrary URL or data\n// URI (see BackgroundImageSpec.source). Two bounds keep an untrusted source\n// from becoming a memory-pressure DoS:\n// - MAX_BG_DIMENSION caps the RETAINED raster and the GPU upload so a\n// \"decompression bomb\" (a small file that decodes to hundreds of\n// megapixels) is downscaled rather than held full-size. A background is\n// cover-fit anyway, so the cap costs nothing visible. NOTE: createImageBitmap\n// decodes the full image before this downscale runs, so the transient decode\n// peak is bounded by the browser's own createImageBitmap limits, not by this\n// cap; the cap bounds sustained memory + GPU pressure, not the decode spike.\n// - MAX_CACHE_ENTRIES bounds the per-source cache so a stream of distinct\n// URLs cannot grow it without limit.\n// Consumers wiring `source` from end-user input should still validate the URL\n// themselves; this library does not fetch-allowlist.\nconst MAX_BG_DIMENSION = 4096;\nconst MAX_CACHE_ENTRIES = 32;\n\nconst loadImage = (\n source: string,\n): Promise<{ canvas: OffscreenCanvas; width: number; height: number }> =>\n fetch(source, { mode: 'cors' })\n .then((r) => {\n if (!r.ok) throw new Error(`kaleidoscope: failed to fetch background image: ${r.status}`);\n return r.blob();\n })\n .then((blob) => createImageBitmap(blob))\n .then((bitmap) => {\n const longSide = Math.max(bitmap.width, bitmap.height);\n const scale = longSide > MAX_BG_DIMENSION ? MAX_BG_DIMENSION / longSide : 1;\n const width = Math.max(1, Math.round(bitmap.width * scale));\n const height = Math.max(1, Math.round(bitmap.height * scale));\n const canvas = new OffscreenCanvas(width, height);\n const ctx = canvas.getContext('2d');\n if (!ctx) throw new Error('kaleidoscope: bg OffscreenCanvas 2D context unavailable');\n ctx.drawImage(bitmap, 0, 0, width, height);\n bitmap.close();\n return { canvas, width, height };\n });\n\n// Free an entry's GL resources before dropping it from the cache.\nconst disposeEntry = (entry: CacheEntry): void => {\n if (!entry.state) return;\n const { gl, program, textures } = entry.state;\n gl.deleteProgram(program.prog);\n gl.deleteTexture(textures.original);\n gl.deleteTexture(textures.mask);\n gl.deleteTexture(textures.background);\n entry.state = null;\n};\n\nconst ensureState = (\n entry: CacheEntry,\n width: number,\n height: number,\n bg: { canvas: OffscreenCanvas; width: number; height: number },\n): GpuState => {\n if (entry.state && entry.state.width === width && entry.state.height === height) {\n return entry.state;\n }\n if (entry.state) {\n const { gl } = entry.state;\n gl.deleteProgram(entry.state.program.prog);\n gl.deleteTexture(entry.state.textures.original);\n gl.deleteTexture(entry.state.textures.mask);\n gl.deleteTexture(entry.state.textures.background);\n }\n\n const canvas = entry.state?.canvas ?? new OffscreenCanvas(width, height);\n canvas.width = width;\n canvas.height = height;\n const gl = canvas.getContext('webgl2');\n if (!gl) {\n throw new Error(\n 'kaleidoscope: WebGL2 not available; background-image requires a WebGL2-capable browser',\n );\n }\n\n entry.state = {\n gl,\n canvas,\n width,\n height,\n program: linkCompositeProgram(gl),\n textures: {\n original: createTexture(gl, width, height),\n mask: createTexture(gl, width, height),\n background: createTexture(gl, width, height),\n },\n };\n // Static background: upload once, here, not per frame. Re-runs only when\n // this state is rebuilt (resolution change). flipY=true matches the\n // original's DOM-coord → GL v=1 convention.\n uploadTexture(gl, entry.state.textures.background, bg.canvas as unknown as TexImageSource, true);\n return entry.state;\n};\n\nconst ensureInputCanvas = (\n entry: CacheEntry,\n width: number,\n height: number,\n): OffscreenCanvasRenderingContext2D => {\n if (\n !entry.inputCanvas2D ||\n entry.inputCanvas2D.width !== width ||\n entry.inputCanvas2D.height !== height\n ) {\n entry.inputCanvas2D = new OffscreenCanvas(width, height);\n entry.inputCtx2D = entry.inputCanvas2D.getContext('2d');\n if (!entry.inputCtx2D) {\n throw new Error('kaleidoscope: OffscreenCanvas 2D context unavailable');\n }\n }\n return entry.inputCtx2D as OffscreenCanvasRenderingContext2D;\n};\n\n// --- The effect factory ----------------------------------------------------\n\nexport const makeBackgroundImage = (source: string): FrameTransform => {\n let entry = cache.get(source);\n if (!entry) {\n // Bound the cache: evict the oldest entry (Map preserves insertion order)\n // and free its GL resources before inserting a new source.\n while (cache.size >= MAX_CACHE_ENTRIES) {\n const oldestKey = cache.keys().next().value;\n if (oldestKey === undefined) break;\n const oldest = cache.get(oldestKey);\n if (oldest) disposeEntry(oldest);\n cache.delete(oldestKey);\n }\n entry = {\n state: null,\n imagePromise: loadImage(source),\n inputCanvas2D: null,\n inputCtx2D: null,\n };\n cache.set(source, entry);\n }\n const e = entry;\n\n return async (frame) => {\n const bg = await e.imagePromise;\n await loadSegmenter(); // ensure loaded; cached after first call.\n const w = frame.displayWidth;\n const h = frame.displayHeight;\n\n const inputCtx = ensureInputCanvas(e, w, h);\n inputCtx.drawImage(frame, 0, 0, w, h);\n const inputCanvas = e.inputCanvas2D as unknown as CanvasImageSource;\n\n // Decoupled segmentation; see blur.ts for the rationale. Forward the\n // original frame until the first mask lands.\n requestMaskIfIdle(inputCanvas);\n const results = getLatestMask();\n if (!results) {\n const passthrough = new VideoFrame(e.inputCanvas2D as unknown as CanvasImageSource, {\n timestamp: frame.timestamp,\n ...(frame.duration != null ? { duration: frame.duration } : {}),\n });\n frame.close();\n return passthrough;\n }\n\n const s = ensureState(e, w, h, bg);\n const { gl, canvas, program, textures } = s;\n\n // Upload original with flipY=true (DOM-coord → GL v=1 = top). The static\n // background is uploaded once in ensureState (flipped the same way), not\n // per frame. Mask is uploaded with flipY=false for the same reason\n // (no-op on MediaPipe's segmentationMask source) AND to preserve the soft\n // confidence values — canvas premultiplied-alpha math would collapse them\n // to near-binary. The composite shader compensates via\n // uMaskUvScale=(1,-1) / uMaskUvOffset=(0,1) set below.\n uploadTexture(gl, textures.original, inputCanvas as unknown as TexImageSource, true);\n uploadTexture(gl, textures.mask, results.segmentationMask as unknown as TexImageSource, false);\n\n gl.disable(gl.BLEND);\n gl.disable(gl.DEPTH_TEST);\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, w, h);\n // biome-ignore lint/correctness/useHookAtTopLevel: gl.useProgram is a WebGL call, not a React hook (the early return above tripped the use* heuristic).\n gl.useProgram(program.prog);\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, textures.original);\n gl.uniform1i(program.uOriginal, 0);\n gl.activeTexture(gl.TEXTURE1);\n gl.bindTexture(gl.TEXTURE_2D, textures.background);\n gl.uniform1i(program.uBackground, 1);\n gl.activeTexture(gl.TEXTURE2);\n gl.bindTexture(gl.TEXTURE_2D, textures.mask);\n gl.uniform1i(program.uMask, 2);\n // Cover-fit center crop: scale the smaller axis to fit, offset to\n // center. Mirrors android/.../effects/BackgroundImageFactory.kt.\n const outAspect = w / h;\n const bgAspect = bg.width / bg.height;\n let bgScaleX: number;\n let bgScaleY: number;\n let bgOffsetX: number;\n let bgOffsetY: number;\n if (bgAspect > outAspect) {\n bgScaleX = outAspect / bgAspect;\n bgScaleY = 1.0;\n bgOffsetX = (1 - bgScaleX) * 0.5;\n bgOffsetY = 0;\n } else {\n bgScaleX = 1.0;\n bgScaleY = bgAspect / outAspect;\n bgOffsetX = 0;\n bgOffsetY = (1 - bgScaleY) * 0.5;\n }\n gl.uniform2f(program.uBgUvScale, bgScaleX, bgScaleY);\n gl.uniform2f(program.uBgUvOffset, bgOffsetX, bgOffsetY);\n // Mask V-flip via sampling uniforms; see comment on the upload above.\n gl.uniform2f(program.uMaskUvScale, 1, -1);\n gl.uniform2f(program.uMaskUvOffset, 0, 1);\n const [maskLo, maskHi] = maskSmoothstepRange(tuning.maskHardness, tuning.maskThreshold);\n gl.uniform1f(program.uMaskLo, maskLo);\n gl.uniform1f(program.uMaskHi, maskHi);\n gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n\n const out = new VideoFrame(canvas as unknown as CanvasImageSource, {\n timestamp: frame.timestamp,\n ...(frame.duration != null ? { duration: frame.duration } : {}),\n });\n frame.close();\n return out;\n };\n};\n"]}
|