@fxi/zartigl 0.10.4 → 0.10.5

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/engine.d.ts CHANGED
@@ -861,6 +861,23 @@ export declare function getPalettes(options?: {
861
861
  includeDeprecated?: boolean;
862
862
  }): PaletteMeta[];
863
863
 
864
+ /**
865
+ * Glow gain at glow = 1. A thin trail covers about a quarter of its glow
866
+ * texel, so this keeps the halo faint even over dense trails.
867
+ */
868
+ export declare const GLOW_GAIN = 1.2;
869
+
870
+ /**
871
+ * Particle glow, `vec4 glowGather(sampler2D trails, ivec2 texel)` and
872
+ * `vec4 addGlow(vec4 trail, sampler2D glowTex, vec2 uv, float gain)`; GLSL
873
+ * ES 3.0. Gather the trails into a texture GLOW_SCALE× smaller, then add it
874
+ * under them at GLOW_GAIN × the style's glow.
875
+ */
876
+ export declare const GLOW_GLSL: string;
877
+
878
+ /** Trail texels per glow texel along each axis: the chunk's GLOW_SCALE. */
879
+ export declare const GLOW_SCALE = 4;
880
+
864
881
  /** Color grade of a style `particles.grade`; an object tunes the vibrant one. */
865
882
  export declare function gradeToColorGrade(grade: ParticleGrade | undefined): ColorGrade;
866
883
 
