-
Notifications
You must be signed in to change notification settings - Fork 50
/
typenames.ts
119 lines (114 loc) · 2.84 KB
/
typenames.ts
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
'use strict';
export class Mouse {
x: number = -1;
y: number = -1;
z: number = -1;
w: number = -1;
}
export class NormalizedMouse {
x: number = 0;
y: number = 0;
}
export type Keys = number[];
export type Position = [number, number, number];
export type Quaternion = [number, number, number, number];
export type UniformsGuiStartingData = {
Open: boolean;
Values: Map<string, number[]>;
};
export class RenderStartingData {
Paused: boolean = false;
Time: number = 0;
Mouse: Mouse = new Mouse();
NormalizedMouse: NormalizedMouse = new NormalizedMouse();
Keys: Keys = [];
FlyControlPosition: Position = [0, 0, 0];
FlyControlRotation: Quaternion = [0, 0, 0, 1];
UniformsGui: UniformsGuiStartingData = { Open: false, Values: new Map<string, number[]>() };
}
export enum TextureMagFilter {
Linear = 'Linear',
Nearest = 'Nearest',
}
export enum TextureMinFilter {
Nearest = 'Nearest',
NearestMipMapNearest = 'NearestMipMapNearest',
NearestMipMapLinear = 'NearestMipMapLinear',
Linear = 'Linear',
LinearMipMapNearest = 'LinearMipMapNearest',
LinearMipMapLinear = 'LinearMipMapLinear',
}
export enum TextureWrapMode {
Repeat = 'Repeat',
Clamp = 'Clamp',
Mirror = 'Mirror',
}
export enum TextureType {
Texture2D = 'Texture2D',
CubeMap = 'CubeMap',
}
export type TextureDefinition = {
Channel: number,
File: string,
Buffer?: string,
BufferIndex?: number,
LocalTexture?: string,
RemoteTexture?: string,
Self?: boolean,
Mag?: TextureMagFilter,
MagLine?: number,
Min?: TextureMinFilter,
MinLine?: number,
Wrap?: TextureWrapMode,
WrapLine?: number,
Type?: TextureType,
TypeLine?: number,
};
export type AudioDefinition = {
Channel: number,
LocalPath?: string,
RemotePath?: string,
UserPath: string
};
export type UniformDefinition = {
Name: string,
Typename: string,
Default: number[],
Min?: number[],
Max?: number[],
Step?: number[]
};
export type BufferDependency = {
Index: number,
Channel: number
};
export type IncludeDefinition = {
Name: string,
File: string,
Code: string,
LineCount: number
};
export type BufferDefinition = {
Name: string,
File: string,
Code: string,
TextureInputs: TextureDefinition[],
AudioInputs: AudioDefinition[],
CustomUniforms: UniformDefinition[],
UsesSelf: boolean,
SelfChannel: number,
Dependents: BufferDependency[],
LineOffset: number
Includes: IncludeDefinition[],
UsesKeyboard?: boolean,
UsesFirstPersonControls?: boolean,
};
export type Diagnostic = {
line: number,
message: string
};
export type DiagnosticBatch = {
filename: string,
diagnostics: Diagnostic[]
};
export type BoxedValue<T> = { Value: T };