-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathConfig.js
148 lines (126 loc) · 3.6 KB
/
Config.js
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
// Example usage:
//
// Config.instance.window.resize = true
// Config.instance.renderer.alpha = false
class Config {
constructor() {
this.engine = {
// Enables custom logging (log msg when a model is loaded)
// and other debug features
debug: false,
// Valid values are number of frames per second. Example: 60
fixedFPS: undefined,
}
this.window = {
// Automatically resize the renderer with the window
resize: true,
// Allow right click
contextMenu: false,
// what is says
preventDefaultMouseEvents: true,
// Show debug stats like fps, MB used, geometries, textures etc.
showStatsOnStart: false,
}
this.renderer = {
// The id added the the canvas element used for drawing. Should not
// start with #
domElementId: 'vrum-dom',
// Should objects be sorted by the renderer depending on the POV?
sortObjects: true,
// Enable/disable antialias
antialias: true,
// don't worry about this one and don't touch it
logarithmicDepthBuffer: false,
// AKA transparent background
alpha: true,
// Transparent background color
clearColor: 0x000000,
// Amount of transparency
clearAlpha: 1,
}
this.shadow = {
details: {
tiny: 'tiny',
low: 'low',
medium: 'medium',
high: 'high',
ultra: 'ultra'
}
}
this.camera = {
// Default camera type
type: 'perspective',
validCameraTypes: ['perspective', 'ortographic'],
// Default camera field of view
fov: 50,
// Default camera near
near: 0.1,
// Default camera far
far: 10000,
}
this.fade = {
// Scene transition fade color
color: 'black',
// Scene transition fade duration
duration: 1000
}
this.modifiers = {
// Default modifier duration
duration: 1000
}
this.networking = {
// the name of the query param used to get the roomName for MeshNetwork
roomQueryParamName: 'room'
}
this.ui = {
// Order in which html elements are layered
zIndex: {
noWebGL: 1000000,
dom: 10000,
video: 10100,
fade: 20000,
orientation: 30000,
stats: 100000,
console: 200000
},
video: {
// used internaly to hold the video container element
containerKey: 'vrum.video.container',
// used internally to lock one video at a time
pendingRemovalKey: 'vrum.video.pendingRemoval',
supportedFormats: ['mp4', 'ogg', 'ogv'],
},
addsScene: {
// if the AddsScene is skippable by default
skippable: true,
// distance to center of the screen, where the panels are located
cameraDistanceZ: 15,
// how much the images are scaled, 1 img pixel to 1 three.js unit
scaleFactor: 0.01,
// the total time the item is displayed, including fade duration
itemDisplayDurationSeconds: 5,
// how long the fade in/out takes of the specific item
fadeDurationMS: 1000,
},
videoScene: {
// if the VideoScene is skippable by default
skippable: true,
}
}
// Video recorder settings
this.recorder = {
verbose: false,
display: true,
framerate: 60,
quality: 100,
format: 'webm',
frameLimit: 0,
autoSaveTime: 0
}
this.measure = {
// width of the line drawns for debugging using Measure
lineWidth: 1
}
}
}
Config.instance = new Config()