x_ite 4.7.6 → 4.7.7
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/.vscode/settings.json +1 -2
- package/Makefile +1 -0
- package/build/components/annotation.build.js +2 -2
- package/build/components/cad-geometry.build.js +2 -2
- package/build/components/cube-map-texturing.build.js +2 -2
- package/build/components/dis.build.js +2 -2
- package/build/components/event-utilities.build.js +2 -2
- package/build/components/geometry2d.build.js +2 -2
- package/build/components/geospatial.build.js +2 -2
- package/build/components/h-anim.build.js +2 -2
- package/build/components/key-device-sensor.build.js +2 -2
- package/build/components/layout.build.js +2 -2
- package/build/components/nurbs.build.js +2 -2
- package/build/components/particle-systems.build.js +2 -2
- package/build/components/picking.build.js +2 -2
- package/build/components/projective-texture-mapping.build.js +2 -2
- package/build/components/rigid-body-physics.build.js +2 -2
- package/build/components/scripting.build.js +2 -2
- package/build/components/texturing-3d.build.js +2 -2
- package/build/components/volume-rendering.build.js +2 -2
- package/build/components/x_ite.build.js +2 -2
- package/build/parts/default.end.frag.js +3 -0
- package/build/parts/default.start.frag.js +15 -0
- package/build/parts/{x_ite.end.frag → x_ite.end.frag.js} +4 -2
- package/build/parts/x_ite.start.frag.js +16 -0
- package/build/x_ite.build.js +2 -2
- package/dist/assets/components/annotation.js +17 -7
- package/dist/assets/components/annotation.min.js +1 -1
- package/dist/assets/components/cad-geometry.js +17 -7
- package/dist/assets/components/cad-geometry.min.js +1 -1
- package/dist/assets/components/cube-map-texturing.js +17 -7
- package/dist/assets/components/cube-map-texturing.min.js +1 -1
- package/dist/assets/components/dis.js +17 -7
- package/dist/assets/components/dis.min.js +1 -1
- package/dist/assets/components/event-utilities.js +17 -7
- package/dist/assets/components/event-utilities.min.js +1 -1
- package/dist/assets/components/geometry2d.js +17 -7
- package/dist/assets/components/geometry2d.min.js +1 -1
- package/dist/assets/components/geospatial.js +17 -7
- package/dist/assets/components/geospatial.min.js +2 -2
- package/dist/assets/components/h-anim.js +17 -7
- package/dist/assets/components/h-anim.min.js +1 -1
- package/dist/assets/components/key-device-sensor.js +17 -7
- package/dist/assets/components/key-device-sensor.min.js +1 -1
- package/dist/assets/components/layout.js +17 -7
- package/dist/assets/components/layout.min.js +1 -1
- package/dist/assets/components/nurbs.js +17 -7
- package/dist/assets/components/nurbs.min.js +2 -2
- package/dist/assets/components/particle-systems.js +17 -7
- package/dist/assets/components/particle-systems.min.js +2 -2
- package/dist/assets/components/picking.js +21 -11
- package/dist/assets/components/picking.min.js +1 -1
- package/dist/assets/components/projective-texture-mapping.js +17 -7
- package/dist/assets/components/projective-texture-mapping.min.js +1 -1
- package/dist/assets/components/rigid-body-physics.js +17 -7
- package/dist/assets/components/rigid-body-physics.min.js +17 -17
- package/dist/assets/components/scripting.js +24 -9
- package/dist/assets/components/scripting.min.js +1 -1
- package/dist/assets/components/texturing-3d.js +17 -7
- package/dist/assets/components/texturing-3d.min.js +41 -41
- package/dist/assets/components/volume-rendering.js +19 -9
- package/dist/assets/components/volume-rendering.min.js +3 -3
- package/dist/assets/components/x_ite.js +17 -7
- package/dist/assets/components/x_ite.min.js +1 -1
- package/dist/assets/shaders/webgl1/FallbackUnlit.fs +3 -4
- package/dist/assets/shaders/webgl1/Gouraud.vs +0 -1
- package/dist/assets/shaders/webgl1/Phong.fs +0 -1
- package/dist/assets/shaders/webgl1/Unlit.fs +0 -3
- package/dist/assets/shaders/webgl2/Gouraud.vs +0 -1
- package/dist/assets/shaders/webgl2/Phong.fs +0 -1
- package/dist/assets/shaders/webgl2/Unlit.fs +0 -3
- package/dist/example.html +2 -2
- package/dist/x_ite.css +2 -2
- package/dist/x_ite.js +29492 -29016
- package/dist/x_ite.min.js +41 -41
- package/dist/x_ite.zip +0 -0
- package/docs/Accessing-the-External-Browser.md +31 -2
- package/docs/What's-New.md +23 -0
- package/docs/_config.yml +1 -1
- package/docs/index.md +20 -13
- package/docs/reference/Browser-Services.md +36 -8
- package/docs/reference/Script-Node-Authoring-Interface.md +12 -4
- package/package.json +3 -3
- package/src/assets/components/picking.js +2 -2
- package/src/assets/components/volume-rendering.js +2 -2
- package/src/assets/shaders/webgl1/FallbackUnlit.fs +3 -4
- package/src/assets/shaders/webgl1/Gouraud.vs +0 -1
- package/src/assets/shaders/webgl1/Phong.fs +0 -1
- package/src/assets/shaders/webgl1/Unlit.fs +0 -3
- package/src/assets/shaders/webgl2/Gouraud.vs +0 -1
- package/src/assets/shaders/webgl2/Phong.fs +0 -1
- package/src/assets/shaders/webgl2/Unlit.fs +0 -3
- package/src/bookmarks.js +8 -11
- package/src/examples.js +1 -1
- package/src/locale/de.po +15 -71
- package/src/locale/fr.po +14 -71
- package/src/standard/Time/MicroTime.js +3 -1
- package/src/standard/Utility/DataStorage.js +7 -10
- package/src/tests.js +1 -1
- package/src/x_ite/Browser/Core/BrowserOptions.js +40 -28
- package/src/x_ite/Browser/Core/BrowserTimings.js +12 -21
- package/src/x_ite/Browser/Core/ContextMenu.js +26 -12
- package/src/x_ite/Browser/Core/X3DCoreContext.js +95 -42
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +3 -0
- package/src/x_ite/Browser/Navigation/LookAtViewer.js +3 -0
- package/src/x_ite/Browser/Navigation/PlaneViewer.js +3 -0
- package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +3 -0
- package/src/x_ite/Browser/Picking/VolumePicker.js +1 -1
- package/src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js +4 -1
- package/src/x_ite/Browser/Shaders/ShaderTest.js +3 -3
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/X3DBrowser.js +70 -50
- package/src/x_ite/Components/Picking/PointPickSensor.js +1 -1
- package/src/x_ite/Components/Scripting/Script.js +7 -2
- package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +10 -12
- package/src/x_ite/Components/Shaders.js +9 -9
- package/src/x_ite/Execution/X3DExecutionContext.js +9 -11
- package/src/x_ite/Fields/SFColor.js +5 -5
- package/src/x_ite/Fields/SFColorRGBA.js +6 -6
- package/src/x_ite/Fields/SFDouble.js +1 -1
- package/src/x_ite/Fields/SFFloat.js +1 -1
- package/src/x_ite/Fields/SFImage.js +13 -13
- package/src/x_ite/Fields/SFMatrix3.js +1 -1
- package/src/x_ite/Fields/SFMatrix4.js +1 -1
- package/src/x_ite/Fields/SFNode.js +23 -19
- package/src/x_ite/Fields/SFNodeCache.js +14 -10
- package/src/x_ite/Fields/SFRotation.js +6 -6
- package/src/x_ite/Fields/SFString.js +1 -1
- package/src/x_ite/Fields/SFVec2.js +2 -2
- package/src/x_ite/Fields/SFVec3.js +3 -3
- package/src/x_ite/Fields/SFVec4.js +4 -4
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +3 -3
- package/src/x_ite/InputOutput/Generator.js +71 -62
- package/src/x_ite/Parser/X3DParser.js +6 -0
- package/src/x_ite/Parser/XMLParser.js +1 -1
- package/src/x_ite/X3D.js +8 -2
- package/src/x_ite.js +21 -12
- package/build/parts/default.end.frag +0 -2
- package/build/parts/default.start.frag +0 -6
- package/build/parts/x_ite.start.frag +0 -8
package/src/locale/fr.po
CHANGED
|
@@ -15,215 +15,158 @@ msgstr ""
|
|
|
15
15
|
"X-Poedit-SourceCharset: UTF-8\n"
|
|
16
16
|
"X-Poedit-SearchPath-0: .\n"
|
|
17
17
|
|
|
18
|
-
#: Browser/Core/BrowserTimings.js:96
|
|
19
18
|
msgid "Less Properties"
|
|
20
19
|
msgstr "Moins de propriétés"
|
|
21
20
|
|
|
22
|
-
#: Browser/Core/BrowserTimings.js:98
|
|
23
21
|
msgid "More Properties"
|
|
24
22
|
msgstr "Plus de propriétés"
|
|
25
23
|
|
|
26
|
-
#: Browser/Core/BrowserTimings.js:124
|
|
27
24
|
msgid "Frame rate"
|
|
28
25
|
msgstr "Fréquence"
|
|
29
26
|
|
|
30
|
-
#: Browser/Core/BrowserTimings.js:124
|
|
31
27
|
msgid "fps"
|
|
32
28
|
msgstr "fps"
|
|
33
29
|
|
|
34
|
-
#: Browser/Core/BrowserTimings.js:125
|
|
35
30
|
msgid "Speed"
|
|
36
31
|
msgstr "Vélocité"
|
|
37
32
|
|
|
38
|
-
#: Browser/Core/BrowserTimings.js:125
|
|
39
33
|
msgid "m/s"
|
|
40
34
|
msgstr ""
|
|
41
35
|
|
|
42
|
-
#: Browser/Core/BrowserTimings.js:125
|
|
43
36
|
msgid "km/h"
|
|
44
37
|
msgstr ""
|
|
45
38
|
|
|
46
|
-
#: Browser/Core/BrowserTimings.js:150
|
|
47
|
-
#, fuzzy
|
|
48
39
|
msgid "Browser"
|
|
49
40
|
msgstr "X_ITE Navigateur"
|
|
50
41
|
|
|
51
|
-
#: Browser/Core/BrowserTimings.js:150 Browser/Core/BrowserTimings.js:151
|
|
52
|
-
#: Browser/Core/BrowserTimings.js:152 Browser/Core/BrowserTimings.js:153
|
|
53
|
-
#: Browser/Core/BrowserTimings.js:154 Browser/Core/BrowserTimings.js:155
|
|
54
|
-
#: Browser/Core/BrowserTimings.js:156
|
|
55
42
|
msgid "ms"
|
|
56
43
|
msgstr ""
|
|
57
44
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
msgstr ""
|
|
45
|
+
msgid "X3D total"
|
|
46
|
+
msgstr "X3D total"
|
|
61
47
|
|
|
62
|
-
|
|
63
|
-
msgid "Routing"
|
|
48
|
+
msgid "Traitement des événements"
|
|
64
49
|
msgstr "Routes"
|
|
65
50
|
|
|
66
|
-
#: Browser/Core/BrowserTimings.js:153
|
|
67
51
|
msgid "Pointer"
|
|
68
52
|
msgstr "Pointeur"
|
|
69
53
|
|
|
70
|
-
#: Browser/Core/BrowserTimings.js:154
|
|
71
54
|
msgid "Camera"
|
|
72
55
|
msgstr "Caméra"
|
|
73
56
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
msgstr "Collision"
|
|
57
|
+
msgid "Collision Detection"
|
|
58
|
+
msgstr "Détection des collisions"
|
|
77
59
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
msgstr "Visualisation"
|
|
60
|
+
msgid "Rendering"
|
|
61
|
+
msgstr "Rendement"
|
|
81
62
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
msgstr "Formes"
|
|
63
|
+
msgid "Number of Shapes"
|
|
64
|
+
msgstr "Nombre de formes"
|
|
85
65
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
msgstr "Senseurs"
|
|
66
|
+
msgid "Number of Sensors"
|
|
67
|
+
msgstr "Nombre de senseurs"
|
|
89
68
|
|
|
90
|
-
#: Browser/Core/BrowserTimings.js:163 Browser/Core/ContextMenu.js:210
|
|
91
69
|
msgid "Browser Timings"
|
|
92
70
|
msgstr "Calcul du temps"
|
|
93
71
|
|
|
94
|
-
#: Browser/Core/ContextMenu.js:19
|
|
95
72
|
msgid "X_ITE Browser"
|
|
96
73
|
msgstr "X_ITE Navigateur"
|
|
97
74
|
|
|
98
|
-
#: Browser/Core/ContextMenu.js:59
|
|
99
75
|
msgid "Viewpoints"
|
|
100
76
|
msgstr "Points de vue"
|
|
101
77
|
|
|
102
|
-
#: Browser/Core/ContextMenu.js:87
|
|
103
78
|
msgid "Available Viewers"
|
|
104
79
|
msgstr "Visionneurs disponibles"
|
|
105
80
|
|
|
106
|
-
#: Browser/Core/ContextMenu.js:145
|
|
107
81
|
msgid "Straighten Horizon"
|
|
108
82
|
msgstr "Redresser l'horizon"
|
|
109
83
|
|
|
110
|
-
#: Browser/Core/ContextMenu.js:95 Browser/Core/ContextMenu.js:107
|
|
111
|
-
#: Browser/Core/ContextMenu.js:121 Browser/Core/ContextMenu.js:135
|
|
112
84
|
msgid "Primitive Quality"
|
|
113
85
|
msgstr "Qualité des objets simples"
|
|
114
86
|
|
|
115
|
-
#: Browser/Core/ContextMenu.js:99 Browser/Core/ContextMenu.js:147
|
|
116
87
|
msgid "High"
|
|
117
88
|
msgstr "Haut"
|
|
118
89
|
|
|
119
|
-
#: Browser/Core/ContextMenu.js:107 Browser/Core/ContextMenu.js:155
|
|
120
90
|
msgid "high"
|
|
121
91
|
msgstr "haut"
|
|
122
92
|
|
|
123
|
-
#: Browser/Core/ContextMenu.js:113 Browser/Core/ContextMenu.js:161
|
|
124
93
|
msgid "Medium"
|
|
125
94
|
msgstr "Moyenne"
|
|
126
95
|
|
|
127
|
-
#: Browser/Core/ContextMenu.js:121 Browser/Core/ContextMenu.js:169
|
|
128
96
|
msgid "medium"
|
|
129
97
|
msgstr "moyenne"
|
|
130
98
|
|
|
131
|
-
#: Browser/Core/ContextMenu.js:127 Browser/Core/ContextMenu.js:175
|
|
132
99
|
msgid "Low"
|
|
133
100
|
msgstr "Faible"
|
|
134
101
|
|
|
135
|
-
#: Browser/Core/ContextMenu.js:135 Browser/Core/ContextMenu.js:183
|
|
136
102
|
msgid "low"
|
|
137
103
|
msgstr "faible"
|
|
138
104
|
|
|
139
|
-
#: Browser/Core/ContextMenu.js:143 Browser/Core/ContextMenu.js:155
|
|
140
|
-
#: Browser/Core/ContextMenu.js:169 Browser/Core/ContextMenu.js:183
|
|
141
105
|
msgid "Texture Quality"
|
|
142
106
|
msgstr "Qualité des textures"
|
|
143
107
|
|
|
144
|
-
#: Browser/Core/ContextMenu.js:191
|
|
145
108
|
msgid "Display Rubberband"
|
|
146
109
|
msgstr "Présenter le bande élastique"
|
|
147
110
|
|
|
148
|
-
#: Browser/Core/ContextMenu.js:202 Browser/Core/ContextMenu.js:204
|
|
149
111
|
msgid "Rubberband"
|
|
150
112
|
msgstr "Bande élastique"
|
|
151
113
|
|
|
152
|
-
#: Browser/Core/ContextMenu.js:202
|
|
153
114
|
msgid "on"
|
|
154
115
|
msgstr "marche"
|
|
155
116
|
|
|
156
|
-
#: Browser/Core/ContextMenu.js:204
|
|
157
117
|
msgid "off"
|
|
158
118
|
msgstr "arrêt"
|
|
159
119
|
|
|
160
|
-
#: Browser/Core/ContextMenu.js:225
|
|
161
120
|
msgid "Mute Browser"
|
|
162
121
|
msgstr "Rendre navigateur muet"
|
|
163
122
|
|
|
164
|
-
#: Browser/Core/ContextMenu.js:233
|
|
165
123
|
msgid "Browser muted"
|
|
166
124
|
msgstr "Navigateur muet"
|
|
167
125
|
|
|
168
|
-
#: Browser/Core/ContextMenu.js:233
|
|
169
126
|
msgid "Browser unmuted"
|
|
170
127
|
msgstr "Son de navigateur réactivé"
|
|
171
128
|
|
|
172
|
-
#: Browser/Core/ContextMenu.js:239
|
|
173
129
|
msgid "Leave Fullscreen"
|
|
174
130
|
msgstr "Sortie en plein écran"
|
|
175
131
|
|
|
176
|
-
#: Browser/Core/ContextMenu.js:239
|
|
177
132
|
msgid "Fullscreen"
|
|
178
133
|
msgstr "Plein écran"
|
|
179
134
|
|
|
180
|
-
#: Browser/Core/ContextMenu.js:249
|
|
181
135
|
msgid "About X_ITE"
|
|
182
136
|
msgstr "À propos de X_ITE"
|
|
183
137
|
|
|
184
|
-
#: Browser/Core/ContextMenu.js:342
|
|
185
138
|
msgid "Examine Viewer"
|
|
186
139
|
msgstr "Examiner"
|
|
187
140
|
|
|
188
|
-
#: Browser/Core/ContextMenu.js:344
|
|
189
141
|
msgid "Walk Viewer"
|
|
190
142
|
msgstr "Aller"
|
|
191
143
|
|
|
192
|
-
#: Browser/Core/ContextMenu.js:346
|
|
193
144
|
msgid "Fly Viewer"
|
|
194
145
|
msgstr "Voler"
|
|
195
146
|
|
|
196
|
-
#: Browser/Core/ContextMenu.js:348
|
|
197
147
|
msgid "Plane Viewer"
|
|
198
148
|
msgstr "Visionneur de la plaine"
|
|
199
149
|
|
|
200
|
-
#: Browser/Core/ContextMenu.js:350
|
|
201
|
-
#, fuzzy
|
|
202
150
|
msgid "Look At Viewer"
|
|
203
151
|
msgstr "Regarder un objet de près"
|
|
204
152
|
|
|
205
|
-
#: Browser/Core/ContextMenu.js:352
|
|
206
153
|
msgid "None Viewer"
|
|
207
154
|
msgstr "Pas de visionneur"
|
|
208
155
|
|
|
209
|
-
#: Browser/Networking/X3DNetworkingContext.js:101
|
|
210
|
-
#, javascript-format
|
|
211
156
|
msgid "Loading %d file"
|
|
212
157
|
msgstr "Télécharger %d fichier"
|
|
213
158
|
|
|
214
|
-
#: Browser/Networking/X3DNetworkingContext.js:101
|
|
215
|
-
#, javascript-format
|
|
216
159
|
msgid "Loading %d files"
|
|
217
160
|
msgstr "Télécharger %d fichiers"
|
|
218
161
|
|
|
219
|
-
#: Browser/Networking/X3DNetworkingContext.js:104
|
|
220
162
|
msgid "Loading done"
|
|
221
163
|
msgstr "Téléchargement fini"
|
|
222
164
|
|
|
223
|
-
#: Browser/X3DBrowser.js:313
|
|
224
165
|
msgid "Failed loading world."
|
|
225
166
|
msgstr "Le chargement des fichiers a échoué."
|
|
226
167
|
|
|
227
|
-
#: Browser/X3DBrowser.js:313
|
|
228
168
|
msgid "Show World Info"
|
|
229
169
|
msgstr "Afficher World Info"
|
|
170
|
+
|
|
171
|
+
msgid "Viewpoint is copied to clipboard."
|
|
172
|
+
msgstr "Le point de vue est copié dans le presse-papiers."
|
|
@@ -51,6 +51,8 @@ define (function ()
|
|
|
51
51
|
{
|
|
52
52
|
"use strict";
|
|
53
53
|
|
|
54
|
+
// Return a pseudo accurate timestamp.
|
|
55
|
+
|
|
54
56
|
performance .now = (function ()
|
|
55
57
|
{
|
|
56
58
|
const now = performance .now;
|
|
@@ -61,7 +63,7 @@ define (function ()
|
|
|
61
63
|
|
|
62
64
|
return function ()
|
|
63
65
|
{
|
|
64
|
-
const current = now .call (
|
|
66
|
+
const current = now .call (this);
|
|
65
67
|
|
|
66
68
|
if (current > last)
|
|
67
69
|
{
|
|
@@ -47,10 +47,7 @@
|
|
|
47
47
|
******************************************************************************/
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
define (
|
|
51
|
-
"jquery",
|
|
52
|
-
],
|
|
53
|
-
function ($)
|
|
50
|
+
define (function ()
|
|
54
51
|
{
|
|
55
52
|
"use strict";
|
|
56
53
|
|
|
@@ -69,10 +66,10 @@ function ($)
|
|
|
69
66
|
|
|
70
67
|
var value = target .getStorage () [target .getNameSpace () + key];
|
|
71
68
|
|
|
72
|
-
if (value === undefined || value === "undefined")
|
|
69
|
+
if (value === undefined || value === "undefined" || value === null)
|
|
73
70
|
return undefined;
|
|
74
71
|
|
|
75
|
-
return
|
|
72
|
+
return JSON .parse (value);
|
|
76
73
|
},
|
|
77
74
|
set: function (target, key, value)
|
|
78
75
|
{
|
|
@@ -112,11 +109,11 @@ function ($)
|
|
|
112
109
|
storage = this .getStorage (),
|
|
113
110
|
namespace = this .getNameSpace ();
|
|
114
111
|
|
|
115
|
-
|
|
112
|
+
for (const key of Object .keys (storage))
|
|
116
113
|
{
|
|
117
|
-
if (key .
|
|
118
|
-
storage .removeItem (key)
|
|
119
|
-
}
|
|
114
|
+
if (key .startsWith (namespace))
|
|
115
|
+
storage .removeItem (key)
|
|
116
|
+
}
|
|
120
117
|
},
|
|
121
118
|
}
|
|
122
119
|
|
package/src/tests.js
CHANGED
|
@@ -56,7 +56,6 @@ define ([
|
|
|
56
56
|
"x_ite/Browser/Core/PrimitiveQuality",
|
|
57
57
|
"x_ite/Browser/Core/Shading",
|
|
58
58
|
"x_ite/Browser/Core/TextureQuality",
|
|
59
|
-
"x_ite/Browser/Navigation/X3DFlyViewer",
|
|
60
59
|
],
|
|
61
60
|
function (Fields,
|
|
62
61
|
X3DFieldDefinition,
|
|
@@ -65,8 +64,7 @@ function (Fields,
|
|
|
65
64
|
X3DConstants,
|
|
66
65
|
PrimitiveQuality,
|
|
67
66
|
Shading,
|
|
68
|
-
TextureQuality
|
|
69
|
-
X3DFlyViewer)
|
|
67
|
+
TextureQuality)
|
|
70
68
|
{
|
|
71
69
|
"use strict";
|
|
72
70
|
|
|
@@ -111,6 +109,7 @@ function (Fields,
|
|
|
111
109
|
new X3DFieldDefinition (X3DConstants .inputOutput, "Gravity", new Fields .SFFloat (9.80665)),
|
|
112
110
|
new X3DFieldDefinition (X3DConstants .inputOutput, "StraightenHorizon", new Fields .SFBool (true)),
|
|
113
111
|
new X3DFieldDefinition (X3DConstants .inputOutput, "LogarithmicDepthBuffer", new Fields .SFBool (false)),
|
|
112
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "Timings", new Fields .SFBool (false)),
|
|
114
113
|
]),
|
|
115
114
|
getTypeName: function ()
|
|
116
115
|
{
|
|
@@ -135,34 +134,37 @@ function (Fields,
|
|
|
135
134
|
this .Shading_ .addInterest ("set_shading__", this);
|
|
136
135
|
this .StraightenHorizon_ .addInterest ("set_straightenHorizon__", this);
|
|
137
136
|
this .LogarithmicDepthBuffer_ .addInterest ("set_logarithmicDepthBuffer__", this);
|
|
137
|
+
this .Timings_ .addInterest ("set_timings__", this);
|
|
138
138
|
|
|
139
139
|
this .configure ();
|
|
140
140
|
},
|
|
141
141
|
configure: function ()
|
|
142
142
|
{
|
|
143
|
-
if (!
|
|
143
|
+
if (!this .isInitialized ())
|
|
144
144
|
return;
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
const
|
|
147
|
+
browser = this .getBrowser (),
|
|
148
|
+
localStorage = browser .getLocalStorage (),
|
|
149
|
+
fieldDefinitions = this .getFieldDefinitions ();
|
|
147
150
|
|
|
148
|
-
for (
|
|
151
|
+
for (const fieldDefinition of fieldDefinitions)
|
|
149
152
|
{
|
|
150
|
-
|
|
151
|
-
fieldDefinition = fieldDefinitions [i],
|
|
152
|
-
field = this .getField (fieldDefinition .name);
|
|
153
|
+
const field = this .getField (fieldDefinition .name);
|
|
153
154
|
|
|
154
|
-
if (
|
|
155
|
+
if (localStorage ["BrowserOptions." + fieldDefinition .name] !== undefined)
|
|
155
156
|
continue;
|
|
156
157
|
|
|
157
|
-
if (!
|
|
158
|
+
if (!field .equals (fieldDefinition .value))
|
|
158
159
|
field .setValue (fieldDefinition .value);
|
|
159
160
|
}
|
|
160
161
|
|
|
161
|
-
|
|
162
|
-
rubberband =
|
|
163
|
-
primitiveQuality =
|
|
164
|
-
textureQuality =
|
|
165
|
-
straightenHorizon =
|
|
162
|
+
const
|
|
163
|
+
rubberband = localStorage ["BrowserOptions.Rubberband"],
|
|
164
|
+
primitiveQuality = localStorage ["BrowserOptions.PrimitiveQuality"],
|
|
165
|
+
textureQuality = localStorage ["BrowserOptions.TextureQuality"],
|
|
166
|
+
straightenHorizon = localStorage ["BrowserOptions.StraightenHorizon"],
|
|
167
|
+
timings = localStorage ["BrowserOptions.Timings"];
|
|
166
168
|
|
|
167
169
|
this .setAttributeSplashScreen ();
|
|
168
170
|
|
|
@@ -177,6 +179,9 @@ function (Fields,
|
|
|
177
179
|
|
|
178
180
|
if (straightenHorizon !== undefined && straightenHorizon !== this .StraightenHorizon_ .getValue ())
|
|
179
181
|
this .StraightenHorizon_ = straightenHorizon;
|
|
182
|
+
|
|
183
|
+
if (timings !== undefined && timings !== this .Timings_ .getValue ())
|
|
184
|
+
this .Timings_ = timings;
|
|
180
185
|
},
|
|
181
186
|
setAttributeSplashScreen: function ()
|
|
182
187
|
{
|
|
@@ -202,10 +207,6 @@ function (Fields,
|
|
|
202
207
|
{
|
|
203
208
|
return toBoolean (this .getBrowser () .getElement () .attr ("splashScreen"), true);
|
|
204
209
|
},
|
|
205
|
-
getTimings: function ()
|
|
206
|
-
{
|
|
207
|
-
return toBoolean (this .getBrowser () .getElement () .attr ("timings"), true);
|
|
208
|
-
},
|
|
209
210
|
getPrimitiveQuality: function ()
|
|
210
211
|
{
|
|
211
212
|
return this .primitiveQuality;
|
|
@@ -229,13 +230,14 @@ function (Fields,
|
|
|
229
230
|
},
|
|
230
231
|
set_primitiveQuality__: function (value)
|
|
231
232
|
{
|
|
232
|
-
|
|
233
|
+
const
|
|
233
234
|
browser = this .getBrowser (),
|
|
235
|
+
localStorage = browser .getLocalStorage (),
|
|
234
236
|
primitiveQuality = value .getValue () .toUpperCase ();
|
|
235
237
|
|
|
236
|
-
|
|
238
|
+
localStorage ["BrowserOptions.PrimitiveQuality"] = primitiveQuality;
|
|
237
239
|
|
|
238
|
-
|
|
240
|
+
const
|
|
239
241
|
cone = browser .getConeOptions (),
|
|
240
242
|
cylinder = browser .getCylinderOptions (),
|
|
241
243
|
sphere = browser .getSphereOptions ();
|
|
@@ -294,11 +296,14 @@ function (Fields,
|
|
|
294
296
|
},
|
|
295
297
|
set_textureQuality__: function (value)
|
|
296
298
|
{
|
|
297
|
-
|
|
299
|
+
const
|
|
300
|
+
browser = this .getBrowser (),
|
|
301
|
+
localStorage = browser .getLocalStorage (),
|
|
302
|
+
textureQuality = value .getValue () .toUpperCase ();
|
|
298
303
|
|
|
299
|
-
|
|
304
|
+
localStorage ["BrowserOptions.TextureQuality"] = textureQuality;
|
|
300
305
|
|
|
301
|
-
|
|
306
|
+
const textureProperties = this .getBrowser () .getDefaultTextureProperties ();
|
|
302
307
|
|
|
303
308
|
switch (textureQuality)
|
|
304
309
|
{
|
|
@@ -354,7 +359,7 @@ function (Fields,
|
|
|
354
359
|
},
|
|
355
360
|
set_shading__: function (value)
|
|
356
361
|
{
|
|
357
|
-
|
|
362
|
+
const shading = value .getValue () .toUpperCase ();
|
|
358
363
|
|
|
359
364
|
switch (shading)
|
|
360
365
|
{
|
|
@@ -394,7 +399,7 @@ function (Fields,
|
|
|
394
399
|
},
|
|
395
400
|
set_logarithmicDepthBuffer__: function (logarithmicDepthBuffer)
|
|
396
401
|
{
|
|
397
|
-
|
|
402
|
+
const
|
|
398
403
|
browser = this .getBrowser (),
|
|
399
404
|
gl = browser .getContext ();
|
|
400
405
|
|
|
@@ -439,6 +444,13 @@ function (Fields,
|
|
|
439
444
|
browser .getShadowShader () .parts_ [1] .getValue () .url_ .addEvent ();
|
|
440
445
|
}
|
|
441
446
|
},
|
|
447
|
+
set_timings__: function (timings)
|
|
448
|
+
{
|
|
449
|
+
const browser = this .getBrowser ();
|
|
450
|
+
|
|
451
|
+
browser .getLocalStorage () ["BrowserOptions.Timings"] = timings .getValue ();
|
|
452
|
+
browser .getBrowserTimings () .setEnabled (timings .getValue ());
|
|
453
|
+
},
|
|
442
454
|
});
|
|
443
455
|
|
|
444
456
|
return BrowserOptions;
|
|
@@ -66,7 +66,7 @@ function ($,
|
|
|
66
66
|
{
|
|
67
67
|
X3DBaseNode .call (this, executionContext);
|
|
68
68
|
|
|
69
|
-
this .
|
|
69
|
+
this .enabled = false;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
BrowserTimings .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
|
|
@@ -88,8 +88,6 @@ function ($,
|
|
|
88
88
|
{
|
|
89
89
|
X3DBaseNode .prototype .initialize .call (this);
|
|
90
90
|
|
|
91
|
-
this .enabled_ .addInterest ("set_enabled__", this);
|
|
92
|
-
|
|
93
91
|
this .localeOptions = { minimumFractionDigits: 2, maximumFractionDigits: 2 };
|
|
94
92
|
this .type = this .getBrowser () .getLocalStorage () ["BrowserTimings.type"] || "LESS";
|
|
95
93
|
this .startTime = 0;
|
|
@@ -104,26 +102,19 @@ function ($,
|
|
|
104
102
|
this .rows = [ ];
|
|
105
103
|
|
|
106
104
|
this .set_button__ ();
|
|
107
|
-
|
|
108
|
-
if (this .getBrowser () .getLocalStorage () ["BrowserTimings.enabled"])
|
|
109
|
-
this .enabled_ = true;
|
|
110
|
-
},
|
|
111
|
-
setEnabled: function (value)
|
|
112
|
-
{
|
|
113
|
-
this .enabled_ = value;
|
|
114
105
|
},
|
|
115
106
|
getEnabled: function ()
|
|
116
107
|
{
|
|
117
|
-
return this .
|
|
108
|
+
return this .enabled;
|
|
118
109
|
},
|
|
119
|
-
|
|
110
|
+
setEnabled: function (enabled)
|
|
120
111
|
{
|
|
121
|
-
if (
|
|
112
|
+
if (this .enabled === enabled)
|
|
122
113
|
return;
|
|
123
114
|
|
|
124
|
-
this .
|
|
115
|
+
this .enabled = enabled;
|
|
125
116
|
|
|
126
|
-
if (enabled
|
|
117
|
+
if (enabled)
|
|
127
118
|
{
|
|
128
119
|
this .element .fadeIn ();
|
|
129
120
|
this .getBrowser () .prepareEvents () .addInterest ("update", this);
|
|
@@ -205,15 +196,15 @@ function ($,
|
|
|
205
196
|
rows [1] .addClass ("x_ite-private-more");
|
|
206
197
|
|
|
207
198
|
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (_("Browser") + ":")) .append ($("<td></td>") .text (f2(systemTime) .toLocaleString (language, fixed) + " " + _("ms")));
|
|
208
|
-
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (_("X3D") + ":")) .append ($("<td></td>") .text (f2(browser .browserTime) .toLocaleString (language, fixed) + " " + _("ms")));
|
|
209
|
-
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (_("
|
|
199
|
+
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (_("X3D total") + ":")) .append ($("<td></td>") .text (f2(browser .browserTime) .toLocaleString (language, fixed) + " " + _("ms")));
|
|
200
|
+
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (_("Event Processing") + ":")) .append ($("<td></td>") .text (f2(routingTime) .toLocaleString (language, fixed) + " " + _("ms")));
|
|
210
201
|
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (_("Pointer") + ":")) .append ($("<td></td>") .text (f2(browser .pointerTime) .toLocaleString (language, fixed) + " " + _("ms")));
|
|
211
202
|
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (_("Camera") + ":")) .append ($("<td></td>") .text (f2(browser .cameraTime) .toLocaleString (language, fixed) + " " + _("ms")));
|
|
212
203
|
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (_("Picking") + ":")) .append ($("<td></td>") .text (f2(browser .pickingTime) .toLocaleString (language, fixed) + " " + _("ms")));
|
|
213
|
-
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (_("Collision") + ":")) .append ($("<td></td>") .text (f2(collisionTime) .toLocaleString (language, fixed) + " " + _("ms")));
|
|
214
|
-
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (_("
|
|
215
|
-
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (_("Shapes") + ":")) .append ($("<td></td>") .text (opaqueShapes + " + " + transparentShapes));
|
|
216
|
-
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (_("Sensors") + ":")) .append ($("<td></td>") .text (prepareEvents + sensors));
|
|
204
|
+
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (_("Collision Detection") + ":")) .append ($("<td></td>") .text (f2(collisionTime) .toLocaleString (language, fixed) + " " + _("ms")));
|
|
205
|
+
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (_("Rendering") + ":")) .append ($("<td></td>") .text (f2(browser .displayTime) .toLocaleString (language, fixed) + " " + _("ms")));
|
|
206
|
+
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (_("Number of Shapes") + ":")) .append ($("<td></td>") .text (opaqueShapes + " + " + transparentShapes));
|
|
207
|
+
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (_("Number of Sensors") + ":")) .append ($("<td></td>") .text (prepareEvents + sensors));
|
|
217
208
|
}
|
|
218
209
|
|
|
219
210
|
rows .length = r;
|
|
@@ -63,6 +63,8 @@ function ($,
|
|
|
63
63
|
function ContextMenu (executionContext)
|
|
64
64
|
{
|
|
65
65
|
X3DBaseNode .call (this, executionContext);
|
|
66
|
+
|
|
67
|
+
this .active = false;
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
ContextMenu .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
|
|
@@ -98,6 +100,8 @@ function ($,
|
|
|
98
100
|
{
|
|
99
101
|
show: function (options)
|
|
100
102
|
{
|
|
103
|
+
this .active = true;
|
|
104
|
+
|
|
101
105
|
if (browser .getElement () .fullScreen ())
|
|
102
106
|
{
|
|
103
107
|
browser .getElement () .append (options .$menu);
|
|
@@ -121,10 +125,20 @@ function ($,
|
|
|
121
125
|
"right": options .$menu .width () + "px",
|
|
122
126
|
});
|
|
123
127
|
}
|
|
124
|
-
}
|
|
128
|
+
}
|
|
129
|
+
.bind (this),
|
|
130
|
+
hide: function (options)
|
|
131
|
+
{
|
|
132
|
+
this .active = false;
|
|
133
|
+
}
|
|
134
|
+
.bind (this),
|
|
125
135
|
},
|
|
126
136
|
});
|
|
127
137
|
},
|
|
138
|
+
getActive: function ()
|
|
139
|
+
{
|
|
140
|
+
return this .active;
|
|
141
|
+
},
|
|
128
142
|
build: function (trigger, event)
|
|
129
143
|
{
|
|
130
144
|
const
|
|
@@ -313,19 +327,19 @@ function ($,
|
|
|
313
327
|
.bind (this),
|
|
314
328
|
},
|
|
315
329
|
},
|
|
316
|
-
"browser-timings":
|
|
330
|
+
"browser-timings": {
|
|
317
331
|
name: _("Browser Timings"),
|
|
318
332
|
type: "checkbox",
|
|
319
|
-
selected: browser .
|
|
333
|
+
selected: browser .getBrowserOption ("Timings"),
|
|
320
334
|
events: {
|
|
321
335
|
click: function (event)
|
|
322
336
|
{
|
|
323
|
-
browser .
|
|
337
|
+
browser .setBrowserOption ("Timings", $(event .target) .is (":checked"));
|
|
324
338
|
browser .getSurface () .focus ();
|
|
325
339
|
}
|
|
326
340
|
.bind (this),
|
|
327
341
|
},
|
|
328
|
-
}
|
|
342
|
+
},
|
|
329
343
|
"fullscreen": {
|
|
330
344
|
name: fullscreen ? _("Leave Fullscreen") : _("Fullscreen"),
|
|
331
345
|
className: "context-menu-icon " + (fullscreen ? "x_ite-private-icon-leave-fullscreen" : "x_ite-private-icon-fullscreen"),
|
|
@@ -354,9 +368,9 @@ function ($,
|
|
|
354
368
|
priv = browser .getElement () .find (".x_ite-private-browser"),
|
|
355
369
|
overlay = $("<div></div>") .addClass ("x_ite-private-world-info-overlay") .appendTo (priv),
|
|
356
370
|
div = $("<div></div>") .addClass ("x_ite-private-world-info") .appendTo (overlay),
|
|
357
|
-
worldInfo = browser .getExecutionContext () .
|
|
358
|
-
title = worldInfo .
|
|
359
|
-
info = worldInfo .
|
|
371
|
+
worldInfo = browser .getExecutionContext () .getWorldInfos () [0],
|
|
372
|
+
title = worldInfo .title,
|
|
373
|
+
info = worldInfo .info;
|
|
360
374
|
|
|
361
375
|
converter .setOption ("omitExtraWLInCodeBlocks", true);
|
|
362
376
|
converter .setOption ("simplifiedAutoLink", true);
|
|
@@ -372,9 +386,9 @@ function ($,
|
|
|
372
386
|
$("<div></div>") .addClass ("x_ite-private-world-info-title") .text (title) .appendTo (div);
|
|
373
387
|
}
|
|
374
388
|
|
|
375
|
-
for (
|
|
389
|
+
for (const line of info)
|
|
376
390
|
{
|
|
377
|
-
$("<div></div>") .addClass ("x_ite-private-world-info-info") .html (converter .makeHtml (
|
|
391
|
+
$("<div></div>") .addClass ("x_ite-private-world-info-info") .html (converter .makeHtml (line)) .appendTo (div);
|
|
378
392
|
}
|
|
379
393
|
|
|
380
394
|
div .find ("a") .on ("click", function (event) { event .stopPropagation (); });
|
|
@@ -422,9 +436,9 @@ function ($,
|
|
|
422
436
|
delete menu .items ["straighten-horizon"];
|
|
423
437
|
}
|
|
424
438
|
|
|
425
|
-
const worldInfo = browser .getExecutionContext () .
|
|
439
|
+
const worldInfo = browser .getExecutionContext () .getWorldInfos () [0];
|
|
426
440
|
|
|
427
|
-
if (!worldInfo || (worldInfo .
|
|
441
|
+
if (!worldInfo || (worldInfo .title .length === 0 && worldInfo .info .length === 0))
|
|
428
442
|
{
|
|
429
443
|
delete menu .items ["world-info"];
|
|
430
444
|
}
|