@margoengine/vfx 0.0.0-stage → 1.0.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.
Files changed (104) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +4 -0
  3. package/README.md +2240 -2
  4. package/dist/base-LGs65K7K.js +709 -0
  5. package/dist/base.d.ts +869 -0
  6. package/dist/base.js +1 -0
  7. package/dist/blown-sand.d.ts +218 -0
  8. package/dist/blown-sand.js +700 -0
  9. package/dist/clouds.d.ts +237 -0
  10. package/dist/clouds.js +583 -0
  11. package/dist/compat-BFjXAQuu.js +14 -0
  12. package/dist/compat-CVSEj1Bp.js +217 -0
  13. package/dist/compat.d.ts +59 -0
  14. package/dist/curves.d.ts +11 -0
  15. package/dist/curves.js +59 -0
  16. package/dist/debris.d.ts +154 -0
  17. package/dist/debris.js +290 -0
  18. package/dist/depth-collide.d.ts +7 -0
  19. package/dist/depth-collide.js +96 -0
  20. package/dist/dust-current.d.ts +66 -0
  21. package/dist/dust-current.js +92 -0
  22. package/dist/emitter.d.ts +10 -0
  23. package/dist/emitter.js +125 -0
  24. package/dist/events.d.ts +9 -0
  25. package/dist/events.js +131 -0
  26. package/dist/extra-CgGjbojB.js +4 -0
  27. package/dist/extra.d.ts +2 -0
  28. package/dist/fields.d.ts +11 -0
  29. package/dist/fields.js +95 -0
  30. package/dist/fire-front.d.ts +610 -0
  31. package/dist/fire-front.js +1080 -0
  32. package/dist/fire.d.ts +140 -0
  33. package/dist/fire.js +194 -0
  34. package/dist/flame-ramp-VoBKpYnM.js +75 -0
  35. package/dist/flame-ramp.d.ts +61 -0
  36. package/dist/flame.d.ts +428 -0
  37. package/dist/flame.js +817 -0
  38. package/dist/flipbook.d.ts +7 -0
  39. package/dist/flipbook.js +23 -0
  40. package/dist/flocking-shaders.d.ts +48 -0
  41. package/dist/flocking-sim.d.ts +623 -0
  42. package/dist/flocking.d.ts +145 -0
  43. package/dist/flocking.js +1846 -0
  44. package/dist/fog-B-kBv7g0.js +32 -0
  45. package/dist/frame-BuvMFBPp.js +4 -0
  46. package/dist/frame.d.ts +7 -0
  47. package/dist/gunfire.d.ts +742 -0
  48. package/dist/gunfire.js +1214 -0
  49. package/dist/hash-Btsp6fGK.js +7 -0
  50. package/dist/hash.d.ts +2 -0
  51. package/dist/index.d.ts +17 -0
  52. package/dist/index.js +60 -0
  53. package/dist/json.d.ts +53 -0
  54. package/dist/json.js +239 -0
  55. package/dist/lit-Dx2tNwP-.js +152 -0
  56. package/dist/lit.d.ts +18 -0
  57. package/dist/lit.js +1 -0
  58. package/dist/mesh.d.ts +16 -0
  59. package/dist/mesh.js +248 -0
  60. package/dist/node-system.d.ts +315 -0
  61. package/dist/node-system.js +384 -0
  62. package/dist/nodes.d.ts +14 -0
  63. package/dist/nodes.js +293 -0
  64. package/dist/obstacles.d.ts +3 -0
  65. package/dist/obstacles.js +25 -0
  66. package/dist/over-life.d.ts +14 -0
  67. package/dist/over-life.js +94 -0
  68. package/dist/reactive-mask-B8xbyzlk.js +69 -0
  69. package/dist/require-webgpu--tUXPsmA.js +7 -0
  70. package/dist/ribbons.d.ts +22 -0
  71. package/dist/ribbons.js +165 -0
  72. package/dist/schedule.d.ts +29 -0
  73. package/dist/schedule.js +47 -0
  74. package/dist/settings.d.ts +362 -0
  75. package/dist/settings.js +707 -0
  76. package/dist/shader.d.ts +49 -0
  77. package/dist/shadows.d.ts +26 -0
  78. package/dist/shadows.js +182 -0
  79. package/dist/shapes.d.ts +34 -0
  80. package/dist/shapes.js +81 -0
  81. package/dist/shared/fog.d.ts +33 -0
  82. package/dist/shared/pass.d.ts +53 -0
  83. package/dist/shared/settings.d.ts +89 -0
  84. package/dist/skinned.d.ts +11 -0
  85. package/dist/skinned.js +104 -0
  86. package/dist/smoke.d.ts +283 -0
  87. package/dist/smoke.js +504 -0
  88. package/dist/soft.d.ts +17 -0
  89. package/dist/soft.js +55 -0
  90. package/dist/solid.d.ts +168 -0
  91. package/dist/solid.js +403 -0
  92. package/dist/sort.d.ts +3 -0
  93. package/dist/sort.js +58 -0
  94. package/dist/space.d.ts +14 -0
  95. package/dist/space.js +88 -0
  96. package/dist/stretch.d.ts +7 -0
  97. package/dist/stretch.js +40 -0
  98. package/dist/texture.d.ts +8 -0
  99. package/dist/texture.js +45 -0
  100. package/dist/view-RKprOPAy.js +30 -0
  101. package/dist/view-rect-DkeiiUtw.js +13 -0
  102. package/dist/wrap.d.ts +3 -0
  103. package/dist/wrap.js +5 -0
  104. package/package.json +198 -4
