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,230 @@
|
|
|
1
|
+
import { t as applyEdgeHandling } from "./edges-CX_lJB9R.js";
|
|
2
|
+
import { c as transformEdges } from "./transformations-CJcUeZIC.js";
|
|
3
|
+
import { t as unpremultiplyAlpha } from "./alpha-C4ptedXe.js";
|
|
4
|
+
import { i as createVariableGaussianBlurCompute } from "./computeBlur-CprKe0xa.js";
|
|
5
|
+
import { Fn, If, convertToTexture, float, instanceIndex, mix, screenUV, smoothstep, step, texture, textureStore, uint, uniform, uvec2, vec2, vec4, viewportSize } from "three/tsl";
|
|
6
|
+
var HALF_KERNEL = 30;
|
|
7
|
+
var BLUR_TO_RADIUS_PX = 12;
|
|
8
|
+
var POISSON_DISK = [
|
|
9
|
+
[0, 0],
|
|
10
|
+
[-.94, -.34],
|
|
11
|
+
[.95, .31],
|
|
12
|
+
[-.09, -.93],
|
|
13
|
+
[.34, .94],
|
|
14
|
+
[-.91, .41],
|
|
15
|
+
[.88, -.46],
|
|
16
|
+
[-.4, .71],
|
|
17
|
+
[.51, .58],
|
|
18
|
+
[-.49, -.59],
|
|
19
|
+
[.4, -.68],
|
|
20
|
+
[-.71, .05],
|
|
21
|
+
[.07, .21]
|
|
22
|
+
];
|
|
23
|
+
var POISSON_WEIGHT = 1 / POISSON_DISK.length;
|
|
24
|
+
const componentDefinition = {
|
|
25
|
+
name: "ReflectivePlane",
|
|
26
|
+
category: "Stylize",
|
|
27
|
+
description: "Reflective floor that mirrors the content above it",
|
|
28
|
+
requiresRTT: true,
|
|
29
|
+
requiresChild: true,
|
|
30
|
+
props: {
|
|
31
|
+
height: {
|
|
32
|
+
default: .7,
|
|
33
|
+
description: "Vertical position of the reflective surface",
|
|
34
|
+
ui: {
|
|
35
|
+
type: ["range", "map"],
|
|
36
|
+
min: 0,
|
|
37
|
+
max: 1,
|
|
38
|
+
step: .01,
|
|
39
|
+
label: "Floor Height",
|
|
40
|
+
group: "Plane"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
distance: {
|
|
44
|
+
default: .5,
|
|
45
|
+
description: "How far below the floor the reflection remains visible before fully fading to transparent.",
|
|
46
|
+
ui: {
|
|
47
|
+
type: ["range", "map"],
|
|
48
|
+
min: .01,
|
|
49
|
+
max: 1,
|
|
50
|
+
step: .01,
|
|
51
|
+
label: "Reflection Distance",
|
|
52
|
+
group: "Plane"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
falloff: {
|
|
56
|
+
default: .5,
|
|
57
|
+
description: "Width of the fade zone, as a fraction of reflection distance.",
|
|
58
|
+
ui: {
|
|
59
|
+
type: ["range", "map"],
|
|
60
|
+
min: 0,
|
|
61
|
+
max: 3,
|
|
62
|
+
step: .01,
|
|
63
|
+
label: "Reflection Falloff",
|
|
64
|
+
group: "Plane"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
blur: {
|
|
68
|
+
default: 3,
|
|
69
|
+
description: "Maximum blur applied to the reflection far from the surface.",
|
|
70
|
+
ui: {
|
|
71
|
+
type: ["range", "map"],
|
|
72
|
+
min: 0,
|
|
73
|
+
max: 5,
|
|
74
|
+
step: .05,
|
|
75
|
+
label: "Blur",
|
|
76
|
+
group: "Surface"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
blurDistance: {
|
|
80
|
+
default: .3,
|
|
81
|
+
description: "How far below the surface the blur takes to ramp from sharp to maximum.",
|
|
82
|
+
ui: {
|
|
83
|
+
type: "range",
|
|
84
|
+
min: .01,
|
|
85
|
+
max: 1,
|
|
86
|
+
step: .01,
|
|
87
|
+
label: "Blur Distance",
|
|
88
|
+
group: "Surface"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
edges: {
|
|
92
|
+
default: "stretch",
|
|
93
|
+
description: "How to handle reflected samples that fall outside the source content.",
|
|
94
|
+
transform: transformEdges,
|
|
95
|
+
compileTime: true,
|
|
96
|
+
ui: {
|
|
97
|
+
type: "select",
|
|
98
|
+
options: [
|
|
99
|
+
{
|
|
100
|
+
label: "Stretch",
|
|
101
|
+
value: "stretch"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
label: "Transparent",
|
|
105
|
+
value: "transparent"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
label: "Mirror",
|
|
109
|
+
value: "mirror"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
label: "Wrap",
|
|
113
|
+
value: "wrap"
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
label: "Edges",
|
|
117
|
+
group: "Surface"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
computeNode: ({ childNode, onCleanup, dimensions, renderer, uniforms, onResize }) => {
|
|
122
|
+
if (!childNode) return null;
|
|
123
|
+
if (uniforms.height.mapComputeInfo || uniforms.blur.mapComputeInfo || uniforms.blurDistance.mapComputeInfo) return null;
|
|
124
|
+
const childTexture = convertToTexture(childNode);
|
|
125
|
+
onCleanup(() => {
|
|
126
|
+
if (childTexture?.renderTarget?.dispose) childTexture.renderTarget.dispose();
|
|
127
|
+
});
|
|
128
|
+
const dpr = renderer?.getPixelRatio?.() ?? 1;
|
|
129
|
+
const blur = createVariableGaussianBlurCompute(childTexture, Math.round(dimensions.width * dpr), Math.round(dimensions.height * dpr), onCleanup, HALF_KERNEL);
|
|
130
|
+
const { computeNodes: blurNodes, outputTexture, blurMapWriteNode, computeWidth, computeHeight } = blur;
|
|
131
|
+
const heightU = uniform(.5);
|
|
132
|
+
const blurAmountU = uniform(1);
|
|
133
|
+
const blurDistanceU = uniform(.5);
|
|
134
|
+
const cw = uint(computeWidth);
|
|
135
|
+
const ch = uint(computeHeight);
|
|
136
|
+
function readScalar(entry) {
|
|
137
|
+
return entry.getCpuValue?.() ?? (typeof entry.uniform.value === "number" ? entry.uniform.value : null);
|
|
138
|
+
}
|
|
139
|
+
function updateUniforms() {
|
|
140
|
+
const h = readScalar(uniforms.height);
|
|
141
|
+
if (h !== null) heightU.value = h;
|
|
142
|
+
const b = readScalar(uniforms.blur);
|
|
143
|
+
if (b !== null) blurAmountU.value = b;
|
|
144
|
+
const bd = readScalar(uniforms.blurDistance);
|
|
145
|
+
if (bd !== null) blurDistanceU.value = Math.max(.01, bd);
|
|
146
|
+
}
|
|
147
|
+
const fillBlurMap = Fn(() => {
|
|
148
|
+
const idx = instanceIndex;
|
|
149
|
+
const cx = idx.mod(cw);
|
|
150
|
+
const cy = idx.div(cw);
|
|
151
|
+
If(cy.lessThan(ch), () => {
|
|
152
|
+
const v = cy.toFloat().add(float(.5)).div(float(computeHeight));
|
|
153
|
+
const distBelowAtOutput = heightU.sub(v).max(float(0));
|
|
154
|
+
const ramp = smoothstep(float(0), blurDistanceU, distBelowAtOutput);
|
|
155
|
+
const radius = blurAmountU.mul(ramp).mul(float(BLUR_TO_RADIUS_PX));
|
|
156
|
+
textureStore(blurMapWriteNode, uvec2(cx, cy), vec4(radius, float(0), float(0), float(1))).toWriteOnly();
|
|
157
|
+
});
|
|
158
|
+
})().compute(computeWidth * computeHeight, [256]);
|
|
159
|
+
onResize(({ width, height }) => {
|
|
160
|
+
blur.setInputDimensions(Math.round(width * dpr), Math.round(height * dpr));
|
|
161
|
+
});
|
|
162
|
+
return {
|
|
163
|
+
outputs: {
|
|
164
|
+
childTexture,
|
|
165
|
+
blurredTexture: outputTexture
|
|
166
|
+
},
|
|
167
|
+
getComputeNodes: () => {
|
|
168
|
+
updateUniforms();
|
|
169
|
+
return [fillBlurMap, ...blurNodes];
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
},
|
|
173
|
+
fragmentNode: ({ uniforms, childNode, onCleanup, computeOutputs }) => {
|
|
174
|
+
if (!childNode) return vec4(0, 0, 0, 0);
|
|
175
|
+
if (computeOutputs?.blurredTexture && computeOutputs?.childTexture) {
|
|
176
|
+
const sharp = computeOutputs.childTexture;
|
|
177
|
+
const blurred = texture(computeOutputs.blurredTexture);
|
|
178
|
+
return Fn(() => {
|
|
179
|
+
const floorY = uniforms.height.uniform;
|
|
180
|
+
const uv$1 = screenUV;
|
|
181
|
+
const distBelow = uv$1.y.sub(floorY).max(float(0));
|
|
182
|
+
const originalSample = sharp.sample(uv$1);
|
|
183
|
+
const reflectedUV = vec2(uv$1.x, floorY.mul(2).sub(uv$1.y));
|
|
184
|
+
const reflSample = applyEdgeHandling(reflectedUV, blurred.sample(reflectedUV), blurred, uniforms.edges.uniform.value);
|
|
185
|
+
const distanceMax = uniforms.distance.uniform.max(float(.001));
|
|
186
|
+
const fadeWidth = distanceMax.mul(uniforms.falloff.uniform).max(float(1e-4));
|
|
187
|
+
const fadeStart = distanceMax.sub(fadeWidth);
|
|
188
|
+
const visibility = float(1).sub(smoothstep(fadeStart, distanceMax, distBelow));
|
|
189
|
+
const effReflA = reflSample.a.mul(visibility);
|
|
190
|
+
const reflPremultRgb = reflSample.rgb.mul(visibility);
|
|
191
|
+
const propsPin = uniforms.height.uniform.mul(float(0)).add(uniforms.blur.uniform.mul(float(0))).add(uniforms.blurDistance.uniform.mul(float(0)));
|
|
192
|
+
const oneMinusReflA = effReflA.oneMinus();
|
|
193
|
+
return unpremultiplyAlpha(mix(originalSample, vec4(reflPremultRgb.add(originalSample.rgb.mul(oneMinusReflA)).add(propsPin), effReflA.add(originalSample.a.mul(oneMinusReflA))), step(floorY, uv$1.y)));
|
|
194
|
+
})();
|
|
195
|
+
}
|
|
196
|
+
const childTexture = convertToTexture(childNode);
|
|
197
|
+
onCleanup(() => {
|
|
198
|
+
if (childTexture?.renderTarget?.dispose) childTexture.renderTarget.dispose();
|
|
199
|
+
});
|
|
200
|
+
return Fn(() => {
|
|
201
|
+
const floorY = uniforms.height.uniform;
|
|
202
|
+
const uv$1 = screenUV;
|
|
203
|
+
const aspect = viewportSize.x.div(viewportSize.y);
|
|
204
|
+
const distBelow = uv$1.y.sub(floorY).max(float(0));
|
|
205
|
+
const originalSample = childTexture.sample(uv$1);
|
|
206
|
+
const reflectedUV = vec2(uv$1.x, floorY.mul(2).sub(uv$1.y));
|
|
207
|
+
const clampedBlurDistance = uniforms.blurDistance.uniform.max(float(.01));
|
|
208
|
+
const blurRamp = smoothstep(float(0), clampedBlurDistance, distBelow);
|
|
209
|
+
const blurRadius = uniforms.blur.uniform.mul(blurRamp).mul(.02);
|
|
210
|
+
const blurredColor = vec4(0).toVar();
|
|
211
|
+
for (let i = 0; i < POISSON_DISK.length; i++) {
|
|
212
|
+
const [ox, oy] = POISSON_DISK[i];
|
|
213
|
+
const offset = vec2(float(ox).mul(blurRadius).div(aspect), float(oy).mul(blurRadius));
|
|
214
|
+
const sampleUV = reflectedUV.add(offset);
|
|
215
|
+
const edgeHandled = applyEdgeHandling(sampleUV, childTexture.sample(sampleUV), childTexture, uniforms.edges.uniform.value);
|
|
216
|
+
blurredColor.assign(blurredColor.add(edgeHandled.mul(float(POISSON_WEIGHT))));
|
|
217
|
+
}
|
|
218
|
+
const distanceMax = uniforms.distance.uniform.max(float(.001));
|
|
219
|
+
const fadeWidth = distanceMax.mul(uniforms.falloff.uniform).max(float(1e-4));
|
|
220
|
+
const fadeStart = distanceMax.sub(fadeWidth);
|
|
221
|
+
const visibility = float(1).sub(smoothstep(fadeStart, distanceMax, distBelow));
|
|
222
|
+
const effReflA = blurredColor.a.mul(visibility);
|
|
223
|
+
const reflPremultRgb = blurredColor.rgb.mul(visibility);
|
|
224
|
+
const oneMinusReflA = effReflA.oneMinus();
|
|
225
|
+
return unpremultiplyAlpha(mix(originalSample, vec4(reflPremultRgb.add(originalSample.rgb.mul(oneMinusReflA)), effReflA.add(originalSample.a.mul(oneMinusReflA))), step(floorY, uv$1.y)));
|
|
226
|
+
})();
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
var ReflectivePlane_default = componentDefinition;
|
|
230
|
+
export { componentDefinition as n, ReflectivePlane_default as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as needsVideoCanvasWorkaround } from "./browser-
|
|
1
|
+
import { t as needsVideoCanvasWorkaround } from "./browser-NUM-x2tw.js";
|
|
2
2
|
import { CanvasTexture, SRGBColorSpace, VideoTexture } from "three/webgpu";
|
|
3
3
|
import { float, max, min, or, screenUV, select, 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-NUM-x2tw.js";
|
|
2
2
|
import { CanvasTexture, SRGBColorSpace, VideoTexture } from "three/webgpu";
|
|
3
3
|
import { float, max, min, or, screenUV, select, texture, uniform, vec2, vec4, viewportSize } from "three/tsl";
|
|
4
4
|
const componentDefinition = {
|
package/dist/core/index.js
CHANGED
|
@@ -83,46 +83,47 @@ import "./Posterize-DNxTRgvF.js";
|
|
|
83
83
|
import "./ProgressiveBlur-BJwJ5mE0.js";
|
|
84
84
|
import "./RadialGradient-CQIctl__.js";
|
|
85
85
|
import "./RectangularCoordinates-F2VzXmal.js";
|
|
86
|
-
import "./
|
|
87
|
-
import "./
|
|
88
|
-
import "./
|
|
89
|
-
import "./
|
|
90
|
-
import "./
|
|
91
|
-
import "./
|
|
92
|
-
import "./
|
|
93
|
-
import "./
|
|
94
|
-
import "./
|
|
95
|
-
import "./
|
|
96
|
-
import "./
|
|
97
|
-
import "./
|
|
98
|
-
import "./
|
|
99
|
-
import "./
|
|
100
|
-
import "./
|
|
101
|
-
import "./
|
|
102
|
-
import "./
|
|
103
|
-
import "./
|
|
104
|
-
import "./
|
|
105
|
-
import "./
|
|
106
|
-
import "./
|
|
107
|
-
import "./
|
|
108
|
-
import "./
|
|
109
|
-
import "./
|
|
110
|
-
import "./
|
|
111
|
-
import "./
|
|
112
|
-
import "./
|
|
113
|
-
import "./
|
|
114
|
-
import "./
|
|
115
|
-
import "./
|
|
116
|
-
import "./
|
|
117
|
-
import "./
|
|
118
|
-
import "./
|
|
119
|
-
import "./
|
|
120
|
-
import "./
|
|
121
|
-
import "./
|
|
122
|
-
import "./
|
|
123
|
-
import "./
|
|
124
|
-
import "./
|
|
125
|
-
import
|
|
86
|
+
import "./ReflectivePlane-UIT4xlmn.js";
|
|
87
|
+
import "./Ring-UT__kmzY.js";
|
|
88
|
+
import "./Ripples-CWVLSUP0.js";
|
|
89
|
+
import "./RoundedRect-BPWHTT1j.js";
|
|
90
|
+
import "./Saturation-DFOp2yD9.js";
|
|
91
|
+
import "./Sharpness-C-IEswPL.js";
|
|
92
|
+
import "./Shatter-CUYQp-qy.js";
|
|
93
|
+
import "./SimplexNoise-LAxWw8fJ.js";
|
|
94
|
+
import "./SineWave-CEQWxC9Q.js";
|
|
95
|
+
import "./Smoke-DO4yylWk.js";
|
|
96
|
+
import "./SmokeFill-Dm0sZS5F.js";
|
|
97
|
+
import "./Solarize-mE7LU1li.js";
|
|
98
|
+
import "./SolidColor-BljkSdvg.js";
|
|
99
|
+
import "./Spherize-DARagREe.js";
|
|
100
|
+
import "./Spiral-CumsIpkp.js";
|
|
101
|
+
import "./Star-8fAlzR9L.js";
|
|
102
|
+
import "./Strands-BB4RIsFz.js";
|
|
103
|
+
import "./Stretch-3S2atBkJ.js";
|
|
104
|
+
import "./Stripes-BGFVSZIt.js";
|
|
105
|
+
import "./StudioBackground-BtJ6b1Ki.js";
|
|
106
|
+
import "./SunBurst-BJRFFYhs.js";
|
|
107
|
+
import "./Swirl-KA9cEnLI.js";
|
|
108
|
+
import "./TiltShift-DtQ3dRL-.js";
|
|
109
|
+
import "./Tint-W_EvzN1-.js";
|
|
110
|
+
import "./Trapezoid-cQzS6-bh.js";
|
|
111
|
+
import "./Tritone-B3hI2nAi.js";
|
|
112
|
+
import "./Truchet-s9PmowCP.js";
|
|
113
|
+
import "./Twirl-UDDXGkFl.js";
|
|
114
|
+
import "./Vesica-ChQBYWuw.js";
|
|
115
|
+
import "./VHS-DW1H7Wuy.js";
|
|
116
|
+
import "./Vibrance-DUj7hwzE.js";
|
|
117
|
+
import "./browser-NUM-x2tw.js";
|
|
118
|
+
import "./VideoTexture-ClutlOqj.js";
|
|
119
|
+
import "./Vignette-F9yxi-UM.js";
|
|
120
|
+
import "./Voronoi-D8HHP_WR.js";
|
|
121
|
+
import "./WaveDistortion-CDIc5Uyk.js";
|
|
122
|
+
import "./Weave-ou5shgl3.js";
|
|
123
|
+
import "./WebcamTexture-D4e06ajM.js";
|
|
124
|
+
import "./WorleyNoise-Uf6IPm7A.js";
|
|
125
|
+
import "./ZoomBlur-DJ-RNKHM.js";
|
|
126
|
+
import { t as getAllShaders } from "./shaderRegistry-9d8S78Sy.js";
|
|
126
127
|
import { Material, Mesh, MeshBasicNodeMaterial, OrthographicCamera, PlaneGeometry, SRGBColorSpace, Scene, Vector2, WebGPURenderer } from "three/webgpu";
|
|
127
128
|
import { WebGLRenderer } from "three";
|
|
128
129
|
import { PI, abs, add, atan, clamp, convertToTexture, cos, div, dot, float, fract, max, min, mix, mul, pow, screenUV, sign, sin, smoothstep, sqrt, step, sub, time, uniform, uv, vec2, vec3, vec4 } from "three/tsl";
|
package/dist/core/registry.js
CHANGED
|
@@ -83,44 +83,45 @@ import "./Posterize-DNxTRgvF.js";
|
|
|
83
83
|
import "./ProgressiveBlur-BJwJ5mE0.js";
|
|
84
84
|
import "./RadialGradient-CQIctl__.js";
|
|
85
85
|
import "./RectangularCoordinates-F2VzXmal.js";
|
|
86
|
-
import "./
|
|
87
|
-
import "./
|
|
88
|
-
import "./
|
|
89
|
-
import "./
|
|
90
|
-
import "./
|
|
91
|
-
import "./
|
|
92
|
-
import "./
|
|
93
|
-
import "./
|
|
94
|
-
import "./
|
|
95
|
-
import "./
|
|
96
|
-
import "./
|
|
97
|
-
import "./
|
|
98
|
-
import "./
|
|
99
|
-
import "./
|
|
100
|
-
import "./
|
|
101
|
-
import "./
|
|
102
|
-
import "./
|
|
103
|
-
import "./
|
|
104
|
-
import "./
|
|
105
|
-
import "./
|
|
106
|
-
import "./
|
|
107
|
-
import "./
|
|
108
|
-
import "./
|
|
109
|
-
import "./
|
|
110
|
-
import "./
|
|
111
|
-
import "./
|
|
112
|
-
import "./
|
|
113
|
-
import "./
|
|
114
|
-
import "./
|
|
115
|
-
import "./
|
|
116
|
-
import "./
|
|
117
|
-
import "./
|
|
118
|
-
import "./
|
|
119
|
-
import "./
|
|
120
|
-
import "./
|
|
121
|
-
import "./
|
|
122
|
-
import "./
|
|
123
|
-
import "./
|
|
124
|
-
import "./
|
|
125
|
-
import
|
|
86
|
+
import "./ReflectivePlane-UIT4xlmn.js";
|
|
87
|
+
import "./Ring-UT__kmzY.js";
|
|
88
|
+
import "./Ripples-CWVLSUP0.js";
|
|
89
|
+
import "./RoundedRect-BPWHTT1j.js";
|
|
90
|
+
import "./Saturation-DFOp2yD9.js";
|
|
91
|
+
import "./Sharpness-C-IEswPL.js";
|
|
92
|
+
import "./Shatter-CUYQp-qy.js";
|
|
93
|
+
import "./SimplexNoise-LAxWw8fJ.js";
|
|
94
|
+
import "./SineWave-CEQWxC9Q.js";
|
|
95
|
+
import "./Smoke-DO4yylWk.js";
|
|
96
|
+
import "./SmokeFill-Dm0sZS5F.js";
|
|
97
|
+
import "./Solarize-mE7LU1li.js";
|
|
98
|
+
import "./SolidColor-BljkSdvg.js";
|
|
99
|
+
import "./Spherize-DARagREe.js";
|
|
100
|
+
import "./Spiral-CumsIpkp.js";
|
|
101
|
+
import "./Star-8fAlzR9L.js";
|
|
102
|
+
import "./Strands-BB4RIsFz.js";
|
|
103
|
+
import "./Stretch-3S2atBkJ.js";
|
|
104
|
+
import "./Stripes-BGFVSZIt.js";
|
|
105
|
+
import "./StudioBackground-BtJ6b1Ki.js";
|
|
106
|
+
import "./SunBurst-BJRFFYhs.js";
|
|
107
|
+
import "./Swirl-KA9cEnLI.js";
|
|
108
|
+
import "./TiltShift-DtQ3dRL-.js";
|
|
109
|
+
import "./Tint-W_EvzN1-.js";
|
|
110
|
+
import "./Trapezoid-cQzS6-bh.js";
|
|
111
|
+
import "./Tritone-B3hI2nAi.js";
|
|
112
|
+
import "./Truchet-s9PmowCP.js";
|
|
113
|
+
import "./Twirl-UDDXGkFl.js";
|
|
114
|
+
import "./Vesica-ChQBYWuw.js";
|
|
115
|
+
import "./VHS-DW1H7Wuy.js";
|
|
116
|
+
import "./Vibrance-DUj7hwzE.js";
|
|
117
|
+
import "./browser-NUM-x2tw.js";
|
|
118
|
+
import "./VideoTexture-ClutlOqj.js";
|
|
119
|
+
import "./Vignette-F9yxi-UM.js";
|
|
120
|
+
import "./Voronoi-D8HHP_WR.js";
|
|
121
|
+
import "./WaveDistortion-CDIc5Uyk.js";
|
|
122
|
+
import "./Weave-ou5shgl3.js";
|
|
123
|
+
import "./WebcamTexture-D4e06ajM.js";
|
|
124
|
+
import "./WorleyNoise-Uf6IPm7A.js";
|
|
125
|
+
import "./ZoomBlur-DJ-RNKHM.js";
|
|
126
|
+
import { a as shaderRegistry, i as getShadersByCategory, n as getShaderByName, r as getShaderCategories, t as getAllShaders } from "./shaderRegistry-9d8S78Sy.js";
|
|
126
127
|
export { getAllShaders, getShaderByName, getShaderCategories, getShadersByCategory, shaderRegistry };
|
|
@@ -76,44 +76,45 @@ import { n as componentDefinition$74 } from "./Posterize-DNxTRgvF.js";
|
|
|
76
76
|
import { n as componentDefinition$75 } from "./ProgressiveBlur-BJwJ5mE0.js";
|
|
77
77
|
import { n as componentDefinition$76 } from "./RadialGradient-CQIctl__.js";
|
|
78
78
|
import { n as componentDefinition$77 } from "./RectangularCoordinates-F2VzXmal.js";
|
|
79
|
-
import { n as componentDefinition$78 } from "./
|
|
80
|
-
import { n as componentDefinition$79 } from "./
|
|
81
|
-
import { n as componentDefinition$80 } from "./
|
|
82
|
-
import { n as componentDefinition$81 } from "./
|
|
83
|
-
import { n as componentDefinition$82 } from "./
|
|
84
|
-
import { n as componentDefinition$83 } from "./
|
|
85
|
-
import { n as componentDefinition$84 } from "./
|
|
86
|
-
import { n as componentDefinition$85 } from "./
|
|
87
|
-
import { n as componentDefinition$86 } from "./
|
|
88
|
-
import { n as componentDefinition$87 } from "./
|
|
89
|
-
import { n as componentDefinition$88 } from "./
|
|
90
|
-
import { n as componentDefinition$89 } from "./
|
|
91
|
-
import { n as componentDefinition$90 } from "./
|
|
92
|
-
import { n as componentDefinition$91 } from "./
|
|
93
|
-
import { n as componentDefinition$92 } from "./
|
|
94
|
-
import { n as componentDefinition$93 } from "./
|
|
95
|
-
import { n as componentDefinition$94 } from "./
|
|
96
|
-
import { n as componentDefinition$95 } from "./
|
|
97
|
-
import { n as componentDefinition$96 } from "./
|
|
98
|
-
import { n as componentDefinition$97 } from "./
|
|
99
|
-
import { n as componentDefinition$98 } from "./
|
|
100
|
-
import { n as componentDefinition$99 } from "./
|
|
101
|
-
import { n as componentDefinition$100 } from "./
|
|
102
|
-
import { n as componentDefinition$101 } from "./
|
|
103
|
-
import { n as componentDefinition$102 } from "./
|
|
104
|
-
import { n as componentDefinition$103 } from "./
|
|
105
|
-
import { n as componentDefinition$104 } from "./
|
|
106
|
-
import { n as componentDefinition$105 } from "./
|
|
107
|
-
import { n as componentDefinition$106 } from "./
|
|
108
|
-
import { n as componentDefinition$107 } from "./
|
|
109
|
-
import { n as componentDefinition$108 } from "./
|
|
110
|
-
import { n as componentDefinition$109 } from "./
|
|
111
|
-
import { n as componentDefinition$110 } from "./
|
|
112
|
-
import { n as componentDefinition$111 } from "./
|
|
113
|
-
import { n as componentDefinition$112 } from "./
|
|
114
|
-
import { n as componentDefinition$113 } from "./
|
|
115
|
-
import { n as componentDefinition$114 } from "./
|
|
116
|
-
import { n as componentDefinition$115 } from "./
|
|
79
|
+
import { n as componentDefinition$78 } from "./ReflectivePlane-UIT4xlmn.js";
|
|
80
|
+
import { n as componentDefinition$79 } from "./Ring-UT__kmzY.js";
|
|
81
|
+
import { n as componentDefinition$80 } from "./Ripples-CWVLSUP0.js";
|
|
82
|
+
import { n as componentDefinition$81 } from "./RoundedRect-BPWHTT1j.js";
|
|
83
|
+
import { n as componentDefinition$82 } from "./Saturation-DFOp2yD9.js";
|
|
84
|
+
import { n as componentDefinition$83 } from "./Sharpness-C-IEswPL.js";
|
|
85
|
+
import { n as componentDefinition$84 } from "./Shatter-CUYQp-qy.js";
|
|
86
|
+
import { n as componentDefinition$85 } from "./SimplexNoise-LAxWw8fJ.js";
|
|
87
|
+
import { n as componentDefinition$86 } from "./SineWave-CEQWxC9Q.js";
|
|
88
|
+
import { n as componentDefinition$87 } from "./Smoke-DO4yylWk.js";
|
|
89
|
+
import { n as componentDefinition$88 } from "./SmokeFill-Dm0sZS5F.js";
|
|
90
|
+
import { n as componentDefinition$89 } from "./Solarize-mE7LU1li.js";
|
|
91
|
+
import { n as componentDefinition$90 } from "./SolidColor-BljkSdvg.js";
|
|
92
|
+
import { n as componentDefinition$91 } from "./Spherize-DARagREe.js";
|
|
93
|
+
import { n as componentDefinition$92 } from "./Spiral-CumsIpkp.js";
|
|
94
|
+
import { n as componentDefinition$93 } from "./Star-8fAlzR9L.js";
|
|
95
|
+
import { n as componentDefinition$94 } from "./Strands-BB4RIsFz.js";
|
|
96
|
+
import { n as componentDefinition$95 } from "./Stretch-3S2atBkJ.js";
|
|
97
|
+
import { n as componentDefinition$96 } from "./Stripes-BGFVSZIt.js";
|
|
98
|
+
import { n as componentDefinition$97 } from "./StudioBackground-BtJ6b1Ki.js";
|
|
99
|
+
import { n as componentDefinition$98 } from "./SunBurst-BJRFFYhs.js";
|
|
100
|
+
import { n as componentDefinition$99 } from "./Swirl-KA9cEnLI.js";
|
|
101
|
+
import { n as componentDefinition$100 } from "./TiltShift-DtQ3dRL-.js";
|
|
102
|
+
import { n as componentDefinition$101 } from "./Tint-W_EvzN1-.js";
|
|
103
|
+
import { n as componentDefinition$102 } from "./Trapezoid-cQzS6-bh.js";
|
|
104
|
+
import { n as componentDefinition$103 } from "./Tritone-B3hI2nAi.js";
|
|
105
|
+
import { n as componentDefinition$104 } from "./Truchet-s9PmowCP.js";
|
|
106
|
+
import { n as componentDefinition$105 } from "./Twirl-UDDXGkFl.js";
|
|
107
|
+
import { n as componentDefinition$106 } from "./Vesica-ChQBYWuw.js";
|
|
108
|
+
import { n as componentDefinition$107 } from "./VHS-DW1H7Wuy.js";
|
|
109
|
+
import { n as componentDefinition$108 } from "./Vibrance-DUj7hwzE.js";
|
|
110
|
+
import { n as componentDefinition$109 } from "./VideoTexture-ClutlOqj.js";
|
|
111
|
+
import { n as componentDefinition$110 } from "./Vignette-F9yxi-UM.js";
|
|
112
|
+
import { n as componentDefinition$111 } from "./Voronoi-D8HHP_WR.js";
|
|
113
|
+
import { n as componentDefinition$112 } from "./WaveDistortion-CDIc5Uyk.js";
|
|
114
|
+
import { n as componentDefinition$113 } from "./Weave-ou5shgl3.js";
|
|
115
|
+
import { n as componentDefinition$114 } from "./WebcamTexture-D4e06ajM.js";
|
|
116
|
+
import { n as componentDefinition$115 } from "./WorleyNoise-Uf6IPm7A.js";
|
|
117
|
+
import { n as componentDefinition$116 } from "./ZoomBlur-DJ-RNKHM.js";
|
|
117
118
|
var createShaderRegistry = () => {
|
|
118
119
|
const registry = {};
|
|
119
120
|
const shaderDefinitions = {
|
|
@@ -195,44 +196,45 @@ var createShaderRegistry = () => {
|
|
|
195
196
|
ProgressiveBlur: componentDefinition$75,
|
|
196
197
|
RadialGradient: componentDefinition$76,
|
|
197
198
|
RectangularCoordinates: componentDefinition$77,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
199
|
+
ReflectivePlane: componentDefinition$78,
|
|
200
|
+
Ring: componentDefinition$79,
|
|
201
|
+
Ripples: componentDefinition$80,
|
|
202
|
+
RoundedRect: componentDefinition$81,
|
|
203
|
+
Saturation: componentDefinition$82,
|
|
204
|
+
Sharpness: componentDefinition$83,
|
|
205
|
+
Shatter: componentDefinition$84,
|
|
206
|
+
SimplexNoise: componentDefinition$85,
|
|
207
|
+
SineWave: componentDefinition$86,
|
|
208
|
+
Smoke: componentDefinition$87,
|
|
209
|
+
SmokeFill: componentDefinition$88,
|
|
210
|
+
Solarize: componentDefinition$89,
|
|
211
|
+
SolidColor: componentDefinition$90,
|
|
212
|
+
Spherize: componentDefinition$91,
|
|
213
|
+
Spiral: componentDefinition$92,
|
|
214
|
+
Star: componentDefinition$93,
|
|
215
|
+
Strands: componentDefinition$94,
|
|
216
|
+
Stretch: componentDefinition$95,
|
|
217
|
+
Stripes: componentDefinition$96,
|
|
218
|
+
StudioBackground: componentDefinition$97,
|
|
219
|
+
SunBurst: componentDefinition$98,
|
|
220
|
+
Swirl: componentDefinition$99,
|
|
221
|
+
TiltShift: componentDefinition$100,
|
|
222
|
+
Tint: componentDefinition$101,
|
|
223
|
+
Trapezoid: componentDefinition$102,
|
|
224
|
+
Tritone: componentDefinition$103,
|
|
225
|
+
Truchet: componentDefinition$104,
|
|
226
|
+
Twirl: componentDefinition$105,
|
|
227
|
+
Vesica: componentDefinition$106,
|
|
228
|
+
VHS: componentDefinition$107,
|
|
229
|
+
Vibrance: componentDefinition$108,
|
|
230
|
+
VideoTexture: componentDefinition$109,
|
|
231
|
+
Vignette: componentDefinition$110,
|
|
232
|
+
Voronoi: componentDefinition$111,
|
|
233
|
+
WaveDistortion: componentDefinition$112,
|
|
234
|
+
Weave: componentDefinition$113,
|
|
235
|
+
WebcamTexture: componentDefinition$114,
|
|
236
|
+
WorleyNoise: componentDefinition$115,
|
|
237
|
+
ZoomBlur: componentDefinition$116
|
|
236
238
|
};
|
|
237
239
|
Object.entries(shaderDefinitions).forEach(([fileName, def]) => {
|
|
238
240
|
const propsMetadata = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shaderRegistry.d.ts","sourceRoot":"","sources":["../src/shaderRegistry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shaderRegistry.d.ts","sourceRoot":"","sources":["../src/shaderRegistry.ts"],"names":[],"mappings":"AAwHA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,mBAAmB,CAAC,GAAG,CAAC,CAAA;IACpC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE;QAC5B,EAAE,CAAC,EAAE,GAAG,CAAA;QACR,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,CAAC,CAAA;CACH;AAyJD,eAAO,MAAM,cAAc,qCAAyB,CAAA;AAGpD,wBAAgB,aAAa,IAAI,mBAAmB,EAAE,CAErD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAE7E;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,mBAAmB,EAAE,CAE5E;AAED,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAG9C"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ComponentDefinition } from '../../types';
|
|
2
|
+
import { transformEdges } from '../../utilities/transformations';
|
|
3
|
+
|
|
4
|
+
export interface ComponentProps {
|
|
5
|
+
/**
|
|
6
|
+
* Vertical position of the reflective surface
|
|
7
|
+
*
|
|
8
|
+
* @default 0.7
|
|
9
|
+
*/
|
|
10
|
+
height: number;
|
|
11
|
+
/**
|
|
12
|
+
* How far below the floor the reflection remains visible before fully fading to transparent.
|
|
13
|
+
*
|
|
14
|
+
* @default 0.5
|
|
15
|
+
*/
|
|
16
|
+
distance: number;
|
|
17
|
+
/**
|
|
18
|
+
* Width of the fade zone, as a fraction of reflection distance.
|
|
19
|
+
*
|
|
20
|
+
* @default 0.5
|
|
21
|
+
*/
|
|
22
|
+
falloff: number;
|
|
23
|
+
/**
|
|
24
|
+
* Maximum blur applied to the reflection far from the surface.
|
|
25
|
+
*
|
|
26
|
+
* @default 3
|
|
27
|
+
*/
|
|
28
|
+
blur: number;
|
|
29
|
+
/**
|
|
30
|
+
* How far below the surface the blur takes to ramp from sharp to maximum.
|
|
31
|
+
*
|
|
32
|
+
* Accepts a number between 0.01 and 1.
|
|
33
|
+
* @default 0.3
|
|
34
|
+
*/
|
|
35
|
+
blurDistance: number;
|
|
36
|
+
/**
|
|
37
|
+
* How to handle reflected samples that fall outside the source content.
|
|
38
|
+
*
|
|
39
|
+
* Accepts one of: `"stretch"`, `"transparent"`, `"mirror"`, `"wrap"`.
|
|
40
|
+
* @default "stretch"
|
|
41
|
+
*/
|
|
42
|
+
edges: Parameters<typeof transformEdges>[0];
|
|
43
|
+
}
|
|
44
|
+
export declare const componentDefinition: ComponentDefinition<ComponentProps>;
|
|
45
|
+
export default componentDefinition;
|
|
46
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/ReflectivePlane/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAwC,MAAM,iBAAiB,CAAA;AAQ1F,OAAO,EAAC,cAAc,EAAC,MAAM,qCAAqC,CAAA;AAuBlE,MAAM,WAAW,cAAc;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;CAC9C;AAED,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,CA+QnE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|