package/dist/engine.js CHANGED
@@ -1,117 +1,63 @@
1
- import { I as u, J as v, K as f, L as x, G as g, M as _, N as V, T as p, O as G, P as C, b as S, Q as b, c as y, R as L, S as R, l as O, z as h, D as A, U as T, V as k, n as I, u as D, q as F, A as B, C as E, m as w, B as N, W as P, X as z, Y as M, Z as U, o as H, _ as K, $ as Y, a0 as q, E as J, a1 as Q, a2 as W, H as X, v as Z, a3 as $ } from "./geovideo-index-BqOLqzgA.js";
2
- import { B as ee, C as ae, e as oe, b as ne, d as re, c as ce, g as te, i as se, a as ie, r as le } from "./backdrop-DctkJ45Q.js";
3
- var e = `vec3 velocityValue(vec4 texel, vec2 minimum, vec2 maximum, float physical) {
4
- if (physical > 0.5) return texel.xyz;
5
- return vec3(mix(minimum, maximum, texel.rg), texel.a);
6
- }
7
-
8
- vec3 blendVelocity(vec3 a, vec3 b, float fraction) {
9
- if (fraction <= 0.0) return a;
10
- return mix(a, b, fraction);
11
- }`, a = `vec3 applyVibrance(vec3 c, float v) {
12
- float mx = max(c.r, max(c.g, c.b));
13
- float mn = min(c.r, min(c.g, c.b));
14
- float boost = v * (1.0 - (mx - mn));
15
- float luma = dot(c, vec3(0.299, 0.587, 0.114));
16
- return mix(vec3(luma), c, 1.0 + boost);
17
- }
18
-
19
- vec3 gradeColor(vec3 c, vec4 g) {
20
- float m = max(c.r, max(c.g, c.b));
21
- if (m > 0.0) {
22
-
23
-
24
- float e = g.x > 1e-3 ? (1.0 - exp(-g.x * m)) / (1.0 - exp(-g.x)) : m;
25
-
26
- e += g.w * smoothstep(0.5, 1.0, e) * (1.0 - e);
27
- c *= e / m;
28
- }
29
-
30
- c = mix(c, c * c * (3.0 - 2.0 * c), g.y);
31
- return clamp(applyVibrance(c, g.z), 0.0, 1.0);
32
- }`, o = `uniform vec2 u_code_range;
33
- uniform vec2 u_value_range;
34
- uniform float u_scalar_transfer;
35
-
36
- float geoVideoScalarCode(float r) {
37
- return clamp((r - u_code_range.x) / (u_code_range.y - u_code_range.x), 0.0, 1.0);
38
- }
39
-
40
- float geoVideoScalarValue(float r) {
41
- float code = geoVideoScalarCode(r);
42
- float t = mix(code, (pow(10.0, code) - 1.0) / 9.0, u_scalar_transfer);
43
- return mix(u_value_range.x, u_value_range.y, t);
44
- }`, n = `uint pcg(uint v) {
45
- uint state = v * 747796405u + 2891336453u;
46
- uint word = ((state >> ((state >> 28u) + 4u)) ^ state) * 277803737u;
47
- return (word >> 22u) ^ word;
48
- }
49
-
50
- float random(uvec3 v) {
51
- return float(pcg(v.x ^ pcg(v.y ^ pcg(v.z))) >> 8u) * (1.0 / 16777216.0);
52
- }`, r = `vec3 applyVibrance(vec3 c, float v) {
53
- float mx = max(c.r, max(c.g, c.b));
54
- float mn = min(c.r, min(c.g, c.b));
55
- float boost = v * (1.0 - (mx - mn));
56
- float luma = dot(c, vec3(0.299, 0.587, 0.114));
57
- return mix(vec3(luma), c, 1.0 + boost);
58
- }`;
59
- const c = r, t = a, s = n, i = o, l = e;
1
+ import { K as o, L as s, G as r, M as i, j as d, N as t, O as G, P as c, Q as l, m as V, R as n, S as L, U as S, T as C, V as u, W as m, X as O, Y as _, b as p, Z as R, c as A, _ as T, $ as x, n as g, B as k, F, a0 as I, a1 as h, p as v, x as D, u as E, C as f, E as B, o as b, D as N, a2 as P, a3 as y, a4 as M, a5 as W, q as U, a6 as H, a7 as K, a8 as Y, H as j, a9 as q, aa as J, J as Q, v as X, ab as Z } from "./engine--787AbnI.js";
2
+ import { B as w, a as z, f as aa, b as ea, e as oa, c as sa, g as ra, i as ia, r as da, d as ta } from "./backdrop-Dceb4d8E.js";
60
3
  export {
61
- ee as BACKDROP_OFF,
62
- t as COLOR_GRADE_GLSL,
63
- ae as COLOR_GRADE_OFF,
64
- oe as COLOR_GRADE_VIBRANT,
65
- i as GEOVIDEO_SCALAR_GLSL,
66
- u as GeoVideoArchiveSource,
67
- v as GeoVideoClock,
68
- f as GeoVideoField,
69
- x as GeoVideoFrameSource,
70
- g as GeoVideoPlayback,
71
- _ as GeoVideoScalarSource,
72
- V as GeoVideoVectorSource,
73
- s as RANDOM_GLSL,
74
- p as TrailFade,
75
- l as VELOCITY_BLEND_GLSL,
76
- c as VIBRANCE_GLSL,
77
- G as alphaFadeAt,
78
- C as assertGeoVideoIndexIdentity,
79
- ne as backdropVec4,
80
- re as colorGradeToGrade,
81
- ce as colorGradeVec4,
82
- S as createColorRampTexture,
83
- b as createGeoVideoFrameSource,
84
- y as createProgram,
85
- L as createShader,
86
- R as fadeToFrames,
87
- O as fadeToOpacity,
88
- h as formatUnit,
89
- A as geoVideoChunkSources,
90
- T as geoVideoGrid,
91
- k as geoVideoIndexChunks,
92
- I as geoVideoScalarUniforms,
4
+ w as BACKDROP_OFF,
5
+ o as COLOR_GRADE_GLSL,
6
+ z as COLOR_GRADE_OFF,
7
+ aa as COLOR_GRADE_VIBRANT,
8
+ s as GEOVIDEO_SCALAR_GLSL,
9
+ r as GLOW_GAIN,
10
+ i as GLOW_GLSL,
11
+ d as GLOW_SCALE,
12
+ t as GeoVideoArchiveSource,
13
+ G as GeoVideoClock,
14
+ c as GeoVideoField,
15
+ l as GeoVideoFrameSource,
16
+ V as GeoVideoPlayback,
17
+ n as GeoVideoScalarSource,
18
+ L as GeoVideoVectorSource,
19
+ S as RANDOM_GLSL,
20
+ C as TrailFade,
21
+ u as VELOCITY_BLEND_GLSL,
22
+ m as VIBRANCE_GLSL,
23
+ O as alphaFadeAt,
24
+ _ as assertGeoVideoIndexIdentity,
25
+ ea as backdropVec4,
26
+ oa as colorGradeToGrade,
27
+ sa as colorGradeVec4,
28
+ p as createColorRampTexture,
29
+ R as createGeoVideoFrameSource,
30
+ A as createProgram,
31
+ T as createShader,
32
+ x as fadeToFrames,
33
+ g as fadeToOpacity,
34
+ k as formatUnit,
35
+ F as geoVideoChunkSources,
36
+ I as geoVideoGrid,
37
+ h as geoVideoIndexChunks,
38
+ v as geoVideoScalarUniforms,
93
39
  D as geoVideoTimelineValues,
94
- F as getPalettes,
95
- te as gradeToColorGrade,
96
- B as isGeoVideoArchiveSource,
97
- se as isHexColor,
98
- E as loadGeoVideoIndex,
99
- w as loadGeoVideoManifest,
40
+ E as getPalettes,
41
+ ra as gradeToColorGrade,
42
+ f as isGeoVideoArchiveSource,
43
+ ia as isHexColor,
44
+ B as loadGeoVideoIndex,
45
+ b as loadGeoVideoManifest,
100
46
  N as nextChunk,
101
47
  P as nextChunkSpan,
102
- z as pairChunk,
48
+ y as pairChunk,
103
49
  M as pairChunkSpan,
104
- U as parseTimeRange,
105
- ie as resolveBackdrop,
106
- le as resolveColorGrade,
107
- H as resolveColorRamp,
108
- K as stepTime,
109
- Y as subtractIsoDuration,
110
- q as timeBracket,
111
- J as timeRangeBounds,
112
- Q as timeStep,
113
- W as validateGeoVideoIndex,
114
- X as validateGeoVideoManifest,
115
- Z as validateScalarColorDomain,
116
- $ as velocityTexels
50
+ W as parseTimeRange,
51
+ da as resolveBackdrop,
52
+ ta as resolveColorGrade,
53
+ U as resolveColorRamp,
54
+ H as stepTime,
55
+ K as subtractIsoDuration,
56
+ Y as timeBracket,
57
+ j as timeRangeBounds,
58
+ q as timeStep,
59
+ J as validateGeoVideoIndex,
60
+ Q as validateGeoVideoManifest,
61
+ X as validateScalarColorDomain,
62
+ Z as velocityTexels
117
63
  };