@canvasengine/presets 2.0.0-beta.10

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.
@@ -0,0 +1,54 @@
1
+ import * as canvasengine from 'canvasengine';
2
+
3
+ interface BarProps {
4
+ backgroundColor?: string;
5
+ foregroundColor?: string;
6
+ value: number;
7
+ maxValue: number;
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): canvasengine.Element<canvasengine.ComponentInstance> | Promise<canvasengine.Element<canvasengine.ComponentInstance>>;
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 };