@canvasengine/presets 2.0.0-beta.4 → 2.0.0-beta.40
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/Bar.d.ts +14 -0
- package/dist/Bar.d.ts.map +1 -0
- package/dist/Button.d.ts +1 -0
- package/dist/Button.d.ts.map +1 -0
- package/dist/Loading.d.ts +94 -0
- package/dist/Loading.d.ts.map +1 -0
- package/dist/NightAmbiant.d.ts +3 -0
- package/dist/NightAmbiant.d.ts.map +1 -0
- package/dist/Particle.d.ts +2 -0
- package/dist/Particle.d.ts.map +1 -0
- package/dist/Tilemap/Tile.d.ts +23 -0
- package/dist/Tilemap/Tile.d.ts.map +1 -0
- package/dist/Tilemap/TileGroup.d.ts +62 -0
- package/dist/Tilemap/TileGroup.d.ts.map +1 -0
- package/dist/Tilemap/TileSet.d.ts +11 -0
- package/dist/Tilemap/TileSet.d.ts.map +1 -0
- package/dist/Tilemap/index.d.ts +2 -0
- package/dist/Tilemap/index.d.ts.map +1 -0
- package/dist/Weathers/fog.d.ts +3 -0
- package/dist/Weathers/fog.d.ts.map +1 -0
- package/dist/Weathers/index.d.ts +6 -0
- package/dist/Weathers/index.d.ts.map +1 -0
- package/dist/Weathers/rain.d.ts +20 -0
- package/dist/Weathers/rain.d.ts.map +1 -0
- package/dist/Weathers/snow.d.ts +12 -0
- package/dist/Weathers/snow.d.ts.map +1 -0
- package/dist/index.d.ts +7 -54
- package/dist/index.d.ts.map +1 -0
- package/dist/index.global.js +527 -0
- package/dist/index.global.js.map +1 -0
- package/dist/index.js +6248 -692
- package/dist/index.js.map +1 -1
- package/package.json +36 -11
- package/src/Bar.ts +0 -87
- package/src/Button.ts +0 -0
- package/src/DrawMap/index.ts +0 -60
- package/src/Joystick.ts +0 -284
- package/src/NightAmbiant.ts +0 -116
- package/src/Particle.ts +0 -50
- package/src/Tilemap/Tile.ts +0 -79
- package/src/Tilemap/TileGroup.ts +0 -207
- package/src/Tilemap/TileLayer.ts +0 -162
- package/src/Tilemap/TileSet.ts +0 -41
- package/src/Tilemap/index.ts +0 -75
- package/src/index.ts +0 -6
package/dist/Bar.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface BarProps {
|
|
2
|
+
backgroundColor?: string;
|
|
3
|
+
foregroundColor?: string;
|
|
4
|
+
value: number;
|
|
5
|
+
maxValue: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
border?: any;
|
|
9
|
+
innerMargin?: number;
|
|
10
|
+
borderRadius?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function Bar(opts: BarProps): import('../packages/core/src/index.ts').Element<import('../packages/core/src/index.ts').ComponentInstance>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=Bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Bar.d.ts","sourceRoot":"","sources":["../src/Bar.ts"],"names":[],"mappings":"AAGA,UAAU,QAAQ;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAWD,wBAAgB,GAAG,CAAC,IAAI,EAAE,QAAQ,4EAiEjC"}
|
package/dist/Button.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../src/Button.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loading Component Props
|
|
3
|
+
*/
|
|
4
|
+
export interface LoadingProps {
|
|
5
|
+
/**
|
|
6
|
+
* Size of the loading spinner (radius in pixels)
|
|
7
|
+
* @default 30
|
|
8
|
+
*/
|
|
9
|
+
size?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Color of the spinner segments
|
|
12
|
+
* @default "#3498db"
|
|
13
|
+
*/
|
|
14
|
+
color?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Background color of the spinner (optional)
|
|
17
|
+
*/
|
|
18
|
+
backgroundColor?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Rotation speed in degrees per second
|
|
21
|
+
* @default 180
|
|
22
|
+
*/
|
|
23
|
+
speed?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Number of segments in the spinner
|
|
26
|
+
* @default 8
|
|
27
|
+
*/
|
|
28
|
+
segments?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Width of each segment
|
|
31
|
+
* @default 3
|
|
32
|
+
*/
|
|
33
|
+
segmentWidth?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Alpha value for inactive segments (0-1)
|
|
36
|
+
* @default 0.15
|
|
37
|
+
*/
|
|
38
|
+
inactiveAlpha?: number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Loading Component
|
|
42
|
+
*
|
|
43
|
+
* Creates an animated circular loading spinner with customizable appearance and rotation speed.
|
|
44
|
+
* The spinner consists of multiple segments that rotate continuously, creating a smooth loading indicator.
|
|
45
|
+
*
|
|
46
|
+
* ## Design
|
|
47
|
+
*
|
|
48
|
+
* The component uses a Graphics element to draw multiple segments arranged in a circle:
|
|
49
|
+
* - **Segments**: Multiple radial segments that create a circular pattern
|
|
50
|
+
* - **Rotation animation**: Continuous rotation using the tick system for smooth animation
|
|
51
|
+
* - **Alpha variation**: Active segments are fully opaque while inactive segments have reduced opacity
|
|
52
|
+
* - **Customizable**: Size, color, speed, and number of segments can be adjusted
|
|
53
|
+
*
|
|
54
|
+
* @param {LoadingProps} opts - Configuration options for the loading spinner
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```tsx
|
|
58
|
+
* // Basic usage with default settings
|
|
59
|
+
* <Loading />
|
|
60
|
+
*
|
|
61
|
+
* // Custom size and color
|
|
62
|
+
* <Loading
|
|
63
|
+
* size={50}
|
|
64
|
+
* color="#e74c3c"
|
|
65
|
+
* />
|
|
66
|
+
*
|
|
67
|
+
* // Fast spinning loader
|
|
68
|
+
* <Loading
|
|
69
|
+
* speed={360}
|
|
70
|
+
* segments={12}
|
|
71
|
+
* />
|
|
72
|
+
*
|
|
73
|
+
* // Large loader with background
|
|
74
|
+
* <Loading
|
|
75
|
+
* size={80}
|
|
76
|
+
* color="#2ecc71"
|
|
77
|
+
* backgroundColor="#ecf0f1"
|
|
78
|
+
* segmentWidth={5}
|
|
79
|
+
* />
|
|
80
|
+
*
|
|
81
|
+
* // Using signals for dynamic control
|
|
82
|
+
* const loaderSize = signal(30);
|
|
83
|
+
* const loaderSpeed = signal(180);
|
|
84
|
+
*
|
|
85
|
+
* <Loading
|
|
86
|
+
* size={loaderSize}
|
|
87
|
+
* speed={loaderSpeed}
|
|
88
|
+
* />
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* @returns {JSX.Element} A container with an animated loading spinner
|
|
92
|
+
*/
|
|
93
|
+
export declare function Loading(opts?: LoadingProps): import('../packages/core/src/index.ts').Element<import('../packages/core/src/index.ts').ComponentInstance> | Promise<import('../packages/core/src/index.ts').Element<import('../packages/core/src/index.ts').ComponentInstance>>;
|
|
94
|
+
//# sourceMappingURL=Loading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Loading.d.ts","sourceRoot":"","sources":["../src/Loading.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,OAAO,CAAC,IAAI,GAAE,YAAiB,gKAkH9C"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function LightSpot(opts: any): import('../packages/core/src/index.ts').Element<import('../packages/core/src/index.ts').ComponentInstance>;
|
|
2
|
+
export declare function NightAmbiant(props: any): import('../packages/core/src/index.ts').Element<import('../packages/core/src/index.ts').ComponentInstance> | Promise<import('../packages/core/src/index.ts').Element<import('../packages/core/src/index.ts').ComponentInstance>>;
|
|
3
|
+
//# sourceMappingURL=NightAmbiant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NightAmbiant.d.ts","sourceRoot":"","sources":["../src/NightAmbiant.ts"],"names":[],"mappings":"AAEA,wBAAgB,SAAS,CAAC,IAAI,KAAA,4EA8C7B;AAED,wBAAgB,YAAY,CAAC,KAAK,KAAA,gKA6DjC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare function Particle(options: any): import('../packages/core/src/index.ts').Element<import('../packages/core/src/index.ts').ComponentInstance> | Promise<import('../packages/core/src/index.ts').Element<import('../packages/core/src/index.ts').ComponentInstance>>;
|
|
2
|
+
//# sourceMappingURL=Particle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Particle.d.ts","sourceRoot":"","sources":["../src/Particle.ts"],"names":[],"mappings":"AAIA,wBAAgB,QAAQ,CAAC,OAAO,KAAA,gKA6C/B"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CompositeTilemap } from '@pixi/tilemap';
|
|
2
|
+
import { Tile as TiledTileClass } from '@rpgjs/tiled';
|
|
3
|
+
import { AnimatedSprite, Texture } from 'pixi.js';
|
|
4
|
+
import { TileSet } from './TileSet';
|
|
5
|
+
export declare class Tile extends AnimatedSprite {
|
|
6
|
+
private tile;
|
|
7
|
+
private tileSet;
|
|
8
|
+
static getTextures(tile: TiledTileClass, tileSet: TileSet): Texture<import('pixi.js').TextureSource<any>>[];
|
|
9
|
+
animations: {
|
|
10
|
+
tileid: number;
|
|
11
|
+
duration: number;
|
|
12
|
+
}[];
|
|
13
|
+
_x: number;
|
|
14
|
+
_y: number;
|
|
15
|
+
pointsBufIndex: number;
|
|
16
|
+
properties: any;
|
|
17
|
+
constructor(tile: TiledTileClass, tileSet: TileSet);
|
|
18
|
+
get z(): any;
|
|
19
|
+
get gid(): any;
|
|
20
|
+
setAnimation(frame: CompositeTilemap): void;
|
|
21
|
+
flip(): void;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=Tile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../src/Tilemap/Tile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,IAAI,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,OAAO,EAAW,MAAM,SAAS,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,qBAAa,IAAK,SAAQ,cAAc;IAsBhC,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,OAAO;IAtBnB,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO;IAczD,UAAU,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,EAAE,CAAK;IACvD,EAAE,EAAE,MAAM,CAAI;IACd,EAAE,EAAE,MAAM,CAAI;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,EAAE,GAAG,CAAK;gBAGR,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,OAAO;IAU5B,IAAI,CAAC,QAEJ;IAED,IAAI,GAAG,QAEN;IAED,YAAY,CAAC,KAAK,EAAE,gBAAgB;IAQpC,IAAI;CA4BP"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
interface TileOptions {
|
|
2
|
+
tilesetIndex?: number;
|
|
3
|
+
tileId: number;
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
}
|
|
7
|
+
interface TilesGroupOptions {
|
|
8
|
+
ignore?: boolean;
|
|
9
|
+
probability?: number;
|
|
10
|
+
baseHeight?: number;
|
|
11
|
+
baseWidth?: number;
|
|
12
|
+
rectMargin?: number;
|
|
13
|
+
baseOffsetX?: number;
|
|
14
|
+
baseOffsetY?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare class TileInfo {
|
|
17
|
+
tilesetIndex?: number;
|
|
18
|
+
tileId: number;
|
|
19
|
+
flags: Map<string, any>;
|
|
20
|
+
id: number;
|
|
21
|
+
constructor(obj: TileOptions);
|
|
22
|
+
addFlag(key: string, value: any): void;
|
|
23
|
+
}
|
|
24
|
+
export declare class TilesGroup {
|
|
25
|
+
tilesetIndex: number;
|
|
26
|
+
tiles: (TileInfo | null)[][];
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
ignore: boolean;
|
|
30
|
+
probability: number;
|
|
31
|
+
baseHeight: number;
|
|
32
|
+
baseWidth?: number;
|
|
33
|
+
baseOffsetX: number;
|
|
34
|
+
baseOffsetY: number;
|
|
35
|
+
rectMargin: number;
|
|
36
|
+
constructor(tiles: TileOptions[], tilesetIndex?: number, options?: TilesGroupOptions);
|
|
37
|
+
getRect(x: number, y: number): {
|
|
38
|
+
minX: number;
|
|
39
|
+
minY: number;
|
|
40
|
+
maxX: number;
|
|
41
|
+
maxY: number;
|
|
42
|
+
};
|
|
43
|
+
get tilesBase(): TileInfo[];
|
|
44
|
+
get tilesBaseWidth(): number;
|
|
45
|
+
get tilesBaseHeight(): number;
|
|
46
|
+
forEach(cb: (tileInfo: TileInfo | null, x: number, y: number) => void): void;
|
|
47
|
+
find(cb: (tileInfo: TileInfo | null, x: number, y: number) => boolean): TileInfo | null;
|
|
48
|
+
getOffsetY(): number;
|
|
49
|
+
fillTiles(): void;
|
|
50
|
+
shiftToTopLeft(): void;
|
|
51
|
+
addTile(x: number, y: number, tileOptions: TileOptions): void;
|
|
52
|
+
addTileFlag(x: number, y: number, key: string, value: any): void;
|
|
53
|
+
getTile(x: number, y: number): TileInfo | null;
|
|
54
|
+
getTilesByFlag(key: string, value: any): {
|
|
55
|
+
tileInfo: TileInfo;
|
|
56
|
+
x: number;
|
|
57
|
+
y: number;
|
|
58
|
+
}[];
|
|
59
|
+
isTileBase(tileInfo: TileInfo): boolean;
|
|
60
|
+
}
|
|
61
|
+
export {};
|
|
62
|
+
//# sourceMappingURL=TileGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TileGroup.d.ts","sourceRoot":"","sources":["../../src/Tilemap/TileGroup.ts"],"names":[],"mappings":"AAAA,UAAU,WAAW;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACZ;AAED,UAAU,iBAAiB;IACvB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,qBAAa,QAAQ;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAY;IACnC,EAAE,EAAE,MAAM,CAAgB;gBAEd,GAAG,EAAE,WAAW;IAK5B,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;CAGlC;AAED,qBAAa,UAAU;IAYsB,YAAY,EAAE,MAAM;IAX7D,KAAK,EAAE,CAAC,QAAQ,GAAG,IAAI,CAAC,EAAE,EAAE,CAAK;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,OAAO,CAAQ;IACvB,WAAW,EAAE,MAAM,CAAI;IACvB,UAAU,EAAE,MAAM,CAAI;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAI;IACvB,WAAW,EAAE,MAAM,CAAI;IACvB,UAAU,EAAE,MAAM,CAAI;gBAEV,KAAK,EAAE,WAAW,EAAE,EAAS,YAAY,GAAE,MAAU,EAAE,OAAO,GAAE,iBAAsB;IAoBlG,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;IAUzF,IAAI,SAAS,eAEZ;IAED,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED,IAAI,eAAe,IAAI,MAAM,CAE5B;IAED,OAAO,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI;IAQrE,IAAI,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,OAAO,GAAG,QAAQ,GAAG,IAAI;IASvF,UAAU,IAAI,MAAM;IAWpB,SAAS;IAST,cAAc,IAAI,IAAI;IAmDtB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW;IAKtD,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;IAIzD,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI;IAI9C,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE;IAevF,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO;CAG1C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TiledTileset, Tileset as TiledTilesetClass } from '@canvasengine/tiled';
|
|
2
|
+
import { Texture } from 'pixi.js';
|
|
3
|
+
export declare class TileSet extends TiledTilesetClass {
|
|
4
|
+
textures: Texture[];
|
|
5
|
+
private tileGroups;
|
|
6
|
+
constructor(tileSet: TiledTileset);
|
|
7
|
+
loadGroup(): void;
|
|
8
|
+
/** @internal */
|
|
9
|
+
load(image: string): Promise<this>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=TileSet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TileSet.d.ts","sourceRoot":"","sources":["../../src/Tilemap/TileSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAqB,OAAO,EAAE,MAAM,SAAS,CAAC;AAErD,qBAAa,OAAQ,SAAQ,iBAAiB;IACrC,QAAQ,EAAE,OAAO,EAAE,CAAM;IAChC,OAAO,CAAC,UAAU,CAAM;gBAEZ,OAAO,EAAE,YAAY;IAIjC,SAAS;IAKT,gBAAgB;IACV,IAAI,CAAC,KAAK,EAAE,MAAM;CAuBzB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare function TiledMap(props: any): import('../../packages/core/src/index.ts').Element<import('../../packages/core/src/index.ts').ComponentInstance> | Promise<import('../../packages/core/src/index.ts').Element<import('../../packages/core/src/index.ts').ComponentInstance>>;
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Tilemap/index.ts"],"names":[],"mappings":"AAuIA,wBAAgB,QAAQ,CAAC,KAAK,KAAA,gKAoF7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fog.d.ts","sourceRoot":"","sources":["../../src/Weathers/fog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,wBAAgB,eAAe,IAAI,SAAS,CAqH3C"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Weather Effect Component (optimized)
|
|
3
|
+
*/
|
|
4
|
+
export declare const WeatherEffect: (options: any) => import('../../packages/core/src/index.ts').Element<import('../../packages/core/src/index.ts').ComponentInstance> | Promise<import('../../packages/core/src/index.ts').Element<import('../../packages/core/src/index.ts').ComponentInstance>>;
|
|
5
|
+
export declare const Weather: (options: any) => import('../../packages/core/src/index.ts').Element<import('../../packages/core/src/index.ts').ComponentInstance> | Promise<import('../../packages/core/src/index.ts').Element<import('../../packages/core/src/index.ts').ComponentInstance>>;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Weathers/index.ts"],"names":[],"mappings":"AAeA;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,YAAO,iKA8MpC,CAAC;AAEF,eAAO,MAAM,OAAO,gLAAgB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { GlProgram } from 'pixi.js';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a high-performance rain shader program with fine realistic streaks
|
|
4
|
+
*
|
|
5
|
+
* Generates procedural raindrops using optimized hash functions for randomness.
|
|
6
|
+
* Simulates physics with gravity and wind effects on fine elongated streaks.
|
|
7
|
+
* Features thin realistic rain streaks (like real rain), optimized calculations,
|
|
8
|
+
* and early exit optimizations for smooth 60fps performance.
|
|
9
|
+
*
|
|
10
|
+
* Performance optimizations:
|
|
11
|
+
* - Reduced hash function calls (4 instead of 6)
|
|
12
|
+
* - Early bounds checking before expensive calculations
|
|
13
|
+
* - Single smoothstep instead of multiple
|
|
14
|
+
* - Optimized distance calculations
|
|
15
|
+
* - Pre-calculated trigonometric values
|
|
16
|
+
*
|
|
17
|
+
* @returns {GlProgram} The compiled WebGL program for rain effect
|
|
18
|
+
*/
|
|
19
|
+
export declare function createRainShader(): GlProgram;
|
|
20
|
+
//# sourceMappingURL=rain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rain.d.ts","sourceRoot":"","sources":["../../src/Weathers/rain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,IAAI,SAAS,CAuJ5C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GlProgram } from 'pixi.js';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a slow & smooth snow shader program
|
|
4
|
+
*
|
|
5
|
+
* Generates procedural snowflakes with circular shapes and size variation.
|
|
6
|
+
* Simulates gentle physics with slower movement and subtle wind drift.
|
|
7
|
+
* Optimized for performance with early exits and efficient calculations.
|
|
8
|
+
*
|
|
9
|
+
* @returns {GlProgram} The compiled WebGL program for snow effect
|
|
10
|
+
*/
|
|
11
|
+
export declare function createSnowShader(): GlProgram;
|
|
12
|
+
//# sourceMappingURL=snow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snow.d.ts","sourceRoot":"","sources":["../../src/Weathers/snow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,IAAI,SAAS,CAwJ5C"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,54 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
width: number;
|
|
9
|
-
height: number;
|
|
10
|
-
}
|
|
11
|
-
declare function Bar(opts: BarProps): canvasengine.Element<canvasengine.ComponentInstance>;
|
|
12
|
-
|
|
13
|
-
declare function Particle(options: any): canvasengine.Element<canvasengine.ComponentInstance> | Promise<canvasengine.Element<canvasengine.ComponentInstance>>;
|
|
14
|
-
|
|
15
|
-
declare function LightSpot(opts: any): canvasengine.Element<canvasengine.ComponentInstance>;
|
|
16
|
-
declare function NightAmbiant(props: any): canvasengine.Element<canvasengine.ComponentInstance> | Promise<canvasengine.Element<canvasengine.ComponentInstance>>;
|
|
17
|
-
|
|
18
|
-
interface JoystickChangeEvent {
|
|
19
|
-
angle: number;
|
|
20
|
-
direction: Direction;
|
|
21
|
-
power: number;
|
|
22
|
-
}
|
|
23
|
-
declare enum Direction {
|
|
24
|
-
LEFT = "left",
|
|
25
|
-
TOP = "top",
|
|
26
|
-
BOTTOM = "bottom",
|
|
27
|
-
RIGHT = "right",
|
|
28
|
-
TOP_LEFT = "top_left",
|
|
29
|
-
TOP_RIGHT = "top_right",
|
|
30
|
-
BOTTOM_LEFT = "bottom_left",
|
|
31
|
-
BOTTOM_RIGHT = "bottom_right"
|
|
32
|
-
}
|
|
33
|
-
interface JoystickSettings {
|
|
34
|
-
outer?: string;
|
|
35
|
-
inner?: string;
|
|
36
|
-
outerScale?: {
|
|
37
|
-
x: number;
|
|
38
|
-
y: number;
|
|
39
|
-
};
|
|
40
|
-
innerScale?: {
|
|
41
|
-
x: number;
|
|
42
|
-
y: number;
|
|
43
|
-
};
|
|
44
|
-
onChange?: (data: JoystickChangeEvent) => void;
|
|
45
|
-
onStart?: () => void;
|
|
46
|
-
onEnd?: () => void;
|
|
47
|
-
}
|
|
48
|
-
declare function Joystick(opts?: JoystickSettings): canvasengine.Element<canvasengine.ComponentInstance> | Promise<canvasengine.Element<canvasengine.ComponentInstance>>;
|
|
49
|
-
|
|
50
|
-
declare function TiledMap(props: any): any;
|
|
51
|
-
|
|
52
|
-
declare function ImageMap(props: any): canvasengine.Element<canvasengine.ComponentInstance> | Promise<canvasengine.Element<canvasengine.ComponentInstance>>;
|
|
53
|
-
|
|
54
|
-
export { Bar, Direction, ImageMap, Joystick, type JoystickChangeEvent, type JoystickSettings, LightSpot, NightAmbiant, Particle, TiledMap };
|
|
1
|
+
export * from './Bar';
|
|
2
|
+
export * from './Particle';
|
|
3
|
+
export * from './NightAmbiant';
|
|
4
|
+
export * from './Loading';
|
|
5
|
+
export * from './Tilemap';
|
|
6
|
+
export * from './Weathers';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA"}
|