-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathapp-options.js
More file actions
134 lines (117 loc) · 2.68 KB
/
app-options.js
File metadata and controls
134 lines (117 loc) · 2.68 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
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/**
* @import { BatchManager } from '../scene/batching/batch-manager.js'
* @import { ComponentSystem } from './components/system.js'
* @import { ElementInput } from './input/element-input.js'
* @import { GamePads } from '../platform/input/game-pads.js'
* @import { GraphicsDevice } from '../platform/graphics/graphics-device.js'
* @import { Keyboard } from '../platform/input/keyboard.js'
* @import { Lightmapper } from './lightmapper/lightmapper.js'
* @import { Mouse } from '../platform/input/mouse.js'
* @import { ResourceHandler } from './handlers/handler.js'
* @import { SoundManager } from '../platform/sound/manager.js'
* @import { TouchDevice } from '../platform/input/touch-device.js'
* @import { XrManager } from './xr/xr-manager.js'
*/
/**
* AppOptions holds configuration settings utilized in the creation of an {@link AppBase} instance.
* It allows functionality to be included or excluded from the AppBase instance.
*/
class AppOptions {
/**
* Input handler for {@link ElementComponent}s.
*
* @type {ElementInput}
*/
elementInput;
/**
* Keyboard handler for input.
*
* @type {Keyboard}
*/
keyboard;
/**
* Mouse handler for input.
*
* @type {Mouse}
*/
mouse;
/**
* TouchDevice handler for input.
*
* @type {TouchDevice}
*/
touch;
/**
* Gamepad handler for input.
*
* @type {GamePads}
*/
gamepads;
/**
* Prefix to apply to script urls before loading.
*
* @type {string}
*/
scriptPrefix;
/**
* Prefix to apply to asset urls before loading.
*
* @type {string}
*/
assetPrefix;
/**
* Scripts in order of loading first.
*
* @type {string[]}
*/
scriptsOrder;
/**
* The sound manager
*
* @type {SoundManager}
*/
soundManager;
/**
* The graphics device.
*
* @type {GraphicsDevice}
*/
graphicsDevice;
/**
* The lightmapper.
*
* @type {typeof Lightmapper}
*/
lightmapper;
/**
* The BatchManager.
*
* @type {typeof BatchManager}
*/
batchManager;
/**
* The XrManager.
*
* @type {typeof XrManager}
*/
xr;
/**
* The component systems the app requires.
*
* @type {typeof ComponentSystem[]}
*/
componentSystems = [];
/**
* The resource handlers the app requires.
*
* @type {typeof ResourceHandler[]}
*/
resourceHandlers = [];
/**
* Use event postFixedUpdate for physics simulation
*
* @type {boolean}
*/
usePostFixedUpdateForPhysicsSim = false;
}
export { AppOptions };