@benjos/create-boilerplate 1.0.3 → 1.3.4
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/README.md +24 -12
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/package.json +10 -9
- package/template-react/.prettierignore +6 -0
- package/template-react/.prettierrc +10 -0
- package/template-react/assets_source/.gitkeep +0 -0
- package/template-react/eslint.config.js +23 -0
- package/template-react/index.html +17 -0
- package/template-react/package-lock.json +4470 -0
- package/template-react/package.json +46 -0
- package/template-react/public/assets/fonts/LICENSE +13 -0
- package/template-react/public/assets/fonts/template.typeface.json +1 -0
- package/template-react/public/assets/hdrs/template.hdr +0 -0
- package/template-react/public/assets/icons/benjosLogoBlack.svg +5 -0
- package/template-react/public/assets/loaders/draco/README.md +32 -0
- package/template-react/public/assets/loaders/draco/draco_decoder.js +34 -0
- package/template-react/public/assets/loaders/draco/draco_decoder.wasm +0 -0
- package/template-react/public/assets/loaders/draco/draco_encoder.js +33 -0
- package/template-react/public/assets/loaders/draco/draco_wasm_wrapper.js +117 -0
- package/template-react/public/assets/loaders/draco/gltf/draco_decoder.js +33 -0
- package/template-react/public/assets/loaders/draco/gltf/draco_decoder.wasm +0 -0
- package/template-react/public/assets/loaders/draco/gltf/draco_encoder.js +33 -0
- package/template-react/public/assets/loaders/draco/gltf/draco_wasm_wrapper.js +116 -0
- package/template-react/public/assets/models/template.glb +0 -0
- package/template-react/public/assets/textures/template.jpg +0 -0
- package/template-react/readme.md +31 -0
- package/template-react/src/App.css +42 -0
- package/template-react/src/App.tsx +14 -0
- package/template-react/src/index.css +68 -0
- package/template-react/src/main.tsx +10 -0
- package/template-react/tsconfig.app.json +34 -0
- package/template-react/tsconfig.json +7 -0
- package/template-react/tsconfig.node.json +26 -0
- package/template-react/vite.config.ts +29 -0
- package/template-vanilla/eslint.config.js +10 -0
- package/template-vanilla/package-lock.json +3735 -3739
- package/template-vanilla/package.json +12 -11
- package/template-vanilla/readme.md +2 -20
- package/template-vanilla/src/experiences/Experience.ts +7 -0
- package/template-vanilla/src/experiences/cameras/threes/DebugThreeCameraController.ts +2 -2
- package/template-vanilla/src/experiences/commands/InitCommand.ts +10 -5
- package/template-vanilla/src/experiences/constants/experiences/ViewType.ts +6 -0
- package/template-vanilla/src/experiences/engines/threes/MainThree.ts +8 -8
- package/template-vanilla/src/experiences/managers/DebugManager.ts +3 -3
- package/template-vanilla/src/experiences/managers/KeyboardManager.ts +2 -2
- package/template-vanilla/src/experiences/managers/LoaderManager.ts +1 -1
- package/template-vanilla/src/experiences/managers/MouseManager.ts +2 -2
- package/template-vanilla/src/experiences/managers/ResizeManager.ts +1 -1
- package/template-vanilla/src/experiences/managers/threes/ThreeAssetsManager.ts +5 -6
- package/template-vanilla/src/experiences/managers/threes/ThreeCameraControllerManager.ts +1 -1
- package/template-vanilla/src/experiences/proxies/ViewProxy.ts +15 -0
- package/template-vanilla/src/experiences/types/global.d.ts +3 -2
- package/template-vanilla/src/experiences/views/bases/ViewBase.ts +14 -3
- package/template-vanilla/src/experiences/views/htmls/bases/HTMLViewBase.ts +5 -4
- package/template-vanilla/src/experiences/views/htmls/loaders/LoaderHTMLView.ts +3 -3
- package/template-vanilla/src/experiences/views/threes/bases/ThreeViewBase.ts +2 -1
- package/template-vanilla/src/experiences/views/threes/loaders/LoaderThreeView.ts +1 -0
- package/template-vanilla/docs/PUBLISHING.md +0 -30
- package/template-vanilla/src/experiences/constants/doms/DomEvent.ts +0 -100
- package/template-vanilla/src/experiences/constants/doms/KeyboardConstant.ts +0 -250
- package/template-vanilla/src/experiences/proxies/bases/PoolProxyBase.ts +0 -61
- package/template-vanilla/src/experiences/tools/Action.ts +0 -23
- package/template-vanilla/src/experiences/tools/Point.ts +0 -56
- package/template-vanilla/src/experiences/utils/AssetUtils.ts +0 -6
- package/template-vanilla/src/experiences/utils/DomUtils.ts +0 -28
- package/template-vanilla/tsconfig.json +0 -24
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
export const KeyboardConstant = {
|
|
2
|
-
Keys: {
|
|
3
|
-
Backspace: 'Backspace',
|
|
4
|
-
Tab: 'Tab',
|
|
5
|
-
Enter: 'Enter',
|
|
6
|
-
Shift: 'Shift',
|
|
7
|
-
Control: 'Control',
|
|
8
|
-
Alt: 'Alt',
|
|
9
|
-
Pause: 'Pause',
|
|
10
|
-
CapsLock: 'CapsLock',
|
|
11
|
-
Escape: 'Escape',
|
|
12
|
-
Space: '',
|
|
13
|
-
PageUp: 'PageUp',
|
|
14
|
-
PageDown: 'PageDown',
|
|
15
|
-
End: 'End',
|
|
16
|
-
Home: 'Home',
|
|
17
|
-
ArrowLeft: 'ArrowLeft',
|
|
18
|
-
ArrowUp: 'ArrowUp',
|
|
19
|
-
ArrowRight: 'ArrowRight',
|
|
20
|
-
ArrowDown: 'ArrowDown',
|
|
21
|
-
PrintScreen: 'PrintScreen',
|
|
22
|
-
Insert: 'Insert',
|
|
23
|
-
Delete: 'Delete',
|
|
24
|
-
Digit0: '0',
|
|
25
|
-
Digit1: '1',
|
|
26
|
-
Digit2: '2',
|
|
27
|
-
Digit3: '3',
|
|
28
|
-
Digit4: '4',
|
|
29
|
-
Digit5: '5',
|
|
30
|
-
Digit6: '6',
|
|
31
|
-
Digit7: '7',
|
|
32
|
-
Digit8: '8',
|
|
33
|
-
Digit9: '9',
|
|
34
|
-
A: 'A',
|
|
35
|
-
B: 'B',
|
|
36
|
-
C: 'C',
|
|
37
|
-
D: 'D',
|
|
38
|
-
E: 'E',
|
|
39
|
-
F: 'F',
|
|
40
|
-
G: 'G',
|
|
41
|
-
H: 'H',
|
|
42
|
-
I: 'I',
|
|
43
|
-
J: 'J',
|
|
44
|
-
K: 'K',
|
|
45
|
-
L: 'L',
|
|
46
|
-
M: 'M',
|
|
47
|
-
N: 'N',
|
|
48
|
-
O: 'O',
|
|
49
|
-
P: 'P',
|
|
50
|
-
Q: 'Q',
|
|
51
|
-
R: 'R',
|
|
52
|
-
S: 'S',
|
|
53
|
-
T: 'T',
|
|
54
|
-
U: 'U',
|
|
55
|
-
V: 'V',
|
|
56
|
-
W: 'W',
|
|
57
|
-
X: 'X',
|
|
58
|
-
Y: 'Y',
|
|
59
|
-
Z: 'Z',
|
|
60
|
-
a: 'a',
|
|
61
|
-
b: 'b',
|
|
62
|
-
c: 'c',
|
|
63
|
-
d: 'd',
|
|
64
|
-
e: 'e',
|
|
65
|
-
f: 'f',
|
|
66
|
-
g: 'g',
|
|
67
|
-
h: 'h',
|
|
68
|
-
i: 'i',
|
|
69
|
-
j: 'j',
|
|
70
|
-
k: 'k',
|
|
71
|
-
l: 'l',
|
|
72
|
-
m: 'm',
|
|
73
|
-
n: 'n',
|
|
74
|
-
o: 'o',
|
|
75
|
-
p: 'p',
|
|
76
|
-
q: 'q',
|
|
77
|
-
r: 'r',
|
|
78
|
-
s: 's',
|
|
79
|
-
t: 't',
|
|
80
|
-
u: 'u',
|
|
81
|
-
v: 'v',
|
|
82
|
-
w: 'w',
|
|
83
|
-
x: 'x',
|
|
84
|
-
y: 'y',
|
|
85
|
-
z: 'z',
|
|
86
|
-
Meta: 'Meta',
|
|
87
|
-
ContextMenu: 'ContextMenu',
|
|
88
|
-
AudioVolumeMute: 'AudioVolumeMute',
|
|
89
|
-
AudioVolumeDown: 'AudioVolumeDown',
|
|
90
|
-
AudioVolumeUp: 'AudioVolumeUp',
|
|
91
|
-
F1: 'F1',
|
|
92
|
-
F2: 'F2',
|
|
93
|
-
F3: 'F3',
|
|
94
|
-
F4: 'F4',
|
|
95
|
-
F5: 'F5',
|
|
96
|
-
F6: 'F6',
|
|
97
|
-
F7: 'F7',
|
|
98
|
-
F8: 'F8',
|
|
99
|
-
F9: 'F9',
|
|
100
|
-
F10: 'F10',
|
|
101
|
-
F11: 'F11',
|
|
102
|
-
F12: 'F12',
|
|
103
|
-
NumLock: 'NumLock',
|
|
104
|
-
ScrollLock: 'ScrollLock',
|
|
105
|
-
Semicolon: ';',
|
|
106
|
-
Equal: ':',
|
|
107
|
-
Comma: ',',
|
|
108
|
-
Minus: '-',
|
|
109
|
-
Period: '.',
|
|
110
|
-
Slash: '/',
|
|
111
|
-
Backquote: '`',
|
|
112
|
-
BracketLeft: '[',
|
|
113
|
-
Backslash: '\\',
|
|
114
|
-
BracketRight: ']',
|
|
115
|
-
Quote: "'",
|
|
116
|
-
Tilde: '~',
|
|
117
|
-
Exclamation: '!',
|
|
118
|
-
At: '@',
|
|
119
|
-
Sharp: '#',
|
|
120
|
-
Dollar: '$',
|
|
121
|
-
Percent: '%',
|
|
122
|
-
Caret: '^',
|
|
123
|
-
Ampersand: '&',
|
|
124
|
-
Asterisk: '*',
|
|
125
|
-
ParenthesisLeft: '(',
|
|
126
|
-
ParenthesisRight: ')',
|
|
127
|
-
Underscore: '_',
|
|
128
|
-
Plus: '+',
|
|
129
|
-
OpenBrace: '{',
|
|
130
|
-
CloseBrace: '}',
|
|
131
|
-
Pipe: '|',
|
|
132
|
-
Colon: ':',
|
|
133
|
-
Quote2: '"',
|
|
134
|
-
AngleBracketLeft: '<',
|
|
135
|
-
AngleBracketRight: '>',
|
|
136
|
-
QuestionMark: '?',
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
Codes: {
|
|
140
|
-
Backspace: 'Backspace',
|
|
141
|
-
Tab: 'Tab',
|
|
142
|
-
Enter: 'Enter',
|
|
143
|
-
ShiftLeft: 'ShiftLeft',
|
|
144
|
-
ShiftRight: 'ShiftRight',
|
|
145
|
-
ControlLeft: 'ControlLeft',
|
|
146
|
-
ControlRight: 'ControlRight',
|
|
147
|
-
AltLeft: 'AltLeft',
|
|
148
|
-
AltRight: 'AltRight',
|
|
149
|
-
Pause: 'Pause',
|
|
150
|
-
CapsLock: 'CapsLock',
|
|
151
|
-
Escape: 'Escape',
|
|
152
|
-
Space: 'Space',
|
|
153
|
-
PageUp: 'PageUp',
|
|
154
|
-
PageDown: 'PageDown',
|
|
155
|
-
End: 'End',
|
|
156
|
-
Home: 'Home',
|
|
157
|
-
ArrowLeft: 'ArrowLeft',
|
|
158
|
-
ArrowUp: 'ArrowUp',
|
|
159
|
-
ArrowRight: 'ArrowRight',
|
|
160
|
-
ArrowDown: 'ArrowDown',
|
|
161
|
-
PrintScreen: 'PrintScreen',
|
|
162
|
-
Insert: 'Insert',
|
|
163
|
-
Delete: 'Delete',
|
|
164
|
-
Digit0: 'Digit0',
|
|
165
|
-
Digit1: 'Digit1',
|
|
166
|
-
Digit2: 'Digit2',
|
|
167
|
-
Digit3: 'Digit3',
|
|
168
|
-
Digit4: 'Digit4',
|
|
169
|
-
Digit5: 'Digit5',
|
|
170
|
-
Digit6: 'Digit6',
|
|
171
|
-
Digit7: 'Digit7',
|
|
172
|
-
Digit8: 'Digit8',
|
|
173
|
-
Digit9: 'Digit9',
|
|
174
|
-
AudioVolumeMute: 'AudioVolumeMute',
|
|
175
|
-
AudioVolumeDown: 'AudioVolumeDown',
|
|
176
|
-
AudioVolumeUp: 'AudioVolumeUp',
|
|
177
|
-
KeyA: 'KeyA',
|
|
178
|
-
KeyB: 'KeyB',
|
|
179
|
-
KeyC: 'KeyC',
|
|
180
|
-
KeyD: 'KeyD',
|
|
181
|
-
KeyE: 'KeyE',
|
|
182
|
-
KeyF: 'KeyF',
|
|
183
|
-
KeyG: 'KeyG',
|
|
184
|
-
KeyH: 'KeyH',
|
|
185
|
-
KeyI: 'KeyI',
|
|
186
|
-
KeyJ: 'KeyJ',
|
|
187
|
-
KeyK: 'KeyK',
|
|
188
|
-
KeyL: 'KeyL',
|
|
189
|
-
KeyM: 'KeyM',
|
|
190
|
-
KeyN: 'KeyN',
|
|
191
|
-
KeyO: 'KeyO',
|
|
192
|
-
KeyP: 'KeyP',
|
|
193
|
-
KeyQ: 'KeyQ',
|
|
194
|
-
KeyR: 'KeyR',
|
|
195
|
-
KeyS: 'KeyS',
|
|
196
|
-
KeyT: 'KeyT',
|
|
197
|
-
KeyU: 'KeyU',
|
|
198
|
-
KeyV: 'KeyV',
|
|
199
|
-
KeyW: 'KeyW',
|
|
200
|
-
KeyX: 'KeyX',
|
|
201
|
-
KeyY: 'KeyY',
|
|
202
|
-
KeyZ: 'KeyZ',
|
|
203
|
-
MetaLeft: 'MetaLeft',
|
|
204
|
-
MetaRight: 'MetaRight',
|
|
205
|
-
ContextMenu: 'ContextMenu',
|
|
206
|
-
Numpad0: 'Numpad0',
|
|
207
|
-
Numpad1: 'Numpad1',
|
|
208
|
-
Numpad2: 'Numpad2',
|
|
209
|
-
Numpad3: 'Numpad3',
|
|
210
|
-
Numpad4: 'Numpad4',
|
|
211
|
-
Numpad5: 'Numpad5',
|
|
212
|
-
Numpad6: 'Numpad6',
|
|
213
|
-
Numpad7: 'Numpad7',
|
|
214
|
-
Numpad8: 'Numpad8',
|
|
215
|
-
Numpad9: 'Numpad9',
|
|
216
|
-
NumpadMultiply: 'NumpadMultiply',
|
|
217
|
-
NumpadAdd: 'NumpadAdd',
|
|
218
|
-
NumpadSubtract: 'NumpadSubtract',
|
|
219
|
-
NumpadDecimal: 'NumpadDecimal',
|
|
220
|
-
NumpadDivide: 'NumpadDivide',
|
|
221
|
-
NumpadEnter: 'NumpadEnter',
|
|
222
|
-
F1: 'F1',
|
|
223
|
-
F2: 'F2',
|
|
224
|
-
F3: 'F3',
|
|
225
|
-
F4: 'F4',
|
|
226
|
-
F5: 'F5',
|
|
227
|
-
F6: 'F6',
|
|
228
|
-
F7: 'F7',
|
|
229
|
-
F8: 'F8',
|
|
230
|
-
F9: 'F9',
|
|
231
|
-
F10: 'F10',
|
|
232
|
-
F11: 'F11',
|
|
233
|
-
F12: 'F12',
|
|
234
|
-
NumLock: 'NumLock',
|
|
235
|
-
ScrollLock: 'ScrollLock',
|
|
236
|
-
Semicolon: 'Semicolon',
|
|
237
|
-
Equal: 'Equal',
|
|
238
|
-
Comma: 'Comma',
|
|
239
|
-
Minus: 'Minus',
|
|
240
|
-
Period: 'Period',
|
|
241
|
-
Slash: 'Slash',
|
|
242
|
-
Backquote: 'Backquote',
|
|
243
|
-
BracketLeft: 'BracketLeft',
|
|
244
|
-
Backslash: 'Backslash',
|
|
245
|
-
BracketRight: 'BracketRight',
|
|
246
|
-
Quote: 'Quote',
|
|
247
|
-
},
|
|
248
|
-
} as const;
|
|
249
|
-
|
|
250
|
-
export type KeyboardConstant = (typeof KeyboardConstant)[keyof typeof KeyboardConstant];
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
type Constructor<T> = new () => T;
|
|
2
|
-
|
|
3
|
-
export default abstract class PoolProxyBase<T = unknown> {
|
|
4
|
-
protected readonly _pool: Set<T> = new Set<T>();
|
|
5
|
-
private readonly _ctor: Constructor<T>;
|
|
6
|
-
|
|
7
|
-
//#region Constants
|
|
8
|
-
//
|
|
9
|
-
private static readonly _DEFAULT_INITIAL_SIZE: number = 0;
|
|
10
|
-
//
|
|
11
|
-
//#endregion
|
|
12
|
-
|
|
13
|
-
constructor(ctor: Constructor<T>, initialSize: number = PoolProxyBase._DEFAULT_INITIAL_SIZE) {
|
|
14
|
-
this._ctor = ctor;
|
|
15
|
-
this._prepopulate(initialSize);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
private _prepopulate(number: number): void {
|
|
19
|
-
for (let i = 0; i < number; i++) {
|
|
20
|
-
this._pool.add(new this._ctor());
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
public get(): T {
|
|
25
|
-
if (this._pool.size > 0) {
|
|
26
|
-
const o = this._pool.values().next().value!;
|
|
27
|
-
this._pool.delete(o);
|
|
28
|
-
return o;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return new this._ctor();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
public release(o: T): void {
|
|
35
|
-
this._pool.add(o);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
//#region TEMPLATE USAGE
|
|
40
|
-
//
|
|
41
|
-
// class TemplatePoolProxy extends PoolProxyBase<TemplateObject> {
|
|
42
|
-
// constructor() {
|
|
43
|
-
// super(TemplateObject);
|
|
44
|
-
// }
|
|
45
|
-
|
|
46
|
-
// public override get(): TemplateObject {
|
|
47
|
-
// const o = super.get();
|
|
48
|
-
// // Do any additional initialization here if necessary
|
|
49
|
-
// return o;
|
|
50
|
-
// }
|
|
51
|
-
|
|
52
|
-
// public override release(o: TemplateObject): void {
|
|
53
|
-
// // Do any additional cleanup here if necessary
|
|
54
|
-
// super.release(o);
|
|
55
|
-
// }
|
|
56
|
-
// }
|
|
57
|
-
|
|
58
|
-
// const instance = new TemplatePoolProxy();
|
|
59
|
-
// export { instance as TemplatePoolProxy };
|
|
60
|
-
//
|
|
61
|
-
//#endregion
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
type Listener<TParams extends unknown[]> = (...params: TParams) => unknown;
|
|
2
|
-
|
|
3
|
-
export default class Action<T extends unknown[] = []> {
|
|
4
|
-
private _listeners = new Set<Listener<T>>();
|
|
5
|
-
|
|
6
|
-
public add(listener: Listener<T>): void {
|
|
7
|
-
this._listeners.add(listener);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
public remove(listener: Listener<T>): void {
|
|
11
|
-
this._listeners.delete(listener);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public removeAll(): void {
|
|
15
|
-
this._listeners.clear();
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
public execute(...params: T): void {
|
|
19
|
-
for (const listener of this._listeners) {
|
|
20
|
-
listener(...params);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
export default class Point {
|
|
2
|
-
private _x: number;
|
|
3
|
-
private _y: number;
|
|
4
|
-
private _z: number;
|
|
5
|
-
|
|
6
|
-
constructor(x = 0, y = 0, z = 0) {
|
|
7
|
-
this._x = x;
|
|
8
|
-
this._y = y;
|
|
9
|
-
this._z = z;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
public set(x: number, y: number, z: number = this._z): void {
|
|
13
|
-
this._x = x;
|
|
14
|
-
this._y = y;
|
|
15
|
-
this._z = z;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
public clear(): void {
|
|
19
|
-
this._x = 0;
|
|
20
|
-
this._y = 0;
|
|
21
|
-
this._z = 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
public copy(p: Point): void {
|
|
25
|
-
this._x = p.x;
|
|
26
|
-
this._y = p.y;
|
|
27
|
-
this._z = p.z;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
public clone(): Point {
|
|
31
|
-
return new Point(this._x, this._y, this._z);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
//#region getter setter
|
|
35
|
-
//
|
|
36
|
-
public get x(): number {
|
|
37
|
-
return this._x;
|
|
38
|
-
}
|
|
39
|
-
public set x(x: number) {
|
|
40
|
-
this._x = x;
|
|
41
|
-
}
|
|
42
|
-
public get y(): number {
|
|
43
|
-
return this._y;
|
|
44
|
-
}
|
|
45
|
-
public set y(y: number) {
|
|
46
|
-
this._y = y;
|
|
47
|
-
}
|
|
48
|
-
public get z(): number {
|
|
49
|
-
return this._z;
|
|
50
|
-
}
|
|
51
|
-
public set z(z: number) {
|
|
52
|
-
this._z = z;
|
|
53
|
-
}
|
|
54
|
-
//
|
|
55
|
-
//#endregion
|
|
56
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export default class DomUtils {
|
|
2
|
-
public static GetApp(): HTMLDivElement {
|
|
3
|
-
const app = (document.querySelector('#app') ?? document.querySelector('#root'))!;
|
|
4
|
-
|
|
5
|
-
if (!app) {
|
|
6
|
-
const newApp = document.createElement('div');
|
|
7
|
-
newApp.id = 'app';
|
|
8
|
-
document.body.appendChild(newApp);
|
|
9
|
-
return newApp;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
return app as HTMLDivElement;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
public static GetLoader(): HTMLDivElement {
|
|
16
|
-
const loader = document.querySelector('#loader')!;
|
|
17
|
-
|
|
18
|
-
if (!loader) {
|
|
19
|
-
const app = DomUtils.GetApp();
|
|
20
|
-
const newLoader = document.createElement('div');
|
|
21
|
-
newLoader.id = 'loader';
|
|
22
|
-
app.appendChild(newLoader);
|
|
23
|
-
return newLoader;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return loader as HTMLDivElement;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"useDefineForClassFields": true,
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
-
"types": ["vite/client", "vite-plugin-glsl/ext"],
|
|
8
|
-
"skipLibCheck": true,
|
|
9
|
-
/* Bundler mode */
|
|
10
|
-
"moduleResolution": "bundler",
|
|
11
|
-
"allowImportingTsExtensions": true,
|
|
12
|
-
"verbatimModuleSyntax": true,
|
|
13
|
-
"moduleDetection": "force",
|
|
14
|
-
"noEmit": true,
|
|
15
|
-
/* Linting */
|
|
16
|
-
"strict": true,
|
|
17
|
-
// "noUnusedLocals": true,
|
|
18
|
-
// "noUnusedParameters": true,
|
|
19
|
-
"erasableSyntaxOnly": true,
|
|
20
|
-
"noFallthroughCasesInSwitch": true,
|
|
21
|
-
"noUncheckedSideEffectImports": true
|
|
22
|
-
},
|
|
23
|
-
"include": ["src", "src/**/*.ts", "src/**/*.d.ts"]
|
|
24
|
-
}
|