@cazala/party 0.1.0-next.46.59ce407 → 0.1.0-next.50.347f59f
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/README.md +31 -0
- package/dist/index.js +90 -2
- package/dist/index.js.map +1 -1
- package/dist/spawner.d.ts +18 -2
- package/dist/spawner.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/spawner.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Spawner
|
|
3
3
|
*
|
|
4
4
|
* Utility for generating initial `IParticle[]` configurations for common
|
|
5
|
-
* shapes (grid, random, circle, donut, square) with optional initial velocity
|
|
5
|
+
* shapes (grid, random, circle, donut, square, text) with optional initial velocity
|
|
6
6
|
* presets (random/in/out/clockwise/counter-clockwise/custom). Also includes
|
|
7
7
|
* lightweight color parsing helpers.
|
|
8
8
|
*/
|
|
@@ -13,9 +13,14 @@ export interface VelocityConfig {
|
|
|
13
13
|
direction: VelocityDirection;
|
|
14
14
|
angle?: number;
|
|
15
15
|
}
|
|
16
|
+
export type SpawnShape = "grid" | "random" | "circle" | "donut" | "square" | "text";
|
|
17
|
+
export type TextHorizontalAlign = "left" | "center" | "right";
|
|
18
|
+
export type TextVerticalAlign = "top" | "center" | "bottom";
|
|
19
|
+
export declare const TEXT_SPAWNER_FONTS: readonly ["sans-serif", "serif", "monospace"];
|
|
20
|
+
export type TextSpawnerFont = (typeof TEXT_SPAWNER_FONTS)[number];
|
|
16
21
|
export interface SpawnOptions {
|
|
17
22
|
count: number;
|
|
18
|
-
shape:
|
|
23
|
+
shape: SpawnShape;
|
|
19
24
|
center: {
|
|
20
25
|
x: number;
|
|
21
26
|
y: number;
|
|
@@ -33,6 +38,17 @@ export interface SpawnOptions {
|
|
|
33
38
|
height: number;
|
|
34
39
|
};
|
|
35
40
|
velocity?: VelocityConfig;
|
|
41
|
+
text?: string;
|
|
42
|
+
font?: TextSpawnerFont | string;
|
|
43
|
+
textSize?: number;
|
|
44
|
+
position?: {
|
|
45
|
+
x: number;
|
|
46
|
+
y: number;
|
|
47
|
+
};
|
|
48
|
+
align?: {
|
|
49
|
+
horizontal: TextHorizontalAlign;
|
|
50
|
+
vertical: TextVerticalAlign;
|
|
51
|
+
};
|
|
36
52
|
}
|
|
37
53
|
export declare class Spawner {
|
|
38
54
|
initParticles(options: SpawnOptions): IParticle[];
|
package/dist/spawner.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spawner.d.ts","sourceRoot":"","sources":["../src/spawner.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,MAAM,iBAAiB,GACzB,QAAQ,GACR,IAAI,GACJ,KAAK,GACL,QAAQ,GACR,WAAW,GACX,mBAAmB,CAAC;AAExB,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,iBAAiB,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,
|
|
1
|
+
{"version":3,"file":"spawner.d.ts","sourceRoot":"","sources":["../src/spawner.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,MAAM,iBAAiB,GACzB,QAAQ,GACR,IAAI,GACJ,KAAK,GACL,QAAQ,GACR,WAAW,GACX,mBAAmB,CAAC;AAExB,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,iBAAiB,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,UAAU,GAClB,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,MAAM,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC9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 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cazala/party",
|
|
3
|
-
"version": "0.1.0-next.
|
|
3
|
+
"version": "0.1.0-next.50.347f59f",
|
|
4
4
|
"description": "High-performance TypeScript particle physics engine with dual runtime support (WebGPU compute + CPU fallback). Features modular architecture, real-time parameter oscillation, advanced physics modules, and comprehensive rendering capabilities.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|