@firecms/neat 0.7.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/shaders.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export const vertexShaderSource = `void main() {
2
2
  vUv = uv;
3
+ vPosition = position;
3
4
 
4
5
  // SCROLLING LOGIC
5
6
  // Separate multipliers for wave, color, and flow offsets
@@ -41,11 +42,36 @@ export const vertexShaderSource = `void main() {
41
42
  // We take the computed flow UVs and apply the color offset
42
43
  // Scale by plane height to match wave offset speed (world space vs UV space)
43
44
  vec3 color = u_colors[0].color;
44
- // ...
45
- vec2 adjustedUv = flowUv;
46
- adjustedUv.y += colorOffset / u_plane_height; // Scroll the color mixing pattern
47
45
 
48
- vec2 noise_cord = adjustedUv * u_color_pressure;
46
+ vec3 distortedPos = position;
47
+ if (u_shape_type > 0.5) {
48
+ if (u_flow_enabled > 0.5) {
49
+ if (u_flow_ease > 0.0 || u_flow_distortion_a > 0.0) {
50
+ vec3 ppp = position / 25.0;
51
+ ppp.xyz += 0.1 * cos((1.5 * u_flow_scale) * ppp.yxz + 1.1 * u_time + vec3(0.1, 1.1, 2.1));
52
+ ppp.xyz += 0.1 * cos((2.3 * u_flow_scale) * ppp.zxy + 1.3 * u_time + vec3(3.2, 3.4, 1.2));
53
+ ppp.xyz += 0.1 * cos((2.2 * u_flow_scale) * ppp.yxz + 1.7 * u_time + vec3(1.8, 5.2, 3.1));
54
+ ppp.xyz += u_flow_distortion_a * cos((u_flow_distortion_b * u_flow_scale) * ppp.zxy + 1.4 * u_time + vec3(6.3, 3.9, 4.5));
55
+
56
+ float r = length(ppp);
57
+ distortedPos = mix(position, vec3(
58
+ position.x * (1.0 - u_flow_ease) + r * u_flow_ease * 25.0,
59
+ position.y,
60
+ position.z * (1.0 - u_flow_ease) + r * u_flow_ease * 25.0
61
+ ), u_flow_ease);
62
+ }
63
+ }
64
+ }
65
+
66
+ vec3 noise_cord;
67
+ if (u_shape_type > 0.5) {
68
+ noise_cord = vec3(distortedPos.x / 50.0, (distortedPos.y + colorOffset) / 50.0, distortedPos.z / 50.0);
69
+ } else {
70
+ vec2 adjustedUv = flowUv;
71
+ adjustedUv.y += colorOffset / u_plane_height;
72
+ noise_cord = vec3(adjustedUv, 0.0);
73
+ }
74
+
49
75
  const float minNoise = .0;
50
76
  const float maxNoise = .9;
51
77
 
@@ -56,11 +82,16 @@ export const vertexShaderSource = `void main() {
56
82
  float noiseSpeed = (1. + float(i)) * 0.11;
57
83
  float noiseSeed = 13. + float(i) * 7.;
58
84
 
85
+ float noise_z = u_time * noiseSpeed;
86
+ if (u_shape_type > 0.5) {
87
+ noise_z = noise_cord.z * u_color_pressure.x * u_color_pressure.x + u_time * noiseSpeed;
88
+ }
89
+
59
90
  float noise = snoise(
60
91
  vec3(
61
- noise_cord.x * u_color_pressure.x + u_time * noiseFlow * 2.,
62
- noise_cord.y * u_color_pressure.y,
63
- u_time * noiseSpeed
92
+ noise_cord.x * u_color_pressure.x * u_color_pressure.x + u_time * noiseFlow * 2.,
93
+ noise_cord.y * u_color_pressure.y * u_color_pressure.y,
94
+ noise_z
64
95
  ) + noiseSeed
65
96
  ) - (.1 * float(i)) + (.5 * u_color_blending);
66
97
 
@@ -72,9 +103,15 @@ export const vertexShaderSource = `void main() {
72
103
 
73
104
  v_color = color;
74
105
 
75
- // 4. VERTEX POSITION
106
+ // 4. FRESNEL (rim glow)
107
+ // (Calculated in fragment shader using displacement slope approximation)
108
+
109
+ // 5. VERTEX POSITION
76
110
  vec3 newPosition = position + normal * v_displacement_amount * u_wave_amplitude;
77
- gl_Position = projectionMatrix * modelViewMatrix * vec4(newPosition, 1.0);
111
+ vec4 mvPosition = modelViewMatrix * vec4(newPosition, 1.0);
112
+ vViewPosition = mvPosition.xyz;
113
+ vNormal = normalize((modelViewMatrix * vec4(normal, 0.0)).xyz);
114
+ gl_Position = projectionMatrix * mvPosition;
78
115
  v_new_position = gl_Position;
79
116
  }
80
117
  `;
@@ -94,58 +131,182 @@ float fbm(vec3 x) {
94
131
  return value;
95
132
  }
96
133
 
134
+ // Branchless HSL to RGB for iridescence
135
+ vec3 hsl2rgb(float h, float s, float l) {
136
+ vec3 rgb = clamp(abs(mod(h * 6.0 + vec3(0.0, 4.0, 2.0), 6.0) - 3.0) - 1.0, 0.0, 1.0);
137
+ return l + s * (rgb - 0.5) * (1.0 - abs(2.0 * l - 1.0));
138
+ }
139
+
97
140
  void main() {
98
141
  vec2 finalUv = vFlowUv;
99
142
 
100
143
  vec3 baseColor;
144
+ float texAlpha = 1.0;
101
145
 
102
146
  if (u_enable_procedural_texture > 0.5) {
103
- // Calculate flow field distance for ease effect
104
- vec2 ppp = -1.0 + 2.0 * finalUv;
105
- ppp += 0.1 * cos((1.5 * u_flow_scale) * ppp.yx + 1.1 * u_time + vec2(0.1, 1.1));
106
- ppp += 0.1 * cos((2.3 * u_flow_scale) * ppp.yx + 1.3 * u_time + vec2(3.2, 3.4));
107
- ppp += 0.1 * cos((2.2 * u_flow_scale) * ppp.yx + 1.7 * u_time + vec2(1.8, 5.2));
108
- ppp += u_flow_distortion_a * cos((u_flow_distortion_b * u_flow_scale) * ppp.yx + 1.4 * u_time + vec2(6.3, 3.9));
109
- float r = length(ppp); // Flow distance
110
-
111
- // Ease blending: 0 = topographic (flow), 1 = image (UV)
112
- float vx = (finalUv.x * u_texture_ease) + (r * (1.0 - u_texture_ease));
113
- float vy = (finalUv.y * u_texture_ease) + (0.0 * (1.0 - u_texture_ease));
114
- vec2 texUv = vec2(vx, vy);
115
-
116
- // PARALLAX SCROLLING
117
- // We manually apply a smaller offset here to make the texture lag behind
118
- float parallaxFactor = 0.25; // 25% speed of the color mixing
119
- texUv.y -= (u_y_offset * u_y_offset_color_multiplier / u_plane_height) * parallaxFactor;
120
-
121
- texUv *= 1.5; // Tiling scale
122
-
123
- vec4 texSample = texture2D(u_procedural_texture, texUv);
124
- baseColor = texSample.rgb;
147
+ if (u_shape_type > 0.5) {
148
+ float parallaxFactor = 0.25;
149
+ float scrollOffset = (u_y_offset * u_y_offset_color_multiplier) * parallaxFactor;
150
+ vec3 scrolledPos = vPosition;
151
+ scrolledPos.y -= scrollOffset;
152
+
153
+ vec3 p = (scrolledPos * 1.5) / 50.0;
154
+ vec2 uvX = p.yz + vec2(0.5);
155
+ vec2 uvY = p.zx + vec2(0.5);
156
+ vec2 uvZ = p.xy + vec2(0.5);
157
+
158
+ vec4 colX = texture2D(u_procedural_texture, fract(uvX));
159
+ vec4 colY = texture2D(u_procedural_texture, fract(uvY));
160
+ vec4 colZ = texture2D(u_procedural_texture, fract(uvZ));
161
+
162
+ vec3 n = normalize(vNormal);
163
+ vec3 blendWeights = abs(n);
164
+ blendWeights = blendWeights / (blendWeights.x + blendWeights.y + blendWeights.z + 0.0001);
165
+
166
+ vec4 texSample = colX * blendWeights.x + colY * blendWeights.y + colZ * blendWeights.z;
167
+ baseColor = texSample.rgb;
168
+ if (u_transparent_texture_void > 0.5) {
169
+ texAlpha = texSample.a;
170
+ }
171
+ } else {
172
+ vec2 ppp = -1.0 + 2.0 * finalUv;
173
+ ppp += 0.1 * cos((1.5 * u_flow_scale) * ppp.yx + 1.1 * u_time + vec2(0.1, 1.1));
174
+ ppp += 0.1 * cos((2.3 * u_flow_scale) * ppp.yx + 1.3 * u_time + vec2(3.2, 3.4));
175
+ ppp += 0.1 * cos((2.2 * u_flow_scale) * ppp.yx + 1.7 * u_time + vec2(1.8, 5.2));
176
+ ppp += u_flow_distortion_a * cos((u_flow_distortion_b * u_flow_scale) * ppp.yx + 1.4 * u_time + vec2(6.3, 3.9));
177
+ float r = length(ppp);
178
+
179
+ float vx = (finalUv.x * u_texture_ease) + (r * (1.0 - u_texture_ease));
180
+ float vy = (finalUv.y * u_texture_ease) + (0.0 * (1.0 - u_texture_ease));
181
+ vec2 texUv = vec2(vx, vy);
182
+
183
+ float parallaxFactor = 0.25;
184
+ texUv.y -= (u_y_offset * u_y_offset_color_multiplier / u_plane_height) * parallaxFactor;
185
+ texUv *= 1.5;
186
+
187
+ vec4 texSample = texture2D(u_procedural_texture, fract(texUv));
188
+ baseColor = texSample.rgb;
189
+ if (u_transparent_texture_void > 0.5) {
190
+ texAlpha = texSample.a;
191
+ }
192
+ }
125
193
  } else {
126
194
  baseColor = v_color;
127
195
  }
128
196
 
129
197
  vec3 color = baseColor;
130
198
 
199
+ // === DOMAIN WARPING (simplified: 3 fbm calls instead of 5) ===
200
+ if (u_domain_warp_enabled > 0.5) {
201
+ vec3 p;
202
+ if (u_shape_type > 0.5) {
203
+ p = vec3((vPosition / 50.0 + vec3(0.5)) * u_domain_warp_scale);
204
+ p.z += u_time * 0.15;
205
+ } else {
206
+ p = vec3(finalUv * u_domain_warp_scale, u_time * 0.15);
207
+ }
208
+ vec2 q = vec2(fbm(p), fbm(p + vec3(5.2, 1.3, 0.0)));
209
+ float f = fbm(p + vec3(4.0 * q, 0.0));
210
+ vec3 warpColor = color * (1.0 + f * 0.8 * u_domain_warp_intensity);
211
+ float pattern = clamp(f * f * f + 0.6 * f * f + 0.5 * f, 0.0, 1.0);
212
+ color = mix(color, warpColor * (0.6 + pattern * 0.8), u_domain_warp_intensity * 0.7);
213
+ }
214
+
131
215
  // Post-processing
132
- color += v_displacement_amount * u_highlights;
133
- // Replace pow() with direct multiplication to avoid negative base undefined behavior in GLSL
134
- float shadowFactor = 1.0 - v_displacement_amount;
135
- color -= shadowFactor * shadowFactor * u_shadows;
216
+ // Compute dynamic pixel-perfect normal using smooth normal
217
+ vec3 normal = normalize(vNormal);
218
+ vec3 viewDir = vec3(0.0, 0.0, 1.0);
219
+ float ndotv = dot(normal, viewDir);
220
+
221
+ // Cull back-faces for closed 3D shapes (Sphere=1, Torus=2, Cylinder=3)
222
+ if (u_shape_type > 0.5 && u_shape_type < 3.5) {
223
+ if (ndotv < 0.0) {
224
+ discard;
225
+ }
226
+ } else {
227
+ // Double-sided shapes (Plane, Ribbon): flip normal if back-facing
228
+ if (ndotv < 0.0) {
229
+ normal = -normal;
230
+ ndotv = -ndotv;
231
+ }
232
+ }
233
+ vec3 lightDir = normalize(vec3(1.0, 1.0, 1.0));
234
+ float diffuse = max(dot(normal, lightDir), 0.0);
235
+ vec3 halfDir = normalize(lightDir + viewDir);
236
+ float specular = pow(max(dot(normal, halfDir), 0.0), 32.0);
237
+
238
+ // Blend smooth 3D shading with smooth height-based wave shading
239
+ if (u_shape_type <= 0.5) {
240
+ // Original height-based wave shading
241
+ color += v_displacement_amount * u_highlights;
242
+ float heightShadow = 1.0 - v_displacement_amount;
243
+ color -= heightShadow * heightShadow * u_shadows;
244
+ } else {
245
+ // 3D shading
246
+ color += specular * u_highlights;
247
+ color += v_displacement_amount * u_highlights * 0.5;
248
+ float heightShadow = 1.0 - v_displacement_amount;
249
+ color -= heightShadow * heightShadow * u_shadows * 0.5;
250
+ color -= (1.0 - diffuse) * u_shadows * 0.5;
251
+ }
136
252
  color = saturation(color, 1.0 + u_saturation);
137
253
  color = color * u_brightness;
138
254
 
139
- // Grain
140
- vec2 noiseCoords = gl_FragCoord.xy / u_grain_scale;
255
+ // === IRIDESCENCE ===
256
+ if (u_iridescence_enabled > 0.5) {
257
+ float hue = fract(v_displacement_amount * 0.5 + 0.5 + u_time * u_iridescence_speed * 0.05);
258
+ vec3 iriColor = hsl2rgb(hue, 0.8, 0.6);
259
+ color = mix(color, iriColor, u_iridescence_intensity * abs(v_displacement_amount) * 0.6);
260
+ }
261
+
262
+ // === FRESNEL (Rim glow) ===
263
+ if (u_fresnel_enabled > 0.5) {
264
+ float slope = 1.0 - abs(v_displacement_amount);
265
+ float fresnel = pow(max(slope, 0.0), u_fresnel_power);
266
+ color += u_fresnel_color * fresnel * u_fresnel_intensity;
267
+ }
268
+
269
+ // === VIGNETTE ===
270
+ if (u_vignette_intensity > 0.0) {
271
+ vec2 vigUv = vUv;
272
+ if (u_shape_type > 0.5) {
273
+ vigUv = (v_new_position.xy / v_new_position.w) * 0.5 + vec2(0.5);
274
+ }
275
+ float dist = length(vigUv - vec2(0.5));
276
+ float vig = smoothstep(u_vignette_radius, u_vignette_radius * 0.3, dist);
277
+ color *= mix(1.0, vig, u_vignette_intensity);
278
+ }
279
+
280
+ // === FAKE BLOOM ===
281
+ if (u_bloom_intensity > 0.0) {
282
+ float luma = dot(color, vec3(0.2126, 0.7152, 0.0722));
283
+ float bloomMask = smoothstep(u_bloom_threshold, 1.0, luma);
284
+ color += color * bloomMask * u_bloom_intensity;
285
+ }
286
+
287
+ // === CHROMATIC ABERRATION ===
288
+ if (u_chromatic_aberration > 0.0) {
289
+ float caAmount = u_chromatic_aberration * 0.008;
290
+ vec2 caUv = vUv;
291
+ if (u_shape_type > 0.5) {
292
+ caUv = (v_new_position.xy / v_new_position.w) * 0.5 + vec2(0.5);
293
+ }
294
+ float dist = length(caUv - vec2(0.5));
295
+ float rShift = v_displacement_amount + caAmount * dist;
296
+ float bShift = v_displacement_amount - caAmount * dist;
297
+ color.r *= 1.0 + rShift * caAmount * 10.0;
298
+ color.b *= 1.0 - bShift * caAmount * 10.0;
299
+ }
300
+
301
+ // Grain (use cheap hash noise instead of expensive fbm when static)
141
302
  float grain = 0.0;
142
-
143
- // Completely bypass expensive noise generation if grain is disabled
144
303
  if (u_grain_intensity > 0.0) {
145
- if (u_grain_speed != 0.0) {
304
+ vec2 noiseCoords = gl_FragCoord.xy / u_grain_scale;
305
+ if (u_grain_speed != 0.0 || u_shape_type <= 0.5) {
146
306
  grain = fbm(vec3(noiseCoords, u_time * u_grain_speed));
147
307
  } else {
148
- grain = fbm(vec3(noiseCoords, 0.0));
308
+ // Static grain: use cheap hash instead of fbm
309
+ grain = random(noiseCoords) - 0.5;
149
310
  }
150
311
 
151
312
  grain = grain * 0.5 + 0.5;
@@ -156,7 +317,25 @@ void main() {
156
317
 
157
318
  color += vec3(grain);
158
319
 
159
- gl_FragColor = vec4(color, 1.0);
320
+ float edgeAlpha = 1.0;
321
+
322
+ // Silhouette falloff for 3D shapes
323
+ if (u_shape_type > 0.5) {
324
+ edgeAlpha = smoothstep(0.0, u_silhouette_fade, ndotv);
325
+ }
326
+
327
+ // UV boundary falloff for open shapes
328
+ if (u_shape_type == 3.0) { // Cylinder: fade top/bottom ends
329
+ float vFade = smoothstep(0.0, u_cylinder_fade, vUv.y) * smoothstep(1.0, 1.0 - u_cylinder_fade, vUv.y);
330
+ edgeAlpha *= vFade;
331
+ } else if (u_shape_type == 4.0) { // Ribbon: fade all 4 borders
332
+ float uFade = smoothstep(0.0, u_ribbon_fade, vUv.x) * smoothstep(1.0, 1.0 - u_ribbon_fade, vUv.x);
333
+ float vFade = smoothstep(0.0, u_ribbon_fade, vUv.y) * smoothstep(1.0, 1.0 - u_ribbon_fade, vUv.y);
334
+ edgeAlpha *= uFade * vFade;
335
+ }
336
+
337
+ edgeAlpha *= texAlpha;
338
+ gl_FragColor = vec4(color, edgeAlpha);
160
339
  }
161
340
  `;
162
341
  export function buildVertUniforms() {
@@ -174,6 +353,9 @@ varying vec2 vFlowUv;
174
353
  varying vec4 v_new_position;
175
354
  varying vec3 v_color;
176
355
  varying float v_displacement_amount;
356
+ varying vec3 vViewPosition;
357
+ varying vec3 vNormal;
358
+ varying vec3 vPosition;
177
359
 
178
360
  uniform float u_time;
179
361
  uniform vec2 u_resolution;
@@ -204,6 +386,14 @@ uniform float u_flow_distortion_b;
204
386
  uniform float u_flow_scale;
205
387
  uniform float u_flow_ease;
206
388
  uniform float u_flow_enabled;
389
+
390
+ // Fresnel uniforms
391
+ uniform float u_fresnel_enabled;
392
+ uniform float u_fresnel_power;
393
+ uniform float u_fresnel_intensity;
394
+ uniform vec3 u_fresnel_color;
395
+
396
+ uniform float u_shape_type;
207
397
  `;
208
398
  }
209
399
  export function buildFragUniforms() {
@@ -211,10 +401,15 @@ export function buildFragUniforms() {
211
401
 
212
402
  varying vec2 vUv;
213
403
  varying vec2 vFlowUv;
404
+ varying vec4 v_new_position;
214
405
  varying vec3 v_color;
215
406
  varying float v_displacement_amount;
407
+ varying vec3 vViewPosition;
408
+ varying vec3 vNormal;
409
+ varying vec3 vPosition;
216
410
 
217
411
  uniform float u_time;
412
+ uniform vec2 u_resolution;
218
413
  uniform float u_plane_height;
219
414
 
220
415
  uniform float u_shadows;
@@ -238,6 +433,40 @@ uniform float u_flow_scale;
238
433
  uniform sampler2D u_procedural_texture;
239
434
  uniform float u_enable_procedural_texture;
240
435
  uniform float u_texture_ease;
436
+
437
+ // Domain warping uniforms
438
+ uniform float u_domain_warp_enabled;
439
+ uniform float u_domain_warp_intensity;
440
+ uniform float u_domain_warp_scale;
441
+
442
+ // Vignette uniforms
443
+ uniform float u_vignette_intensity;
444
+ uniform float u_vignette_radius;
445
+
446
+ // Fresnel uniforms (fragment side)
447
+ uniform float u_fresnel_enabled;
448
+ uniform float u_fresnel_power;
449
+ uniform float u_fresnel_intensity;
450
+ uniform vec3 u_fresnel_color;
451
+
452
+
453
+
454
+ // Iridescence uniforms
455
+ uniform float u_iridescence_enabled;
456
+ uniform float u_iridescence_intensity;
457
+ uniform float u_iridescence_speed;
458
+
459
+ // Bloom uniforms
460
+ uniform float u_bloom_intensity;
461
+ uniform float u_bloom_threshold;
462
+
463
+ // Chromatic aberration
464
+ uniform float u_chromatic_aberration;
465
+ uniform float u_shape_type;
466
+ uniform float u_transparent_texture_void;
467
+ uniform float u_silhouette_fade;
468
+ uniform float u_cylinder_fade;
469
+ uniform float u_ribbon_fade;
241
470
  `;
242
471
  }
243
472
  export function buildNoise() {
@@ -1 +1 @@
1
- {"version":3,"file":"shaders.js","sourceRoot":"","sources":["../src/shaders.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+EjC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFnC,CAAC;AAEF,MAAM,UAAU,iBAAiB;IAC7B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CV,CAAC;AACF,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC7B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BV,CAAC;AACF,CAAC;AAED,MAAM,UAAU,UAAU;IACtB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwJV,CAAC;AACF,CAAC;AAED,MAAM,UAAU,mBAAmB;IAC/B,OAAO;;;;;;CAMV,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"shaders.js","sourceRoot":"","sources":["../src/shaders.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoHjC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8NnC,CAAC;AAEF,MAAM,UAAU,iBAAiB;IAC7B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDV,CAAC;AACF,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC7B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsEV,CAAC;AACF,CAAC;AAED,MAAM,UAAU,UAAU;IACtB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwJV,CAAC;AACF,CAAC;AAED,MAAM,UAAU,mBAAmB;IAC/B,OAAO;;;;;;CAMV,CAAC;AACF,CAAC"}
package/dist/types.d.ts CHANGED
@@ -41,6 +41,46 @@ export type NeatConfig = {
41
41
  textureShapeCircles?: number;
42
42
  textureShapeBars?: number;
43
43
  textureShapeSquiggles?: number;
44
+ domainWarpEnabled?: boolean;
45
+ domainWarpIntensity?: number;
46
+ domainWarpScale?: number;
47
+ vignetteIntensity?: number;
48
+ vignetteRadius?: number;
49
+ fresnelEnabled?: boolean;
50
+ fresnelPower?: number;
51
+ fresnelIntensity?: number;
52
+ fresnelColor?: string;
53
+ iridescenceEnabled?: boolean;
54
+ iridescenceIntensity?: number;
55
+ iridescenceSpeed?: number;
56
+ bloomIntensity?: number;
57
+ bloomThreshold?: number;
58
+ chromaticAberration?: number;
59
+ shapeType?: 'plane' | 'sphere' | 'torus' | 'cylinder' | 'ribbon';
60
+ shapeRotationX?: number;
61
+ shapeRotationY?: number;
62
+ shapeRotationZ?: number;
63
+ shapeAutoRotateSpeedX?: number;
64
+ shapeAutoRotateSpeedY?: number;
65
+ sphereRadius?: number;
66
+ torusRadius?: number;
67
+ torusTube?: number;
68
+ cylinderRadius?: number;
69
+ cylinderHeight?: number;
70
+ planeBend?: number;
71
+ planeTwist?: number;
72
+ transparentTextureVoid?: boolean;
73
+ silhouetteFade?: number;
74
+ cylinderFade?: number;
75
+ ribbonFade?: number;
76
+ cameraLock?: boolean;
77
+ cameraX?: number;
78
+ cameraY?: number;
79
+ cameraZ?: number;
80
+ cameraRotationX?: number;
81
+ cameraRotationY?: number;
82
+ cameraRotationZ?: number;
83
+ cameraZoom?: number;
44
84
  };
45
85
  export type NeatColor = {
46
86
  color: string;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@firecms/neat",
3
3
  "description": "Beautiful 3D gradients for your website",
4
4
  "access": "public",
5
- "version": "0.7.1",
5
+ "version": "0.9.0",
6
6
  "main": "./dist/index.umd.js",
7
7
  "module": "./dist/index.es.js",
8
8
  "types": "dist/index.d.ts",