@nightshadeui/particle-system 2.16.0 → 2.17.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/ParticleSystemController.d.ts +2 -0
- package/dist/ParticleSystemController.d.ts.map +1 -1
- package/dist/components/ParticleCanvas.vue.d.ts +79 -0
- package/dist/components/ParticleCanvas.vue.d.ts.map +1 -0
- package/dist/components/ParticleSystem.vue.d.ts +21 -4
- package/dist/components/ParticleSystem.vue.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/particle-system.mjs +245 -92
- package/dist/particles.d.ts +1 -0
- package/dist/particles.d.ts.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -3
- package/dist/particle-system.css +0 -1
|
@@ -5,6 +5,7 @@ export declare class ParticleSystemController {
|
|
|
5
5
|
paused: Event<void>;
|
|
6
6
|
resumed: Event<void>;
|
|
7
7
|
finished: Event<void>;
|
|
8
|
+
updated: Event<void>;
|
|
8
9
|
particles: import('vue').Reactive<ParticleState[]>;
|
|
9
10
|
config: {
|
|
10
11
|
seed: number;
|
|
@@ -27,6 +28,7 @@ export declare class ParticleSystemController {
|
|
|
27
28
|
rotationOverTime: import('./types.js').NumberValue;
|
|
28
29
|
turbulence: import('./types.js').NumberValue;
|
|
29
30
|
noiseScale: import('./types.js').NumberValue;
|
|
31
|
+
update: import('./types.js').ParticleUpdate;
|
|
30
32
|
};
|
|
31
33
|
private index;
|
|
32
34
|
private spawnAccumulator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParticleSystemController.d.ts","sourceRoot":"","sources":["../src/ParticleSystemController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAUlC,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAItE,qBAAa,wBAAwB;IAEjC,OAAO,cAAqB;IAC5B,MAAM,cAAqB;IAC3B,OAAO,cAAqB;IAC5B,QAAQ,cAAqB;
|
|
1
|
+
{"version":3,"file":"ParticleSystemController.d.ts","sourceRoot":"","sources":["../src/ParticleSystemController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAUlC,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAItE,qBAAa,wBAAwB;IAEjC,OAAO,cAAqB;IAC5B,MAAM,cAAqB;IAC3B,OAAO,cAAqB;IAC5B,QAAQ,cAAqB;IAC7B,OAAO,cAAqB;IAE5B,SAAS,0CAAiC;IAC1C,MAAM;;;;;;;;;;;;;;;;;;;;;;MAA2B;IAEjC,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,gBAAgB,CAAK;IAC7B,OAAO,CAAC,MAAM,CAAkC;IAChD,OAAO,CAAC,KAAK,CAA4B;IACzC,OAAO,CAAC,QAAQ,CAAK;IACrB,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,KAAK,CAEV;gBAES,MAAM,GAAE,oBAAyB;IAI7C,IAAI,SAAS,YAEZ;IAED,IAAI,SAAS,YAEZ;IAED,IAAI,QAAQ,YAEX;IAED,SAAS,CAAC,MAAM,GAAE,oBAAyB;IAS3C,KAAK;IAKL,OAAO;IAKP,KAAK,CAAC,QAAQ,UAAgB;IAe9B,KAAK;IAQL,MAAM;IAUN,IAAI;IAIJ,MAAM;IASN,IAAI,CAAC,IAAI,SAAoB;IAa7B,OAAO,CAAC,UAAU;IAWlB,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,KAAK;IAUb,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,IAAI;IAWZ,OAAO,CAAC,eAAe;CAM1B"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
controller: {
|
|
3
|
+
type: ObjectConstructor;
|
|
4
|
+
};
|
|
5
|
+
config: {
|
|
6
|
+
type: ObjectConstructor;
|
|
7
|
+
};
|
|
8
|
+
draw: {
|
|
9
|
+
type: FunctionConstructor;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
clear: {
|
|
13
|
+
type: FunctionConstructor;
|
|
14
|
+
};
|
|
15
|
+
beforeDraw: {
|
|
16
|
+
type: FunctionConstructor;
|
|
17
|
+
};
|
|
18
|
+
afterDraw: {
|
|
19
|
+
type: FunctionConstructor;
|
|
20
|
+
};
|
|
21
|
+
pixelRatio: {
|
|
22
|
+
type: NumberConstructor;
|
|
23
|
+
};
|
|
24
|
+
}>, {}, {
|
|
25
|
+
localController: null;
|
|
26
|
+
resizeObserver: null;
|
|
27
|
+
}, {
|
|
28
|
+
particleController(): Record<string, any> | null;
|
|
29
|
+
isRunning(): any;
|
|
30
|
+
isPaused(): any;
|
|
31
|
+
canvasStyle(): {
|
|
32
|
+
display: string;
|
|
33
|
+
width: string;
|
|
34
|
+
height: string;
|
|
35
|
+
};
|
|
36
|
+
}, {
|
|
37
|
+
mountCanvas(): void;
|
|
38
|
+
unmountCanvas(): void;
|
|
39
|
+
mountController(controller: any): void;
|
|
40
|
+
unmountController(controller: any): void;
|
|
41
|
+
reset(): void;
|
|
42
|
+
pause(): void;
|
|
43
|
+
resume(): void;
|
|
44
|
+
stop(): void;
|
|
45
|
+
resizeCanvas(): void;
|
|
46
|
+
drawFrame(): void;
|
|
47
|
+
clearFrame(ctx: any, canvas: any): void;
|
|
48
|
+
getPixelRatio(): number;
|
|
49
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("started" | "paused" | "resumed" | "finished")[], "started" | "paused" | "resumed" | "finished", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
50
|
+
controller: {
|
|
51
|
+
type: ObjectConstructor;
|
|
52
|
+
};
|
|
53
|
+
config: {
|
|
54
|
+
type: ObjectConstructor;
|
|
55
|
+
};
|
|
56
|
+
draw: {
|
|
57
|
+
type: FunctionConstructor;
|
|
58
|
+
required: true;
|
|
59
|
+
};
|
|
60
|
+
clear: {
|
|
61
|
+
type: FunctionConstructor;
|
|
62
|
+
};
|
|
63
|
+
beforeDraw: {
|
|
64
|
+
type: FunctionConstructor;
|
|
65
|
+
};
|
|
66
|
+
afterDraw: {
|
|
67
|
+
type: FunctionConstructor;
|
|
68
|
+
};
|
|
69
|
+
pixelRatio: {
|
|
70
|
+
type: NumberConstructor;
|
|
71
|
+
};
|
|
72
|
+
}>> & Readonly<{
|
|
73
|
+
onStarted?: ((...args: any[]) => any) | undefined;
|
|
74
|
+
onPaused?: ((...args: any[]) => any) | undefined;
|
|
75
|
+
onResumed?: ((...args: any[]) => any) | undefined;
|
|
76
|
+
onFinished?: ((...args: any[]) => any) | undefined;
|
|
77
|
+
}>, {}, {}, {}, {}, "isPaused" | "reset" | "pause" | "resume" | "stop" | "drawFrame" | "isRunning", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
78
|
+
export default _default;
|
|
79
|
+
//# sourceMappingURL=ParticleCanvas.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParticleCanvas.vue.d.ts","sourceRoot":"","sources":["../../src/components/ParticleCanvas.vue"],"names":[],"mappings":"AAMA;"}
|
|
@@ -5,21 +5,24 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
5
5
|
config: {
|
|
6
6
|
type: ObjectConstructor;
|
|
7
7
|
};
|
|
8
|
+
tagName: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
8
12
|
}>, {}, {
|
|
9
13
|
localController: null;
|
|
10
|
-
eventCleanups: never[];
|
|
11
14
|
}, {
|
|
12
15
|
particleController(): Record<string, any> | null;
|
|
13
16
|
isRunning(): any;
|
|
14
17
|
isPaused(): any;
|
|
15
18
|
}, {
|
|
16
19
|
mountController(controller: any): void;
|
|
17
|
-
unmountController(): void;
|
|
20
|
+
unmountController(controller: any): void;
|
|
18
21
|
reset(): void;
|
|
19
22
|
pause(): void;
|
|
20
23
|
resume(): void;
|
|
21
24
|
stop(): void;
|
|
22
|
-
|
|
25
|
+
getHtmlStyle(particle: any): {
|
|
23
26
|
position: string;
|
|
24
27
|
top: number;
|
|
25
28
|
left: number;
|
|
@@ -30,6 +33,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
30
33
|
'transform-origin': string;
|
|
31
34
|
'will-change': string;
|
|
32
35
|
};
|
|
36
|
+
getSvgStyle(particle: any): {
|
|
37
|
+
opacity: any;
|
|
38
|
+
transform: string;
|
|
39
|
+
'transform-origin': string;
|
|
40
|
+
'transform-box': string;
|
|
41
|
+
'will-change': string;
|
|
42
|
+
};
|
|
43
|
+
getTransform(particle: any): string;
|
|
33
44
|
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("started" | "paused" | "resumed" | "finished")[], "started" | "paused" | "resumed" | "finished", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
34
45
|
controller: {
|
|
35
46
|
type: ObjectConstructor;
|
|
@@ -37,11 +48,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
37
48
|
config: {
|
|
38
49
|
type: ObjectConstructor;
|
|
39
50
|
};
|
|
51
|
+
tagName: {
|
|
52
|
+
type: StringConstructor;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
40
55
|
}>> & Readonly<{
|
|
41
56
|
onStarted?: ((...args: any[]) => any) | undefined;
|
|
42
57
|
onPaused?: ((...args: any[]) => any) | undefined;
|
|
43
58
|
onResumed?: ((...args: any[]) => any) | undefined;
|
|
44
59
|
onFinished?: ((...args: any[]) => any) | undefined;
|
|
45
|
-
}>, {
|
|
60
|
+
}>, {
|
|
61
|
+
tagName: string;
|
|
62
|
+
}, {}, {}, {}, "isPaused" | "reset" | "pause" | "resume" | "stop" | "isRunning", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
46
63
|
export default _default;
|
|
47
64
|
//# sourceMappingURL=ParticleSystem.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParticleSystem.vue.d.ts","sourceRoot":"","sources":["../../src/components/ParticleSystem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ParticleSystem.vue.d.ts","sourceRoot":"","sources":["../../src/components/ParticleSystem.vue"],"names":[],"mappings":"AAeA;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { default as ParticleCanvas } from './components/ParticleCanvas.vue';
|
|
1
2
|
import { default as ParticleSystem } from './components/ParticleSystem.vue';
|
|
2
3
|
export * from './particles.js';
|
|
3
4
|
export * from './ParticleSystemController.js';
|
|
4
5
|
export * from './types.js';
|
|
5
|
-
export { ParticleSystem, };
|
|
6
|
+
export { ParticleCanvas, ParticleSystem, };
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAE7D,cAAc,gBAAgB,CAAC;AAC/B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,YAAY,CAAC;AAE3B,OAAO,EACH,cAAc,GACjB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAE7D,cAAc,gBAAgB,CAAC;AAC/B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,YAAY,CAAC;AAE3B,OAAO,EACH,cAAc,EACd,cAAc,GACjB,CAAC"}
|
package/dist/particle-system.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { reactive as E, openBlock as
|
|
2
|
-
class
|
|
1
|
+
import { reactive as E, openBlock as I, createElementBlock as q, normalizeStyle as K, createBlock as W, resolveDynamicComponent as Z, withCtx as tt, Fragment as et, renderList as st, renderSlot as it } from "vue";
|
|
2
|
+
class w {
|
|
3
3
|
constructor() {
|
|
4
4
|
this._groups = /* @__PURE__ */ new Map();
|
|
5
5
|
}
|
|
@@ -26,23 +26,23 @@ class O {
|
|
|
26
26
|
i(e);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function h(t, e) {
|
|
30
30
|
return [t, e];
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function B(t) {
|
|
33
33
|
return Math.hypot(t[0], t[1]);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
const e =
|
|
37
|
-
return e === 0 ?
|
|
35
|
+
function nt(t) {
|
|
36
|
+
const e = B(t);
|
|
37
|
+
return e === 0 ? h(0, 0) : h(t[0] / e, t[1] / e);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
return
|
|
39
|
+
function L(t, e) {
|
|
40
|
+
return h(t[0] + e[0], t[1] + e[1]);
|
|
41
41
|
}
|
|
42
42
|
function U(t, e) {
|
|
43
|
-
return
|
|
43
|
+
return h(t[0] * e, t[1] * e);
|
|
44
44
|
}
|
|
45
|
-
const
|
|
45
|
+
const X = /* @__PURE__ */ Math.sqrt(3), rt = 0.5 * (X - 1), x = (3 - X) / 6, j = (t) => Math.floor(t) | 0, k = /* @__PURE__ */ new Float64Array([
|
|
46
46
|
1,
|
|
47
47
|
1,
|
|
48
48
|
-1,
|
|
@@ -68,33 +68,33 @@ const B = /* @__PURE__ */ Math.sqrt(3), tt = 0.5 * (B - 1), A = (3 - B) / 6, k =
|
|
|
68
68
|
0,
|
|
69
69
|
-1
|
|
70
70
|
]);
|
|
71
|
-
function
|
|
72
|
-
const e =
|
|
71
|
+
function ot(t = Math.random) {
|
|
72
|
+
const e = at(t), s = new Float64Array(e).map((n) => k[n % 12 * 2]), i = new Float64Array(e).map((n) => k[n % 12 * 2 + 1]);
|
|
73
73
|
return function(r, o) {
|
|
74
|
-
let m = 0,
|
|
75
|
-
const P = (r + o) *
|
|
76
|
-
let
|
|
77
|
-
|
|
78
|
-
const
|
|
79
|
-
let p = 0.5 -
|
|
74
|
+
let m = 0, d = 0, f = 0;
|
|
75
|
+
const P = (r + o) * rt, O = j(r + P), S = j(o + P), N = (O + S) * x, Y = O - N, J = S - N, c = r - Y, u = o - J;
|
|
76
|
+
let T, b;
|
|
77
|
+
c > u ? (T = 1, b = 0) : (T = 0, b = 1);
|
|
78
|
+
const _ = c - T + x, F = u - b + x, z = c - 1 + 2 * x, M = u - 1 + 2 * x, R = O & 255, $ = S & 255;
|
|
79
|
+
let p = 0.5 - c * c - u * u;
|
|
80
80
|
if (p >= 0) {
|
|
81
|
-
const l =
|
|
82
|
-
p *= p, m = p * p * (v *
|
|
81
|
+
const l = R + e[$], v = s[l], C = i[l];
|
|
82
|
+
p *= p, m = p * p * (v * c + C * u);
|
|
83
83
|
}
|
|
84
|
-
let
|
|
85
|
-
if (y >= 0) {
|
|
86
|
-
const l = V + w + e[$ + x], v = s[l], C = i[l];
|
|
87
|
-
y *= y, f = y * y * (v * M + C * b);
|
|
88
|
-
}
|
|
89
|
-
let g = 0.5 - z * z - F * F;
|
|
84
|
+
let g = 0.5 - _ * _ - F * F;
|
|
90
85
|
if (g >= 0) {
|
|
91
|
-
const l =
|
|
92
|
-
g *= g, d = g * g * (v *
|
|
86
|
+
const l = R + T + e[$ + b], v = s[l], C = i[l];
|
|
87
|
+
g *= g, d = g * g * (v * _ + C * F);
|
|
88
|
+
}
|
|
89
|
+
let y = 0.5 - z * z - M * M;
|
|
90
|
+
if (y >= 0) {
|
|
91
|
+
const l = R + 1 + e[$ + 1], v = s[l], C = i[l];
|
|
92
|
+
y *= y, f = y * y * (v * z + C * M);
|
|
93
93
|
}
|
|
94
|
-
return 70 * (m +
|
|
94
|
+
return 70 * (m + d + f);
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function at(t) {
|
|
98
98
|
const s = new Uint8Array(512);
|
|
99
99
|
for (let i = 0; i < 512 / 2; i++)
|
|
100
100
|
s[i] = i;
|
|
@@ -106,7 +106,7 @@ function st(t) {
|
|
|
106
106
|
s[i] = s[i - 256];
|
|
107
107
|
return s;
|
|
108
108
|
}
|
|
109
|
-
const
|
|
109
|
+
const lt = {
|
|
110
110
|
seed: 1,
|
|
111
111
|
isPaused: !1,
|
|
112
112
|
startCount: 24,
|
|
@@ -126,15 +126,17 @@ const it = {
|
|
|
126
126
|
rotation: 0,
|
|
127
127
|
rotationOverTime: 0,
|
|
128
128
|
turbulence: 0,
|
|
129
|
-
noiseScale: 0.01
|
|
129
|
+
noiseScale: 0.01,
|
|
130
|
+
update: () => {
|
|
131
|
+
}
|
|
130
132
|
};
|
|
131
|
-
function
|
|
133
|
+
function G(t = {}) {
|
|
132
134
|
return {
|
|
133
|
-
...
|
|
135
|
+
...lt,
|
|
134
136
|
...t
|
|
135
137
|
};
|
|
136
138
|
}
|
|
137
|
-
function
|
|
139
|
+
function D(t) {
|
|
138
140
|
let e = t >>> 0;
|
|
139
141
|
return () => {
|
|
140
142
|
e += 1831565813;
|
|
@@ -142,27 +144,27 @@ function I(t) {
|
|
|
142
144
|
return s = Math.imul(s ^ s >>> 15, s | 1), s ^= s + Math.imul(s ^ s >>> 7, s | 61), ((s ^ s >>> 14) >>> 0) / 4294967296;
|
|
143
145
|
};
|
|
144
146
|
}
|
|
145
|
-
function
|
|
146
|
-
const i =
|
|
147
|
+
function ht(t, e, s) {
|
|
148
|
+
const i = A(e.shape, s), n = s() * Math.PI * 2, r = Math.sqrt(s()), o = h(
|
|
147
149
|
Math.cos(n) * r * i[0],
|
|
148
150
|
Math.sin(n) * r * i[1]
|
|
149
|
-
), m =
|
|
151
|
+
), m = B(o) === 0 ? h(Math.cos(n), Math.sin(n)) : nt(o), d = A(e.linearVelocity, s), f = a(e.radialVelocity, s), P = U(m, f);
|
|
150
152
|
return {
|
|
151
153
|
index: t,
|
|
152
154
|
age: 0,
|
|
153
155
|
lifetime: Math.max(1e-3, a(e.lifetime, s)),
|
|
154
156
|
position: o,
|
|
155
|
-
velocity:
|
|
156
|
-
effectiveVelocity:
|
|
157
|
+
velocity: d,
|
|
158
|
+
effectiveVelocity: L(d, P),
|
|
157
159
|
radialDirection: m,
|
|
158
160
|
size: a(e.size, s),
|
|
159
161
|
sizeOverTime: a(e.sizeOverTime, s),
|
|
160
|
-
scale:
|
|
161
|
-
scaleOverTime:
|
|
162
|
+
scale: A(e.scale, s),
|
|
163
|
+
scaleOverTime: A(e.scaleOverTime, s),
|
|
162
164
|
opacity: a(e.opacity, s),
|
|
163
165
|
opacityOverTime: a(e.opacityOverTime, s),
|
|
164
|
-
linearAcceleration:
|
|
165
|
-
radialVelocity:
|
|
166
|
+
linearAcceleration: A(e.linearAcceleration, s),
|
|
167
|
+
radialVelocity: f,
|
|
166
168
|
radialAcceleration: a(e.radialAcceleration, s),
|
|
167
169
|
rotation: a(e.rotation, s),
|
|
168
170
|
rotationOverTime: a(e.rotationOverTime, s),
|
|
@@ -171,7 +173,7 @@ function nt(t, e, s) {
|
|
|
171
173
|
t: 0
|
|
172
174
|
};
|
|
173
175
|
}
|
|
174
|
-
function
|
|
176
|
+
function ct(t, e, s) {
|
|
175
177
|
t.age += e, t.radialVelocity += t.radialAcceleration * e, t.velocity[0] += (t.linearAcceleration[0] + s(
|
|
176
178
|
t.position[0] * t.noiseScale,
|
|
177
179
|
t.position[1] * t.noiseScale
|
|
@@ -180,31 +182,31 @@ function rt(t, e, s) {
|
|
|
180
182
|
t.position[1] * t.noiseScale - 100
|
|
181
183
|
) * t.turbulence) * e;
|
|
182
184
|
const i = U(t.radialDirection, t.radialVelocity);
|
|
183
|
-
t.effectiveVelocity =
|
|
185
|
+
t.effectiveVelocity = L(t.velocity, i), t.position[0] += t.effectiveVelocity[0] * e, t.position[1] += t.effectiveVelocity[1] * e, t.size += t.sizeOverTime * e, t.scale[0] += t.scaleOverTime[0] * e, t.scale[1] += t.scaleOverTime[1] * e, t.opacity += t.opacityOverTime * e, t.rotation += t.rotationOverTime * e, t.t = Math.min(1, t.age / t.lifetime);
|
|
184
186
|
}
|
|
185
|
-
function
|
|
186
|
-
return
|
|
187
|
+
function V(t) {
|
|
188
|
+
return ot(t);
|
|
187
189
|
}
|
|
188
190
|
function a(t, e) {
|
|
189
191
|
return Array.isArray(t) ? t[0] + (t[1] - t[0]) * e() : t;
|
|
190
192
|
}
|
|
191
|
-
function
|
|
192
|
-
if (
|
|
193
|
+
function A(t, e) {
|
|
194
|
+
if (ut(t)) {
|
|
193
195
|
const [s, i] = t;
|
|
194
|
-
return
|
|
196
|
+
return h(
|
|
195
197
|
s[0] + (i[0] - s[0]) * e(),
|
|
196
198
|
s[1] + (i[1] - s[1]) * e()
|
|
197
199
|
);
|
|
198
200
|
}
|
|
199
|
-
return
|
|
201
|
+
return h(t[0], t[1]);
|
|
200
202
|
}
|
|
201
|
-
function
|
|
203
|
+
function ut(t) {
|
|
202
204
|
return Array.isArray(t[0]);
|
|
203
205
|
}
|
|
204
|
-
const
|
|
205
|
-
class
|
|
206
|
+
const mt = Number.MAX_SAFE_INTEGER;
|
|
207
|
+
class H {
|
|
206
208
|
constructor(e = {}) {
|
|
207
|
-
this.started = new
|
|
209
|
+
this.started = new w(), this.paused = new w(), this.resumed = new w(), this.finished = new w(), this.updated = new w(), this.particles = E([]), this.config = G(), this.index = 0, this.spawnAccumulator = 0, this.random = D(this.config.seed), this.noise = V(this.random), this.lastTime = 0, this.frame = 0, this.mounted = !1, this.state = E({
|
|
208
210
|
isPaused: this.config.isPaused
|
|
209
211
|
}), this.setConfig(e);
|
|
210
212
|
}
|
|
@@ -219,7 +221,7 @@ class lt {
|
|
|
219
221
|
}
|
|
220
222
|
setConfig(e = {}) {
|
|
221
223
|
const s = this.config.seed;
|
|
222
|
-
this.config =
|
|
224
|
+
this.config = G(e), this.config.seed !== s && (this.random = D(this.config.seed), this.noise = V(this.random));
|
|
223
225
|
}
|
|
224
226
|
mount() {
|
|
225
227
|
this.mounted = !0, this.reset(this.config.isPaused);
|
|
@@ -228,7 +230,7 @@ class lt {
|
|
|
228
230
|
this.mounted = !1, cancelAnimationFrame(this.frame);
|
|
229
231
|
}
|
|
230
232
|
reset(e = this.isPaused) {
|
|
231
|
-
this.particles.splice(0), this.index = 0, this.spawnAccumulator = 0, this.lastTime = performance.now(), this.state.isPaused = e, this.random =
|
|
233
|
+
this.particles.splice(0), this.index = 0, this.spawnAccumulator = 0, this.lastTime = performance.now(), this.state.isPaused = e, this.random = D(this.config.seed), this.noise = V(this.random), this.spawn(this.config.startCount), this.updated.emit(), this.started.emit(), this.finishIfDrained(), this.startFrame();
|
|
232
234
|
}
|
|
233
235
|
pause() {
|
|
234
236
|
this.isPaused || (this.state.isPaused = !0, this.paused.emit());
|
|
@@ -248,7 +250,7 @@ class lt {
|
|
|
248
250
|
return;
|
|
249
251
|
}
|
|
250
252
|
const s = Math.min(0.05, Math.max(0, (e - this.lastTime) / 1e3));
|
|
251
|
-
this.lastTime = e, this.spawnOverTime(s), this.step(s), this.finishIfDrained();
|
|
253
|
+
this.lastTime = e, this.spawnOverTime(s), this.step(s), this.updated.emit(), this.finishIfDrained();
|
|
252
254
|
}
|
|
253
255
|
startFrame() {
|
|
254
256
|
!this.mounted || this.isPaused || (cancelAnimationFrame(this.frame), this.frame = requestAnimationFrame((e) => {
|
|
@@ -262,7 +264,7 @@ class lt {
|
|
|
262
264
|
}
|
|
263
265
|
spawn(e) {
|
|
264
266
|
for (let s = 0; s < e; s++)
|
|
265
|
-
this.particles.push(
|
|
267
|
+
this.particles.push(ht(
|
|
266
268
|
this.nextIndex(),
|
|
267
269
|
this.config,
|
|
268
270
|
this.random
|
|
@@ -270,27 +272,32 @@ class lt {
|
|
|
270
272
|
}
|
|
271
273
|
nextIndex() {
|
|
272
274
|
const e = this.index;
|
|
273
|
-
return this.index = e ===
|
|
275
|
+
return this.index = e === mt ? 0 : e + 1, e;
|
|
274
276
|
}
|
|
275
277
|
step(e) {
|
|
276
278
|
for (let s = this.particles.length - 1; s >= 0; s--) {
|
|
277
279
|
const i = this.particles[s];
|
|
278
|
-
|
|
280
|
+
ct(i, e, this.noise), this.config.update(i, e), i.age >= i.lifetime && this.particles.splice(s, 1);
|
|
279
281
|
}
|
|
280
282
|
}
|
|
281
283
|
finishIfDrained() {
|
|
282
284
|
this.isRunning && this.isDrained && this.finish();
|
|
283
285
|
}
|
|
284
286
|
}
|
|
285
|
-
const
|
|
287
|
+
const Q = (t, e) => {
|
|
286
288
|
const s = t.__vccOpts || t;
|
|
287
289
|
for (const [i, n] of e)
|
|
288
290
|
s[i] = n;
|
|
289
291
|
return s;
|
|
290
|
-
},
|
|
292
|
+
}, dt = {
|
|
291
293
|
props: {
|
|
292
294
|
controller: { type: Object },
|
|
293
|
-
config: { type: Object }
|
|
295
|
+
config: { type: Object },
|
|
296
|
+
draw: { type: Function, required: !0 },
|
|
297
|
+
clear: { type: Function },
|
|
298
|
+
beforeDraw: { type: Function },
|
|
299
|
+
afterDraw: { type: Function },
|
|
300
|
+
pixelRatio: { type: Number }
|
|
294
301
|
},
|
|
295
302
|
emits: [
|
|
296
303
|
"started",
|
|
@@ -303,13 +310,139 @@ const ct = (t, e) => {
|
|
|
303
310
|
"pause",
|
|
304
311
|
"resume",
|
|
305
312
|
"stop",
|
|
313
|
+
"drawFrame",
|
|
306
314
|
"isRunning",
|
|
307
315
|
"isPaused"
|
|
308
316
|
],
|
|
309
317
|
data() {
|
|
310
318
|
return {
|
|
311
319
|
localController: null,
|
|
312
|
-
|
|
320
|
+
resizeObserver: null
|
|
321
|
+
};
|
|
322
|
+
},
|
|
323
|
+
computed: {
|
|
324
|
+
particleController() {
|
|
325
|
+
return this.controller ?? this.localController;
|
|
326
|
+
},
|
|
327
|
+
isRunning() {
|
|
328
|
+
return this.particleController.isRunning;
|
|
329
|
+
},
|
|
330
|
+
isPaused() {
|
|
331
|
+
return this.particleController.isPaused;
|
|
332
|
+
},
|
|
333
|
+
canvasStyle() {
|
|
334
|
+
return {
|
|
335
|
+
display: "block",
|
|
336
|
+
width: "100%",
|
|
337
|
+
height: "100%"
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
watch: {
|
|
342
|
+
config: {
|
|
343
|
+
deep: !0,
|
|
344
|
+
handler(t) {
|
|
345
|
+
t != null && this.particleController?.setConfig(t);
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
controller(t, e) {
|
|
349
|
+
this.unmountController(e ?? this.localController), this.mountController(t ?? this.localController), this.drawFrame();
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
created() {
|
|
353
|
+
this.localController = new H(this.config ?? {});
|
|
354
|
+
},
|
|
355
|
+
mounted() {
|
|
356
|
+
this.mountCanvas(), this.mountController(this.particleController);
|
|
357
|
+
},
|
|
358
|
+
beforeUnmount() {
|
|
359
|
+
this.unmountController(this.particleController), this.unmountCanvas();
|
|
360
|
+
},
|
|
361
|
+
methods: {
|
|
362
|
+
mountCanvas() {
|
|
363
|
+
this.resizeObserver = new ResizeObserver(() => this.resizeCanvas()), this.resizeObserver.observe(this.$refs.canvas), this.resizeCanvas();
|
|
364
|
+
},
|
|
365
|
+
unmountCanvas() {
|
|
366
|
+
this.resizeObserver?.disconnect(), this.resizeObserver = null;
|
|
367
|
+
},
|
|
368
|
+
mountController(t) {
|
|
369
|
+
this.config != null && t.setConfig(this.config), t.started.on(() => this.$emit("started"), this), t.paused.on(() => this.$emit("paused"), this), t.resumed.on(() => this.$emit("resumed"), this), t.finished.on(() => this.$emit("finished"), this), t.updated.on(() => this.drawFrame(), this), t.mount();
|
|
370
|
+
},
|
|
371
|
+
unmountController(t) {
|
|
372
|
+
t && (t.started.removeAll(this), t.paused.removeAll(this), t.resumed.removeAll(this), t.finished.removeAll(this), t.updated.removeAll(this), t.unmount());
|
|
373
|
+
},
|
|
374
|
+
reset() {
|
|
375
|
+
this.particleController.reset();
|
|
376
|
+
},
|
|
377
|
+
pause() {
|
|
378
|
+
this.particleController.pause();
|
|
379
|
+
},
|
|
380
|
+
resume() {
|
|
381
|
+
this.particleController.resume();
|
|
382
|
+
},
|
|
383
|
+
stop() {
|
|
384
|
+
this.particleController.stop();
|
|
385
|
+
},
|
|
386
|
+
resizeCanvas() {
|
|
387
|
+
const t = this.$refs.canvas, e = t.getBoundingClientRect(), s = this.getPixelRatio(), i = Math.max(1, Math.round(e.width * s)), n = Math.max(1, Math.round(e.height * s));
|
|
388
|
+
t.width !== i && (t.width = i), t.height !== n && (t.height = n), this.drawFrame();
|
|
389
|
+
},
|
|
390
|
+
drawFrame() {
|
|
391
|
+
const t = this.$refs.canvas;
|
|
392
|
+
if (!t)
|
|
393
|
+
return;
|
|
394
|
+
const e = t.getContext("2d"), s = this.particleController.particles;
|
|
395
|
+
if (!e)
|
|
396
|
+
return;
|
|
397
|
+
const i = this.getPixelRatio();
|
|
398
|
+
e.setTransform(i, 0, 0, i, 0, 0), this.clearFrame(e, t), this.beforeDraw?.(e, s, t);
|
|
399
|
+
for (const n of s)
|
|
400
|
+
this.draw(e, n, t);
|
|
401
|
+
this.afterDraw?.(e, s, t);
|
|
402
|
+
},
|
|
403
|
+
clearFrame(t, e) {
|
|
404
|
+
if (this.clear) {
|
|
405
|
+
this.clear(t, e);
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
const s = this.getPixelRatio();
|
|
409
|
+
t.clearRect(0, 0, e.width / s, e.height / s);
|
|
410
|
+
},
|
|
411
|
+
getPixelRatio() {
|
|
412
|
+
return Math.max(1, this.pixelRatio ?? window.devicePixelRatio ?? 1);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
function ft(t, e, s, i, n, r) {
|
|
417
|
+
return I(), q("canvas", {
|
|
418
|
+
ref: "canvas",
|
|
419
|
+
class: "ParticleCanvas",
|
|
420
|
+
style: K(r.canvasStyle)
|
|
421
|
+
}, null, 4);
|
|
422
|
+
}
|
|
423
|
+
const vt = /* @__PURE__ */ Q(dt, [["render", ft]]), pt = {
|
|
424
|
+
props: {
|
|
425
|
+
controller: { type: Object },
|
|
426
|
+
config: { type: Object },
|
|
427
|
+
tagName: { type: String, default: "div" }
|
|
428
|
+
},
|
|
429
|
+
emits: [
|
|
430
|
+
"started",
|
|
431
|
+
"paused",
|
|
432
|
+
"resumed",
|
|
433
|
+
"finished"
|
|
434
|
+
],
|
|
435
|
+
expose: [
|
|
436
|
+
"reset",
|
|
437
|
+
"pause",
|
|
438
|
+
"resume",
|
|
439
|
+
"stop",
|
|
440
|
+
"isRunning",
|
|
441
|
+
"isPaused"
|
|
442
|
+
],
|
|
443
|
+
data() {
|
|
444
|
+
return {
|
|
445
|
+
localController: null
|
|
313
446
|
};
|
|
314
447
|
},
|
|
315
448
|
computed: {
|
|
@@ -331,24 +464,24 @@ const ct = (t, e) => {
|
|
|
331
464
|
}
|
|
332
465
|
},
|
|
333
466
|
controller(t, e) {
|
|
334
|
-
e
|
|
467
|
+
this.unmountController(e ?? this.localController), this.mountController(t ?? this.localController);
|
|
335
468
|
}
|
|
336
469
|
},
|
|
337
470
|
created() {
|
|
338
|
-
this.localController = new
|
|
471
|
+
this.localController = new H(this.config ?? {});
|
|
339
472
|
},
|
|
340
473
|
mounted() {
|
|
341
474
|
this.mountController(this.particleController);
|
|
342
475
|
},
|
|
343
476
|
beforeUnmount() {
|
|
344
|
-
this.unmountController();
|
|
477
|
+
this.unmountController(this.particleController);
|
|
345
478
|
},
|
|
346
479
|
methods: {
|
|
347
480
|
mountController(t) {
|
|
348
481
|
this.config != null && t.setConfig(this.config), t.started.on(() => this.$emit("started"), this), t.paused.on(() => this.$emit("paused"), this), t.resumed.on(() => this.$emit("resumed"), this), t.finished.on(() => this.$emit("finished"), this), t.mount();
|
|
349
482
|
},
|
|
350
|
-
unmountController() {
|
|
351
|
-
|
|
483
|
+
unmountController(t) {
|
|
484
|
+
t && (t.started.removeAll(this), t.paused.removeAll(this), t.resumed.removeAll(this), t.finished.removeAll(this), t.unmount());
|
|
352
485
|
},
|
|
353
486
|
reset() {
|
|
354
487
|
this.particleController.reset();
|
|
@@ -362,7 +495,7 @@ const ct = (t, e) => {
|
|
|
362
495
|
stop() {
|
|
363
496
|
this.particleController.stop();
|
|
364
497
|
},
|
|
365
|
-
|
|
498
|
+
getHtmlStyle(t) {
|
|
366
499
|
const e = Math.max(0, t.size);
|
|
367
500
|
return {
|
|
368
501
|
position: "absolute",
|
|
@@ -371,30 +504,50 @@ const ct = (t, e) => {
|
|
|
371
504
|
width: `${e}px`,
|
|
372
505
|
height: `${e}px`,
|
|
373
506
|
opacity: t.opacity,
|
|
374
|
-
transform:
|
|
507
|
+
transform: this.getTransform(t),
|
|
375
508
|
"transform-origin": "center",
|
|
376
509
|
"will-change": "transform, opacity"
|
|
377
510
|
};
|
|
511
|
+
},
|
|
512
|
+
getSvgStyle(t) {
|
|
513
|
+
return {
|
|
514
|
+
opacity: t.opacity,
|
|
515
|
+
transform: this.getTransform(t),
|
|
516
|
+
"transform-origin": "center",
|
|
517
|
+
"transform-box": "fill-box",
|
|
518
|
+
"will-change": "transform, opacity"
|
|
519
|
+
};
|
|
520
|
+
},
|
|
521
|
+
getTransform(t) {
|
|
522
|
+
return `translate(${t.position[0]}px, ${t.position[1]}px) rotate(${t.rotation}deg) scale(${t.scale[0]}, ${t.scale[1]})`;
|
|
378
523
|
}
|
|
379
524
|
}
|
|
380
|
-
}
|
|
381
|
-
function
|
|
382
|
-
return
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
525
|
+
};
|
|
526
|
+
function gt(t, e, s, i, n, r) {
|
|
527
|
+
return I(), W(Z(s.tagName), {
|
|
528
|
+
class: "ParticleSystem",
|
|
529
|
+
style: { position: "relative" }
|
|
530
|
+
}, {
|
|
531
|
+
default: tt(() => [
|
|
532
|
+
(I(!0), q(et, null, st(r.particleController.particles, (o) => it(t.$slots, "default", {
|
|
533
|
+
key: o.index,
|
|
534
|
+
particle: o,
|
|
535
|
+
htmlStyle: r.getHtmlStyle(o),
|
|
536
|
+
svgStyle: r.getSvgStyle(o)
|
|
537
|
+
})), 128))
|
|
538
|
+
]),
|
|
539
|
+
_: 3
|
|
540
|
+
});
|
|
389
541
|
}
|
|
390
|
-
const
|
|
542
|
+
const Ct = /* @__PURE__ */ Q(pt, [["render", gt]]);
|
|
391
543
|
export {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
544
|
+
lt as DEFAULT_PARTICLE_CONFIG,
|
|
545
|
+
vt as ParticleCanvas,
|
|
546
|
+
Ct as ParticleSystem,
|
|
547
|
+
H as ParticleSystemController,
|
|
548
|
+
V as createNoise,
|
|
549
|
+
ht as createParticle,
|
|
550
|
+
D as createRandom,
|
|
551
|
+
G as resolveParticleConfig,
|
|
552
|
+
ct as stepParticle
|
|
400
553
|
};
|
package/dist/particles.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare function resolveParticleConfig(config?: ParticleSystemConfig): {
|
|
|
23
23
|
rotationOverTime: NumberValue;
|
|
24
24
|
turbulence: NumberValue;
|
|
25
25
|
noiseScale: NumberValue;
|
|
26
|
+
update: import('./types.js').ParticleUpdate;
|
|
26
27
|
};
|
|
27
28
|
export declare function createRandom(seed: number): () => number;
|
|
28
29
|
export declare function createParticle(index: number, config: ReturnType<typeof resolveParticleConfig>, random: () => number): ParticleState;
|
package/dist/particles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"particles.d.ts","sourceRoot":"","sources":["../src/particles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,KAAK,EACR,WAAW,EACX,aAAa,EACb,oBAAoB,EAEpB,YAAY,EACf,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,4BAA4B,GAAG,QAAQ,CAAC,oBAAoB,CAAC,CAAC;AAE1E,eAAO,MAAM,uBAAuB,EAAE,
|
|
1
|
+
{"version":3,"file":"particles.d.ts","sourceRoot":"","sources":["../src/particles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,KAAK,EACR,WAAW,EACX,aAAa,EACb,oBAAoB,EAEpB,YAAY,EACf,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,4BAA4B,GAAG,QAAQ,CAAC,oBAAoB,CAAC,CAAC;AAE1E,eAAO,MAAM,uBAAuB,EAAE,4BAsBrC,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,MAAM,GAAE,oBAAyB;;;;;;;;;;;;;;;;;;;;;;EAKtE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,gBASxC;AAED,wBAAgB,cAAc,CAC1B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,UAAU,CAAC,OAAO,qBAAqB,CAAC,EAChD,MAAM,EAAE,MAAM,MAAM,GACrB,aAAa,CAqCf;AAED,wBAAgB,YAAY,CACxB,QAAQ,EAAE,aAAa,EACvB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,QA4B1C;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,MAAM,2CAE/C"}
|
package/dist/types.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export type NumberRange = [number, number];
|
|
|
3
3
|
export type Vector2Range = [Vector2, Vector2];
|
|
4
4
|
export type NumberValue = number | NumberRange;
|
|
5
5
|
export type Vector2Value = Vector2 | Vector2Range;
|
|
6
|
+
export type ParticleUpdate = (particle: ParticleState, dt: number) => void;
|
|
6
7
|
export interface ParticleSystemConfig {
|
|
7
8
|
seed?: number;
|
|
8
9
|
isPaused?: boolean;
|
|
@@ -24,6 +25,7 @@ export interface ParticleSystemConfig {
|
|
|
24
25
|
rotationOverTime?: NumberValue;
|
|
25
26
|
turbulence?: NumberValue;
|
|
26
27
|
noiseScale?: NumberValue;
|
|
28
|
+
update?: ParticleUpdate;
|
|
27
29
|
}
|
|
28
30
|
export interface ParticleState {
|
|
29
31
|
index: number;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAE1D,MAAM,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC3C,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAE9C,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,WAAW,CAAC;AAC/C,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAE1D,MAAM,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC3C,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAE9C,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,WAAW,CAAC;AAC/C,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,YAAY,CAAC;AAClD,MAAM,MAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;AAE3E,MAAM,WAAW,oBAAoB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,eAAe,CAAC,EAAE,WAAW,CAAC;IAC9B,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,kBAAkB,CAAC,EAAE,YAAY,CAAC;IAClC,cAAc,CAAC,EAAE,WAAW,CAAC;IAC7B,kBAAkB,CAAC,EAAE,WAAW,CAAC;IACjC,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,gBAAgB,CAAC,EAAE,WAAW,CAAC;IAC/B,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,MAAM,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,CAAC,EAAE,MAAM,CAAC;CACb"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nightshadeui/particle-system",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.17.0",
|
|
4
4
|
"description": "Nightshade particle system component",
|
|
5
5
|
"author": "Boris Okunskiy",
|
|
6
6
|
"license": "ISC",
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"import": "./dist/particle-system.mjs"
|
|
12
12
|
},
|
|
13
|
-
"./css": "./dist/particle-system.css",
|
|
14
13
|
"./src": "./src/index.ts"
|
|
15
14
|
},
|
|
16
15
|
"files": [
|
|
@@ -24,7 +23,7 @@
|
|
|
24
23
|
"vue": "^3.5.22"
|
|
25
24
|
},
|
|
26
25
|
"dependencies": {
|
|
27
|
-
"@nightshadeui/util": "2.
|
|
26
|
+
"@nightshadeui/util": "2.17.0",
|
|
28
27
|
"nanoevent": "^1.0.0",
|
|
29
28
|
"simplex-noise": "^4.0.3"
|
|
30
29
|
}
|
package/dist/particle-system.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@layer nightshade-components{.ParticleSystem[data-v-47a4e782]{position:relative}}
|