package/dist/space.js ADDED
@@ -0,0 +1,88 @@
1
+ import { MargoError as e } from "@margoengine/math/errors";
2
+ //#region src/space.ts
3
+ var t = [
4
+ 1,
5
+ 0,
6
+ 0,
7
+ 0,
8
+ 0,
9
+ 1,
10
+ 0,
11
+ 0,
12
+ 0,
13
+ 0,
14
+ 1,
15
+ 0,
16
+ 0,
17
+ 0,
18
+ 0,
19
+ 1
20
+ ], n = (t, n, r) => {
21
+ if (t.split(n).length !== 2) throw new e("unsupported", "VFX space needs its simulation shader; update the space edits");
22
+ return t.replace(n, r);
23
+ }, r = {
24
+ validate(e, n) {
25
+ if (!e || typeof e != "object") throw TypeError("VFX space needs an object; pass {mode: \"local\"}");
26
+ if (e.mode !== void 0 && e.mode !== "local" && e.mode !== "world") throw TypeError("VFX space mode must be local or world; choose one");
27
+ for (let [t, n] of [["inheritVelocity", 1], ["ratePerDistance", 1e6]]) {
28
+ let r = e[t] ?? 0;
29
+ if (!Number.isFinite(r) || r < 0 || r > n) throw RangeError(`VFX space ${t} must be 0..${n}; pass a finite value in range`);
30
+ }
31
+ let r = e.transform ?? t;
32
+ if (r.length !== 16 || !Array.from(r).every((e) => Number.isFinite(e) && Math.abs(e) <= 0xe8d4a51000)) throw RangeError("VFX space transform needs 16 finite rigid matrix values; pass a rigid 4x4 matrix");
33
+ if (r[3] !== 0 || r[7] !== 0 || r[11] !== 0 || r[15] !== 1) throw RangeError("VFX space transform must be affine; use a rigid 4x4 matrix");
34
+ for (let e = 0; e < 3; e++) for (let t = e; t < 3; t++) {
35
+ let n = r[e * 4] * r[t * 4] + r[e * 4 + 1] * r[t * 4 + 1] + r[e * 4 + 2] * r[t * 4 + 2];
36
+ if (Math.abs(n - +(e === t)) > 1e-5) throw RangeError("VFX space transform cannot scale or shear; use an orthonormal frame");
37
+ }
38
+ if (n.skinned) throw TypeError("VFX space cannot transform world-space skinned births; use one emitter");
39
+ },
40
+ simulation(e) {
41
+ return e = e.replace("fn update(", "struct Space {frame:mat4x4f,delta:mat4x4f,motion:vec4f,births:vec4f}\n@group(0) @binding(25) var<uniform> space:Space;\nfn update("), e = n(e, " p.positionLife.w-=dt;", " if(p.positionLife.w>0 && space.births.w>0){\n p.positionLife=vec4f((space.delta*vec4f(p.positionLife.xyz,1)).xyz,p.positionLife.w);\n p.velocitySize=vec4f((space.delta*vec4f(p.velocitySize.xyz,0)).xyz,p.velocitySize.w);\n }\n p.positionLife.w-=dt;"), n(e, " particles[cold]=p.color;particles[cold+1]=p.rotation;", " p.positionLife=vec4f((space.frame*vec4f(p.positionLife.xyz,1)).xyz,p.positionLife.w);\n if(f32(ticket)<space.births.x){let along=space.births.y+f32(ticket)*space.births.z;p.positionLife=vec4f(p.positionLife.xyz-space.motion.xyz*(1-along),p.positionLife.w);}\n p.velocitySize=vec4f((space.frame*vec4f(p.velocitySize.xyz,0)).xyz+space.motion.xyz*space.motion.w,p.velocitySize.w);\n particles[cold]=p.color;particles[cold+1]=p.rotation;");
42
+ },
43
+ create(e, n, r) {
44
+ let i = e.device.createBuffer({
45
+ size: 160,
46
+ usage: 72
47
+ });
48
+ r.push(i);
49
+ let a = /* @__PURE__ */ new Float32Array(40), o, s = 0;
50
+ return {
51
+ compute: [{
52
+ binding: 25,
53
+ resource: { buffer: i }
54
+ }],
55
+ emission(n) {
56
+ let r = e.options.space ?? {}, i = r.transform ?? t, c = e.options.position ?? [
57
+ 0,
58
+ 1,
59
+ 0
60
+ ], l = Array.from(i);
61
+ for (let e = 0; e < 3; e++) l[12 + e] += i[e] * c[0] + i[4 + e] * c[1] + i[8 + e] * c[2];
62
+ let u = o ?? l;
63
+ a.set(i, 0), a.set(t, 16);
64
+ for (let e = 0; e < 3; e++) for (let t = 0; t < 3; t++) {
65
+ let n = 0;
66
+ for (let r = 0; r < 3; r++) n += l[r * 4 + t] * u[r * 4 + e];
67
+ a[16 + e * 4 + t] = n;
68
+ }
69
+ for (let e = 0; e < 3; e++) {
70
+ a[28 + e] = l[12 + e];
71
+ for (let t = 0; t < 3; t++) a[28 + e] -= a[16 + t * 4 + e] * u[12 + t];
72
+ a[32 + e] = l[12 + e] - u[12 + e];
73
+ }
74
+ a[35] = n > 0 ? (r.inheritVelocity ?? 0) / n : 0;
75
+ let d = Math.hypot(a[32], a[33], a[34]) * (r.ratePerDistance ?? 0), f = Math.floor(d + s);
76
+ return a[36] = Math.min(e.capacity, f), a[37] = d > 0 ? (1 - s) / d : 1, a[38] = d > 0 ? 1 / d : 0, a[39] = +(r.mode === "local"), s = (d + s) % 1, o = l, f;
77
+ },
78
+ write(e) {
79
+ e.device.queue.writeBuffer(i, 0, a);
80
+ },
81
+ reset() {
82
+ o = void 0, s = 0;
83
+ }
84
+ };
85
+ }
86
+ };
87
+ //#endregion
88
+ export { r as space };
@@ -0,0 +1,7 @@
1
+ import type { VFXExtension, VFXStretch } from './base.js';
2
+ /**
3
+ * The `stretch` feature: velocity-stretched billboards, streaks along each particle's motion for sparks, rain and
4
+ * tracers. Pass it as `{stretch}` to `VFX` from `@margoengine/vfx/base`; the root `VFX` has it. `factor` is read
5
+ * every frame.
6
+ */
7
+ export declare const stretch: VFXExtension<VFXStretch>;
@@ -0,0 +1,40 @@
1
+ import { MargoError as e } from "@margoengine/math/errors";
2
+ //#region src/stretch.ts
3
+ var t = (e) => `
4
+ struct Stretch {shape:vec4f}
5
+ @group(0) @binding(${e}) var<uniform> stretch:Stretch;
6
+ `;
7
+ function n(t, n, r) {
8
+ if (t.split(n).length !== 2) throw new e("unsupported", "VFX stretch needs the shaders it was written for; update the stretch edits");
9
+ return t.replace(n, r);
10
+ }
11
+ var r = {
12
+ validate(e) {
13
+ if (!e || typeof e != "object") throw TypeError("VFX stretch must be an object; pass e.g. {factor: 0.05}");
14
+ let t = e.factor ?? .05;
15
+ if (typeof t != "number" || !Number.isFinite(t) || t < 0 || t > 10) throw RangeError("VFX stretch factor must be 0 to 10 seconds of travel; pass e.g. 0.05");
16
+ },
17
+ simulation: (e) => n(e.replace("fn update(", t(18) + "fn update("), "let r=p.velocitySize.w*1.01;", "let r=(p.velocitySize.w+stretch.shape.x*length(p.velocitySize.xyz))*1.01;"),
18
+ billboard: (e) => n(e.replace("struct Out", t(18) + "struct Out"), "let rotated=vec2f(corner.x*cs-corner.y*sn,corner.x*sn+corner.y*cs);", "let flat=vec2f(dot(p.velocitySize.xyz,f.right.xyz),dot(p.velocitySize.xyz,f.up.xyz));let across=length(flat);\n var rotated=vec2f(corner.x*cs-corner.y*sn,corner.x*sn+corner.y*cs);\n if(across>1e-6){let d=flat/across;let long=1+stretch.shape.x*length(p.velocitySize.xyz)/p.velocitySize.w;rotated=vec2f(d.y,-d.x)*corner.x+d*corner.y*long;}"),
19
+ create(e, t, n) {
20
+ let r = e.device.createBuffer({
21
+ size: 16,
22
+ usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST
23
+ });
24
+ n.push(r);
25
+ let i = /* @__PURE__ */ new Float32Array(4), a = {
26
+ binding: 18,
27
+ resource: { buffer: r }
28
+ };
29
+ return {
30
+ compute: [a],
31
+ render: [a],
32
+ write(t) {
33
+ let n = e.options.stretch;
34
+ i[0] = n ? n.factor ?? .05 : 0, t.device.queue.writeBuffer(r, 0, i);
35
+ }
36
+ };
37
+ }
38
+ };
39
+ //#endregion
40
+ export { r as stretch };
@@ -0,0 +1,8 @@
1
+ import type { VFXFeatures } from './base.js';
2
+ /**
3
+ * The `texture` feature: draws each particle as the RGBA8 sRGB sprite in `options.texture` (at most 4096 px per side)
4
+ * multiplied by the particle colour instead of the soft disc, or with `atlas` a grid of frames, one per particle
5
+ * (random at spawn, or stepped through over its life). Pass it as `{texture: textureFeature}` to `VFX` from
6
+ * `@margoengine/vfx/base`. Named `textureFeature` so it does not clash with `@margoengine/shader`'s `texture()` node.
7
+ */
8
+ export declare const textureFeature: NonNullable<VFXFeatures['texture']>;
@@ -0,0 +1,45 @@
1
+ //#region src/texture.ts
2
+ var e = "textureSample(sprite,spriteSampler,i.uv*vec2f(0.5,-0.5)+0.5)", t = (t, { width: n, height: r, atlas: i }) => {
3
+ if (!i) return t;
4
+ let { columns: a, rows: o } = i, s = a * o, c = [.5 * a / n, .5 * o / r], l = i.frames === "random", u = l ? `atlasHash(bitcast<u32>(p.rotation.x))%${s}u` : `min(u32(max(1-p.positionLife.w/p.rotation.z,0.0)*${s}.0),${s - 1}u)`;
5
+ return t.replace("struct Out", (l ? "fn atlasHash(v:u32)->u32 {var x=v;x=(x^(x>>16u))*0x7feb352du;x=(x^(x>>15u))*0x846ca68bu;return x^(x>>16u);}\n" : "") + "struct Out").replace("@location(1) color:vec4f}", "@location(1) color:vec4f,@location(2) @interpolate(flat) cell:vec2f}").replace("o.uv=corner;", `o.uv=corner;let atlasFrame=${u};o.cell=vec2f(f32(atlasFrame%${a}u),f32(atlasFrame/${a}u));`).replace(e, `textureSample(sprite,spriteSampler,(i.cell+clamp(i.uv*vec2f(0.5,-0.5)+0.5,vec2f(${c[0]},${c[1]}),vec2f(${1 - c[0]},${1 - c[1]})))/vec2f(${a},${o}))`);
6
+ }, n = {
7
+ copy(e) {
8
+ if (!Number.isSafeInteger(e.width) || !Number.isSafeInteger(e.height) || Math.min(e.width, e.height) < 1 || Math.max(e.width, e.height) > 4096 || !(e.data instanceof Uint8Array || e.data instanceof Uint8ClampedArray) || e.data.length !== e.width * e.height * 4) throw RangeError("Particle texture needs whole-number width and height from 1 to 4096 and RGBA data of width x height x 4 bytes; pass a Uint8Array of that length.");
9
+ let t = {
10
+ width: e.width,
11
+ height: e.height,
12
+ data: Uint8Array.from(e.data)
13
+ }, n = e.atlas;
14
+ if (n !== void 0) {
15
+ if (n?.frames !== "random" && n?.frames !== "lifetime") throw TypeError(`Particle atlas frames is ${String(n?.frames)}; pass 'random' or 'lifetime'`);
16
+ if (!Number.isSafeInteger(n.columns) || !Number.isSafeInteger(n.rows) || Math.min(n.columns, n.rows) < 1 || n.columns > e.width || n.rows > e.height) throw RangeError(`Particle atlas of ${n.columns} x ${n.rows} frames does not fit a ${e.width} x ${e.height} texture; pass whole numbers from 1 to the texture width and height`);
17
+ t.atlas = {
18
+ columns: n.columns,
19
+ rows: n.rows,
20
+ frames: n.frames
21
+ };
22
+ }
23
+ return t;
24
+ },
25
+ patch: (n, r) => t(n.replace("struct Out", "@group(0) @binding(3) var sprite:texture_2d<f32>;\n@group(0) @binding(4) var spriteSampler:sampler;\nstruct Out").replace("vec2f(-1.7320509,-1),vec2f(1.7320509,-1)", "vec2f(-3,-1),vec2f(3,-1)").replace("let radius=dot(i.uv,i.uv);if(radius>1){discard;}return vec4f(i.color.rgb,i.color.a*(1-radius)*(1-radius));", `let t=${e};if(t.a<0.02||any(abs(i.uv)>vec2f(1))){discard;}return vec4f(i.color.rgb*t.rgb,i.color.a*t.a);`), r),
26
+ create(e, t, n) {
27
+ let r = e.createTexture({
28
+ size: [t.width, t.height],
29
+ format: "rgba8unorm-srgb",
30
+ usage: GPUTextureUsage.COPY_DST | GPUTextureUsage.TEXTURE_BINDING
31
+ });
32
+ return n.push(r), e.queue.writeTexture({ texture: r }, t.data, { bytesPerRow: t.width * 4 }, [t.width, t.height]), [{
33
+ binding: 3,
34
+ resource: r.createView()
35
+ }, {
36
+ binding: 4,
37
+ resource: e.createSampler({
38
+ minFilter: "linear",
39
+ magFilter: "linear"
40
+ })
41
+ }];
42
+ }
43
+ };
44
+ //#endregion
45
+ export { n as textureFeature };
@@ -0,0 +1,30 @@
1
+ //#region ../shared/view.js
2
+ function e(e, t) {
3
+ let n = t.position, r = t.up ?? [
4
+ 0,
5
+ 1,
6
+ 0
7
+ ], i = n[0] - t.target[0], a = n[1] - t.target[1], o = n[2] - t.target[2], s = Math.abs(i), c = Math.abs(a), l = Math.abs(o), u = s > c ? s : c, d = u > l ? u : l, f;
8
+ if (s === Infinity || c === Infinity || l === Infinity) f = Infinity;
9
+ else if (s !== s || c !== c || l !== l) f = s + c + l;
10
+ else if (d === 0) f = 0;
11
+ else {
12
+ let e = s / d * (s / d), t = c / d * (c / d), n = e + t - e - t, r = l / d * (l / d) - n;
13
+ f = Math.sqrt(e + t + r) * d;
14
+ }
15
+ i /= f, a /= f, o /= f;
16
+ let p = r[1] * o - r[2] * a, m = r[2] * i - r[0] * o, h = r[0] * a - r[1] * i, g = Math.abs(p), _ = Math.abs(m), v = Math.abs(h), y = g > _ ? g : _, b = y > v ? y : v, x;
17
+ if (g === Infinity || _ === Infinity || v === Infinity) x = Infinity;
18
+ else if (g !== g || _ !== _ || v !== v) x = g + _ + v;
19
+ else if (b === 0) x = 0;
20
+ else {
21
+ let e = g / b * (g / b), t = _ / b * (_ / b), n = e + t - e - t, r = v / b * (v / b) - n;
22
+ x = Math.sqrt(e + t + r) * b;
23
+ }
24
+ if (!f || !x) throw RangeError("Invalid camera view; pass distinct eye and target and another up vector");
25
+ p /= x, m /= x, h /= x;
26
+ let S = a * h - o * m, C = o * p - i * h, w = i * m - a * p;
27
+ return e[0] = p, e[1] = S, e[2] = i, e[3] = 0, e[4] = m, e[5] = C, e[6] = a, e[7] = 0, e[8] = h, e[9] = w, e[10] = o, e[11] = 0, e[12] = -p * n[0] - m * n[1] - h * n[2], e[13] = -S * n[0] - C * n[1] - w * n[2], e[14] = -i * n[0] - a * n[1] - o * n[2], e[15] = 1, e;
28
+ }
29
+ //#endregion
30
+ export { e as t };
@@ -0,0 +1,13 @@
1
+ //#region ../shared/view-rect.js
2
+ function e(e) {
3
+ return e?.view?.viewport;
4
+ }
5
+ function t(t, n) {
6
+ let r = e(n);
7
+ if (!r) return;
8
+ t.setViewport(r[0], r[1], r[2], r[3], 0, 1);
9
+ let i = n.view.scissor ?? r;
10
+ t.setScissorRect(i[0], i[1], i[2], i[3]);
11
+ }
12
+ //#endregion
13
+ export { e as n, t };
package/dist/wrap.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type { VFXFeatures } from './base.js';
2
+ /** `wrap` option: keeps a field inside the emission box; re-entering particles restart at the emitter velocity. */
3
+ export declare const wrap: NonNullable<VFXFeatures['wrap']>;
package/dist/wrap.js ADDED
@@ -0,0 +1,5 @@
1
+ import { n as e } from "./frame-BuvMFBPp.js";
2
+ //#region src/wrap.ts
3
+ var t = { patch: (t) => t.replace(e, "\n let low=f.emitterTime.xyz-f.emissionExtent.xyz;let span=2*f.emissionExtent.xyz;let q=p.positionLife.xyz-low;\n if(any(q<vec3f(0))||any(q>span)){p.positionLife=vec4f(low+q-floor(q/span)*span,p.positionLife.w);p.velocitySize=vec4f(f.velocitySpread.xyz,p.velocitySize.w);}\n " + e) };
4
+ //#endregion
5
+ export { t as wrap };
package/package.json CHANGED
@@ -1,6 +1,200 @@
1
1
  {
2
2
  "name": "@margoengine/vfx",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "GPU particle simulation and indirect billboards, with curves over life and sphere, cone and mesh-surface emitters.",
5
+ "keywords": [
6
+ "margoengine",
7
+ "webgpu",
8
+ "3d",
9
+ "vfx"
10
+ ],
11
+ "homepage": "https://margoengine.com",
12
+ "bugs": {
13
+ "url": "https://github.com/scottcampbelldata/margoengine/issues"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/scottcampbelldata/margoengine.git",
18
+ "directory": "packages/vfx"
19
+ },
20
+ "license": "Apache-2.0",
21
+ "author": "Scott Campbell",
22
+ "type": "module",
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "dependencies": {
27
+ "@margoengine/clustered": "^1.0.0",
28
+ "@margoengine/math": "^1.0.0",
29
+ "@margoengine/sky": "^1.0.0"
30
+ },
31
+ "scripts": {
32
+ "build": "node ../../scripts/build-optional.js vfx",
33
+ "test": "npm run build && node --test test/*.test.js ../../examples/package-benchmarks/proofs/package-guard.mjs",
34
+ "prepack": "npm --prefix ../.. run build:packages",
35
+ "test:gpu:parity": "cd ../.. && node packages/vfx/test/parity.mjs --all && node packages/vfx/test/parity.mjs --all --compat",
36
+ "test:gpu": "cd ../.. && node packages/vfx/test/browser-check.mjs && node packages/vfx/test/features-check.mjs && node packages/vfx/test/lit-check.mjs && node packages/vfx/test/flipbook-webgl2.mjs && node packages/vfx/test/shadows-nodes-webgl2.mjs && node packages/vfx/test/seek-check.mjs && node packages/vfx/test/seek-check.mjs --compat && node packages/vfx/test/film-clock-check.mjs && node packages/vfx/test/clouds-check.mjs && node packages/vfx/test/blown-sand-check.mjs && node packages/vfx/test/blown-sand-check.mjs --compat && node packages/vfx/test/settings-check.mjs && node packages/vfx/test/smoke-check.mjs && node packages/vfx/test/smoke-ao.browser.mjs && node packages/vfx/test/smoke-ao.browser.mjs --compat && node packages/vfx/test/fire-front-check.mjs && node packages/vfx/test/flame-check.mjs && node packages/vfx/test/gunfire-check.mjs && node packages/vfx/test/solid-check.mjs && node packages/vfx/test/reactive-check.mjs && node packages/vfx/test/reactive-sources-check.mjs && node packages/vfx/test/reactive-sources-check.mjs --compat && node packages/vfx/test/flocking-check.mjs && node packages/vfx/test/flocking-check.mjs --compat"
37
+ },
38
+ "sideEffects": false,
39
+ "exports": {
40
+ ".": {
41
+ "types": "./dist/index.d.ts",
42
+ "import": "./dist/index.js"
43
+ },
44
+ "./base": {
45
+ "types": "./dist/base.d.ts",
46
+ "import": "./dist/base.js"
47
+ },
48
+ "./obstacles": {
49
+ "types": "./dist/obstacles.d.ts",
50
+ "import": "./dist/obstacles.js"
51
+ },
52
+ "./wrap": {
53
+ "types": "./dist/wrap.d.ts",
54
+ "import": "./dist/wrap.js"
55
+ },
56
+ "./sort": {
57
+ "types": "./dist/sort.d.ts",
58
+ "import": "./dist/sort.js"
59
+ },
60
+ "./texture": {
61
+ "types": "./dist/texture.d.ts",
62
+ "import": "./dist/texture.js"
63
+ },
64
+ "./soft": {
65
+ "types": "./dist/soft.d.ts",
66
+ "import": "./dist/soft.js"
67
+ },
68
+ "./curves": {
69
+ "types": "./dist/curves.d.ts",
70
+ "import": "./dist/curves.js"
71
+ },
72
+ "./emitter": {
73
+ "types": "./dist/emitter.d.ts",
74
+ "import": "./dist/emitter.js"
75
+ },
76
+ "./ribbons": {
77
+ "types": "./dist/ribbons.d.ts",
78
+ "import": "./dist/ribbons.js"
79
+ },
80
+ "./mesh": {
81
+ "types": "./dist/mesh.d.ts",
82
+ "import": "./dist/mesh.js"
83
+ },
84
+ "./events": {
85
+ "types": "./dist/events.d.ts",
86
+ "import": "./dist/events.js"
87
+ },
88
+ "./lit": {
89
+ "types": "./dist/lit.d.ts",
90
+ "import": "./dist/lit.js"
91
+ },
92
+ "./depth-collide": {
93
+ "types": "./dist/depth-collide.d.ts",
94
+ "import": "./dist/depth-collide.js"
95
+ },
96
+ "./stretch": {
97
+ "types": "./dist/stretch.d.ts",
98
+ "import": "./dist/stretch.js"
99
+ },
100
+ "./fields": {
101
+ "types": "./dist/fields.d.ts",
102
+ "import": "./dist/fields.js"
103
+ },
104
+ "./skinned": {
105
+ "types": "./dist/skinned.d.ts",
106
+ "import": "./dist/skinned.js"
107
+ },
108
+ "./flipbook": {
109
+ "types": "./dist/flipbook.d.ts",
110
+ "import": "./dist/flipbook.js"
111
+ },
112
+ "./shadows": {
113
+ "types": "./dist/shadows.d.ts",
114
+ "import": "./dist/shadows.js"
115
+ },
116
+ "./nodes": {
117
+ "types": "./dist/nodes.d.ts",
118
+ "import": "./dist/nodes.js"
119
+ },
120
+ "./space": {
121
+ "types": "./dist/space.d.ts",
122
+ "import": "./dist/space.js"
123
+ },
124
+ "./over-life": {
125
+ "types": "./dist/over-life.d.ts",
126
+ "import": "./dist/over-life.js"
127
+ },
128
+ "./shapes": {
129
+ "types": "./dist/shapes.d.ts",
130
+ "import": "./dist/shapes.js"
131
+ },
132
+ "./node-system": {
133
+ "types": "./dist/node-system.d.ts",
134
+ "import": "./dist/node-system.js"
135
+ },
136
+ "./schedule": {
137
+ "types": "./dist/schedule.d.ts",
138
+ "import": "./dist/schedule.js"
139
+ },
140
+ "./json": {
141
+ "types": "./dist/json.d.ts",
142
+ "import": "./dist/json.js"
143
+ },
144
+ "./fire": {
145
+ "types": "./dist/fire.d.ts",
146
+ "import": "./dist/fire.js"
147
+ },
148
+ "./settings": {
149
+ "types": "./dist/settings.d.ts",
150
+ "import": "./dist/settings.js"
151
+ },
152
+ "./clouds": {
153
+ "types": "./dist/clouds.d.ts",
154
+ "import": "./dist/clouds.js"
155
+ },
156
+ "./debris": {
157
+ "types": "./dist/debris.d.ts",
158
+ "import": "./dist/debris.js"
159
+ },
160
+ "./dust-current": {
161
+ "types": "./dist/dust-current.d.ts",
162
+ "import": "./dist/dust-current.js"
163
+ },
164
+ "./blown-sand": {
165
+ "types": "./dist/blown-sand.d.ts",
166
+ "import": "./dist/blown-sand.js"
167
+ },
168
+ "./flame": {
169
+ "types": "./dist/flame.d.ts",
170
+ "import": "./dist/flame.js"
171
+ },
172
+ "./smoke": {
173
+ "types": "./dist/smoke.d.ts",
174
+ "import": "./dist/smoke.js"
175
+ },
176
+ "./fire-front": {
177
+ "types": "./dist/fire-front.d.ts",
178
+ "import": "./dist/fire-front.js"
179
+ },
180
+ "./solid": {
181
+ "types": "./dist/solid.d.ts",
182
+ "import": "./dist/solid.js"
183
+ },
184
+ "./gunfire": {
185
+ "types": "./dist/gunfire.d.ts",
186
+ "import": "./dist/gunfire.js"
187
+ },
188
+ "./flocking": {
189
+ "types": "./dist/flocking.d.ts",
190
+ "import": "./dist/flocking.js"
191
+ }
192
+ },
193
+ "files": [
194
+ "dist",
195
+ "NOTICE"
196
+ ],
197
+ "peerDependencies": {
198
+ "@margoengine/core": "^1.0.0"
199
+ }
200
+ }