@canvasengine/presets 2.0.0-beta.24 → 2.0.0-beta.26
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/Joystick.d.ts +34 -0
- package/dist/Joystick.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/TileLayer.d.ts +87 -0
- package/dist/Tilemap/TileLayer.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/index.d.ts +57 -0
- package/dist/Weathers/index.d.ts.map +1 -0
- package/dist/index.d.ts +7 -112
- package/dist/index.d.ts.map +1 -0
- package/dist/index.global.js +25 -951
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +5889 -4
- package/dist/index.js.map +1 -1
- package/package.json +31 -9
- package/src/Bar.ts +0 -90
- package/src/Button.ts +0 -0
- package/src/Joystick.ts +0 -284
- package/src/NightAmbiant.ts +0 -116
- package/src/Particle.ts +0 -50
- package/src/Tilemap/Tile.ts +0 -83
- package/src/Tilemap/TileGroup.ts +0 -207
- package/src/Tilemap/TileLayer.ts +0 -146
- package/src/Tilemap/TileSet.ts +0 -41
- package/src/Tilemap/index.ts +0 -222
- package/src/Weathers/index.ts +0 -224
- package/src/index.ts +0 -6
- package/tsup.config.ts +0 -18
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,34 @@
|
|
|
1
|
+
export interface JoystickChangeEvent {
|
|
2
|
+
angle: number;
|
|
3
|
+
direction: Direction;
|
|
4
|
+
power: number;
|
|
5
|
+
}
|
|
6
|
+
export declare enum Direction {
|
|
7
|
+
LEFT = "left",
|
|
8
|
+
TOP = "top",
|
|
9
|
+
BOTTOM = "bottom",
|
|
10
|
+
RIGHT = "right",
|
|
11
|
+
TOP_LEFT = "top_left",
|
|
12
|
+
TOP_RIGHT = "top_right",
|
|
13
|
+
BOTTOM_LEFT = "bottom_left",
|
|
14
|
+
BOTTOM_RIGHT = "bottom_right"
|
|
15
|
+
}
|
|
16
|
+
export interface JoystickSettings {
|
|
17
|
+
outer?: string;
|
|
18
|
+
inner?: string;
|
|
19
|
+
outerScale?: {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
};
|
|
23
|
+
innerScale?: {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
};
|
|
27
|
+
innerColor?: string;
|
|
28
|
+
outerColor?: string;
|
|
29
|
+
onChange?: (data: JoystickChangeEvent) => void;
|
|
30
|
+
onStart?: () => void;
|
|
31
|
+
onEnd?: () => void;
|
|
32
|
+
}
|
|
33
|
+
export declare function Joystick(opts?: JoystickSettings): 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>>;
|
|
34
|
+
//# sourceMappingURL=Joystick.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Joystick.d.ts","sourceRoot":"","sources":["../src/Joystick.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,oBAAY,SAAS;IACnB,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,UAAU,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC/C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,QAAQ,CAAC,IAAI,GAAE,gBAAqB,gKAoPnD"}
|
|
@@ -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,gKAiEjC"}
|
|
@@ -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,87 @@
|
|
|
1
|
+
import { CompositeTilemap } from '@canvasengine/tilemap';
|
|
2
|
+
import { Tile as TileClass } from '@canvasengine/tiled';
|
|
3
|
+
import { Tile } from './Tile';
|
|
4
|
+
import { TileSet } from './TileSet';
|
|
5
|
+
declare const CanvasTileLayer_base: {
|
|
6
|
+
new (): {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
"__#1@#canvasContext": {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
} | null;
|
|
11
|
+
isFlex: boolean;
|
|
12
|
+
fullProps: import('../../packages/core/src/index.ts').Props;
|
|
13
|
+
isMounted: boolean;
|
|
14
|
+
_anchorPoints: import('pixi.js').ObservablePoint;
|
|
15
|
+
isCustomAnchor: boolean;
|
|
16
|
+
displayWidth: import('../../packages/core/src/index.ts').WritableSignal<number>;
|
|
17
|
+
displayHeight: import('../../packages/core/src/index.ts').WritableSignal<number>;
|
|
18
|
+
overrideProps: string[];
|
|
19
|
+
layout: any;
|
|
20
|
+
onBeforeDestroy: import('../../packages/core/src/index.ts').OnHook | null;
|
|
21
|
+
onAfterMount: import('../../packages/core/src/index.ts').OnHook | null;
|
|
22
|
+
subjectInit: import('rxjs').BehaviorSubject<any>;
|
|
23
|
+
disableLayout: boolean;
|
|
24
|
+
readonly deltaRatio: any;
|
|
25
|
+
readonly parentIsFlex: any;
|
|
26
|
+
onInit(props: import('../../packages/core/src/index.ts').Props): void;
|
|
27
|
+
onMount({ parent, props }: import('../../packages/core/src/index.ts').Element</*elided*/ any>, index?: number): Promise<void>;
|
|
28
|
+
onUpdate(props: import('../../packages/core/src/index.ts').Props): void;
|
|
29
|
+
onDestroy(parent: import('../../packages/core/src/index.ts').Element, afterDestroy?: () => void): Promise<void>;
|
|
30
|
+
setFlexDirection(direction: import('../../../core/src/components/types/DisplayObject').FlexDirection): void;
|
|
31
|
+
setFlexWrap(wrap: "wrap" | "nowrap" | "wrap-reverse"): void;
|
|
32
|
+
setAlignContent(align: import('../../../core/src/components/types/DisplayObject').AlignContent): void;
|
|
33
|
+
setAlignSelf(align: import('../../../core/src/components/types/DisplayObject').AlignContent): void;
|
|
34
|
+
setAlignItems(align: import('../../../core/src/components/types/DisplayObject').AlignContent): void;
|
|
35
|
+
setJustifyContent(justifyContent: "flex-start" | "flex-end" | "center" | "space-between" | "space-around"): void;
|
|
36
|
+
setPosition(position: import('../../../core/src/components/types/DisplayObject').EdgeSize): void;
|
|
37
|
+
setX(x: number): void;
|
|
38
|
+
setY(y: number): void;
|
|
39
|
+
setPadding(padding: import('../../../core/src/components/types/DisplayObject').EdgeSize): void;
|
|
40
|
+
setMargin(margin: import('../../../core/src/components/types/DisplayObject').EdgeSize): void;
|
|
41
|
+
setGap(gap: import('../../../core/src/components/types/DisplayObject').EdgeSize): void;
|
|
42
|
+
setBorder(border: import('../../../core/src/components/types/DisplayObject').EdgeSize): void;
|
|
43
|
+
setPositionType(positionType: "relative" | "absolute"): void;
|
|
44
|
+
setWidth(width: number): void;
|
|
45
|
+
setHeight(height: number): void;
|
|
46
|
+
getWidth(): number;
|
|
47
|
+
getHeight(): number;
|
|
48
|
+
setMinWidth(minWidth: number | string): void;
|
|
49
|
+
setMinHeight(minHeight: number | string): void;
|
|
50
|
+
setMaxWidth(maxWidth: number | string): void;
|
|
51
|
+
setMaxHeight(maxHeight: number | string): void;
|
|
52
|
+
setAspectRatio(aspectRatio: number): void;
|
|
53
|
+
setFlexGrow(flexGrow: number): void;
|
|
54
|
+
setFlexShrink(flexShrink: number): void;
|
|
55
|
+
setFlexBasis(flexBasis: number | string): void;
|
|
56
|
+
setRowGap(rowGap: number): void;
|
|
57
|
+
setColumnGap(columnGap: number): void;
|
|
58
|
+
setTop(top: number | string): void;
|
|
59
|
+
setLeft(left: number | string): void;
|
|
60
|
+
setRight(right: number | string): void;
|
|
61
|
+
setBottom(bottom: number | string): void;
|
|
62
|
+
setObjectFit(objectFit: import('../../../core/src/components/types/DisplayObject').ObjectFit): void;
|
|
63
|
+
setObjectPosition(objectPosition: import('../../../core/src/components/types/DisplayObject').ObjectPosition): void;
|
|
64
|
+
setTransformOrigin(transformOrigin: import('../../../core/src/components/types/DisplayObject').TransformOrigin): void;
|
|
65
|
+
};
|
|
66
|
+
[x: string]: any;
|
|
67
|
+
};
|
|
68
|
+
export declare class CanvasTileLayer extends CanvasTileLayer_base {
|
|
69
|
+
private _tiles;
|
|
70
|
+
tiles: (TileClass | null)[];
|
|
71
|
+
private _layer;
|
|
72
|
+
private frameTile;
|
|
73
|
+
private frameRateAnimation;
|
|
74
|
+
private subscriptionTick;
|
|
75
|
+
static findTileSet(gid: number, tileSets: TileSet[]): TileSet;
|
|
76
|
+
/** @internal */
|
|
77
|
+
createTile(x: number, y: number, options?: any): Tile | undefined;
|
|
78
|
+
private _addFrame;
|
|
79
|
+
onMount(args: any): Promise<void>;
|
|
80
|
+
onUpdate(props: any): void;
|
|
81
|
+
onDestroy(parent: any): Promise<void>;
|
|
82
|
+
}
|
|
83
|
+
export interface CanvasTileLayer extends CompositeTilemap {
|
|
84
|
+
}
|
|
85
|
+
export declare function CompositeTileLayer(props: any): import('../../packages/core/src/index.ts').Element<import('../../packages/core/src/index.ts').ComponentInstance>;
|
|
86
|
+
export {};
|
|
87
|
+
//# sourceMappingURL=TileLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TileLayer.d.ts","sourceRoot":"","sources":["../../src/Tilemap/TileLayer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAIjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAS,IAAI,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAO/D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKpC,qBAAa,eAAgB,SAAQ,oBAA+B;IAClE,OAAO,CAAC,MAAM,CAAW;IACzB,KAAK,EAAE,CAAC,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC;IAC5B,OAAO,CAAC,MAAM,CAAM;IACpB,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,kBAAkB,CAAc;IACxC,OAAO,CAAC,gBAAgB,CAAe;IAEvC,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE;IAWnD,gBAAgB;IAChB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,GAAQ,GAAG,IAAI,GAAG,SAAS;IAqCrE,OAAO,CAAC,SAAS;IAWX,OAAO,CAAC,IAAI,KAAA;IAuBlB,QAAQ,CAAC,KAAK,KAAA;IAsBR,SAAS,CAAC,MAAM,EAAE,GAAG;CAI5B;AAGD,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;CAAG;AAI5D,wBAAgB,kBAAkB,CAAC,KAAK,KAAA,4EAEvC"}
|
|
@@ -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,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Weather Effect Component
|
|
3
|
+
*
|
|
4
|
+
* Creates a realistic rain effect using WebGL shaders with customizable parameters.
|
|
5
|
+
* The effect simulates raindrops falling with wind influence, density control, and speed adjustment.
|
|
6
|
+
*
|
|
7
|
+
* ## Design
|
|
8
|
+
*
|
|
9
|
+
* The component uses a fragment shader to generate procedural rain drops with:
|
|
10
|
+
* - **Procedural generation**: Each raindrop is generated using hash functions for randomness
|
|
11
|
+
* - **Wind simulation**: Raindrops are affected by wind direction and strength as they fall
|
|
12
|
+
* - **Density control**: Number of visible raindrops can be adjusted
|
|
13
|
+
* - **Speed variation**: Each drop has slightly different falling speed for realism
|
|
14
|
+
* - **Visual styling**: Zelda-inspired rain appearance with proper fade effects
|
|
15
|
+
*
|
|
16
|
+
* @param {Object} options - Configuration options for the weather effect
|
|
17
|
+
* @param {number} [options.speed=0.5] - Rain falling speed (0.1 = slow, 2.0 = fast)
|
|
18
|
+
* @param {number} [options.windDirection=0.0] - Wind direction (-1.0 = left, 1.0 = right)
|
|
19
|
+
* @param {number} [options.windStrength=0.2] - Wind strength (0.0 = no wind, 1.0 = strong)
|
|
20
|
+
* @param {number} [options.density=180.0] - Rain density (number of raindrops, 50-400)
|
|
21
|
+
* @param {Array<number>} [options.resolution=[1000, 1000]] - Screen resolution for proper scaling
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```jsx
|
|
25
|
+
* // Basic usage with default settings
|
|
26
|
+
* <Weather />
|
|
27
|
+
*
|
|
28
|
+
* // Customized heavy rain with strong wind
|
|
29
|
+
* <Weather
|
|
30
|
+
* speed={1.5}
|
|
31
|
+
* windDirection={0.8}
|
|
32
|
+
* windStrength={0.6}
|
|
33
|
+
* density={300}
|
|
34
|
+
* />
|
|
35
|
+
*
|
|
36
|
+
* // Light drizzle
|
|
37
|
+
* <Weather
|
|
38
|
+
* speed={0.2}
|
|
39
|
+
* density={80}
|
|
40
|
+
* windStrength={0.1}
|
|
41
|
+
* />
|
|
42
|
+
*
|
|
43
|
+
* // Using signals for dynamic control
|
|
44
|
+
* const rainSpeed = signal(0.5);
|
|
45
|
+
* const windDir = signal(0.0);
|
|
46
|
+
*
|
|
47
|
+
* <Weather
|
|
48
|
+
* speed={rainSpeed}
|
|
49
|
+
* windDirection={windDir}
|
|
50
|
+
* />
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @returns {JSX.Element} A mesh component with the weather shader effect
|
|
54
|
+
*/
|
|
55
|
+
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>>;
|
|
56
|
+
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>>;
|
|
57
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Weathers/index.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,eAAO,MAAM,aAAa,GAAI,YAAO,iKA6JpC,CAAC;AAGF,eAAO,MAAM,OAAO,gLAAgB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,112 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
width: number;
|
|
9
|
-
height: number;
|
|
10
|
-
border?: any;
|
|
11
|
-
innerMargin?: number;
|
|
12
|
-
borderRadius?: number;
|
|
13
|
-
}
|
|
14
|
-
declare function Bar(opts: BarProps): canvasengine.Element<canvasengine.ComponentInstance>;
|
|
15
|
-
|
|
16
|
-
declare function Particle(options: any): canvasengine.Element<canvasengine.ComponentInstance> | Promise<canvasengine.Element<canvasengine.ComponentInstance>>;
|
|
17
|
-
|
|
18
|
-
declare function LightSpot(opts: any): canvasengine.Element<canvasengine.ComponentInstance>;
|
|
19
|
-
declare function NightAmbiant(props: any): canvasengine.Element<canvasengine.ComponentInstance> | Promise<canvasengine.Element<canvasengine.ComponentInstance>>;
|
|
20
|
-
|
|
21
|
-
interface JoystickChangeEvent {
|
|
22
|
-
angle: number;
|
|
23
|
-
direction: Direction;
|
|
24
|
-
power: number;
|
|
25
|
-
}
|
|
26
|
-
declare enum Direction {
|
|
27
|
-
LEFT = "left",
|
|
28
|
-
TOP = "top",
|
|
29
|
-
BOTTOM = "bottom",
|
|
30
|
-
RIGHT = "right",
|
|
31
|
-
TOP_LEFT = "top_left",
|
|
32
|
-
TOP_RIGHT = "top_right",
|
|
33
|
-
BOTTOM_LEFT = "bottom_left",
|
|
34
|
-
BOTTOM_RIGHT = "bottom_right"
|
|
35
|
-
}
|
|
36
|
-
interface JoystickSettings {
|
|
37
|
-
outer?: string;
|
|
38
|
-
inner?: string;
|
|
39
|
-
outerScale?: {
|
|
40
|
-
x: number;
|
|
41
|
-
y: number;
|
|
42
|
-
};
|
|
43
|
-
innerScale?: {
|
|
44
|
-
x: number;
|
|
45
|
-
y: number;
|
|
46
|
-
};
|
|
47
|
-
onChange?: (data: JoystickChangeEvent) => void;
|
|
48
|
-
onStart?: () => void;
|
|
49
|
-
onEnd?: () => void;
|
|
50
|
-
}
|
|
51
|
-
declare function Joystick(opts?: JoystickSettings): canvasengine.Element<canvasengine.ComponentInstance> | Promise<canvasengine.Element<canvasengine.ComponentInstance>>;
|
|
52
|
-
|
|
53
|
-
declare function TiledMap(props: any): canvasengine.Element<canvasengine.ComponentInstance> | Promise<canvasengine.Element<canvasengine.ComponentInstance>>;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Weather Effect Component
|
|
57
|
-
*
|
|
58
|
-
* Creates a realistic rain effect using WebGL shaders with customizable parameters.
|
|
59
|
-
* The effect simulates raindrops falling with wind influence, density control, and speed adjustment.
|
|
60
|
-
*
|
|
61
|
-
* ## Design
|
|
62
|
-
*
|
|
63
|
-
* The component uses a fragment shader to generate procedural rain drops with:
|
|
64
|
-
* - **Procedural generation**: Each raindrop is generated using hash functions for randomness
|
|
65
|
-
* - **Wind simulation**: Raindrops are affected by wind direction and strength as they fall
|
|
66
|
-
* - **Density control**: Number of visible raindrops can be adjusted
|
|
67
|
-
* - **Speed variation**: Each drop has slightly different falling speed for realism
|
|
68
|
-
* - **Visual styling**: Zelda-inspired rain appearance with proper fade effects
|
|
69
|
-
*
|
|
70
|
-
* @param {Object} options - Configuration options for the weather effect
|
|
71
|
-
* @param {number} [options.speed=0.5] - Rain falling speed (0.1 = slow, 2.0 = fast)
|
|
72
|
-
* @param {number} [options.windDirection=0.0] - Wind direction (-1.0 = left, 1.0 = right)
|
|
73
|
-
* @param {number} [options.windStrength=0.2] - Wind strength (0.0 = no wind, 1.0 = strong)
|
|
74
|
-
* @param {number} [options.density=180.0] - Rain density (number of raindrops, 50-400)
|
|
75
|
-
* @param {Array<number>} [options.resolution=[1000, 1000]] - Screen resolution for proper scaling
|
|
76
|
-
*
|
|
77
|
-
* @example
|
|
78
|
-
* ```jsx
|
|
79
|
-
* // Basic usage with default settings
|
|
80
|
-
* <Weather />
|
|
81
|
-
*
|
|
82
|
-
* // Customized heavy rain with strong wind
|
|
83
|
-
* <Weather
|
|
84
|
-
* speed={1.5}
|
|
85
|
-
* windDirection={0.8}
|
|
86
|
-
* windStrength={0.6}
|
|
87
|
-
* density={300}
|
|
88
|
-
* />
|
|
89
|
-
*
|
|
90
|
-
* // Light drizzle
|
|
91
|
-
* <Weather
|
|
92
|
-
* speed={0.2}
|
|
93
|
-
* density={80}
|
|
94
|
-
* windStrength={0.1}
|
|
95
|
-
* />
|
|
96
|
-
*
|
|
97
|
-
* // Using signals for dynamic control
|
|
98
|
-
* const rainSpeed = signal(0.5);
|
|
99
|
-
* const windDir = signal(0.0);
|
|
100
|
-
*
|
|
101
|
-
* <Weather
|
|
102
|
-
* speed={rainSpeed}
|
|
103
|
-
* windDirection={windDir}
|
|
104
|
-
* />
|
|
105
|
-
* ```
|
|
106
|
-
*
|
|
107
|
-
* @returns {JSX.Element} A mesh component with the weather shader effect
|
|
108
|
-
*/
|
|
109
|
-
declare const WeatherEffect: (options: any) => canvasengine.Element<canvasengine.ComponentInstance> | Promise<canvasengine.Element<canvasengine.ComponentInstance>>;
|
|
110
|
-
declare const Weather: (options: any) => canvasengine.Element<canvasengine.ComponentInstance> | Promise<canvasengine.Element<canvasengine.ComponentInstance>>;
|
|
111
|
-
|
|
112
|
-
export { Bar, Direction, Joystick, type JoystickChangeEvent, type JoystickSettings, LightSpot, NightAmbiant, Particle, TiledMap, Weather, WeatherEffect };
|
|
1
|
+
export * from './Bar';
|
|
2
|
+
export * from './Particle';
|
|
3
|
+
export * from './NightAmbiant';
|
|
4
|
+
export * from './Joystick';
|
|
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,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA"}
|