-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
56 lines (55 loc) · 1.66 KB
/
types.ts
File metadata and controls
56 lines (55 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
export interface SpriteSheetData {
frames: Array<{
filename: string; // Name of the frame
frame: {
x: number;
y: number;
w: number;
h: number;
};
rotated?: boolean;
trimmed?: boolean;
spriteSourceSize?: {
x: number;
y: number;
w: number;
h: number;
};
sourceSize?: {
w: number;
h: number;
};
duration?: number; // Optional duration for each frame (in milliseconds)
}>;
meta: {
image: string; // Path to the spritesheet image
size: {
w: number; // Width of the spritesheet
h: number; // Height of the spritesheet
};
startingAnimation?: string; // Optional property to specify the starting animation
startingFrame?: string; // Optional property to specify the starting frame
animations: {
[animationName: string]: {
frames: string[]; // Array of frame names for this animation
loop?: boolean; // Optional property to indicate if the animation should loop
bounce?: boolean; // Optional property to indicate if the animation should bounce
};
}; // Optional property to define animations by frame names
}
}
export interface ButtonStyle {
borderRadius?: number;
borderWidth?: number;
borderColor?: string;
backgroundColor?: string;
color?: string;
font?: string;
width?: number;
height?: number;
}
export interface ButtonStyles {
default?: ButtonStyle;
hover?: ButtonStyle;
active?: ButtonStyle;
}