shaders 2.5.122 → 2.5.123
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/dist/core/ReflectivePlane-UIT4xlmn.js +230 -0
- package/dist/core/{VideoTexture-D9XxE1Hw.js → VideoTexture-ClutlOqj.js} +1 -1
- package/dist/core/{WebcamTexture-9Td8qQWm.js → WebcamTexture-D4e06ajM.js} +1 -1
- package/dist/core/index.js +41 -40
- package/dist/core/registry.js +41 -40
- package/dist/core/{shaderRegistry-BoqhBfun.js → shaderRegistry-9d8S78Sy.js} +78 -76
- package/dist/core/shaderRegistry.d.ts.map +1 -1
- package/dist/core/shaders/ReflectivePlane/index.d.ts +46 -0
- package/dist/core/shaders/ReflectivePlane/index.d.ts.map +1 -0
- package/dist/core/shaders/ReflectivePlane/index.js +6 -0
- package/dist/core/shaders/Ring/index.js +1 -1
- package/dist/core/shaders/Ripples/index.js +1 -1
- package/dist/core/shaders/RoundedRect/index.js +1 -1
- package/dist/core/shaders/Saturation/index.js +1 -1
- package/dist/core/shaders/Sharpness/index.js +1 -1
- package/dist/core/shaders/Shatter/index.js +1 -1
- package/dist/core/shaders/SimplexNoise/index.js +1 -1
- package/dist/core/shaders/SineWave/index.js +1 -1
- package/dist/core/shaders/Smoke/index.js +1 -1
- package/dist/core/shaders/SmokeFill/index.js +1 -1
- package/dist/core/shaders/Solarize/index.js +1 -1
- package/dist/core/shaders/SolidColor/index.js +1 -1
- package/dist/core/shaders/Spherize/index.js +1 -1
- package/dist/core/shaders/Spiral/index.js +1 -1
- package/dist/core/shaders/Star/index.js +1 -1
- package/dist/core/shaders/Strands/index.js +1 -1
- package/dist/core/shaders/Stretch/index.js +1 -1
- package/dist/core/shaders/Stripes/index.js +1 -1
- package/dist/core/shaders/StudioBackground/index.js +1 -1
- package/dist/core/shaders/SunBurst/index.js +1 -1
- package/dist/core/shaders/Swirl/index.js +1 -1
- package/dist/core/shaders/TiltShift/index.js +1 -1
- package/dist/core/shaders/Tint/index.js +1 -1
- package/dist/core/shaders/Trapezoid/index.js +1 -1
- package/dist/core/shaders/Tritone/index.js +1 -1
- package/dist/core/shaders/Truchet/index.js +1 -1
- package/dist/core/shaders/Twirl/index.js +1 -1
- package/dist/core/shaders/VHS/index.js +1 -1
- package/dist/core/shaders/Vesica/index.js +1 -1
- package/dist/core/shaders/Vibrance/index.js +1 -1
- package/dist/core/shaders/VideoTexture/index.js +2 -2
- package/dist/core/shaders/Vignette/index.js +1 -1
- package/dist/core/shaders/Voronoi/index.js +1 -1
- package/dist/core/shaders/WaveDistortion/index.js +1 -1
- package/dist/core/shaders/Weave/index.js +1 -1
- package/dist/core/shaders/WebcamTexture/index.js +2 -2
- package/dist/core/shaders/WorleyNoise/index.js +1 -1
- package/dist/core/shaders/ZoomBlur/index.js +1 -1
- package/dist/js/createShader.js +1 -1
- package/dist/js/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/js/utils/generatePresetCode.js +11 -0
- package/dist/react/Preview.js +1 -0
- package/dist/react/ReflectivePlane.js +217 -0
- package/dist/react/Shader.js +1 -1
- package/dist/react/bundle.js +207 -207
- package/dist/react/components/ReflectivePlane.d.ts +36 -0
- package/dist/react/components/ReflectivePlane.d.ts.map +1 -0
- package/dist/react/engine/Preview.d.ts.map +1 -1
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +2 -1
- package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/react/utils/generatePresetCode.js +11 -0
- package/dist/registry.js +217 -0
- package/dist/solid/components/ReflectivePlane.d.ts +33 -0
- package/dist/solid/components/ReflectivePlane.d.ts.map +1 -0
- package/dist/solid/components/ReflectivePlane.js +228 -0
- package/dist/solid/engine/Preview.d.ts.map +1 -1
- package/dist/solid/engine/Preview.js +158 -156
- package/dist/solid/engine/Shader.js +1 -1
- package/dist/solid/index.d.ts +1 -0
- package/dist/solid/index.d.ts.map +1 -1
- package/dist/solid/index.js +82 -80
- package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/solid/utils/generatePresetCode.js +11 -0
- package/dist/svelte/components/ReflectivePlane.svelte.d.ts +23 -0
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.js +740 -540
- package/dist/svelte/source/components/ReflectivePlane.svelte +329 -0
- package/dist/svelte/source/engine/Preview.svelte +2 -0
- package/dist/svelte/source/index.js +1 -0
- package/dist/svelte/utils/generatePresetCode.js +11 -0
- package/dist/vue/Preview.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/vue/ReflectivePlane.js +3 -0
- package/dist/vue/ReflectivePlane.vue_vue_type_script_setup_true_lang.js +218 -0
- package/dist/vue/Shader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/vue/components/ReflectivePlane.vue.d.ts +58 -0
- package/dist/vue/components/ReflectivePlane.vue.d.ts.map +1 -0
- package/dist/vue/index.d.ts +1 -0
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js +2 -1
- package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/vue/utils/generatePresetCode.js +11 -0
- package/package.json +9 -1
- /package/dist/core/{Ring-CtnDtTY8.js → Ring-UT__kmzY.js} +0 -0
- /package/dist/core/{Ripples-B4H0VoZb.js → Ripples-CWVLSUP0.js} +0 -0
- /package/dist/core/{RoundedRect-tnt7Jr5b.js → RoundedRect-BPWHTT1j.js} +0 -0
- /package/dist/core/{Saturation-6FlxHXSi.js → Saturation-DFOp2yD9.js} +0 -0
- /package/dist/core/{Sharpness-C4cJlBuh.js → Sharpness-C-IEswPL.js} +0 -0
- /package/dist/core/{Shatter-CnkycTRD.js → Shatter-CUYQp-qy.js} +0 -0
- /package/dist/core/{SimplexNoise-BnRaoxON.js → SimplexNoise-LAxWw8fJ.js} +0 -0
- /package/dist/core/{SineWave-CZ4Fanvr.js → SineWave-CEQWxC9Q.js} +0 -0
- /package/dist/core/{Smoke-CXPjGG-b.js → Smoke-DO4yylWk.js} +0 -0
- /package/dist/core/{SmokeFill-DzEtYeKN.js → SmokeFill-Dm0sZS5F.js} +0 -0
- /package/dist/core/{Solarize-CynVlxjT.js → Solarize-mE7LU1li.js} +0 -0
- /package/dist/core/{SolidColor-dCAOGC_P.js → SolidColor-BljkSdvg.js} +0 -0
- /package/dist/core/{Spherize-C77QGVWj.js → Spherize-DARagREe.js} +0 -0
- /package/dist/core/{Spiral-eN65wa6O.js → Spiral-CumsIpkp.js} +0 -0
- /package/dist/core/{Star-0Flymgm9.js → Star-8fAlzR9L.js} +0 -0
- /package/dist/core/{Strands-DnWJDGiO.js → Strands-BB4RIsFz.js} +0 -0
- /package/dist/core/{Stretch-B5XGF1bF.js → Stretch-3S2atBkJ.js} +0 -0
- /package/dist/core/{Stripes-CNXJpFyr.js → Stripes-BGFVSZIt.js} +0 -0
- /package/dist/core/{StudioBackground-DtiE2mCf.js → StudioBackground-BtJ6b1Ki.js} +0 -0
- /package/dist/core/{SunBurst-D9X1-buZ.js → SunBurst-BJRFFYhs.js} +0 -0
- /package/dist/core/{Swirl-BV6pN94G.js → Swirl-KA9cEnLI.js} +0 -0
- /package/dist/core/{TiltShift-r4qzPb2k.js → TiltShift-DtQ3dRL-.js} +0 -0
- /package/dist/core/{Tint-CJ8FQdzA.js → Tint-W_EvzN1-.js} +0 -0
- /package/dist/core/{Trapezoid-JmybJMUr.js → Trapezoid-cQzS6-bh.js} +0 -0
- /package/dist/core/{Tritone-D_QvxjGc.js → Tritone-B3hI2nAi.js} +0 -0
- /package/dist/core/{Truchet-BJeZS_JQ.js → Truchet-s9PmowCP.js} +0 -0
- /package/dist/core/{Twirl-8ayqS0n8.js → Twirl-UDDXGkFl.js} +0 -0
- /package/dist/core/{VHS-Gbec95K_.js → VHS-DW1H7Wuy.js} +0 -0
- /package/dist/core/{Vesica-D7iqgpJg.js → Vesica-ChQBYWuw.js} +0 -0
- /package/dist/core/{Vibrance-COKHmh8r.js → Vibrance-DUj7hwzE.js} +0 -0
- /package/dist/core/{Vignette-Y_2yono-.js → Vignette-F9yxi-UM.js} +0 -0
- /package/dist/core/{Voronoi-DQ_f6k5D.js → Voronoi-D8HHP_WR.js} +0 -0
- /package/dist/core/{WaveDistortion-R5FfwKQN.js → WaveDistortion-CDIc5Uyk.js} +0 -0
- /package/dist/core/{Weave-DJ4s3Gwc.js → Weave-ou5shgl3.js} +0 -0
- /package/dist/core/{WorleyNoise-CWytDfGH.js → WorleyNoise-Uf6IPm7A.js} +0 -0
- /package/dist/core/{ZoomBlur-DWFQVFMK.js → ZoomBlur-DJ-RNKHM.js} +0 -0
- /package/dist/core/{browser-BamVDhaZ.js → browser-NUM-x2tw.js} +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import "../../edges-CX_lJB9R.js";
|
|
2
|
+
import "../../transformations-CJcUeZIC.js";
|
|
3
|
+
import "../../alpha-C4ptedXe.js";
|
|
4
|
+
import "../../computeBlur-CprKe0xa.js";
|
|
5
|
+
import { n as componentDefinition, t as ReflectivePlane_default } from "../../ReflectivePlane-UIT4xlmn.js";
|
|
6
|
+
export { componentDefinition, ReflectivePlane_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../colorMixing-BPpDnR5I.js";
|
|
3
3
|
import "../../sdf-D_EAGXhN.js";
|
|
4
|
-
import { n as componentDefinition, t as Ring_default } from "../../Ring-
|
|
4
|
+
import { n as componentDefinition, t as Ring_default } from "../../Ring-UT__kmzY.js";
|
|
5
5
|
export { componentDefinition, Ring_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../colorMixing-BPpDnR5I.js";
|
|
3
3
|
import "../../time-DUqSFWvT.js";
|
|
4
|
-
import { n as componentDefinition, t as Ripples_default } from "../../Ripples-
|
|
4
|
+
import { n as componentDefinition, t as Ripples_default } from "../../Ripples-CWVLSUP0.js";
|
|
5
5
|
export { componentDefinition, Ripples_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../colorMixing-BPpDnR5I.js";
|
|
3
3
|
import "../../sdf-D_EAGXhN.js";
|
|
4
|
-
import { n as componentDefinition, t as RoundedRect_default } from "../../RoundedRect-
|
|
4
|
+
import { n as componentDefinition, t as RoundedRect_default } from "../../RoundedRect-BPWHTT1j.js";
|
|
5
5
|
export { componentDefinition, RoundedRect_default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as componentDefinition, t as Saturation_default } from "../../Saturation-
|
|
1
|
+
import { n as componentDefinition, t as Saturation_default } from "../../Saturation-DFOp2yD9.js";
|
|
2
2
|
export { componentDefinition, Saturation_default as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "../../alpha-C4ptedXe.js";
|
|
2
|
-
import { n as componentDefinition, t as Sharpness_default } from "../../Sharpness-
|
|
2
|
+
import { n as componentDefinition, t as Sharpness_default } from "../../Sharpness-C-IEswPL.js";
|
|
3
3
|
export { componentDefinition, Sharpness_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../edges-CX_lJB9R.js";
|
|
2
2
|
import "../../transformations-CJcUeZIC.js";
|
|
3
3
|
import "../../alpha-C4ptedXe.js";
|
|
4
|
-
import { n as componentDefinition, t as Shatter_default } from "../../Shatter-
|
|
4
|
+
import { n as componentDefinition, t as Shatter_default } from "../../Shatter-CUYQp-qy.js";
|
|
5
5
|
export { componentDefinition, Shatter_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../colorMixing-BPpDnR5I.js";
|
|
3
3
|
import "../../time-DUqSFWvT.js";
|
|
4
|
-
import { n as componentDefinition, t as SimplexNoise_default } from "../../SimplexNoise-
|
|
4
|
+
import { n as componentDefinition, t as SimplexNoise_default } from "../../SimplexNoise-LAxWw8fJ.js";
|
|
5
5
|
export { componentDefinition, SimplexNoise_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../time-DUqSFWvT.js";
|
|
3
|
-
import { n as componentDefinition, t as SineWave_default } from "../../SineWave-
|
|
3
|
+
import { n as componentDefinition, t as SineWave_default } from "../../SineWave-CEQWxC9Q.js";
|
|
4
4
|
export { componentDefinition, SineWave_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../colorMixing-BPpDnR5I.js";
|
|
3
|
-
import { n as componentDefinition, t as Smoke_default } from "../../Smoke-
|
|
3
|
+
import { n as componentDefinition, t as Smoke_default } from "../../Smoke-DO4yylWk.js";
|
|
4
4
|
export { componentDefinition, Smoke_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../colorMixing-BPpDnR5I.js";
|
|
3
3
|
import "../../sdf-D_EAGXhN.js";
|
|
4
|
-
import { n as componentDefinition, t as SmokeFill_default } from "../../SmokeFill-
|
|
4
|
+
import { n as componentDefinition, t as SmokeFill_default } from "../../SmokeFill-Dm0sZS5F.js";
|
|
5
5
|
export { componentDefinition, SmokeFill_default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as componentDefinition, t as Solarize_default } from "../../Solarize-
|
|
1
|
+
import { n as componentDefinition, t as Solarize_default } from "../../Solarize-mE7LU1li.js";
|
|
2
2
|
export { componentDefinition, Solarize_default as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
|
-
import { n as componentDefinition, t as SolidColor_default } from "../../SolidColor-
|
|
2
|
+
import { n as componentDefinition, t as SolidColor_default } from "../../SolidColor-BljkSdvg.js";
|
|
3
3
|
export { componentDefinition, SolidColor_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../alpha-C4ptedXe.js";
|
|
3
|
-
import { n as componentDefinition, t as Spherize_default } from "../../Spherize-
|
|
3
|
+
import { n as componentDefinition, t as Spherize_default } from "../../Spherize-DARagREe.js";
|
|
4
4
|
export { componentDefinition, Spherize_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../colorMixing-BPpDnR5I.js";
|
|
3
3
|
import "../../time-DUqSFWvT.js";
|
|
4
|
-
import { n as componentDefinition, t as Spiral_default } from "../../Spiral-
|
|
4
|
+
import { n as componentDefinition, t as Spiral_default } from "../../Spiral-CumsIpkp.js";
|
|
5
5
|
export { componentDefinition, Spiral_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../colorMixing-BPpDnR5I.js";
|
|
3
3
|
import "../../sdf-D_EAGXhN.js";
|
|
4
|
-
import { n as componentDefinition, t as Star_default } from "../../Star-
|
|
4
|
+
import { n as componentDefinition, t as Star_default } from "../../Star-8fAlzR9L.js";
|
|
5
5
|
export { componentDefinition, Star_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../time-DUqSFWvT.js";
|
|
3
|
-
import { n as componentDefinition, t as Strands_default } from "../../Strands-
|
|
3
|
+
import { n as componentDefinition, t as Strands_default } from "../../Strands-BB4RIsFz.js";
|
|
4
4
|
export { componentDefinition, Strands_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../edges-CX_lJB9R.js";
|
|
2
2
|
import "../../transformations-CJcUeZIC.js";
|
|
3
3
|
import "../../alpha-C4ptedXe.js";
|
|
4
|
-
import { n as componentDefinition, t as Stretch_default } from "../../Stretch-
|
|
4
|
+
import { n as componentDefinition, t as Stretch_default } from "../../Stretch-3S2atBkJ.js";
|
|
5
5
|
export { componentDefinition, Stretch_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../colorMixing-BPpDnR5I.js";
|
|
3
3
|
import "../../time-DUqSFWvT.js";
|
|
4
|
-
import { n as componentDefinition, t as Stripes_default } from "../../Stripes-
|
|
4
|
+
import { n as componentDefinition, t as Stripes_default } from "../../Stripes-BGFVSZIt.js";
|
|
5
5
|
export { componentDefinition, Stripes_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../time-DUqSFWvT.js";
|
|
3
|
-
import { n as componentDefinition, t as StudioBackground_default } from "../../StudioBackground-
|
|
3
|
+
import { n as componentDefinition, t as StudioBackground_default } from "../../StudioBackground-BtJ6b1Ki.js";
|
|
4
4
|
export { componentDefinition, StudioBackground_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../time-DUqSFWvT.js";
|
|
3
|
-
import { n as componentDefinition, t as SunBurst_default } from "../../SunBurst-
|
|
3
|
+
import { n as componentDefinition, t as SunBurst_default } from "../../SunBurst-BJRFFYhs.js";
|
|
4
4
|
export { componentDefinition, SunBurst_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../colorMixing-BPpDnR5I.js";
|
|
3
3
|
import "../../time-DUqSFWvT.js";
|
|
4
|
-
import { n as componentDefinition, t as Swirl_default } from "../../Swirl-
|
|
4
|
+
import { n as componentDefinition, t as Swirl_default } from "../../Swirl-KA9cEnLI.js";
|
|
5
5
|
export { componentDefinition, Swirl_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../alpha-C4ptedXe.js";
|
|
3
3
|
import "../../computeBlur-CprKe0xa.js";
|
|
4
|
-
import { n as componentDefinition, t as TiltShift_default } from "../../TiltShift-
|
|
4
|
+
import { n as componentDefinition, t as TiltShift_default } from "../../TiltShift-DtQ3dRL-.js";
|
|
5
5
|
export { componentDefinition, TiltShift_default as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
|
-
import { n as componentDefinition, t as Tint_default } from "../../Tint-
|
|
2
|
+
import { n as componentDefinition, t as Tint_default } from "../../Tint-W_EvzN1-.js";
|
|
3
3
|
export { componentDefinition, Tint_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../colorMixing-BPpDnR5I.js";
|
|
3
3
|
import "../../sdf-D_EAGXhN.js";
|
|
4
|
-
import { n as componentDefinition, t as Trapezoid_default } from "../../Trapezoid-
|
|
4
|
+
import { n as componentDefinition, t as Trapezoid_default } from "../../Trapezoid-cQzS6-bh.js";
|
|
5
5
|
export { componentDefinition, Trapezoid_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../colorMixing-BPpDnR5I.js";
|
|
3
|
-
import { n as componentDefinition, t as Tritone_default } from "../../Tritone-
|
|
3
|
+
import { n as componentDefinition, t as Tritone_default } from "../../Tritone-B3hI2nAi.js";
|
|
4
4
|
export { componentDefinition, Tritone_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../colorMixing-BPpDnR5I.js";
|
|
3
|
-
import { n as componentDefinition, t as Truchet_default } from "../../Truchet-
|
|
3
|
+
import { n as componentDefinition, t as Truchet_default } from "../../Truchet-s9PmowCP.js";
|
|
4
4
|
export { componentDefinition, Truchet_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../edges-CX_lJB9R.js";
|
|
2
2
|
import "../../transformations-CJcUeZIC.js";
|
|
3
3
|
import "../../alpha-C4ptedXe.js";
|
|
4
|
-
import { n as componentDefinition, t as Twirl_default } from "../../Twirl-
|
|
4
|
+
import { n as componentDefinition, t as Twirl_default } from "../../Twirl-UDDXGkFl.js";
|
|
5
5
|
export { componentDefinition, Twirl_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../colorMixing-BPpDnR5I.js";
|
|
3
3
|
import "../../sdf-D_EAGXhN.js";
|
|
4
|
-
import { n as componentDefinition, t as Vesica_default } from "../../Vesica-
|
|
4
|
+
import { n as componentDefinition, t as Vesica_default } from "../../Vesica-ChQBYWuw.js";
|
|
5
5
|
export { componentDefinition, Vesica_default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as componentDefinition, t as Vibrance_default } from "../../Vibrance-
|
|
1
|
+
import { n as componentDefinition, t as Vibrance_default } from "../../Vibrance-DUj7hwzE.js";
|
|
2
2
|
export { componentDefinition, Vibrance_default as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../../browser-
|
|
2
|
-
import { n as componentDefinition, t as VideoTexture_default } from "../../VideoTexture-
|
|
1
|
+
import "../../browser-NUM-x2tw.js";
|
|
2
|
+
import { n as componentDefinition, t as VideoTexture_default } from "../../VideoTexture-ClutlOqj.js";
|
|
3
3
|
export { componentDefinition, VideoTexture_default as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
|
-
import { n as componentDefinition, t as Vignette_default } from "../../Vignette-
|
|
2
|
+
import { n as componentDefinition, t as Vignette_default } from "../../Vignette-F9yxi-UM.js";
|
|
3
3
|
export { componentDefinition, Vignette_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../colorMixing-BPpDnR5I.js";
|
|
3
3
|
import "../../time-DUqSFWvT.js";
|
|
4
|
-
import { n as componentDefinition, t as Voronoi_default } from "../../Voronoi-
|
|
4
|
+
import { n as componentDefinition, t as Voronoi_default } from "../../Voronoi-D8HHP_WR.js";
|
|
5
5
|
export { componentDefinition, Voronoi_default as default };
|
|
@@ -2,5 +2,5 @@ import "../../edges-CX_lJB9R.js";
|
|
|
2
2
|
import "../../transformations-CJcUeZIC.js";
|
|
3
3
|
import "../../alpha-C4ptedXe.js";
|
|
4
4
|
import "../../time-DUqSFWvT.js";
|
|
5
|
-
import { n as componentDefinition, t as WaveDistortion_default } from "../../WaveDistortion-
|
|
5
|
+
import { n as componentDefinition, t as WaveDistortion_default } from "../../WaveDistortion-CDIc5Uyk.js";
|
|
6
6
|
export { componentDefinition, WaveDistortion_default as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
|
-
import { n as componentDefinition, t as Weave_default } from "../../Weave-
|
|
2
|
+
import { n as componentDefinition, t as Weave_default } from "../../Weave-ou5shgl3.js";
|
|
3
3
|
export { componentDefinition, Weave_default as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../../browser-
|
|
2
|
-
import { n as componentDefinition, t as WebcamTexture_default } from "../../WebcamTexture-
|
|
1
|
+
import "../../browser-NUM-x2tw.js";
|
|
2
|
+
import { n as componentDefinition, t as WebcamTexture_default } from "../../WebcamTexture-D4e06ajM.js";
|
|
3
3
|
export { componentDefinition, WebcamTexture_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../colorMixing-BPpDnR5I.js";
|
|
3
3
|
import "../../time-DUqSFWvT.js";
|
|
4
|
-
import { n as componentDefinition, t as WorleyNoise_default } from "../../WorleyNoise-
|
|
4
|
+
import { n as componentDefinition, t as WorleyNoise_default } from "../../WorleyNoise-Uf6IPm7A.js";
|
|
5
5
|
export { componentDefinition, WorleyNoise_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../../transformations-CJcUeZIC.js";
|
|
2
2
|
import "../../alpha-C4ptedXe.js";
|
|
3
|
-
import { n as componentDefinition, t as ZoomBlur_default } from "../../ZoomBlur-
|
|
3
|
+
import { n as componentDefinition, t as ZoomBlur_default } from "../../ZoomBlur-DJ-RNKHM.js";
|
|
4
4
|
export { componentDefinition, ZoomBlur_default as default };
|
package/dist/js/createShader.js
CHANGED
|
@@ -148,7 +148,7 @@ async function createShader(canvas, preset, options) {
|
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
150
|
if (renderer.getPerformanceStats().fps > 0) {
|
|
151
|
-
state.telemetryCollector = startTelemetry(renderer, "2.5.
|
|
151
|
+
state.telemetryCollector = startTelemetry(renderer, "2.5.123", options?.disableTelemetry || false, false);
|
|
152
152
|
if (state.telemetryCollector) state.telemetryCollector.start();
|
|
153
153
|
state.telemetryStartTimeout = null;
|
|
154
154
|
} else state.telemetryStartTimeout = setTimeout(checkRendering, 500);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatePresetCode.d.ts","sourceRoot":"","sources":["../../src/utils/generatePresetCode.ts"],"names":[],"mappings":"AAAA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAA;CAC7B;AAED,UAAU,YAAY;IACpB,UAAU,EAAE,eAAe,EAAE,CAAA;CAC9B;
|
|
1
|
+
{"version":3,"file":"generatePresetCode.d.ts","sourceRoot":"","sources":["../../src/utils/generatePresetCode.ts"],"names":[],"mappings":"AAAA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAA;CAC7B;AAED,UAAU,YAAY;IACpB,UAAU,EAAE,eAAe,EAAE,CAAA;CAC9B;AAulDD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,CAoBlG;AAGD,eAAO,MAAM,mBAAmB,UAuH/B,CAAA"}
|
|
@@ -972,6 +972,16 @@ var shaderMetadata = {
|
|
|
972
972
|
"intensity": 1,
|
|
973
973
|
"edges": "transparent"
|
|
974
974
|
},
|
|
975
|
+
"ReflectivePlane": {
|
|
976
|
+
"opacity": 1,
|
|
977
|
+
"blendMode": "normal",
|
|
978
|
+
"height": .7,
|
|
979
|
+
"distance": .5,
|
|
980
|
+
"falloff": .5,
|
|
981
|
+
"blur": 3,
|
|
982
|
+
"blurDistance": .3,
|
|
983
|
+
"edges": "stretch"
|
|
984
|
+
},
|
|
975
985
|
"Ring": {
|
|
976
986
|
"opacity": 1,
|
|
977
987
|
"blendMode": "normal",
|
|
@@ -1618,6 +1628,7 @@ const availableComponents = [
|
|
|
1618
1628
|
"ProgressiveBlur",
|
|
1619
1629
|
"RadialGradient",
|
|
1620
1630
|
"RectangularCoordinates",
|
|
1631
|
+
"ReflectivePlane",
|
|
1621
1632
|
"Ring",
|
|
1622
1633
|
"Ripples",
|
|
1623
1634
|
"RoundedRect",
|
package/dist/react/Preview.js
CHANGED
|
@@ -186,6 +186,7 @@ var componentMap = {
|
|
|
186
186
|
ProgressiveBlur: lazy(() => import("./ProgressiveBlur.js")),
|
|
187
187
|
RadialGradient: lazy(() => import("./RadialGradient.js")),
|
|
188
188
|
RectangularCoordinates: lazy(() => import("./RectangularCoordinates.js")),
|
|
189
|
+
ReflectivePlane: lazy(() => import("./ReflectivePlane.js")),
|
|
189
190
|
Ring: lazy(() => import("./Ring.js")),
|
|
190
191
|
Ripples: lazy(() => import("./Ripples.js")),
|
|
191
192
|
RoundedRect: lazy(() => import("./RoundedRect.js")),
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { ShaderContext } from "./Shader.js";
|
|
2
|
+
import { useContext, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { createPortal } from "react-dom";
|
|
4
|
+
import { createUniformsMap } from "../core/index.js";
|
|
5
|
+
import { setColorSpaceMode } from "../core/utilities/transformations/index.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { componentDefinition } from "../core/shaders/ReflectivePlane/index.js";
|
|
8
|
+
function isPropDriver(value) {
|
|
9
|
+
return typeof value === "object" && value !== null && "type" in value && (value.type === "map" || value.type === "mouse" || value.type === "mouse-position" || value.type === "auto-animate");
|
|
10
|
+
}
|
|
11
|
+
function computeEffectiveProps(props, defaultProps$1) {
|
|
12
|
+
let baseProps = { ...defaultProps$1 };
|
|
13
|
+
for (const [key, value] of Object.entries(props)) if (key !== "children" && key !== "ref" && value !== void 0 && !isPropDriver(value)) baseProps[key] = value;
|
|
14
|
+
return baseProps;
|
|
15
|
+
}
|
|
16
|
+
var MARKER_STYLE = { display: "contents" };
|
|
17
|
+
var DEFAULT_TRANSFORM = {
|
|
18
|
+
offsetX: 0,
|
|
19
|
+
offsetY: 0,
|
|
20
|
+
rotation: 0,
|
|
21
|
+
scale: 1,
|
|
22
|
+
anchorX: .5,
|
|
23
|
+
anchorY: .5,
|
|
24
|
+
edges: "transparent"
|
|
25
|
+
};
|
|
26
|
+
var defaultProps = {
|
|
27
|
+
blendMode: "normal",
|
|
28
|
+
visible: true
|
|
29
|
+
};
|
|
30
|
+
try {
|
|
31
|
+
if (componentDefinition && componentDefinition.props) Object.entries(componentDefinition.props).forEach(([key, config]) => {
|
|
32
|
+
const propConfig = config;
|
|
33
|
+
if (propConfig && typeof propConfig === "object" && "default" in propConfig) defaultProps[key] = propConfig.default;
|
|
34
|
+
});
|
|
35
|
+
} catch (e) {
|
|
36
|
+
console.warn("Error extracting default props:", e);
|
|
37
|
+
}
|
|
38
|
+
const ShaderComponent = (props) => {
|
|
39
|
+
const context = useContext(ShaderContext);
|
|
40
|
+
if (!context) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
|
|
41
|
+
const { shaderParentId: parentId, shaderNodeRegister: parentRegister, shaderUniformUpdate: parentUniformUpdate, shaderMetadataUpdate: parentMetadataUpdate, shaderColorSpace } = context;
|
|
42
|
+
const reactId = useId();
|
|
43
|
+
const instanceId = useMemo(() => {
|
|
44
|
+
return (props.id ? props.id.replace(/[^a-zA-Z0-9_]/g, "_") : null) || reactId.replace(/[^a-zA-Z0-9_]/g, "");
|
|
45
|
+
}, [props.id, reactId]);
|
|
46
|
+
const effectiveProps = useMemo(() => {
|
|
47
|
+
return computeEffectiveProps(props, defaultProps);
|
|
48
|
+
}, [props]);
|
|
49
|
+
const effectiveTransform = useMemo(() => ({
|
|
50
|
+
...DEFAULT_TRANSFORM,
|
|
51
|
+
...props.transform
|
|
52
|
+
}), [props.transform]);
|
|
53
|
+
const markerRef = useRef(null);
|
|
54
|
+
const isCapturesDOM = !!componentDefinition.capturesDOM;
|
|
55
|
+
const captureCanvasRef = useRef(null);
|
|
56
|
+
const [domMounted, setDomMounted] = useState(false);
|
|
57
|
+
const [captureSize, setCaptureSize] = useState(() => ({
|
|
58
|
+
w: typeof window !== "undefined" ? Math.round(window.innerWidth * Math.min(window.devicePixelRatio, 2)) : 0,
|
|
59
|
+
h: typeof window !== "undefined" ? Math.round(window.innerHeight * Math.min(window.devicePixelRatio, 2)) : 0
|
|
60
|
+
}));
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (!isCapturesDOM) return;
|
|
63
|
+
setDomMounted(true);
|
|
64
|
+
const onResize = () => {
|
|
65
|
+
const d = Math.min(window.devicePixelRatio, 2);
|
|
66
|
+
setCaptureSize({
|
|
67
|
+
w: Math.round(window.innerWidth * d),
|
|
68
|
+
h: Math.round(window.innerHeight * d)
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
window.addEventListener("resize", onResize);
|
|
72
|
+
return () => window.removeEventListener("resize", onResize);
|
|
73
|
+
}, [isCapturesDOM]);
|
|
74
|
+
const detectedOrderRef = useRef(void 0);
|
|
75
|
+
const uniformsRef = useRef(null);
|
|
76
|
+
if (uniformsRef.current === null) {
|
|
77
|
+
setColorSpaceMode(shaderColorSpace);
|
|
78
|
+
uniformsRef.current = createUniformsMap(componentDefinition, effectiveProps, instanceId);
|
|
79
|
+
}
|
|
80
|
+
const childContextValue = useMemo(() => {
|
|
81
|
+
return {
|
|
82
|
+
...context,
|
|
83
|
+
shaderParentId: instanceId
|
|
84
|
+
};
|
|
85
|
+
}, [context, instanceId]);
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
if (!uniformsRef.current) return;
|
|
88
|
+
try {
|
|
89
|
+
const metadata = {
|
|
90
|
+
blendMode: props.blendMode || "normal",
|
|
91
|
+
opacity: props.opacity,
|
|
92
|
+
visible: props.visible === false ? false : true,
|
|
93
|
+
id: props.id,
|
|
94
|
+
mask: props.maskSource ? {
|
|
95
|
+
source: props.maskSource,
|
|
96
|
+
type: props.maskType || "alpha"
|
|
97
|
+
} : void 0,
|
|
98
|
+
maps: mapsFromProps,
|
|
99
|
+
renderOrder: props.renderOrder ?? detectedOrderRef.current,
|
|
100
|
+
transform: effectiveTransform
|
|
101
|
+
};
|
|
102
|
+
parentRegister(instanceId, componentDefinition.fragmentNode, parentId, metadata, uniformsRef.current, componentDefinition, isCapturesDOM ? captureCanvasRef.current ?? void 0 : void 0);
|
|
103
|
+
return () => {
|
|
104
|
+
parentRegister(instanceId, null, null, null, null);
|
|
105
|
+
};
|
|
106
|
+
} catch (error) {
|
|
107
|
+
console.error("Error registering shader node:", error);
|
|
108
|
+
return () => {};
|
|
109
|
+
}
|
|
110
|
+
}, [
|
|
111
|
+
instanceId,
|
|
112
|
+
parentId,
|
|
113
|
+
parentRegister,
|
|
114
|
+
domMounted
|
|
115
|
+
]);
|
|
116
|
+
useEffect(() => {
|
|
117
|
+
if (props.renderOrder === void 0 && markerRef.current) {
|
|
118
|
+
const parent = markerRef.current.parentElement;
|
|
119
|
+
if (parent) {
|
|
120
|
+
const siblings = parent.querySelectorAll(":scope > [data-shader-id]");
|
|
121
|
+
const position = Array.from(siblings).indexOf(markerRef.current);
|
|
122
|
+
if (position >= 0) {
|
|
123
|
+
detectedOrderRef.current = position;
|
|
124
|
+
parentMetadataUpdate(instanceId, { renderOrder: position });
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}, []);
|
|
129
|
+
const prevPropsRef = useRef({});
|
|
130
|
+
const mapsFromProps = useMemo(() => {
|
|
131
|
+
const maps = {};
|
|
132
|
+
for (const [key, value] of Object.entries(props)) if (key !== "children" && key !== "ref" && isPropDriver(value)) maps[key] = value;
|
|
133
|
+
return Object.keys(maps).length > 0 ? maps : void 0;
|
|
134
|
+
}, [props]);
|
|
135
|
+
useEffect(() => {
|
|
136
|
+
if (!uniformsRef.current) return;
|
|
137
|
+
try {
|
|
138
|
+
Object.entries(uniformsRef.current).forEach(([propName, uniformData]) => {
|
|
139
|
+
if (!uniformData || typeof uniformData !== "object") return;
|
|
140
|
+
const { uniform } = uniformData;
|
|
141
|
+
if (uniform?.value !== void 0 && propName in effectiveProps) {
|
|
142
|
+
const newValue = effectiveProps[propName];
|
|
143
|
+
if (isPropDriver(newValue)) return;
|
|
144
|
+
if (newValue !== prevPropsRef.current[propName]) {
|
|
145
|
+
parentUniformUpdate(instanceId, propName, newValue);
|
|
146
|
+
prevPropsRef.current[propName] = newValue;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
} catch (error) {
|
|
151
|
+
console.error("Error updating uniforms:", error);
|
|
152
|
+
}
|
|
153
|
+
}, [
|
|
154
|
+
effectiveProps,
|
|
155
|
+
instanceId,
|
|
156
|
+
parentUniformUpdate
|
|
157
|
+
]);
|
|
158
|
+
useEffect(() => {
|
|
159
|
+
try {
|
|
160
|
+
parentMetadataUpdate(instanceId, {
|
|
161
|
+
blendMode: props.blendMode || "normal",
|
|
162
|
+
opacity: props.opacity,
|
|
163
|
+
visible: props.visible === false ? false : true,
|
|
164
|
+
id: props.id,
|
|
165
|
+
mask: props.maskSource ? {
|
|
166
|
+
source: props.maskSource,
|
|
167
|
+
type: props.maskType || "alpha"
|
|
168
|
+
} : void 0,
|
|
169
|
+
maps: mapsFromProps,
|
|
170
|
+
renderOrder: props.renderOrder ?? detectedOrderRef.current,
|
|
171
|
+
transform: effectiveTransform
|
|
172
|
+
});
|
|
173
|
+
} catch (error) {
|
|
174
|
+
console.error("Error updating metadata:", error);
|
|
175
|
+
}
|
|
176
|
+
}, [
|
|
177
|
+
props.blendMode,
|
|
178
|
+
props.opacity,
|
|
179
|
+
props.visible,
|
|
180
|
+
props.maskSource,
|
|
181
|
+
props.maskType,
|
|
182
|
+
props.renderOrder,
|
|
183
|
+
props.id,
|
|
184
|
+
mapsFromProps,
|
|
185
|
+
effectiveTransform,
|
|
186
|
+
instanceId,
|
|
187
|
+
parentMetadataUpdate
|
|
188
|
+
]);
|
|
189
|
+
if (props.ref && typeof props.ref === "function") try {
|
|
190
|
+
props.ref(null);
|
|
191
|
+
} catch (e) {}
|
|
192
|
+
const captureCanvas = isCapturesDOM && domMounted ? createPortal(/* @__PURE__ */ jsx("canvas", {
|
|
193
|
+
ref: captureCanvasRef,
|
|
194
|
+
"layoutsubtree": "",
|
|
195
|
+
width: captureSize.w,
|
|
196
|
+
height: captureSize.h,
|
|
197
|
+
style: {
|
|
198
|
+
position: "fixed",
|
|
199
|
+
inset: 0,
|
|
200
|
+
width: "100vw",
|
|
201
|
+
height: "100vh",
|
|
202
|
+
zIndex: -9999
|
|
203
|
+
},
|
|
204
|
+
children: props.children
|
|
205
|
+
}), document.body) : null;
|
|
206
|
+
return /* @__PURE__ */ jsxs(ShaderContext.Provider, {
|
|
207
|
+
value: childContextValue,
|
|
208
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
209
|
+
ref: markerRef,
|
|
210
|
+
style: MARKER_STYLE,
|
|
211
|
+
"data-shader-id": instanceId,
|
|
212
|
+
children: !isCapturesDOM && props.children
|
|
213
|
+
}), captureCanvas]
|
|
214
|
+
});
|
|
215
|
+
};
|
|
216
|
+
var ReflectivePlane_default = ShaderComponent;
|
|
217
|
+
export { ShaderComponent, ReflectivePlane_default as default };
|
package/dist/react/Shader.js
CHANGED
|
@@ -89,7 +89,7 @@ const Shader = ({ children, disableTelemetry = false, colorSpace = "p3-linear",
|
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
91
|
if (rendererRef.current.getPerformanceStats().fps > 0) {
|
|
92
|
-
telemetryCollectorRef.current = startTelemetry(rendererRef.current, "2.5.
|
|
92
|
+
telemetryCollectorRef.current = startTelemetry(rendererRef.current, "2.5.123", disableTelemetry, isPreview);
|
|
93
93
|
if (telemetryCollectorRef.current) telemetryCollectorRef.current.start();
|
|
94
94
|
telemetryStartTimeoutRef.current = null;
|
|
95
95
|
} else telemetryStartTimeoutRef.current = window.setTimeout(checkRendering, 500);
|