-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
49 lines (44 loc) · 1023 Bytes
/
types.ts
File metadata and controls
49 lines (44 loc) · 1023 Bytes
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
export enum MaterialType {
EMPTY = 0,
STONE = 1,
SAND = 2,
WATER = 3,
WOOD = 4,
FIRE = 5,
SMOKE = 6,
PLANT = 7,
ACID = 8,
LAVA = 9,
STEAM = 10,
ICE = 11,
VOID = 12, // Indestructible
BOUNCY = 13, // Bouncy Ball
// Custom materials start here
CUSTOM_START = 100
}
export type MaterialBehavior = 'static' | 'powder' | 'liquid' | 'gas' | 'fire' | 'bouncy';
export interface MaterialDef {
id: number;
name: string;
color: string;
behavior: MaterialBehavior;
density?: number; // Heavier sinks
flammable?: boolean;
corrosive?: boolean; // Acid
bounciness?: number; // 0-1
viscosity?: number; // For liquids
texturePattern?: 'flat' | 'noise' | 'bricks' | 'waves' | 'checker';
}
export interface GenerationRequest {
prompt: string;
width: number;
height: number;
}
export type ToolType = 'brush' | 'eraser' | 'line' | 'rect' | 'stamp';
export interface Asset {
id: string;
name: string;
width: number;
height: number;
data: number[]; // Flattened grid
}