shaders 2.5.94 → 2.5.96
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/Blur-CXXttTb1.js +138 -0
- package/dist/core/{ChannelBlur-CCaPXjka.js → ChannelBlur-gzP71FWd.js} +37 -2
- package/dist/core/{Crescent-DPxGWdPH.js → Crescent-BkRt-XWy.js} +1 -1
- package/dist/core/{Cross-CDyzf8TT.js → Cross-kkY7feuC.js} +1 -1
- package/dist/core/{Crystal-DSuN8TNY.js → Crystal-xVyUhVD-.js} +1 -1
- package/dist/core/CursorRipples-Cgm7N0Bp.js +289 -0
- package/dist/core/CursorTrail-CCRbdwHJ.js +263 -0
- package/dist/core/{Ellipse-BNmzdnpK.js → Ellipse-CXxGqTYI.js} +1 -1
- package/dist/core/{Emboss-nrduRrVs.js → Emboss-ClQV27Mt.js} +1 -1
- package/dist/core/{Flower-B4xPp0Qa.js → Flower-MAwlZEv8.js} +1 -1
- package/dist/core/{Glass-CRfTkmRy.js → Glass-DDBKYclp.js} +46 -8
- package/dist/core/Glow-BwaPYDRZ.js +174 -0
- package/dist/core/GridDistortion-DtaRNrTZ.js +278 -0
- package/dist/core/Liquify-cE5dxrfh.js +351 -0
- package/dist/core/{Neon-CUKnkAK8.js → Neon-Dg8UfC7P.js} +1 -1
- package/dist/core/{Polygon-C1y6Nyh4.js → Polygon-DRCs3CYs.js} +1 -1
- package/dist/core/ProgressiveBlur-B8xwWyTM.js +236 -0
- package/dist/core/{Ring-Chj1tp_P.js → Ring-QApyKPzE.js} +1 -1
- package/dist/core/{RoundedRect-BEj6tE1e.js → RoundedRect-Ca9af9xe.js} +1 -1
- package/dist/core/{Shatter-CZMOHj60.js → Shatter-BssZTRYJ.js} +154 -66
- package/dist/core/{Star-fPw1j10r.js → Star-DiXwnPGP.js} +1 -1
- package/dist/core/TiltShift-CI3FlfYk.js +252 -0
- package/dist/core/{Trapezoid-Cr61vRvN.js → Trapezoid-BX_hmeZJ.js} +1 -1
- package/dist/core/{Vesica-AXTA8DJU.js → Vesica-DU0f85NG.js} +1 -1
- package/dist/core/{VideoTexture-BobyGZGr.js → VideoTexture-DJrkry82.js} +1 -1
- package/dist/core/{WebcamTexture-BXj7sqND.js → WebcamTexture-Cf8J7JB1.js} +1 -1
- package/dist/core/computeBlur-C3oX720H.js +141 -0
- package/dist/core/effects/glass.d.ts +1 -1
- package/dist/core/effects/glass.d.ts.map +1 -1
- package/dist/core/index.js +213 -128
- package/dist/core/registry.js +102 -101
- package/dist/core/renderer.d.ts +19 -1
- package/dist/core/renderer.d.ts.map +1 -1
- package/dist/core/shaderRegistry-B_84rvO8.js +244 -0
- package/dist/core/shaders/Blur/index.d.ts.map +1 -1
- package/dist/core/shaders/Blur/index.js +2 -1
- package/dist/core/shaders/BrightnessContrast/index.js +1 -1
- package/dist/core/shaders/Bulge/index.js +1 -1
- package/dist/core/shaders/CRTScreen/index.js +1 -1
- package/dist/core/shaders/ChannelBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/ChannelBlur/index.js +2 -1
- package/dist/core/shaders/Checkerboard/index.js +1 -1
- package/dist/core/shaders/ChromaFlow/index.js +1 -1
- package/dist/core/shaders/ChromaticAberration/index.js +1 -1
- package/dist/core/shaders/Circle/index.js +1 -1
- package/dist/core/shaders/ConcentricSpin/index.js +1 -1
- package/dist/core/shaders/ConicGradient/index.js +1 -1
- package/dist/core/shaders/ContourLines/index.js +1 -1
- package/dist/core/shaders/Crescent/index.js +2 -2
- package/dist/core/shaders/Cross/index.js +2 -2
- package/dist/core/shaders/Crystal/index.js +2 -2
- package/dist/core/shaders/CursorRipples/index.d.ts.map +1 -1
- package/dist/core/shaders/CursorRipples/index.js +1 -1
- package/dist/core/shaders/CursorTrail/index.d.ts.map +1 -1
- package/dist/core/shaders/CursorTrail/index.js +1 -1
- package/dist/core/shaders/DOMTexture/index.js +1 -1
- package/dist/core/shaders/DiamondGradient/index.js +1 -1
- package/dist/core/shaders/DiffuseBlur/index.js +1 -1
- package/dist/core/shaders/Dither/index.js +1 -1
- package/dist/core/shaders/DotGrid/index.js +1 -1
- package/dist/core/shaders/DropShadow/index.js +1 -1
- package/dist/core/shaders/Duotone/index.js +1 -1
- package/dist/core/shaders/Ellipse/index.js +2 -2
- package/dist/core/shaders/Emboss/index.js +2 -2
- package/dist/core/shaders/FallingLines/index.js +1 -1
- package/dist/core/shaders/FilmGrain/index.js +1 -1
- package/dist/core/shaders/FloatingParticles/index.js +1 -1
- package/dist/core/shaders/FlowField/index.js +1 -1
- package/dist/core/shaders/Flower/index.js +2 -2
- package/dist/core/shaders/FlowingGradient/index.js +1 -1
- package/dist/core/shaders/Form3D/index.js +1 -1
- package/dist/core/shaders/Glass/index.d.ts.map +1 -1
- package/dist/core/shaders/Glass/index.js +3 -2
- package/dist/core/shaders/GlassTiles/index.js +1 -1
- package/dist/core/shaders/Glitch/index.js +1 -1
- package/dist/core/shaders/Glow/index.d.ts.map +1 -1
- package/dist/core/shaders/Glow/index.js +2 -1
- package/dist/core/shaders/Godrays/index.js +1 -1
- package/dist/core/shaders/Grayscale/index.js +1 -1
- package/dist/core/shaders/Grid/index.js +1 -1
- package/dist/core/shaders/GridDistortion/index.d.ts.map +1 -1
- package/dist/core/shaders/GridDistortion/index.js +1 -1
- package/dist/core/shaders/Group/index.js +1 -1
- package/dist/core/shaders/Halftone/index.js +1 -1
- package/dist/core/shaders/HexGrid/index.js +1 -1
- package/dist/core/shaders/HueShift/index.js +1 -1
- package/dist/core/shaders/ImageTexture/index.js +1 -1
- package/dist/core/shaders/Invert/index.js +1 -1
- package/dist/core/shaders/Kaleidoscope/index.js +1 -1
- package/dist/core/shaders/LensFlare/index.js +1 -1
- package/dist/core/shaders/LinearBlur/index.js +1 -1
- package/dist/core/shaders/LinearGradient/index.js +1 -1
- package/dist/core/shaders/Liquify/index.d.ts.map +1 -1
- package/dist/core/shaders/Liquify/index.js +1 -1
- package/dist/core/shaders/Mirror/index.js +1 -1
- package/dist/core/shaders/MultiPointGradient/index.js +1 -1
- package/dist/core/shaders/Neon/index.js +2 -2
- package/dist/core/shaders/Paper/index.js +1 -1
- package/dist/core/shaders/Perspective/index.js +1 -1
- package/dist/core/shaders/Pixelate/index.js +1 -1
- package/dist/core/shaders/Plasma/index.js +1 -1
- package/dist/core/shaders/PolarCoordinates/index.js +1 -1
- package/dist/core/shaders/Polygon/index.js +2 -2
- package/dist/core/shaders/Posterize/index.js +1 -1
- package/dist/core/shaders/ProgressiveBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/ProgressiveBlur/index.js +2 -1
- package/dist/core/shaders/RadialGradient/index.js +1 -1
- package/dist/core/shaders/RectangularCoordinates/index.js +1 -1
- package/dist/core/shaders/Ring/index.js +2 -2
- package/dist/core/shaders/Ripples/index.js +1 -1
- package/dist/core/shaders/RoundedRect/index.js +2 -2
- package/dist/core/shaders/Saturation/index.js +1 -1
- package/dist/core/shaders/Sharpness/index.js +1 -1
- package/dist/core/shaders/Shatter/index.d.ts.map +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/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 +2 -2
- 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/Swirl/index.js +1 -1
- package/dist/core/shaders/TiltShift/index.d.ts.map +1 -1
- package/dist/core/shaders/TiltShift/index.js +2 -1
- package/dist/core/shaders/Tint/index.js +1 -1
- package/dist/core/shaders/Trapezoid/index.js +2 -2
- 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/Vesica/index.js +2 -2
- 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/ZoomBlur/index.js +1 -1
- package/dist/core/types.d.ts +49 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/utilities/computeBlur.d.ts +50 -0
- package/dist/core/utilities/computeBlur.d.ts.map +1 -0
- package/dist/js/createShader.js +1 -1
- package/dist/react/Shader.js +1 -1
- package/dist/registry.js +2 -2
- package/dist/solid/engine/Shader.js +1 -1
- package/dist/svelte/index.js +1 -1
- package/dist/vue/Shader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/package.json +1 -1
- package/dist/core/Blur-DTyNQt1R.js +0 -78
- package/dist/core/CursorRipples-Bo-3LZoC.js +0 -186
- package/dist/core/CursorTrail-C-0lpOV1.js +0 -160
- package/dist/core/Glow-CKWIRcBt.js +0 -108
- package/dist/core/GridDistortion-DXM5MgSc.js +0 -183
- package/dist/core/Liquify-CqcAWBwZ.js +0 -228
- package/dist/core/ProgressiveBlur-BcHBSVDo.js +0 -128
- package/dist/core/TiltShift-BysRsV8v.js +0 -141
- package/dist/core/shaderRegistry-BzOzMO4V.js +0 -244
- /package/dist/core/{BrightnessContrast-BoR9bi58.js → BrightnessContrast-CJTOpQCn.js} +0 -0
- /package/dist/core/{Bulge-DN2R75Hp.js → Bulge-Chpbxxzj.js} +0 -0
- /package/dist/core/{CRTScreen-DolQEkb1.js → CRTScreen-CTwXU-NX.js} +0 -0
- /package/dist/core/{Checkerboard-_IUtUrDv.js → Checkerboard-ucave4-a.js} +0 -0
- /package/dist/core/{ChromaFlow-Cq6hDVjX.js → ChromaFlow-BZXyVHtK.js} +0 -0
- /package/dist/core/{ChromaticAberration-G8_bwQtD.js → ChromaticAberration-DsMj-vBw.js} +0 -0
- /package/dist/core/{Circle--0oHzoCi.js → Circle-QgCuVo44.js} +0 -0
- /package/dist/core/{ConcentricSpin-BzxzMieZ.js → ConcentricSpin-Crfxti93.js} +0 -0
- /package/dist/core/{ConicGradient-BXXizzIs.js → ConicGradient-CQAPYlQg.js} +0 -0
- /package/dist/core/{ContourLines-C0XSJEkE.js → ContourLines-KTHC32hd.js} +0 -0
- /package/dist/core/{DOMTexture-Dw3Qakny.js → DOMTexture-D-RkeyMs.js} +0 -0
- /package/dist/core/{DiamondGradient-TsOxHjg_.js → DiamondGradient-BC3ugP8a.js} +0 -0
- /package/dist/core/{DiffuseBlur-BqIV4JLM.js → DiffuseBlur-eyM1v3ad.js} +0 -0
- /package/dist/core/{Dither-D_YF6z03.js → Dither-CDfDotR6.js} +0 -0
- /package/dist/core/{DotGrid-CiDt4NmI.js → DotGrid-T9YbgC3V.js} +0 -0
- /package/dist/core/{DropShadow-BRoXryDA.js → DropShadow-jMhnYPXZ.js} +0 -0
- /package/dist/core/{Duotone-CGHcHB9f.js → Duotone-Bl02WcA2.js} +0 -0
- /package/dist/core/{FallingLines-vdw8KxhV.js → FallingLines-CArEXajJ.js} +0 -0
- /package/dist/core/{FilmGrain-BqQeKO6Z.js → FilmGrain-Ph73aoC_.js} +0 -0
- /package/dist/core/{FloatingParticles-DR5cv6Eh.js → FloatingParticles-BtwGRl_d.js} +0 -0
- /package/dist/core/{FlowField-DpP32B1X.js → FlowField-RyqiRxyI.js} +0 -0
- /package/dist/core/{FlowingGradient-lSouJxmq.js → FlowingGradient-C0Zoyfd6.js} +0 -0
- /package/dist/core/{Form3D-DQD-0zrd.js → Form3D-rKpxb9t3.js} +0 -0
- /package/dist/core/{GlassTiles-B7aAvcTQ.js → GlassTiles-k1C4a4u8.js} +0 -0
- /package/dist/core/{Glitch-CgmgjLea.js → Glitch-DzPMkBu4.js} +0 -0
- /package/dist/core/{Godrays-o-3Im6H1.js → Godrays-DAYmq-BP.js} +0 -0
- /package/dist/core/{Grayscale-Bip62olI.js → Grayscale-lYKBBkGY.js} +0 -0
- /package/dist/core/{Grid-hwQnF_hs.js → Grid-BJ-nxN3i.js} +0 -0
- /package/dist/core/{Group-BexPm4Fb.js → Group-DpozigtX.js} +0 -0
- /package/dist/core/{Halftone-onLYU4dF.js → Halftone-BVL2oy37.js} +0 -0
- /package/dist/core/{HexGrid-BkqEEgfh.js → HexGrid-D-EmQ4kI.js} +0 -0
- /package/dist/core/{HueShift-BldS-av9.js → HueShift-D9K0ynaS.js} +0 -0
- /package/dist/core/{ImageTexture-DLCjc5cM.js → ImageTexture-CArkZMfh.js} +0 -0
- /package/dist/core/{Invert-C2LI5GXr.js → Invert-DCnwo_Xq.js} +0 -0
- /package/dist/core/{Kaleidoscope-CxWjs5jx.js → Kaleidoscope-BytHro3k.js} +0 -0
- /package/dist/core/{LensFlare-BNO7tCXH.js → LensFlare-B0vv4x97.js} +0 -0
- /package/dist/core/{LinearBlur-Ds6rm8u-.js → LinearBlur-BFewxPjV.js} +0 -0
- /package/dist/core/{LinearGradient-BZjDhnZp.js → LinearGradient-BKUf_u7r.js} +0 -0
- /package/dist/core/{Mirror-5W3sul9v.js → Mirror-DIle92J8.js} +0 -0
- /package/dist/core/{MultiPointGradient-lpUGnrLq.js → MultiPointGradient-DDwac_mm.js} +0 -0
- /package/dist/core/{Paper-14yYPnWW.js → Paper-bMSMCeYK.js} +0 -0
- /package/dist/core/{Perspective-POVbIGPc.js → Perspective-BmfvQV6W.js} +0 -0
- /package/dist/core/{Pixelate-CxUxBDeN.js → Pixelate-Dl26r6IT.js} +0 -0
- /package/dist/core/{Plasma-DM9TU0VN.js → Plasma-CJWS1TvX.js} +0 -0
- /package/dist/core/{PolarCoordinates-t4Wa00gQ.js → PolarCoordinates-lq6K4WBm.js} +0 -0
- /package/dist/core/{Posterize-Dk4DE8Ee.js → Posterize-BjH7Zscm.js} +0 -0
- /package/dist/core/{RadialGradient-CSXQIa5L.js → RadialGradient-DiGFPgrn.js} +0 -0
- /package/dist/core/{RectangularCoordinates-YaZ_uRXb.js → RectangularCoordinates-COkNDxi0.js} +0 -0
- /package/dist/core/{Ripples-wJx2FwJY.js → Ripples-C8Q17Hvz.js} +0 -0
- /package/dist/core/{Saturation-B500nPZH.js → Saturation-CgDaiq6n.js} +0 -0
- /package/dist/core/{Sharpness-NqY4_gKZ.js → Sharpness-CRXT0D30.js} +0 -0
- /package/dist/core/{SimplexNoise-2-J7EbY9.js → SimplexNoise-KfTCAfpL.js} +0 -0
- /package/dist/core/{SineWave-OWJVWsI1.js → SineWave-Ckeap_YM.js} +0 -0
- /package/dist/core/{Solarize-CEhQxL9Z.js → Solarize-DhtQYYpW.js} +0 -0
- /package/dist/core/{SolidColor-Dlzm61ZG.js → SolidColor-6yUkGybH.js} +0 -0
- /package/dist/core/{Spherize-CXf4_Mkm.js → Spherize-8LXrGGG_.js} +0 -0
- /package/dist/core/{Spiral-CSXNX92f.js → Spiral-Bs7uZrBr.js} +0 -0
- /package/dist/core/{Strands-BPVy1zbt.js → Strands-DsAAVemq.js} +0 -0
- /package/dist/core/{Stretch-CFAjfvny.js → Stretch-D7P2R5lV.js} +0 -0
- /package/dist/core/{Stripes-BSGzno-I.js → Stripes-DF8agIiJ.js} +0 -0
- /package/dist/core/{StudioBackground-81AihXcZ.js → StudioBackground-BFeNfwEu.js} +0 -0
- /package/dist/core/{Swirl-D_ZvZtDS.js → Swirl-BwezrSAA.js} +0 -0
- /package/dist/core/{Tint-C6xN-Qot.js → Tint-BdXlqlzz.js} +0 -0
- /package/dist/core/{Tritone-Dk8GcpYo.js → Tritone-BlJ7cchN.js} +0 -0
- /package/dist/core/{Truchet-BFd2XYD3.js → Truchet-Bnn0fwbF.js} +0 -0
- /package/dist/core/{Twirl-CA0r8U7e.js → Twirl-C5ijhqz1.js} +0 -0
- /package/dist/core/{Vibrance-Dq1jBFJb.js → Vibrance-dqIV6GBe.js} +0 -0
- /package/dist/core/{Vignette-DB8x78Up.js → Vignette-DB1wO1dm.js} +0 -0
- /package/dist/core/{Voronoi-ALXxxHBo.js → Voronoi-C3WIJFWc.js} +0 -0
- /package/dist/core/{WaveDistortion-CHb75HO3.js → WaveDistortion-BKma8-Ju.js} +0 -0
- /package/dist/core/{Weave-j4CrCig4.js → Weave-xuu_vQ5e.js} +0 -0
- /package/dist/core/{ZoomBlur-Cl75kL8E.js → ZoomBlur-UcS2iFT2.js} +0 -0
- /package/dist/core/{browser-DIoaEnIX.js → browser-ClWxLlIB.js} +0 -0
- /package/dist/core/{sdf-Bux00UoZ.js → sdf-DyC2H_qS.js} +0 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { l as transformPosition, r as transformAngle } from "./transformations-B5lM6fYX.js";
|
|
2
|
+
import { t as unpremultiplyAlpha } from "./alpha-C4ptedXe.js";
|
|
3
|
+
import { n as createVariableGaussianBlurCompute } from "./computeBlur-C3oX720H.js";
|
|
4
|
+
import { Fn, If, abs, clamp, convertToTexture, cos, dot, float, instanceIndex, int, mix, pow, radians, screenUV, sin, smoothstep, texture, textureLoad, textureStore, uint, uniform, uvec2, vec2, vec3, vec4, viewportSize } from "three/tsl";
|
|
5
|
+
const componentDefinition = {
|
|
6
|
+
name: "TiltShift",
|
|
7
|
+
category: "Blurs",
|
|
8
|
+
description: "Selective focus blur mimicking tilt-shift photography",
|
|
9
|
+
requiresRTT: true,
|
|
10
|
+
requiresChild: true,
|
|
11
|
+
props: {
|
|
12
|
+
intensity: {
|
|
13
|
+
default: 50,
|
|
14
|
+
description: "Maximum blur intensity at edges",
|
|
15
|
+
ui: {
|
|
16
|
+
type: ["range", "map"],
|
|
17
|
+
min: 0,
|
|
18
|
+
max: 100,
|
|
19
|
+
step: 1,
|
|
20
|
+
label: "Intensity",
|
|
21
|
+
group: "Effect"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
width: {
|
|
25
|
+
default: .3,
|
|
26
|
+
description: "Width of the sharp focus area",
|
|
27
|
+
ui: {
|
|
28
|
+
type: ["range", "map"],
|
|
29
|
+
min: 0,
|
|
30
|
+
max: 1,
|
|
31
|
+
step: .1,
|
|
32
|
+
label: "Width",
|
|
33
|
+
group: "Effect"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
falloff: {
|
|
37
|
+
default: .3,
|
|
38
|
+
description: "Distance over which blur transitions to full strength",
|
|
39
|
+
ui: {
|
|
40
|
+
type: ["range", "map"],
|
|
41
|
+
min: 0,
|
|
42
|
+
max: 1,
|
|
43
|
+
step: .1,
|
|
44
|
+
label: "Falloff",
|
|
45
|
+
group: "Effect"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
angle: {
|
|
49
|
+
default: 0,
|
|
50
|
+
transform: transformAngle,
|
|
51
|
+
description: "Rotation angle of the focus line (in degrees)",
|
|
52
|
+
ui: {
|
|
53
|
+
type: ["range", "map"],
|
|
54
|
+
min: 0,
|
|
55
|
+
max: 360,
|
|
56
|
+
step: 1,
|
|
57
|
+
label: "Angle",
|
|
58
|
+
group: "Effect"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
center: {
|
|
62
|
+
default: {
|
|
63
|
+
x: .5,
|
|
64
|
+
y: .5
|
|
65
|
+
},
|
|
66
|
+
transform: transformPosition,
|
|
67
|
+
description: "Center point of the focus line",
|
|
68
|
+
ui: {
|
|
69
|
+
type: "position",
|
|
70
|
+
label: "Center",
|
|
71
|
+
group: "Position"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
computeNode: ({ childNode, onCleanup, dimensions, renderer, uniforms }) => {
|
|
76
|
+
if (!childNode) return null;
|
|
77
|
+
if (uniforms.angle.mapComputeInfo || uniforms.width.mapComputeInfo || uniforms.falloff.mapComputeInfo) return null;
|
|
78
|
+
const childTexture = convertToTexture(childNode);
|
|
79
|
+
onCleanup(() => {
|
|
80
|
+
if (childTexture?.renderTarget?.dispose) childTexture.renderTarget.dispose();
|
|
81
|
+
});
|
|
82
|
+
const dpr = renderer?.getPixelRatio?.() ?? 1;
|
|
83
|
+
const texWidth = Math.round(dimensions.width * dpr);
|
|
84
|
+
const texHeight = Math.round(dimensions.height * dpr);
|
|
85
|
+
const { computeNodes: blurNodes, outputTexture, blurMapWriteNode } = createVariableGaussianBlurCompute(childTexture, texWidth, texHeight, onCleanup);
|
|
86
|
+
const angleU = uniform(0);
|
|
87
|
+
const centerXU = uniform(.5);
|
|
88
|
+
const centerYU = uniform(.5);
|
|
89
|
+
const focusWidthU = uniform(.15);
|
|
90
|
+
const falloffU = uniform(.3);
|
|
91
|
+
const aspectU = uniform(1);
|
|
92
|
+
const w = uint(texWidth);
|
|
93
|
+
const h = uint(texHeight);
|
|
94
|
+
function readScalar(entry) {
|
|
95
|
+
return entry.getCpuValue?.() ?? (typeof entry.uniform.value === "number" ? entry.uniform.value : null);
|
|
96
|
+
}
|
|
97
|
+
function updateGeometryUniforms() {
|
|
98
|
+
const angleVal = readScalar(uniforms.angle);
|
|
99
|
+
if (angleVal !== null) angleU.value = angleVal;
|
|
100
|
+
const centerXVal = uniforms.center.uniform.value?.x ?? uniforms.center.uniform.x?.value;
|
|
101
|
+
if (typeof centerXVal === "number") centerXU.value = centerXVal;
|
|
102
|
+
const centerYVal = uniforms.center.uniform.value?.y ?? uniforms.center.uniform.y?.value;
|
|
103
|
+
if (typeof centerYVal === "number") centerYU.value = centerYVal;
|
|
104
|
+
const widthVal = readScalar(uniforms.width);
|
|
105
|
+
if (widthVal !== null) focusWidthU.value = widthVal * .5;
|
|
106
|
+
const falloffVal = readScalar(uniforms.falloff);
|
|
107
|
+
if (falloffVal !== null) falloffU.value = falloffVal;
|
|
108
|
+
aspectU.value = dimensions.width / dimensions.height;
|
|
109
|
+
}
|
|
110
|
+
const intensityMapInfo = uniforms.intensity.mapComputeInfo;
|
|
111
|
+
if (intensityMapInfo) {
|
|
112
|
+
const { sourceTexture, channel, inputMin, inputMax, outputMin, outputMax, curve } = intensityMapInfo;
|
|
113
|
+
const fillBlurMap$1 = Fn(() => {
|
|
114
|
+
const idx = instanceIndex;
|
|
115
|
+
const x = idx.mod(w);
|
|
116
|
+
const y = idx.div(w);
|
|
117
|
+
If(y.lessThan(h), () => {
|
|
118
|
+
const u = x.toFloat().add(float(.5)).div(float(texWidth));
|
|
119
|
+
const v = y.toFloat().add(float(.5)).div(float(texHeight));
|
|
120
|
+
const angleRad = angleU.mul(float(Math.PI / 180));
|
|
121
|
+
const perpVector = vec2(angleRad.sin().negate(), angleRad.cos());
|
|
122
|
+
const centerPos = vec2(centerXU, float(1).sub(centerYU));
|
|
123
|
+
const centeredUV = vec2(u, v).sub(centerPos);
|
|
124
|
+
const distFromLine = abs(dot(vec2(centeredUV.x.mul(aspectU), centeredUV.y), perpVector));
|
|
125
|
+
const blurAmount = smoothstep(focusWidthU, focusWidthU.add(falloffU), distFromLine);
|
|
126
|
+
const mapSample = textureLoad(sourceTexture, uvec2(x, y), int(0));
|
|
127
|
+
let raw;
|
|
128
|
+
if (channel === "alpha") raw = mapSample.a;
|
|
129
|
+
else if (channel === "alphaInverted") raw = mapSample.a.oneMinus();
|
|
130
|
+
else if (channel === "luminanceInverted") raw = dot(mapSample.rgb, vec3(.2126, .7152, .0722)).oneMinus();
|
|
131
|
+
else raw = dot(mapSample.rgb, vec3(.2126, .7152, .0722));
|
|
132
|
+
const inputRange = inputMax.sub(inputMin).max(float(1e-4));
|
|
133
|
+
const maxRadius = mix(outputMin, outputMax, pow(clamp(raw.sub(inputMin).div(inputRange), float(0), float(1)), pow(float(2), curve.negate().mul(float(2))))).mul(float(.36));
|
|
134
|
+
const radius = blurAmount.mul(maxRadius);
|
|
135
|
+
textureStore(blurMapWriteNode, uvec2(x, y), vec4(radius, float(0), float(0), float(1))).toWriteOnly();
|
|
136
|
+
});
|
|
137
|
+
})().compute(texWidth * texHeight, [256]);
|
|
138
|
+
return {
|
|
139
|
+
outputs: {
|
|
140
|
+
childTexture,
|
|
141
|
+
blurredTexture: outputTexture
|
|
142
|
+
},
|
|
143
|
+
getComputeNodes: () => {
|
|
144
|
+
updateGeometryUniforms();
|
|
145
|
+
return [fillBlurMap$1, ...blurNodes];
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
const maxRadiusU = uniform(18);
|
|
150
|
+
const fillBlurMap = Fn(() => {
|
|
151
|
+
const idx = instanceIndex;
|
|
152
|
+
const x = idx.mod(w);
|
|
153
|
+
const y = idx.div(w);
|
|
154
|
+
If(y.lessThan(h), () => {
|
|
155
|
+
const u = x.toFloat().add(float(.5)).div(float(texWidth));
|
|
156
|
+
const v = y.toFloat().add(float(.5)).div(float(texHeight));
|
|
157
|
+
const angleRad = angleU.mul(float(Math.PI / 180));
|
|
158
|
+
const perpVector = vec2(angleRad.sin().negate(), angleRad.cos());
|
|
159
|
+
const centerPos = vec2(centerXU, float(1).sub(centerYU));
|
|
160
|
+
const centeredUV = vec2(u, v).sub(centerPos);
|
|
161
|
+
const distFromLine = abs(dot(vec2(centeredUV.x.mul(aspectU), centeredUV.y), perpVector));
|
|
162
|
+
const radius = smoothstep(focusWidthU, focusWidthU.add(falloffU), distFromLine).mul(maxRadiusU);
|
|
163
|
+
textureStore(blurMapWriteNode, uvec2(x, y), vec4(radius, float(0), float(0), float(1))).toWriteOnly();
|
|
164
|
+
});
|
|
165
|
+
})().compute(texWidth * texHeight, [256]);
|
|
166
|
+
return {
|
|
167
|
+
outputs: {
|
|
168
|
+
childTexture,
|
|
169
|
+
blurredTexture: outputTexture
|
|
170
|
+
},
|
|
171
|
+
getComputeNodes: () => {
|
|
172
|
+
updateGeometryUniforms();
|
|
173
|
+
const intensityVal = readScalar(uniforms.intensity);
|
|
174
|
+
if (intensityVal !== null) maxRadiusU.value = intensityVal * .36;
|
|
175
|
+
return [fillBlurMap, ...blurNodes];
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
},
|
|
179
|
+
fragmentNode: ({ uniforms, childNode, onCleanup, computeOutputs }) => {
|
|
180
|
+
if (!childNode) return vec4(0, 0, 0, 0);
|
|
181
|
+
if (computeOutputs?.blurredTexture) {
|
|
182
|
+
const sharp = computeOutputs.childTexture.sample(screenUV);
|
|
183
|
+
const blurred = texture(computeOutputs.blurredTexture).sample(screenUV);
|
|
184
|
+
const propsPin = uniforms.intensity.uniform.mul(float(0)).add(uniforms.width.uniform.mul(float(0))).add(uniforms.falloff.uniform.mul(float(0))).add(uniforms.angle.uniform.mul(float(0)));
|
|
185
|
+
return unpremultiplyAlpha(vec4(blurred.rgb.add(propsPin), sharp.a));
|
|
186
|
+
}
|
|
187
|
+
const childTexture = convertToTexture(childNode);
|
|
188
|
+
onCleanup(() => {
|
|
189
|
+
if (childTexture?.renderTarget?.dispose) childTexture.renderTarget.dispose();
|
|
190
|
+
});
|
|
191
|
+
const aspect = viewportSize.x.div(viewportSize.y);
|
|
192
|
+
const angleRad = radians(uniforms.angle.uniform);
|
|
193
|
+
const cosAngle = cos(angleRad);
|
|
194
|
+
const perpVector = vec2(sin(angleRad).negate(), cosAngle);
|
|
195
|
+
const centerPosition = vec2(uniforms.center.uniform[0], uniforms.center.uniform[1].oneMinus());
|
|
196
|
+
const centeredUV = screenUV.sub(centerPosition);
|
|
197
|
+
const distFromLine = abs(dot(vec2(centeredUV.x.mul(aspect), centeredUV.y), perpVector));
|
|
198
|
+
const focusWidth = uniforms.width.uniform.mul(.5);
|
|
199
|
+
const falloff = uniforms.falloff.uniform;
|
|
200
|
+
const blurAmount = smoothstep(focusWidth, focusWidth.add(falloff), distFromLine);
|
|
201
|
+
const scaledIntensity = uniforms.intensity.uniform.mul(.06);
|
|
202
|
+
const blurRadius = blurAmount.mul(scaledIntensity);
|
|
203
|
+
const weights = [
|
|
204
|
+
.056,
|
|
205
|
+
.135,
|
|
206
|
+
.278,
|
|
207
|
+
.487,
|
|
208
|
+
.726,
|
|
209
|
+
.923,
|
|
210
|
+
1,
|
|
211
|
+
.923,
|
|
212
|
+
.726,
|
|
213
|
+
.487,
|
|
214
|
+
.278,
|
|
215
|
+
.135,
|
|
216
|
+
.056
|
|
217
|
+
];
|
|
218
|
+
const weightSum = 6.21;
|
|
219
|
+
const horizontalTexture = convertToTexture(Fn(() => {
|
|
220
|
+
const uv$1 = screenUV;
|
|
221
|
+
const pixelSize = vec2(1).div(viewportSize);
|
|
222
|
+
const total = vec4(0).toVar();
|
|
223
|
+
for (let x = -6; x <= 6; x++) {
|
|
224
|
+
const weight = float(weights[x + 6] / weightSum);
|
|
225
|
+
const offset = vec2(float(x), float(0)).mul(blurRadius).mul(pixelSize);
|
|
226
|
+
const sampleCoord = uv$1.add(offset);
|
|
227
|
+
const sample = childTexture.sample(sampleCoord).mul(weight);
|
|
228
|
+
total.assign(total.add(sample));
|
|
229
|
+
}
|
|
230
|
+
return total;
|
|
231
|
+
})());
|
|
232
|
+
onCleanup(() => {
|
|
233
|
+
if (horizontalTexture?.renderTarget?.dispose) horizontalTexture.renderTarget.dispose();
|
|
234
|
+
});
|
|
235
|
+
return Fn(() => {
|
|
236
|
+
const uv$1 = screenUV;
|
|
237
|
+
const pixelSize = vec2(1).div(viewportSize);
|
|
238
|
+
const total = vec4(0).toVar();
|
|
239
|
+
for (let y = -6; y <= 6; y++) {
|
|
240
|
+
const weight = float(weights[y + 6] / weightSum);
|
|
241
|
+
const offset = vec2(float(0), float(y)).mul(blurRadius).mul(pixelSize);
|
|
242
|
+
const sampleCoord = uv$1.add(offset);
|
|
243
|
+
const sample = horizontalTexture.sample(sampleCoord).mul(weight);
|
|
244
|
+
total.assign(total.add(sample));
|
|
245
|
+
}
|
|
246
|
+
const blurred = total;
|
|
247
|
+
return unpremultiplyAlpha(mix(childTexture.sample(uv$1), blurred, blurAmount));
|
|
248
|
+
})();
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
var TiltShift_default = componentDefinition;
|
|
252
|
+
export { componentDefinition as n, TiltShift_default as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as transformColor, l as transformPosition, o as transformColorSpace, t as colorSpaceOptions } from "./transformations-B5lM6fYX.js";
|
|
2
2
|
import { t as mixColors } from "./colorMixing-BPpDnR5I.js";
|
|
3
|
-
import { f as trapezoidSdf } from "./sdf-
|
|
3
|
+
import { f as trapezoidSdf } from "./sdf-DyC2H_qS.js";
|
|
4
4
|
import { cos, float, screenUV, sin, smoothstep, vec2, vec4, viewportSize } from "three/tsl";
|
|
5
5
|
var transformStrokePosition = (value) => {
|
|
6
6
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as transformColor, l as transformPosition, o as transformColorSpace, t as colorSpaceOptions } from "./transformations-B5lM6fYX.js";
|
|
2
2
|
import { t as mixColors } from "./colorMixing-BPpDnR5I.js";
|
|
3
|
-
import { p as vesicaSdf } from "./sdf-
|
|
3
|
+
import { p as vesicaSdf } from "./sdf-DyC2H_qS.js";
|
|
4
4
|
import { cos, float, screenUV, sin, smoothstep, vec2, vec4, viewportSize } from "three/tsl";
|
|
5
5
|
var transformStrokePosition = (value) => {
|
|
6
6
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as needsVideoCanvasWorkaround } from "./browser-
|
|
1
|
+
import { t as needsVideoCanvasWorkaround } from "./browser-ClWxLlIB.js";
|
|
2
2
|
import { CanvasTexture, SRGBColorSpace, VideoTexture } from "three/webgpu";
|
|
3
3
|
import { float, max, min, or, screenUV, select, step, texture, uniform, vec2, vec4, viewportSize } from "three/tsl";
|
|
4
4
|
const componentDefinition = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as needsVideoCanvasWorkaround } from "./browser-
|
|
1
|
+
import { t as needsVideoCanvasWorkaround } from "./browser-ClWxLlIB.js";
|
|
2
2
|
import { CanvasTexture, SRGBColorSpace, VideoTexture } from "three/webgpu";
|
|
3
3
|
import { float, max, min, or, screenUV, select, step, texture, uniform, vec2, vec4, viewportSize } from "three/tsl";
|
|
4
4
|
const componentDefinition = {
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { StorageTexture } from "three/webgpu";
|
|
2
|
+
import { FloatType } from "three";
|
|
3
|
+
import { Fn, If, float, instanceIndex, int, storageTexture, textureLoad, textureStore, uint, uniformArray, uvec2, vec4 } from "three/tsl";
|
|
4
|
+
var HALF_KERNEL = 24;
|
|
5
|
+
var KERNEL_SIZE = HALF_KERNEL * 2 + 1;
|
|
6
|
+
var VAR_SIGMA = HALF_KERNEL / 3;
|
|
7
|
+
var FIXED_WEIGHTS = [];
|
|
8
|
+
var fixedWeightSum = 0;
|
|
9
|
+
for (let i = -HALF_KERNEL; i <= HALF_KERNEL; i++) {
|
|
10
|
+
const w = Math.exp(-(i * i) / (2 * VAR_SIGMA * VAR_SIGMA));
|
|
11
|
+
FIXED_WEIGHTS.push(w);
|
|
12
|
+
fixedWeightSum += w;
|
|
13
|
+
}
|
|
14
|
+
for (let i = 0; i < KERNEL_SIZE; i++) FIXED_WEIGHTS[i] /= fixedWeightSum;
|
|
15
|
+
function createGaussianBlurCompute(inputTexture, width, height, onCleanup) {
|
|
16
|
+
const intermediateTex = new StorageTexture(width, height);
|
|
17
|
+
intermediateTex.type = FloatType;
|
|
18
|
+
const outputTex = new StorageTexture(width, height);
|
|
19
|
+
outputTex.type = FloatType;
|
|
20
|
+
onCleanup(() => {
|
|
21
|
+
intermediateTex.dispose();
|
|
22
|
+
outputTex.dispose();
|
|
23
|
+
});
|
|
24
|
+
const intermediateWriteNode = storageTexture(intermediateTex);
|
|
25
|
+
const intermediateReadNode = storageTexture(intermediateTex).toReadOnly();
|
|
26
|
+
const outputNode = storageTexture(outputTex);
|
|
27
|
+
const weights = uniformArray(new Array(KERNEL_SIZE).fill(0), "float");
|
|
28
|
+
let lastRadius = -1;
|
|
29
|
+
const w = uint(width);
|
|
30
|
+
const h = uint(height);
|
|
31
|
+
const wm1 = int(width - 1);
|
|
32
|
+
const hm1 = int(height - 1);
|
|
33
|
+
const horizontalPass = Fn(() => {
|
|
34
|
+
const idx = instanceIndex;
|
|
35
|
+
const x = idx.mod(w);
|
|
36
|
+
const y = idx.div(w);
|
|
37
|
+
If(y.lessThan(h), () => {
|
|
38
|
+
const sum = vec4(0).toVar();
|
|
39
|
+
const xi = x.toInt();
|
|
40
|
+
for (let i = -HALF_KERNEL; i <= HALF_KERNEL; i++) {
|
|
41
|
+
const texel = textureLoad(inputTexture, uvec2(xi.add(int(i)).clamp(int(0), wm1).toUint(), y), int(0));
|
|
42
|
+
sum.assign(sum.add(texel.mul(weights.element(int(i + HALF_KERNEL)))));
|
|
43
|
+
}
|
|
44
|
+
textureStore(intermediateWriteNode, uvec2(x, y), sum).toWriteOnly();
|
|
45
|
+
});
|
|
46
|
+
})().compute(width * height, [256]);
|
|
47
|
+
const verticalPass = Fn(() => {
|
|
48
|
+
const idx = instanceIndex;
|
|
49
|
+
const x = idx.mod(w);
|
|
50
|
+
const y = idx.div(w);
|
|
51
|
+
If(y.lessThan(h), () => {
|
|
52
|
+
const sum = vec4(0).toVar();
|
|
53
|
+
for (let i = -HALF_KERNEL; i <= HALF_KERNEL; i++) {
|
|
54
|
+
const texel = textureLoad(intermediateReadNode, uvec2(x, y.toInt().add(int(i)).clamp(int(0), hm1).toUint()), int(0));
|
|
55
|
+
sum.assign(sum.add(texel.mul(weights.element(int(i + HALF_KERNEL)))));
|
|
56
|
+
}
|
|
57
|
+
textureStore(outputNode, uvec2(x, y), sum).toWriteOnly();
|
|
58
|
+
});
|
|
59
|
+
})().compute(width * height, [256]);
|
|
60
|
+
function updateRadius(pixelRadius) {
|
|
61
|
+
if (Math.abs(pixelRadius - lastRadius) < .01) return;
|
|
62
|
+
lastRadius = pixelRadius;
|
|
63
|
+
const sigma = Math.max(pixelRadius * .5, .001);
|
|
64
|
+
const newWeights = new Array(KERNEL_SIZE);
|
|
65
|
+
let total = 0;
|
|
66
|
+
for (let i = -HALF_KERNEL; i <= HALF_KERNEL; i++) {
|
|
67
|
+
const w$1 = Math.exp(-(i * i) / (2 * sigma * sigma));
|
|
68
|
+
newWeights[i + HALF_KERNEL] = w$1;
|
|
69
|
+
total += w$1;
|
|
70
|
+
}
|
|
71
|
+
for (let i = 0; i < KERNEL_SIZE; i++) newWeights[i] /= total;
|
|
72
|
+
weights.array = newWeights;
|
|
73
|
+
}
|
|
74
|
+
updateRadius(4);
|
|
75
|
+
return {
|
|
76
|
+
computeNodes: [horizontalPass, verticalPass],
|
|
77
|
+
outputTexture: outputTex,
|
|
78
|
+
updateRadius
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function createVariableGaussianBlurCompute(inputTexture, width, height, onCleanup) {
|
|
82
|
+
const blurMapTex = new StorageTexture(width, height);
|
|
83
|
+
blurMapTex.type = FloatType;
|
|
84
|
+
const blurMapWriteNode = storageTexture(blurMapTex);
|
|
85
|
+
const blurMapReadNode = storageTexture(blurMapTex).toReadOnly();
|
|
86
|
+
const intermediateTex = new StorageTexture(width, height);
|
|
87
|
+
intermediateTex.type = FloatType;
|
|
88
|
+
const outputTex = new StorageTexture(width, height);
|
|
89
|
+
outputTex.type = FloatType;
|
|
90
|
+
onCleanup(() => {
|
|
91
|
+
blurMapTex.dispose();
|
|
92
|
+
intermediateTex.dispose();
|
|
93
|
+
outputTex.dispose();
|
|
94
|
+
});
|
|
95
|
+
const intermediateWriteNode = storageTexture(intermediateTex);
|
|
96
|
+
const intermediateReadNode = storageTexture(intermediateTex).toReadOnly();
|
|
97
|
+
const outputNode = storageTexture(outputTex);
|
|
98
|
+
const weights = uniformArray(FIXED_WEIGHTS, "float");
|
|
99
|
+
const w = uint(width);
|
|
100
|
+
const h = uint(height);
|
|
101
|
+
const wm1 = int(width - 1);
|
|
102
|
+
const hm1 = int(height - 1);
|
|
103
|
+
const invHalf = float(1 / HALF_KERNEL);
|
|
104
|
+
return {
|
|
105
|
+
computeNodes: [Fn(() => {
|
|
106
|
+
const idx = instanceIndex;
|
|
107
|
+
const x = idx.mod(w);
|
|
108
|
+
const y = idx.div(w);
|
|
109
|
+
If(y.lessThan(h), () => {
|
|
110
|
+
const blurRadius = textureLoad(blurMapReadNode, uvec2(x, y), int(0)).r;
|
|
111
|
+
const sum = vec4(0).toVar();
|
|
112
|
+
const xi = x.toInt();
|
|
113
|
+
for (let i = -HALF_KERNEL; i <= HALF_KERNEL; i++) {
|
|
114
|
+
const offset = float(i).mul(invHalf).mul(blurRadius);
|
|
115
|
+
const texel = textureLoad(inputTexture, uvec2(xi.add(offset.round().toInt()).clamp(int(0), wm1).toUint(), y), int(0));
|
|
116
|
+
sum.assign(sum.add(texel.mul(weights.element(int(i + HALF_KERNEL)))));
|
|
117
|
+
}
|
|
118
|
+
textureStore(intermediateWriteNode, uvec2(x, y), sum).toWriteOnly();
|
|
119
|
+
});
|
|
120
|
+
})().compute(width * height, [256]), Fn(() => {
|
|
121
|
+
const idx = instanceIndex;
|
|
122
|
+
const x = idx.mod(w);
|
|
123
|
+
const y = idx.div(w);
|
|
124
|
+
If(y.lessThan(h), () => {
|
|
125
|
+
const blurRadius = textureLoad(blurMapReadNode, uvec2(x, y), int(0)).r;
|
|
126
|
+
const sum = vec4(0).toVar();
|
|
127
|
+
const yi = y.toInt();
|
|
128
|
+
for (let i = -HALF_KERNEL; i <= HALF_KERNEL; i++) {
|
|
129
|
+
const offset = float(i).mul(invHalf).mul(blurRadius);
|
|
130
|
+
const texel = textureLoad(intermediateReadNode, uvec2(x, yi.add(offset.round().toInt()).clamp(int(0), hm1).toUint()), int(0));
|
|
131
|
+
sum.assign(sum.add(texel.mul(weights.element(int(i + HALF_KERNEL)))));
|
|
132
|
+
}
|
|
133
|
+
textureStore(outputNode, uvec2(x, y), sum).toWriteOnly();
|
|
134
|
+
});
|
|
135
|
+
})().compute(width * height, [256])],
|
|
136
|
+
outputTexture: outputTex,
|
|
137
|
+
blurMapTexture: blurMapTex,
|
|
138
|
+
blurMapWriteNode
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
export { createVariableGaussianBlurCompute as n, createGaussianBlurCompute as t };
|
|
@@ -61,5 +61,5 @@ export interface GlassEffectUniforms {
|
|
|
61
61
|
uniform: any;
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
export declare function applyGlassEffect(childTexture: any, sdfSampler: (uv: any) => any, uniforms: GlassEffectUniforms & UniformsMap, onBeforeRender?: (callback: () => void) => void): Node;
|
|
64
|
+
export declare function applyGlassEffect(childTexture: any, sdfSampler: (uv: any) => any, uniforms: GlassEffectUniforms & UniformsMap, onBeforeRender?: (callback: () => void) => void, blurredTexture?: any): Node;
|
|
65
65
|
//# sourceMappingURL=glass.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glass.d.ts","sourceRoot":"","sources":["../../src/effects/glass.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,UAAU,CAAA;AAMzC,eAAO,MAAM,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAO,CAAA;AAO/C,MAAM,WAAW,mBAAmB;IAChC,MAAM,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACxB,KAAK,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACvB,YAAY,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC9B,UAAU,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC5B,SAAS,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC3B,UAAU,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC5B,IAAI,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACtB,SAAS,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC3B,aAAa,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC/B,sBAAsB,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACxC,UAAU,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC5B,SAAS,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC3B,cAAc,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAChC,iBAAiB,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACnC,OAAO,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACzB,YAAY,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC9B,eAAe,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACjC,MAAM,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACxB,SAAS,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;CAC9B;AAgBD,wBAAgB,gBAAgB,CAC5B,YAAY,EAAE,GAAG,EACjB,UAAU,EAAE,CAAC,EAAE,EAAE,GAAG,KAAK,GAAG,EAC5B,QAAQ,EAAE,mBAAmB,GAAG,WAAW,EAC3C,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,IAAI,
|
|
1
|
+
{"version":3,"file":"glass.d.ts","sourceRoot":"","sources":["../../src/effects/glass.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,UAAU,CAAA;AAMzC,eAAO,MAAM,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAO,CAAA;AAO/C,MAAM,WAAW,mBAAmB;IAChC,MAAM,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACxB,KAAK,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACvB,YAAY,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC9B,UAAU,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC5B,SAAS,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC3B,UAAU,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC5B,IAAI,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACtB,SAAS,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC3B,aAAa,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC/B,sBAAsB,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACxC,UAAU,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC5B,SAAS,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC3B,cAAc,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAChC,iBAAiB,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACnC,OAAO,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACzB,YAAY,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC9B,eAAe,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACjC,MAAM,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACxB,SAAS,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;CAC9B;AAgBD,wBAAgB,gBAAgB,CAC5B,YAAY,EAAE,GAAG,EACjB,UAAU,EAAE,CAAC,EAAE,EAAE,GAAG,KAAK,GAAG,EAC5B,QAAQ,EAAE,mBAAmB,GAAG,WAAW,EAC3C,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,IAAI,EAC/C,cAAc,CAAC,EAAE,GAAG,GACrB,IAAI,CAqMN"}
|