x_ite 9.4.4 → 9.5.0

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.
Files changed (49) hide show
  1. package/README.md +19 -5
  2. package/dist/assets/components/Annotation.js +13 -13
  3. package/dist/assets/components/Annotation.min.js +1 -1
  4. package/dist/assets/components/CADGeometry.js +33 -17
  5. package/dist/assets/components/CADGeometry.min.js +1 -1
  6. package/dist/assets/components/CubeMapTexturing.js +25 -25
  7. package/dist/assets/components/CubeMapTexturing.min.js +1 -1
  8. package/dist/assets/components/DIS.js +13 -13
  9. package/dist/assets/components/DIS.min.js +1 -1
  10. package/dist/assets/components/EventUtilities.js +9 -9
  11. package/dist/assets/components/EventUtilities.min.js +1 -1
  12. package/dist/assets/components/Geometry2D.js +20 -20
  13. package/dist/assets/components/Geometry2D.min.js +1 -1
  14. package/dist/assets/components/Geospatial.js +45 -60
  15. package/dist/assets/components/Geospatial.min.js +1 -1
  16. package/dist/assets/components/HAnim.js +37 -34
  17. package/dist/assets/components/HAnim.min.js +1 -1
  18. package/dist/assets/components/KeyDeviceSensor.js +8 -8
  19. package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
  20. package/dist/assets/components/Layout.js +27 -27
  21. package/dist/assets/components/Layout.min.js +1 -1
  22. package/dist/assets/components/NURBS.js +23 -23
  23. package/dist/assets/components/NURBS.min.js +1 -1
  24. package/dist/assets/components/ParticleSystems.js +107 -155
  25. package/dist/assets/components/ParticleSystems.min.js +1 -1
  26. package/dist/assets/components/Picking.js +18 -18
  27. package/dist/assets/components/Picking.min.js +1 -1
  28. package/dist/assets/components/RigidBodyPhysics.js +17 -17
  29. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  30. package/dist/assets/components/Scripting.js +38 -38
  31. package/dist/assets/components/Scripting.min.js +1 -1
  32. package/dist/assets/components/Text.js +24 -24
  33. package/dist/assets/components/Text.min.js +1 -1
  34. package/dist/assets/components/TextureProjection.js +15 -15
  35. package/dist/assets/components/TextureProjection.min.js +1 -1
  36. package/dist/assets/components/Texturing3D.js +1956 -2567
  37. package/dist/assets/components/Texturing3D.min.js +1 -1
  38. package/dist/assets/components/VolumeRendering.js +19 -19
  39. package/dist/assets/components/VolumeRendering.min.js +1 -1
  40. package/dist/assets/components/X_ITE.js +303 -8
  41. package/dist/assets/components/X_ITE.min.js +1 -1
  42. package/dist/assets/lib/libktx.js +1 -1
  43. package/dist/x_ite.css +1 -1
  44. package/dist/x_ite.js +1264 -866
  45. package/dist/x_ite.min.js +1 -1
  46. package/dist/x_ite.min.mjs +1 -1
  47. package/dist/x_ite.mjs +1264 -866
  48. package/dist/x_ite.zip +0 -0
  49. package/package.json +6 -6
package/dist/x_ite.mjs CHANGED
@@ -1,9 +1,9 @@
1
- /* X_ITE v9.4.4 */var __webpack_modules__ = ({
1
+ /* X_ITE v9.5.0 */var __webpack_modules__ = ({
2
2
 
3
- /***/ 133:
3
+ /***/ 543:
4
4
  /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
5
5
 
6
- /* provided dependency */ var jQuery = __webpack_require__(237);
6
+ /* provided dependency */ var jQuery = __webpack_require__(275);
7
7
  /**
8
8
  * @preserve jquery.fullscreen 1.1.5
9
9
  * https://github.com/code-lts/jquery-fullscreen-plugin
@@ -199,7 +199,7 @@ installFullScreenHandlers();
199
199
 
200
200
  /***/ }),
201
201
 
202
- /***/ 789:
202
+ /***/ 419:
203
203
  /***/ ((module, exports, __webpack_require__) => {
204
204
 
205
205
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
@@ -213,7 +213,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
213
213
  (function (factory) {
214
214
  if ( true ) {
215
215
  // AMD. Register as an anonymous module.
216
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(237)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
216
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(275)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
217
217
  __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
218
218
  (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
219
219
  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
@@ -424,7 +424,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
424
424
 
425
425
  /***/ }),
426
426
 
427
- /***/ 237:
427
+ /***/ 275:
428
428
  /***/ (function(module, exports) {
429
429
 
430
430
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
@@ -11148,7 +11148,7 @@ return jQuery;
11148
11148
 
11149
11149
  /***/ }),
11150
11150
 
11151
- /***/ 414:
11151
+ /***/ 224:
11152
11152
  /***/ ((module) => {
11153
11153
 
11154
11154
  /**
@@ -15927,7 +15927,7 @@ if (true) {
15927
15927
 
15928
15928
  /***/ }),
15929
15929
 
15930
- /***/ 121:
15930
+ /***/ 35:
15931
15931
  /***/ (function(__unused_webpack_module, exports) {
15932
15932
 
15933
15933
 
@@ -19172,7 +19172,7 @@ if (true) {
19172
19172
 
19173
19173
  /***/ }),
19174
19174
 
19175
- /***/ 646:
19175
+ /***/ 964:
19176
19176
  /***/ (function(module, exports) {
19177
19177
 
19178
19178
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
@@ -20299,7 +20299,7 @@ Object .defineProperty (Namespace, "add",
20299
20299
  }
20300
20300
  else
20301
20301
  {
20302
- const X3D = window [Symbol .for ("X_ITE.X3D-9.4.4")];
20302
+ const X3D = window [Symbol .for ("X_ITE.X3D-9.5.0")];
20303
20303
 
20304
20304
  if (X3D)
20305
20305
  X3D [name] = module;
@@ -23409,6 +23409,9 @@ Object .assign (Color3 .prototype,
23409
23409
  },
23410
23410
  });
23411
23411
 
23412
+ for (const key of Object .keys (Color3 .prototype))
23413
+ Object .defineProperty (Color3 .prototype, key, { enumerable: false });
23414
+
23412
23415
  const r = {
23413
23416
  get () { return this [_r]; },
23414
23417
  set (value) { this [_r] = clamp (value, 0, 1); },
@@ -23863,6 +23866,9 @@ Object .assign (Color4 .prototype,
23863
23866
  },
23864
23867
  });
23865
23868
 
23869
+ for (const key of Object .keys (Color4 .prototype))
23870
+ Object .defineProperty (Color4 .prototype, key, { enumerable: false });
23871
+
23866
23872
  const Numbers_Color4_r = {
23867
23873
  get () { return this [Color4_r]; },
23868
23874
  set (value) { this [Color4_r] = Color4_clamp (value, 0, 1); },
@@ -24907,6 +24913,9 @@ Object .assign (Vector2 .prototype,
24907
24913
  }
24908
24914
  });
24909
24915
 
24916
+ for (const key of Object .keys (Vector2 .prototype))
24917
+ Object .defineProperty (Vector2 .prototype, key, { enumerable: false });
24918
+
24910
24919
  Object .defineProperties (Vector2 .prototype,
24911
24920
  {
24912
24921
  length: { value: 2 },
@@ -25198,6 +25207,9 @@ Object .assign (Vector3 .prototype,
25198
25207
  }
25199
25208
  });
25200
25209
 
25210
+ for (const key of Object .keys (Vector3 .prototype))
25211
+ Object .defineProperty (Vector3 .prototype, key, { enumerable: false });
25212
+
25201
25213
  Object .defineProperties (Vector3 .prototype,
25202
25214
  {
25203
25215
  length: { value: 3 },
@@ -25466,6 +25478,9 @@ Object .assign (Matrix2 .prototype,
25466
25478
  },
25467
25479
  });
25468
25480
 
25481
+ for (const key of Object .keys (Matrix2 .prototype))
25482
+ Object .defineProperty (Matrix2 .prototype, key, { enumerable: false });
25483
+
25469
25484
  Object .defineProperties (Matrix2 .prototype,
25470
25485
  {
25471
25486
  order: { value: 2 },
@@ -26284,6 +26299,9 @@ Object .assign (Matrix3 .prototype,
26284
26299
  },
26285
26300
  });
26286
26301
 
26302
+ for (const key of Object .keys (Matrix3 .prototype))
26303
+ Object .defineProperty (Matrix3 .prototype, key, { enumerable: false });
26304
+
26287
26305
  Object .defineProperties (Matrix3 .prototype,
26288
26306
  {
26289
26307
  order: { value: 3 },
@@ -26817,6 +26835,9 @@ Object .assign (Vector4 .prototype,
26817
26835
  },
26818
26836
  });
26819
26837
 
26838
+ for (const key of Object .keys (Vector4 .prototype))
26839
+ Object .defineProperty (Vector4 .prototype, key, { enumerable: false });
26840
+
26820
26841
  Object .defineProperties (Vector4 .prototype,
26821
26842
  {
26822
26843
  length: { value: 4 },
@@ -27435,6 +27456,9 @@ Object .assign (Quaternion .prototype,
27435
27456
  },
27436
27457
  });
27437
27458
 
27459
+ for (const key of Object .keys (Quaternion .prototype))
27460
+ Object .defineProperty (Quaternion .prototype, key, { enumerable: false });
27461
+
27438
27462
  Object .defineProperties (Quaternion .prototype,
27439
27463
  {
27440
27464
  length: { value: 4 },
@@ -27945,6 +27969,9 @@ Object .assign (Rotation4 .prototype,
27945
27969
  }
27946
27970
  });
27947
27971
 
27972
+ for (const key of Object .keys (Rotation4 .prototype))
27973
+ Object .defineProperty (Rotation4 .prototype, key, { enumerable: false });
27974
+
27948
27975
  const x = {
27949
27976
  get ()
27950
27977
  {
@@ -28717,6 +28744,9 @@ Object .assign (Matrix4_Matrix4 .prototype,
28717
28744
  },
28718
28745
  });
28719
28746
 
28747
+ for (const key of Object .keys (Matrix4_Matrix4 .prototype))
28748
+ Object .defineProperty (Matrix4_Matrix4 .prototype, key, { enumerable: false });
28749
+
28720
28750
  Object .defineProperties (Matrix4_Matrix4 .prototype,
28721
28751
  {
28722
28752
  order: { value: 4 },
@@ -34236,7 +34266,7 @@ const X3DBaseNode_default_ = X3DBaseNode;
34236
34266
  x_ite_Namespace .add ("X3DBaseNode", "x_ite/Base/X3DBaseNode", X3DBaseNode_default_);
34237
34267
  /* harmony default export */ const Base_X3DBaseNode = (X3DBaseNode_default_);
34238
34268
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Legacy.js
34239
- /* provided dependency */ var $ = __webpack_require__(237);
34269
+ /* provided dependency */ var $ = __webpack_require__(275);
34240
34270
  /*******************************************************************************
34241
34271
  *
34242
34272
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34373,7 +34403,7 @@ x_ite_Namespace .add ("Legacy", "x_ite/Browser/Legacy", Legacy_default_);
34373
34403
  *
34374
34404
  ******************************************************************************/
34375
34405
 
34376
- const BROWSER_VERSION_default_ = "9.4.4";
34406
+ const BROWSER_VERSION_default_ = "9.5.0";
34377
34407
  ;
34378
34408
 
34379
34409
  x_ite_Namespace .add ("BROWSER_VERSION", "x_ite/BROWSER_VERSION", BROWSER_VERSION_default_);
@@ -34777,6 +34807,22 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
34777
34807
 
34778
34808
  return field;
34779
34809
  }
34810
+ else if (field)
34811
+ {
34812
+ // Support for Numbers (Vector234, Color34, ...).
34813
+
34814
+ if (!metadataObject)
34815
+ return field;
34816
+
34817
+ const value = metadataObject .value;
34818
+
34819
+ let i = 0;
34820
+
34821
+ for (const key in field)
34822
+ field [key] = value [i ++];
34823
+
34824
+ return field;
34825
+ }
34780
34826
 
34781
34827
  return metadataObject ? Array .from (metadataObject .value) : [ ];
34782
34828
  },
@@ -34871,6 +34917,13 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
34871
34917
  break;
34872
34918
  }
34873
34919
  }
34920
+ else if (!Array .isArray (value) && value .valueOf () instanceof Object)
34921
+ {
34922
+ // Support for Numbers (Vector234, Color34, ...).
34923
+
34924
+ value = Array .from (value);
34925
+ value .type = "double";
34926
+ }
34874
34927
 
34875
34928
  metadataSet .getValue () .setMetaValue (last, value);
34876
34929
 
@@ -36835,7 +36888,7 @@ Object .assign (Object .setPrototypeOf (MetadataSet .prototype, Core_X3DNode .pr
36835
36888
  setMetaValue (name, value)
36836
36889
  {
36837
36890
  if (!Array .isArray (value))
36838
- value = [value];
36891
+ value = [value .valueOf ()];
36839
36892
 
36840
36893
  switch (value .type ?? (typeof value [0]))
36841
36894
  {
@@ -36845,14 +36898,6 @@ Object .assign (Object .setPrototypeOf (MetadataSet .prototype, Core_X3DNode .pr
36845
36898
  return;
36846
36899
  }
36847
36900
  case "number":
36848
- {
36849
- if (value .every (v => Number .isInteger (v)))
36850
- this .getMetadataObject ("MetadataInteger", name, true) .value = value;
36851
- else
36852
- this .getMetadataObject ("MetadataDouble", name, true) .value = value;
36853
-
36854
- return;
36855
- }
36856
36901
  case "double":
36857
36902
  {
36858
36903
  this .getMetadataObject ("MetadataDouble", name, true) .value = value;
@@ -38014,8 +38059,8 @@ function X3DUrlObject (executionContext)
38014
38059
  {
38015
38060
  this .addType (Base_X3DConstants .X3DUrlObject);
38016
38061
 
38017
- this .addChildObjects (Base_X3DConstants .outputOnly, "loadState", new x_ite_Fields .SFInt32 (Base_X3DConstants .NOT_STARTED_STATE),
38018
- Base_X3DConstants .inputOutput, "loadData", new x_ite_Fields .SFTime ());
38062
+ this .addChildObjects (Base_X3DConstants .outputOnly, "loadState", new x_ite_Fields .SFInt32 (Base_X3DConstants .NOT_STARTED_STATE),
38063
+ Base_X3DConstants .outputOnly, "loadData", new x_ite_Fields .SFTime ());
38019
38064
 
38020
38065
  this [X3DUrlObject_cache] = true;
38021
38066
  this [_autoRefreshStartTime] = Date .now ();
@@ -38970,7 +39015,7 @@ const X3DProtoDeclaration_default_ = X3DProtoDeclaration;
38970
39015
  x_ite_Namespace .add ("X3DProtoDeclaration", "x_ite/Prototype/X3DProtoDeclaration", X3DProtoDeclaration_default_);
38971
39016
  /* harmony default export */ const Prototype_X3DProtoDeclaration = (X3DProtoDeclaration_default_);
38972
39017
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/X3DParser.js
38973
- /* provided dependency */ var X3DParser_$ = __webpack_require__(237);
39018
+ /* provided dependency */ var X3DParser_$ = __webpack_require__(275);
38974
39019
  /*******************************************************************************
38975
39020
  *
38976
39021
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39232,7 +39277,7 @@ const Expressions_default_ = Expressions;
39232
39277
  x_ite_Namespace .add ("Expressions", "x_ite/Parser/Expressions", Expressions_default_);
39233
39278
  /* harmony default export */ const Parser_Expressions = (Expressions_default_);
39234
39279
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/VRMLParser.js
39235
- /* provided dependency */ var VRMLParser_$ = __webpack_require__(237);
39280
+ /* provided dependency */ var VRMLParser_$ = __webpack_require__(275);
39236
39281
  /*******************************************************************************
39237
39282
  *
39238
39283
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41918,7 +41963,7 @@ const VRMLParser_default_ = VRMLParser;
41918
41963
  x_ite_Namespace .add ("VRMLParser", "x_ite/Parser/VRMLParser", VRMLParser_default_);
41919
41964
  /* harmony default export */ const Parser_VRMLParser = (VRMLParser_default_);
41920
41965
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/XMLParser.js
41921
- /* provided dependency */ var XMLParser_$ = __webpack_require__(237);
41966
+ /* provided dependency */ var XMLParser_$ = __webpack_require__(275);
41922
41967
  /*******************************************************************************
41923
41968
  *
41924
41969
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44027,7 +44072,7 @@ const URLs_default_ = URLs;
44027
44072
  x_ite_Namespace .add ("URLs", "x_ite/Browser/Networking/URLs", URLs_default_);
44028
44073
  /* harmony default export */ const Networking_URLs = (URLs_default_);
44029
44074
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/GLTF2Parser.js
44030
- /* provided dependency */ var GLTF2Parser_$ = __webpack_require__(237);
44075
+ /* provided dependency */ var GLTF2Parser_$ = __webpack_require__(275);
44031
44076
  /*******************************************************************************
44032
44077
  *
44033
44078
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44323,6 +44368,15 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
44323
44368
  // {
44324
44369
  // break;
44325
44370
  // },
44371
+ case "EXT_mesh_gpu_instancing":
44372
+ {
44373
+ const component = browser .getComponent ("X_ITE", 1);
44374
+
44375
+ if (!scene .hasComponent (component))
44376
+ scene .addComponent (component);
44377
+
44378
+ break;
44379
+ }
44326
44380
  case "KHR_texture_transform":
44327
44381
  {
44328
44382
  const component = browser .getComponent ("Texturing3D", 2);
@@ -45267,7 +45321,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
45267
45321
 
45268
45322
  this .meshes = meshes;
45269
45323
  },
45270
- meshObject (mesh, skin)
45324
+ meshObject (mesh, skin, EXT_mesh_gpu_instancing)
45271
45325
  {
45272
45326
  if (!(mesh instanceof Object))
45273
45327
  return;
@@ -45285,7 +45339,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
45285
45339
  return mesh .shapeNodes;
45286
45340
  }
45287
45341
 
45288
- const shapeNodes = this .primitivesArray (mesh, skin);
45342
+ const shapeNodes = this .primitivesArray (mesh, skin, EXT_mesh_gpu_instancing);
45289
45343
 
45290
45344
  // Name Shape nodes.
45291
45345
 
@@ -45301,7 +45355,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
45301
45355
 
45302
45356
  return mesh .shapeNodes = shapeNodes;
45303
45357
  },
45304
- primitivesArray ({ primitives, weights }, skin)
45358
+ primitivesArray ({ primitives, weights }, skin, EXT_mesh_gpu_instancing)
45305
45359
  {
45306
45360
  if (!(primitives instanceof Array))
45307
45361
  return [ ];
@@ -45309,11 +45363,11 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
45309
45363
  const shapeNodes = [ ];
45310
45364
 
45311
45365
  for (const primitive of primitives)
45312
- this .primitiveObject (primitive, weights, skin, shapeNodes);
45366
+ this .primitiveObject (primitive, weights, skin, EXT_mesh_gpu_instancing, shapeNodes);
45313
45367
 
45314
45368
  return shapeNodes;
45315
45369
  },
45316
- primitiveObject (primitive, weights, skin, shapeNodes)
45370
+ primitiveObject (primitive, weights, skin, EXT_mesh_gpu_instancing, shapeNodes)
45317
45371
  {
45318
45372
  if (!(primitive instanceof Object))
45319
45373
  return;
@@ -45326,7 +45380,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
45326
45380
 
45327
45381
  this .primitiveExtensionsObject (primitive .extensions, primitive)
45328
45382
 
45329
- shapeNodes .push (primitive .shapeNode = this .createShape (primitive, weights, skin));
45383
+ shapeNodes .push (primitive .shapeNode = this .createShape (primitive, weights, skin, EXT_mesh_gpu_instancing));
45330
45384
  },
45331
45385
  attributesObject (attributes)
45332
45386
  {
@@ -45716,8 +45770,9 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
45716
45770
  // Add mesh.
45717
45771
 
45718
45772
  const
45719
- skin = this .skins [node .skin],
45720
- shapeNodes = this .meshObject (this .meshes [node .mesh], skin);
45773
+ skin = this .skins [node .skin],
45774
+ EXT_mesh_gpu_instancing = node .extensions ?.EXT_mesh_gpu_instancing,
45775
+ shapeNodes = this .meshObject (this .meshes [node .mesh], skin, EXT_mesh_gpu_instancing);
45721
45776
 
45722
45777
  // Add camera.
45723
45778
 
@@ -45737,7 +45792,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
45737
45792
  // Add Shape nodes.
45738
45793
 
45739
45794
  if (shapeNodes)
45740
- transformNode ._children .push (... this .meshInstancing (node .extensions ?.EXT_mesh_gpu_instancing, shapeNodes));
45795
+ transformNode ._children .push (... shapeNodes);
45741
45796
 
45742
45797
  transformNode .setup ();
45743
45798
 
@@ -45806,71 +45861,6 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
45806
45861
 
45807
45862
  transformNode ._children .push (lightNode);
45808
45863
  },
45809
- meshInstancing (EXT_mesh_gpu_instancing, shapeNodes)
45810
- {
45811
- if (!(EXT_mesh_gpu_instancing instanceof Object))
45812
- return shapeNodes;
45813
-
45814
- let
45815
- attributes = EXT_mesh_gpu_instancing .attributes,
45816
- translation = this .accessors [attributes ?.TRANSLATION],
45817
- rotation = this .accessors [attributes ?.ROTATION],
45818
- scale = this .accessors [attributes ?.SCALE],
45819
- count = Math .max (translation ?.count ?? 0, rotation ?.count ?? 0, scale ?.count ?? 0);
45820
-
45821
- if (!count)
45822
- return shapeNodes;
45823
-
45824
- if (translation ?.type !== "VEC3")
45825
- translation = null;
45826
-
45827
- if (rotation ?.type !== "VEC4")
45828
- rotation = null;
45829
-
45830
- if (scale ?.type !== "VEC3")
45831
- scale = null;
45832
-
45833
- const
45834
- scene = this .getScene (),
45835
- transformNodes = [ ],
45836
- tArray = translation ?.array,
45837
- rArray = rotation ?.normalizedArray,
45838
- sArray = scale ?.array;
45839
-
45840
- for (let i = 0; i < count; ++ i)
45841
- {
45842
- const transformNode = scene .createNode ("Transform", false);
45843
-
45844
- if (translation && i < translation .count)
45845
- {
45846
- transformNode ._translation = new Numbers_Vector3 (tArray [i * 3 + 0],
45847
- tArray [i * 3 + 1],
45848
- tArray [i * 3 + 2]);
45849
- }
45850
-
45851
- if (rotation && i < rotation .count)
45852
- {
45853
- transformNode ._rotation = new Numbers_Rotation4 (new Numbers_Quaternion (rArray [i * 4 + 0],
45854
- rArray [i * 4 + 1],
45855
- rArray [i * 4 + 2],
45856
- rArray [i * 4 + 3]));
45857
- }
45858
-
45859
- if (scale && i < scale .count)
45860
- {
45861
- transformNode ._scale = new Numbers_Vector3 (sArray [i * 3 + 0],
45862
- sArray [i * 3 + 1],
45863
- sArray [i * 3 + 2]);
45864
- }
45865
-
45866
- transformNode ._children = shapeNodes;
45867
-
45868
- transformNode .setup ();
45869
- transformNodes .push (transformNode);
45870
- }
45871
-
45872
- return transformNodes;
45873
- },
45874
45864
  nodeChildrenArray (children)
45875
45865
  {
45876
45866
  if (!(children instanceof Array))
@@ -46174,11 +46164,11 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
46174
46164
 
46175
46165
  return navigationInfoNode;
46176
46166
  },
46177
- createShape (primitive, weights, skin)
46167
+ createShape (primitive, weights, skin, EXT_mesh_gpu_instancing)
46178
46168
  {
46179
46169
  const
46180
46170
  scene = this .getExecutionContext (),
46181
- shapeNode = scene .createNode ("Shape", false),
46171
+ shapeNode = this .meshInstancing (EXT_mesh_gpu_instancing) ?? scene .createNode ("Shape", false),
46182
46172
  appearanceNode = this .materialObject (primitive),
46183
46173
  geometryNode = this .createGeometry (primitive, weights, skin);
46184
46174
 
@@ -46189,6 +46179,60 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
46189
46179
 
46190
46180
  return shapeNode;
46191
46181
  },
46182
+ meshInstancing (EXT_mesh_gpu_instancing)
46183
+ {
46184
+ if (!(EXT_mesh_gpu_instancing instanceof Object))
46185
+ return null;
46186
+
46187
+ let
46188
+ attributes = EXT_mesh_gpu_instancing .attributes,
46189
+ translation = this .accessors [attributes ?.TRANSLATION],
46190
+ rotation = this .accessors [attributes ?.ROTATION],
46191
+ scale = this .accessors [attributes ?.SCALE],
46192
+ count = Math .max (translation ?.count ?? 0, rotation ?.count ?? 0, scale ?.count ?? 0);
46193
+
46194
+ if (!count)
46195
+ return null;
46196
+
46197
+ if (translation ?.type !== "VEC3")
46198
+ translation = null;
46199
+
46200
+ if (rotation ?.type !== "VEC4")
46201
+ rotation = null;
46202
+
46203
+ if (scale ?.type !== "VEC3")
46204
+ scale = null;
46205
+
46206
+ const
46207
+ scene = this .getScene (),
46208
+ instancedShapeNode = scene .createNode ("InstancedShape", false),
46209
+ translationArray = translation ?.array,
46210
+ rotationArray = rotation ?.normalizedArray,
46211
+ scaleArray = scale ?.array;
46212
+
46213
+ if (translationArray)
46214
+ instancedShapeNode ._translations = translationArray;
46215
+
46216
+ if (rotationArray)
46217
+ {
46218
+ const length = rotation .count * 4;
46219
+
46220
+ for (let i = 0; i < length; i += 4)
46221
+ {
46222
+ instancedShapeNode ._rotations .push (new Numbers_Rotation4 (new Numbers_Quaternion (rotationArray [i + 0],
46223
+ rotationArray [i + 1],
46224
+ rotationArray [i + 2],
46225
+ rotationArray [i + 3])));
46226
+ }
46227
+ }
46228
+
46229
+ if (scaleArray)
46230
+ instancedShapeNode ._scales = scaleArray;
46231
+
46232
+ instancedShapeNode .setup ();
46233
+
46234
+ return instancedShapeNode;
46235
+ },
46192
46236
  getDefaultAppearance (mode)
46193
46237
  {
46194
46238
  mode = mode > 3;
@@ -47330,7 +47374,7 @@ const GLTF2Parser_default_ = GLTF2Parser;
47330
47374
  x_ite_Namespace .add ("GLTF2Parser", "x_ite/Parser/GLTF2Parser", GLTF2Parser_default_);
47331
47375
  /* harmony default export */ const Parser_GLTF2Parser = (GLTF2Parser_default_);
47332
47376
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/GLB2Parser.js
47333
- /* provided dependency */ var GLB2Parser_$ = __webpack_require__(237);
47377
+ /* provided dependency */ var GLB2Parser_$ = __webpack_require__(275);
47334
47378
  /*******************************************************************************
47335
47379
  *
47336
47380
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47482,7 +47526,7 @@ const GLB2Parser_default_ = GLB2Parser;
47482
47526
  x_ite_Namespace .add ("GLB2Parser", "x_ite/Parser/GLB2Parser", GLB2Parser_default_);
47483
47527
  /* harmony default export */ const Parser_GLB2Parser = (GLB2Parser_default_);
47484
47528
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/OBJParser.js
47485
- /* provided dependency */ var OBJParser_$ = __webpack_require__(237);
47529
+ /* provided dependency */ var OBJParser_$ = __webpack_require__(275);
47486
47530
  /*******************************************************************************
47487
47531
  *
47488
47532
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50144,6 +50188,9 @@ Object .assign (Complex .prototype,
50144
50188
  },
50145
50189
  });
50146
50190
 
50191
+ for (const key of Object .keys (Complex .prototype))
50192
+ Object .defineProperty (Complex .prototype, key, { enumerable: false });
50193
+
50147
50194
  Object .defineProperties (Complex .prototype,
50148
50195
  {
50149
50196
  length: { value: 2 },
@@ -50837,8 +50884,8 @@ const MatrixStack_default_ = MatrixStack;
50837
50884
  x_ite_Namespace .add ("MatrixStack", "standard/Math/Utility/MatrixStack", MatrixStack_default_);
50838
50885
  /* harmony default export */ const Utility_MatrixStack = (MatrixStack_default_);
50839
50886
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/SVGParser.js
50840
- /* provided dependency */ var SVGParser_$ = __webpack_require__(237);
50841
- /* provided dependency */ var libtess = __webpack_require__(414);
50887
+ /* provided dependency */ var SVGParser_$ = __webpack_require__(275);
50888
+ /* provided dependency */ var libtess = __webpack_require__(224);
50842
50889
  /*******************************************************************************
50843
50890
  *
50844
50891
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53606,7 +53653,7 @@ const SVGParser_default_ = SVGParser;
53606
53653
  x_ite_Namespace .add ("SVGParser", "x_ite/Parser/SVGParser", SVGParser_default_);
53607
53654
  /* harmony default export */ const Parser_SVGParser = (SVGParser_default_);
53608
53655
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/GoldenGate.js
53609
- /* provided dependency */ var GoldenGate_$ = __webpack_require__(237);
53656
+ /* provided dependency */ var GoldenGate_$ = __webpack_require__(275);
53610
53657
  /*******************************************************************************
53611
53658
  *
53612
53659
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53956,7 +54003,7 @@ const Plane3_default_ = Plane3;
53956
54003
  x_ite_Namespace .add ("Plane3", "standard/Math/Geometry/Plane3", Plane3_default_);
53957
54004
  /* harmony default export */ const Geometry_Plane3 = (Plane3_default_);
53958
54005
  ;// CONCATENATED MODULE: ./src/standard/Math/Geometry/Triangle3.js
53959
- /* provided dependency */ var Triangle3_libtess = __webpack_require__(414);
54006
+ /* provided dependency */ var Triangle3_libtess = __webpack_require__(224);
53960
54007
  /*******************************************************************************
53961
54008
  *
53962
54009
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56604,34 +56651,36 @@ Object .assign (X3DRenderObject .prototype,
56604
56651
  {
56605
56652
  return this .shadowShapes;
56606
56653
  },
56607
- setNumOpaqueShapes (value)
56608
- {
56609
- this .numOpaqueShapes = value;
56610
- },
56611
56654
  getNumOpaqueShapes ()
56612
56655
  {
56613
56656
  return this .numOpaqueShapes;
56614
56657
  },
56615
- getOpaqueShapes ()
56658
+ setNumOpaqueShapes (value)
56616
56659
  {
56617
- return this .opaqueShapes;
56660
+ // Needed for StaticGroup.
56661
+ this .numOpaqueShapes = value;
56618
56662
  },
56619
- setNumTransparentShapes (value)
56663
+ getOpaqueShapes ()
56620
56664
  {
56621
- this .numTransparentShapes = value;
56665
+ return this .opaqueShapes;
56622
56666
  },
56623
56667
  getNumTransparentShapes ()
56624
56668
  {
56625
56669
  return this .numTransparentShapes;
56626
56670
  },
56671
+ setNumTransparentShapes (value)
56672
+ {
56673
+ // Needed for StaticGroup.
56674
+ this .numTransparentShapes = value;
56675
+ },
56627
56676
  getTransparentShapes ()
56628
56677
  {
56629
56678
  return this .transparentShapes;
56630
56679
  },
56631
56680
  constrainTranslation (translation, stepBack)
56632
56681
  {
56633
- /// Contrains @a translation to a possible value the avatar can move. If the avatar reaches and intersects with an
56634
- /// and obstacle and @a stepBack is true a translation in the opposite directiion is returned. Future implementation will
56682
+ /// Constrains @a translation to a possible value the avatar can move. If the avatar reaches and intersects with an
56683
+ /// and obstacle and @a stepBack is true a translation in the opposite direction is returned. Future implementation will
56635
56684
  /// will then return a value where the avatar slides along the wall. Modifies translation in place.
56636
56685
 
56637
56686
  // Constrain translation when the viewer collides with an obstacle.
@@ -60769,8 +60818,8 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
60769
60818
 
60770
60819
  delete this .displaySimple;
60771
60820
  delete this .display;
60772
- delete this .displaySimpleParticles;
60773
- delete this .displayParticles;
60821
+ delete this .displaySimpleInstanced;
60822
+ delete this .displayInstanced;
60774
60823
  }
60775
60824
  else
60776
60825
  {
@@ -60778,8 +60827,8 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
60778
60827
 
60779
60828
  this .displaySimple = Function .prototype;
60780
60829
  this .display = Function .prototype;
60781
- this .displaySimpleParticles = Function .prototype;
60782
- this .displayParticles = Function .prototype;
60830
+ this .displaySimpleInstanced = Function .prototype;
60831
+ this .displayInstanced = Function .prototype;
60783
60832
  }
60784
60833
  },
60785
60834
  traverse (type, renderObject)
@@ -60908,26 +60957,32 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
60908
60957
  for (const node of renderModeNodes)
60909
60958
  node .disable (gl);
60910
60959
  },
60911
- displaySimpleParticles (gl, shaderNode, particleSystem)
60960
+ displaySimpleInstanced (gl, shaderNode, shapeNode)
60912
60961
  {
60913
- const outputParticles = particleSystem .outputParticles;
60962
+ const instances = shapeNode .getInstances ();
60914
60963
 
60915
- if (outputParticles .vertexArrayObject .update (this .updateParticles) .enable (shaderNode .getProgram ()))
60964
+ if (instances .vertexArrayObject .update (this .updateParticles) .enable (shaderNode .getProgram ()))
60916
60965
  {
60917
- const { particleStride, particleOffset, matrixOffset } = particleSystem;
60966
+ const { instancesStride, particleOffset, matrixOffset, normalMatrixOffset } = shapeNode;
60967
+
60968
+ if (particleOffset !== undefined)
60969
+ shaderNode .enableParticleAttribute (gl, instances, instancesStride, particleOffset, 1);
60918
60970
 
60919
- shaderNode .enableParticleAttribute (gl, outputParticles, particleStride, particleOffset, 1);
60920
- shaderNode .enableParticleMatrixAttribute (gl, outputParticles, particleStride, matrixOffset, 1);
60921
- shaderNode .enableTexCoordAttribute (gl, this .texCoordBuffers, 0, 0);
60922
- shaderNode .enableNormalAttribute (gl, this .normalBuffer, 0, 0);
60923
- shaderNode .enableVertexAttribute (gl, this .vertexBuffer, 0, 0);
60971
+ shaderNode .enableInstanceMatrixAttribute (gl, instances, instancesStride, matrixOffset, 1);
60972
+
60973
+ if (normalMatrixOffset !== undefined)
60974
+ shaderNode .enableInstanceNormalMatrixAttribute (gl, instances, instancesStride, normalMatrixOffset, 1);
60975
+
60976
+ shaderNode .enableTexCoordAttribute (gl, this .texCoordBuffers, 0, 0);
60977
+ shaderNode .enableNormalAttribute (gl, this .normalBuffer, 0, 0);
60978
+ shaderNode .enableVertexAttribute (gl, this .vertexBuffer, 0, 0);
60924
60979
 
60925
60980
  this .updateParticles = false;
60926
60981
  }
60927
60982
 
60928
- gl .drawArraysInstanced (this .primitiveMode, 0, this .vertexCount, particleSystem .numParticles);
60983
+ gl .drawArraysInstanced (this .primitiveMode, 0, this .vertexCount, shapeNode .getNumInstances ());
60929
60984
  },
60930
- displayParticles (gl, renderContext, particleSystem)
60985
+ displayInstanced (gl, renderContext, shapeNode)
60931
60986
  {
60932
60987
  const
60933
60988
  browser = this .getBrowser (),
@@ -60936,17 +60991,17 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
60936
60991
 
60937
60992
  if (this .solid || !appearanceNode .getBackMaterial () || browser .getWireframe ())
60938
60993
  {
60939
- this .displayParticlesGeometry (gl, renderContext, appearanceNode, shaderNode, true, true, particleSystem);
60994
+ this .displayInstancedGeometry (gl, renderContext, appearanceNode, shaderNode, true, true, shapeNode);
60940
60995
  }
60941
60996
  else
60942
60997
  {
60943
60998
  const backShaderNode = appearanceNode .getBackShader (this, renderContext);
60944
60999
 
60945
- this .displayParticlesGeometry (gl, renderContext, appearanceNode, backShaderNode, true, false, particleSystem);
60946
- this .displayParticlesGeometry (gl, renderContext, appearanceNode, shaderNode, false, true, particleSystem);
61000
+ this .displayInstancedGeometry (gl, renderContext, appearanceNode, backShaderNode, true, false, shapeNode);
61001
+ this .displayInstancedGeometry (gl, renderContext, appearanceNode, shaderNode, false, true, shapeNode);
60947
61002
  }
60948
61003
  },
60949
- displayParticlesGeometry (gl, renderContext, appearanceNode, shaderNode, back, front, particleSystem)
61004
+ displayInstancedGeometry (gl, renderContext, appearanceNode, shaderNode, back, front, shapeNode)
60950
61005
  {
60951
61006
  const
60952
61007
  browser = this .getBrowser (),
@@ -60965,14 +61020,19 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
60965
61020
 
60966
61021
  // Setup vertex attributes.
60967
61022
 
60968
- const outputParticles = particleSystem .outputParticles;
61023
+ const instances = shapeNode .getInstances ();
60969
61024
 
60970
- if (outputParticles .vertexArrayObject .update (this .updateParticles) .enable (shaderNode .getProgram ()))
61025
+ if (instances .vertexArrayObject .update (this .updateParticles) .enable (shaderNode .getProgram ()))
60971
61026
  {
60972
- const { particleStride, particleOffset, matrixOffset } = particleSystem;
61027
+ const { instancesStride, particleOffset, matrixOffset, normalMatrixOffset } = shapeNode;
61028
+
61029
+ if (particleOffset !== undefined)
61030
+ shaderNode .enableParticleAttribute (gl, instances, instancesStride, particleOffset, 1);
61031
+
61032
+ shaderNode .enableInstanceMatrixAttribute (gl, instances, instancesStride, matrixOffset, 1);
60973
61033
 
60974
- shaderNode .enableParticleAttribute (gl, outputParticles, particleStride, particleOffset, 1);
60975
- shaderNode .enableParticleMatrixAttribute (gl, outputParticles, particleStride, matrixOffset, 1);
61034
+ if (normalMatrixOffset !== undefined)
61035
+ shaderNode .enableInstanceNormalMatrixAttribute (gl, instances, instancesStride, normalMatrixOffset, 1);
60976
61036
 
60977
61037
  for (let i = 0, length = attribNodes .length; i < length; ++ i)
60978
61038
  attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
@@ -61005,13 +61065,13 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
61005
61065
  if (back && !this .solid)
61006
61066
  {
61007
61067
  gl .cullFace (gl .FRONT);
61008
- gl .drawArraysInstanced (primitiveMode, 0, this .vertexCount, particleSystem .numParticles);
61068
+ gl .drawArraysInstanced (primitiveMode, 0, this .vertexCount, shapeNode .getNumInstances ());
61009
61069
  }
61010
61070
 
61011
61071
  if (front)
61012
61072
  {
61013
61073
  gl .cullFace (gl .BACK);
61014
- gl .drawArraysInstanced (primitiveMode, 0, this .vertexCount, particleSystem .numParticles);
61074
+ gl .drawArraysInstanced (primitiveMode, 0, this .vertexCount, shapeNode .getNumInstances ());
61015
61075
  }
61016
61076
  }
61017
61077
  else
@@ -61023,7 +61083,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
61023
61083
  else
61024
61084
  gl .disable (gl .CULL_FACE);
61025
61085
 
61026
- gl .drawArraysInstanced (primitiveMode, 0, this .vertexCount, particleSystem .numParticles);
61086
+ gl .drawArraysInstanced (primitiveMode, 0, this .vertexCount, shapeNode .getNumInstances ());
61027
61087
  }
61028
61088
 
61029
61089
  for (const node of renderModeNodes)
@@ -62449,7 +62509,7 @@ const X3DTexture2DNode_default_ = X3DTexture2DNode;
62449
62509
  x_ite_Namespace .add ("X3DTexture2DNode", "x_ite/Components/Texturing/X3DTexture2DNode", X3DTexture2DNode_default_);
62450
62510
  /* harmony default export */ const Texturing_X3DTexture2DNode = (X3DTexture2DNode_default_);
62451
62511
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/ImageTexture.js
62452
- /* provided dependency */ var ImageTexture_$ = __webpack_require__(237);
62512
+ /* provided dependency */ var ImageTexture_$ = __webpack_require__(275);
62453
62513
  /*******************************************************************************
62454
62514
  *
62455
62515
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64794,7 +64854,7 @@ function X3DViewpointNode (executionContext)
64794
64854
  Base_X3DConstants .inputOutput, "fieldOfViewScale", new x_ite_Fields .SFFloat (1));
64795
64855
 
64796
64856
  this .descriptions = [ ];
64797
- this .userPosition = new Numbers_Vector3 (0, 1, 0);
64857
+ this .userPosition = new Numbers_Vector3 ();
64798
64858
  this .userOrientation = new Numbers_Rotation4 ();
64799
64859
  this .userCenterOfRotation = new Numbers_Vector3 ();
64800
64860
  this .modelMatrix = new Numbers_Matrix4 ();
@@ -64875,10 +64935,10 @@ Object .assign (Object .setPrototypeOf (X3DViewpointNode .prototype, Core_X3DBin
64875
64935
  },
64876
64936
  set_viewAll__ ()
64877
64937
  {
64878
- if (! this ._viewAll .getValue ())
64938
+ if (!this ._viewAll .getValue ())
64879
64939
  return;
64880
64940
 
64881
- if (! this ._isBound .getValue ())
64941
+ if (!this ._isBound .getValue ())
64882
64942
  return;
64883
64943
 
64884
64944
  this ._set_bind = true;
@@ -65008,7 +65068,7 @@ Object .assign (Object .setPrototypeOf (X3DViewpointNode .prototype, Core_X3DBin
65008
65068
  {
65009
65069
  const relative = this .getRelativeTransformation (fromViewpointNode);
65010
65070
 
65011
- if (! this ._retainUserOffsets .getValue ())
65071
+ if (!this ._retainUserOffsets .getValue ())
65012
65072
  this .resetUserOffsets ();
65013
65073
 
65014
65074
  if (this ._viewAll .getValue ())
@@ -65432,6 +65492,10 @@ Object .assign (Object .setPrototypeOf (Viewpoint .prototype, Navigation_X3DView
65432
65492
 
65433
65493
  return fov > 0 && fov < Math .PI ? fov : Math .PI / 4;
65434
65494
  },
65495
+ setFieldOfView (value)
65496
+ {
65497
+ this ._fieldOfView = value;
65498
+ },
65435
65499
  getUserFieldOfView ()
65436
65500
  {
65437
65501
  const fov = this ._fieldOfView .getValue () * this ._fieldOfViewScale .getValue ();
@@ -66043,7 +66107,7 @@ const X3DWorld_default_ = X3DWorld;
66043
66107
  x_ite_Namespace .add ("X3DWorld", "x_ite/Execution/X3DWorld", X3DWorld_default_);
66044
66108
  /* harmony default export */ const Execution_X3DWorld = (X3DWorld_default_);
66045
66109
  ;// CONCATENATED MODULE: ./src/x_ite/InputOutput/FileLoader.js
66046
- /* provided dependency */ var FileLoader_$ = __webpack_require__(237);
66110
+ /* provided dependency */ var FileLoader_$ = __webpack_require__(275);
66047
66111
  /*******************************************************************************
66048
66112
  *
66049
66113
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66979,7 +67043,7 @@ const ProtoDeclarationArray_default_ = ProtoDeclarationArray;
66979
67043
  x_ite_Namespace .add ("ProtoDeclarationArray", "x_ite/Prototype/ProtoDeclarationArray", ProtoDeclarationArray_default_);
66980
67044
  /* harmony default export */ const Prototype_ProtoDeclarationArray = (ProtoDeclarationArray_default_);
66981
67045
  ;// CONCATENATED MODULE: ./src/x_ite/Routing/X3DRoute.js
66982
- /* provided dependency */ var X3DRoute_$ = __webpack_require__(237);
67046
+ /* provided dependency */ var X3DRoute_$ = __webpack_require__(275);
66983
67047
  /*******************************************************************************
66984
67048
  *
66985
67049
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67581,7 +67645,6 @@ x_ite_Namespace .add ("RouteArray", "x_ite/Routing/RouteArray", RouteArray_defau
67581
67645
 
67582
67646
 
67583
67647
 
67584
-
67585
67648
  const
67586
67649
  _outerNode = Symbol (),
67587
67650
  _namedNodes = Symbol (),
@@ -67597,18 +67660,22 @@ function X3DExecutionContext (executionContext, outerNode = null, browser = exec
67597
67660
  this .addType (Base_X3DConstants .X3DExecutionContext)
67598
67661
 
67599
67662
  this .addChildObjects (Base_X3DConstants .initializeOnly, "rootNodes", new x_ite_Fields .MFNode (),
67663
+ Base_X3DConstants .inputOutput, "countPrimitives", new x_ite_Fields .SFBool (true),
67600
67664
  Base_X3DConstants .outputOnly, "worldInfos", new x_ite_Fields .MFNode (),
67601
67665
  Base_X3DConstants .outputOnly, "sceneGraph_changed", new x_ite_Fields .SFTime ())
67602
67666
 
67603
67667
  this ._rootNodes .setPrivate (false);
67604
67668
  this ._rootNodes .collectCloneCount = () => 1;
67605
67669
 
67606
- this [_outerNode] = outerNode;
67607
- this [_namedNodes] = new Execution_NamedNodesArray ();
67608
- this [_importedNodes] = new Execution_ImportedNodesArray ();
67609
- this [_protos] = new Prototype_ProtoDeclarationArray ();
67610
- this [_externprotos] = new Prototype_ExternProtoDeclarationArray ();
67611
- this [X3DExecutionContext_routes] = new Routing_RouteArray ();
67670
+ this ._countPrimitives .addReference (executionContext ._countPrimitives);
67671
+ this ._sceneGraph_changed .addFieldInterest (this ._sceneGraph_changed);
67672
+
67673
+ this [_outerNode] = outerNode;
67674
+ this [_namedNodes] = new Execution_NamedNodesArray ();
67675
+ this [_importedNodes] = new Execution_ImportedNodesArray ();
67676
+ this [_protos] = new Prototype_ProtoDeclarationArray ();
67677
+ this [_externprotos] = new Prototype_ExternProtoDeclarationArray ();
67678
+ this [X3DExecutionContext_routes] = new Routing_RouteArray ();
67612
67679
 
67613
67680
  this [_namedNodes] .addParent (this);
67614
67681
  this [_importedNodes] .addParent (this);
@@ -67619,16 +67686,15 @@ function X3DExecutionContext (executionContext, outerNode = null, browser = exec
67619
67686
 
67620
67687
  Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3DBaseNode .prototype),
67621
67688
  {
67622
- initialize ()
67689
+ setExecutionContext (executionContext)
67623
67690
  {
67624
- Base_X3DBaseNode .prototype .initialize .call (this);
67691
+ this ._countPrimitives .removeReference (this .getExecutionContext () ._countPrimitives);
67692
+ this ._sceneGraph_changed .removeFieldInterest (this .getExecutionContext () ._sceneGraph_changed);
67625
67693
 
67626
- if (!this .isScene ())
67627
- this ._sceneGraph_changed .addInterest ("set_sceneGraph", this)
67628
- },
67629
- set_sceneGraph ()
67630
- {
67631
- this .getExecutionContext () ._sceneGraph_changed = this .getBrowser () .getCurrentTime ();
67694
+ Base_X3DBaseNode .prototype .setExecutionContext .call (this, executionContext);
67695
+
67696
+ this ._countPrimitives .addReference (executionContext ._countPrimitives);
67697
+ this ._sceneGraph_changed .addFieldInterest (executionContext ._sceneGraph_changed);
67632
67698
  },
67633
67699
  isScene ()
67634
67700
  {
@@ -67639,6 +67705,14 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
67639
67705
  // Can be either of type X3DProtoDeclaration or X3DPrototypeInstance, or null.
67640
67706
  return this [_outerNode];
67641
67707
  },
67708
+ getCountPrimitives ()
67709
+ {
67710
+ return this ._countPrimitives .getValue ();
67711
+ },
67712
+ setCountPrimitives (value)
67713
+ {
67714
+ this ._countPrimitives = this .getExecutionContext () .getCountPrimitives () && value;
67715
+ },
67642
67716
  getSpecificationVersion ()
67643
67717
  {
67644
67718
  return this .getExecutionContext () .getSpecificationVersion ();
@@ -67873,7 +67947,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
67873
67947
 
67874
67948
  this [_importedNodes] .add (importedName, importedNode);
67875
67949
 
67876
- this ._importedNodes_changed = this .getBrowser () .getCurrentTime ();
67950
+ this ._sceneGraph_changed = this .getBrowser () .getCurrentTime ();
67877
67951
  },
67878
67952
  renameImportedNode (oldImportedName, newImportedName)
67879
67953
  {
@@ -67888,6 +67962,8 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
67888
67962
  importedNode [Symbol .for ("X_ITE.X3DImportedNode.setImportName")] (newImportedName);
67889
67963
 
67890
67964
  this [_importedNodes] .update (oldImportedName, newImportedName, importedNode);
67965
+
67966
+ this ._sceneGraph_changed = this .getBrowser () .getCurrentTime ();
67891
67967
  },
67892
67968
  removeImportedNode (importedName)
67893
67969
  {
@@ -67902,7 +67978,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
67902
67978
 
67903
67979
  this [_importedNodes] .remove (importedName);
67904
67980
 
67905
- this ._importedNodes_changed = this .getBrowser () .getCurrentTime ();
67981
+ this ._sceneGraph_changed = this .getBrowser () .getCurrentTime ();
67906
67982
  },
67907
67983
  getImportedNode (importedName)
67908
67984
  {
@@ -68003,7 +68079,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
68003
68079
  this [_protos] .add (name, proto);
68004
68080
  proto .setName (name);
68005
68081
 
68006
- this ._protos_changed = this .getBrowser () .getCurrentTime ();
68082
+ this ._sceneGraph_changed = this .getBrowser () .getCurrentTime ();
68007
68083
  },
68008
68084
  updateProtoDeclaration (name, proto)
68009
68085
  {
@@ -68023,7 +68099,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
68023
68099
  this [_protos] .update (proto .getName (), name, proto);
68024
68100
  proto .setName (name);
68025
68101
 
68026
- this ._protos_changed = this .getBrowser () .getCurrentTime ();
68102
+ this ._sceneGraph_changed = this .getBrowser () .getCurrentTime ();
68027
68103
  },
68028
68104
  removeProtoDeclaration (name)
68029
68105
  {
@@ -68031,7 +68107,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
68031
68107
 
68032
68108
  this [_protos] .remove (name);
68033
68109
 
68034
- this ._protos_changed = this .getBrowser () .getCurrentTime ();
68110
+ this ._sceneGraph_changed = this .getBrowser () .getCurrentTime ();
68035
68111
  },
68036
68112
  getProtoDeclarations ()
68037
68113
  {
@@ -68076,7 +68152,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
68076
68152
  this [_externprotos] .add (name, externproto);
68077
68153
  externproto .setName (name);
68078
68154
 
68079
- this ._externprotos_changed = this .getBrowser () .getCurrentTime ();
68155
+ this ._sceneGraph_changed = this .getBrowser () .getCurrentTime ();
68080
68156
  },
68081
68157
  updateExternProtoDeclaration (name, externproto)
68082
68158
  {
@@ -68096,7 +68172,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
68096
68172
  this [_externprotos] .update (externproto .getName (), name, externproto);
68097
68173
  externproto .setName (name);
68098
68174
 
68099
- this ._externprotos_changed = this .getBrowser () .getCurrentTime ();
68175
+ this ._sceneGraph_changed = this .getBrowser () .getCurrentTime ();
68100
68176
  },
68101
68177
  removeExternProtoDeclaration (name)
68102
68178
  {
@@ -68104,7 +68180,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
68104
68180
 
68105
68181
  this [_externprotos] .remove (name);
68106
68182
 
68107
- this ._externprotos_changed = this .getBrowser () .getCurrentTime ();
68183
+ this ._sceneGraph_changed = this .getBrowser () .getCurrentTime ();
68108
68184
  },
68109
68185
  getExternProtoDeclarations ()
68110
68186
  {
@@ -68583,6 +68659,7 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
68583
68659
  // Dispose body and assign field definitions.
68584
68660
 
68585
68661
  this [X3DPrototypeInstance_body] ?.dispose ();
68662
+
68586
68663
  this [X3DPrototypeInstance_fieldDefinitions] .assign (protoNode .getFieldDefinitions ());
68587
68664
 
68588
68665
  // If there is a proto, the externproto is completely loaded.
@@ -74790,7 +74867,7 @@ Object .assign (Object .setPrototypeOf (ElevationGrid .prototype, Rendering_X3DG
74790
74867
  if (!this ._normalPerVertex .getValue ())
74791
74868
  return normals;
74792
74869
 
74793
- return this .refineNormals (normalIndex, normals, this ._creaseAngle .getValue ());
74870
+ return this .refineNormals (normalIndex, normals, creaseAngle ?? this ._creaseAngle .getValue ());
74794
74871
  },
74795
74872
  createCoordIndex ()
74796
74873
  {
@@ -74894,8 +74971,8 @@ Object .assign (Object .setPrototypeOf (ElevationGrid .prototype, Rendering_X3DG
74894
74971
  for (let p = 0; p < 6; ++ p, ++ c)
74895
74972
  {
74896
74973
  const
74897
- index = coordIndex [c],
74898
- point = points [index];
74974
+ index = coordIndex [c],
74975
+ { x, y, z} = points [index];
74899
74976
 
74900
74977
  coordIndicesArray .push (index);
74901
74978
 
@@ -74904,13 +74981,7 @@ Object .assign (Object .setPrototypeOf (ElevationGrid .prototype, Rendering_X3DG
74904
74981
 
74905
74982
  fogCoordNode ?.addDepth (index, fogDepthArray);
74906
74983
 
74907
- if (colorNode)
74908
- {
74909
- if (colorPerVertex)
74910
- colorNode .addColor (index, colorArray);
74911
- else
74912
- colorNode .addColor (face, colorArray);
74913
- }
74984
+ colorNode ?.addColor (colorPerVertex ? index : face, colorArray);
74914
74985
 
74915
74986
  if (texCoordNode)
74916
74987
  {
@@ -74918,21 +74989,14 @@ Object .assign (Object .setPrototypeOf (ElevationGrid .prototype, Rendering_X3DG
74918
74989
  }
74919
74990
  else
74920
74991
  {
74921
- const t = texCoords [index];
74992
+ const { x, y } = texCoords [index];
74922
74993
 
74923
- texCoordArray .push (t .x, t .y, 0, 1);
74994
+ texCoordArray .push (x, y, 0, 1);
74924
74995
  }
74925
74996
 
74926
- if (normalNode)
74927
- {
74928
- if (normalPerVertex)
74929
- normalNode .addVector (index, normalArray);
74930
-
74931
- else
74932
- normalNode .addVector (face, normalArray);
74933
- }
74997
+ normalNode ?.addVector (normalPerVertex ? index : face, normalArray);
74934
74998
 
74935
- vertexArray .push (point .x, point .y, point .z, 1);
74999
+ vertexArray .push (x, y, z, 1);
74936
75000
  }
74937
75001
  }
74938
75002
 
@@ -74942,10 +75006,8 @@ Object .assign (Object .setPrototypeOf (ElevationGrid .prototype, Rendering_X3DG
74942
75006
  {
74943
75007
  const normals = this .createNormals (points, coordIndex);
74944
75008
 
74945
- for (const normal of normals)
74946
- {
74947
- normalArray .push (normal .x, normal .y, normal .z);
74948
- }
75009
+ for (const { x, y, z } of normals)
75010
+ normalArray .push (x, y, z);
74949
75011
  }
74950
75012
 
74951
75013
  this .setSolid (this ._solid .getValue ());
@@ -75560,8 +75622,8 @@ Object .assign (Object .setPrototypeOf (Extrusion .prototype, Rendering_X3DGeome
75560
75622
 
75561
75623
  const refinedNormals = this .refineNormals (normalIndex, normals, this ._creaseAngle .getValue ());
75562
75624
 
75563
- for (const normal of refinedNormals)
75564
- normalArray .push (normal .x, normal .y, normal .z);
75625
+ for (const { x, y, z } of refinedNormals)
75626
+ normalArray .push (x, y, z);
75565
75627
 
75566
75628
  // Build caps
75567
75629
 
@@ -75970,23 +76032,11 @@ Object .assign (Object .setPrototypeOf (X3DComposedGeometryNode .prototype, Rend
75970
76032
 
75971
76033
  fogCoordNode ?.addDepth (index, fogDepthArray);
75972
76034
 
75973
- if (colorNode)
75974
- {
75975
- if (colorPerVertex)
75976
- colorNode .addColor (index, colorArray);
75977
- else
75978
- colorNode .addColor (face, colorArray);
75979
- }
76035
+ colorNode ?.addColor (colorPerVertex ? index : face, colorArray);
75980
76036
 
75981
76037
  texCoordNode ?.addPoint (index, multiTexCoordArray);
75982
76038
 
75983
- if (normalNode)
75984
- {
75985
- if (normalPerVertex)
75986
- normalNode .addVector (index, normalArray);
75987
- else
75988
- normalNode .addVector (face, normalArray);
75989
- }
76039
+ normalNode ?.addVector (normalPerVertex ? index : face, normalArray);
75990
76040
 
75991
76041
  coordNode .addPoint (index, vertexArray);
75992
76042
  }
@@ -76007,9 +76057,9 @@ Object .assign (Object .setPrototypeOf (X3DComposedGeometryNode .prototype, Rend
76007
76057
 
76008
76058
  for (let i = 0; i < trianglesSize; ++ i)
76009
76059
  {
76010
- const normal = normals [this .getTriangleIndex (i)];
76060
+ const { x, y, z } = normals [this .getTriangleIndex (i)];
76011
76061
 
76012
- normalArray .push (normal .x, normal .y, normal .z);
76062
+ normalArray .push (x, y, z);
76013
76063
  }
76014
76064
  },
76015
76065
  createNormals (verticesPerPolygon, polygonsSize)
@@ -76265,23 +76315,11 @@ Object .assign (Object .setPrototypeOf (IndexedFaceSet .prototype, Rendering_X3D
76265
76315
 
76266
76316
  fogCoordNode ?.addDepth (index, fogDepthArray);
76267
76317
 
76268
- if (colorNode)
76269
- {
76270
- if (colorPerVertex)
76271
- colorNode .addColor (this .getColorPerVertexIndex (i), colorArray);
76272
- else
76273
- colorNode .addColor (this .getColorIndex (face), colorArray);
76274
- }
76318
+ colorNode ?.addColor (colorPerVertex ? this .getColorPerVertexIndex (i) : this .getColorIndex (face), colorArray);
76275
76319
 
76276
76320
  texCoordNode ?.addPoint (this .getTexCoordPerVertexIndex (i), multiTexCoordArray);
76277
76321
 
76278
- if (normalNode)
76279
- {
76280
- if (normalPerVertex)
76281
- normalNode .addVector (this .getNormalPerVertexIndex (i), normalArray);
76282
- else
76283
- normalNode .addVector (this .getNormalIndex (face), normalArray);
76284
- }
76322
+ normalNode ?.addVector (normalPerVertex ? this .getNormalPerVertexIndex (i) : this .getNormalIndex (face), normalArray);
76285
76323
 
76286
76324
  coordNode .addPoint (index, vertexArray);
76287
76325
  }
@@ -82586,6 +82624,10 @@ Object .assign (Object .setPrototypeOf (OrthoViewpoint .prototype, Navigation_X3
82586
82624
  this .getMaximumY (),
82587
82625
  ];
82588
82626
  },
82627
+ setFieldOfView (value)
82628
+ {
82629
+ this ._fieldOfView = value;
82630
+ },
82589
82631
  getUserFieldOfView ()
82590
82632
  {
82591
82633
  return [
@@ -87458,7 +87500,7 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
87458
87500
  gl .lineWidth (1);
87459
87501
  };
87460
87502
  })(),
87461
- displayParticles (gl, renderContext, particleSystem)
87503
+ displayInstanced (gl, renderContext, shapeNode)
87462
87504
  {
87463
87505
  const
87464
87506
  browser = this .getBrowser (),
@@ -87479,14 +87521,19 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
87479
87521
 
87480
87522
  // Setup vertex attributes.
87481
87523
 
87482
- const outputParticles = particleSystem .outputParticles;
87524
+ const instances = shapeNode .getInstances ();
87483
87525
 
87484
- if (outputParticles .vertexArrayObject .update (this .updateParticles) .enable (shaderNode .getProgram ()))
87526
+ if (instances .vertexArrayObject .update (this .updateParticles) .enable (shaderNode .getProgram ()))
87485
87527
  {
87486
- const particleStride = particleSystem .particleStride;
87528
+ const { instancesStride, particleOffset, matrixOffset, normalMatrixOffset } = shapeNode;
87529
+
87530
+ if (particleOffset !== undefined)
87531
+ shaderNode .enableParticleAttribute (gl, instances, instancesStride, particleOffset, 1);
87487
87532
 
87488
- shaderNode .enableParticleAttribute (gl, outputParticles, particleStride, particleSystem .particleOffset, 1);
87489
- shaderNode .enableParticleMatrixAttribute (gl, outputParticles, particleStride, particleSystem .matrixOffset, 1);
87533
+ shaderNode .enableInstanceMatrixAttribute (gl, instances, instancesStride, matrixOffset, 1);
87534
+
87535
+ if (normalMatrixOffset !== undefined)
87536
+ shaderNode .enableInstanceNormalMatrixAttribute (gl, instances, instancesStride, normalMatrixOffset, 1);
87490
87537
 
87491
87538
  for (let i = 0, length = attribNodes .length; i < length; ++ i)
87492
87539
  attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
@@ -87507,7 +87554,7 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
87507
87554
 
87508
87555
  // Wireframes are always solid so only one drawing call is needed.
87509
87556
 
87510
- gl .drawArraysInstanced (primitiveMode, 0, this .vertexCount, particleSystem .numParticles);
87557
+ gl .drawArraysInstanced (primitiveMode, 0, this .vertexCount, shapeNode .getNumInstances ());
87511
87558
 
87512
87559
  for (const node of renderModeNodes)
87513
87560
  node .disable (gl);
@@ -87781,13 +87828,7 @@ Object .assign (Object .setPrototypeOf (IndexedLineSet .prototype, Rendering_X3D
87781
87828
 
87782
87829
  fogCoordNode ?.addDepth (index, fogDepthArray);
87783
87830
 
87784
- if (colorNode)
87785
- {
87786
- if (colorPerVertex)
87787
- colorNode .addColor (this .getColorPerVertexIndex (i), colorArray);
87788
- else
87789
- colorNode .addColor (this .getColorIndex (face), colorArray);
87790
- }
87831
+ colorNode ?.addColor (colorPerVertex ? this .getColorPerVertexIndex (i) : this .getColorIndex (face), colorArray);
87791
87832
 
87792
87833
  normalNode ?.addVector (index, normalArray);
87793
87834
 
@@ -87963,6 +88004,14 @@ Object .assign (Object .setPrototypeOf (IndexedTriangleFanSet .prototype, Render
87963
88004
  {
87964
88005
  return this .triangleIndex [index];
87965
88006
  },
88007
+ getVerticesPerPolygon ()
88008
+ {
88009
+ return 3;
88010
+ },
88011
+ getNumVertices ()
88012
+ {
88013
+ return this .triangleIndex .length;
88014
+ },
87966
88015
  build ()
87967
88016
  {
87968
88017
  Rendering_X3DComposedGeometryNode .prototype .build .call (this, 3, this .triangleIndex .length, 3, this .triangleIndex .length);
@@ -88084,6 +88133,14 @@ Object .assign (Object .setPrototypeOf (IndexedTriangleSet .prototype, Rendering
88084
88133
  {
88085
88134
  return this ._index [i];
88086
88135
  },
88136
+ getVerticesPerPolygon ()
88137
+ {
88138
+ return 3;
88139
+ },
88140
+ getNumVertices ()
88141
+ {
88142
+ return this ._index .length;
88143
+ },
88087
88144
  initialize ()
88088
88145
  {
88089
88146
  Rendering_X3DComposedGeometryNode .prototype .initialize .call (this);
@@ -88268,6 +88325,14 @@ Object .assign (Object .setPrototypeOf (IndexedTriangleStripSet .prototype, Rend
88268
88325
  {
88269
88326
  return this .triangleIndex [index];
88270
88327
  },
88328
+ getVerticesPerPolygon ()
88329
+ {
88330
+ return 3;
88331
+ },
88332
+ getNumVertices ()
88333
+ {
88334
+ return this .triangleIndex .length;
88335
+ },
88271
88336
  build ()
88272
88337
  {
88273
88338
  Rendering_X3DComposedGeometryNode .prototype .build .call (this, 3, this .triangleIndex .length, 3, this .triangleIndex .length);
@@ -88917,7 +88982,7 @@ Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Renderi
88917
88982
  for (const node of renderModeNodes)
88918
88983
  node .disable (gl);
88919
88984
  },
88920
- displayParticles (gl, renderContext, particleSystem)
88985
+ displayInstanced (gl, renderContext, shapeNode)
88921
88986
  {
88922
88987
  const
88923
88988
  appearanceNode = renderContext .appearanceNode,
@@ -88936,14 +89001,19 @@ Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Renderi
88936
89001
 
88937
89002
  // Setup vertex attributes.
88938
89003
 
88939
- const outputParticles = particleSystem .outputParticles;
89004
+ const instances = shapeNode .getInstances ();
88940
89005
 
88941
- if (outputParticles .vertexArrayObject .update (this .updateParticles) .enable (shaderNode .getProgram ()))
89006
+ if (instances .vertexArrayObject .update (this .updateParticles) .enable (shaderNode .getProgram ()))
88942
89007
  {
88943
- const particleStride = particleSystem .particleStride;
89008
+ const { instancesStride, particleOffset, matrixOffset, normalMatrixOffset } = shapeNode;
88944
89009
 
88945
- shaderNode .enableParticleAttribute (gl, outputParticles, particleStride, particleSystem .particleOffset, 1);
88946
- shaderNode .enableParticleMatrixAttribute (gl, outputParticles, particleStride, particleSystem .matrixOffset, 1);
89010
+ if (particleOffset !== undefined)
89011
+ shaderNode .enableParticleAttribute (gl, instances, instancesStride, particleOffset, 1);
89012
+
89013
+ shaderNode .enableInstanceMatrixAttribute (gl, instances, instancesStride, matrixOffset, 1);
89014
+
89015
+ if (normalMatrixOffset !== undefined)
89016
+ shaderNode .enableInstanceNormalMatrixAttribute (gl, instances, instancesStride, normalMatrixOffset, 1);
88947
89017
 
88948
89018
  for (let i = 0, length = attribNodes .length; i < length; ++ i)
88949
89019
  attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
@@ -88964,7 +89034,7 @@ Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Renderi
88964
89034
 
88965
89035
  // Wireframes are always solid so only one drawing call is needed.
88966
89036
 
88967
- gl .drawArraysInstanced (this .primitiveMode, 0, this .vertexCount, particleSystem .numParticles);
89037
+ gl .drawArraysInstanced (this .primitiveMode, 0, this .vertexCount, shapeNode .getNumInstances ());
88968
89038
 
88969
89039
  for (const node of renderModeNodes)
88970
89040
  node .disable (gl);
@@ -89316,6 +89386,14 @@ Object .assign (Object .setPrototypeOf (TriangleFanSet .prototype, Rendering_X3D
89316
89386
  {
89317
89387
  return this .triangleIndex [index];
89318
89388
  },
89389
+ getVerticesPerPolygon ()
89390
+ {
89391
+ return 3;
89392
+ },
89393
+ getNumVertices ()
89394
+ {
89395
+ return this .triangleIndex .length;
89396
+ },
89319
89397
  build ()
89320
89398
  {
89321
89399
  Rendering_X3DComposedGeometryNode .prototype .build .call (this, 3, this .triangleIndex .length, 3, this .triangleIndex .length);
@@ -89432,9 +89510,17 @@ function TriangleSet (executionContext)
89432
89510
 
89433
89511
  Object .assign (Object .setPrototypeOf (TriangleSet .prototype, Rendering_X3DComposedGeometryNode .prototype),
89434
89512
  {
89513
+ getVerticesPerPolygon ()
89514
+ {
89515
+ return 3;
89516
+ },
89517
+ getNumVertices ()
89518
+ {
89519
+ return this .getCoord () ?.getSize ();
89520
+ },
89435
89521
  build ()
89436
89522
  {
89437
- if (! this .getCoord ())
89523
+ if (!this .getCoord ())
89438
89524
  return;
89439
89525
 
89440
89526
  Rendering_X3DComposedGeometryNode .prototype .build .call (this, 3, this .getCoord () .getSize (), 3, this .getCoord () .getSize ());
@@ -89594,6 +89680,14 @@ Object .assign (Object .setPrototypeOf (TriangleStripSet .prototype, Rendering_X
89594
89680
  {
89595
89681
  return this .triangleIndex [index];
89596
89682
  },
89683
+ getVerticesPerPolygon ()
89684
+ {
89685
+ return 3;
89686
+ },
89687
+ getNumVertices ()
89688
+ {
89689
+ return this .triangleIndex .length;
89690
+ },
89597
89691
  build ()
89598
89692
  {
89599
89693
  Rendering_X3DComposedGeometryNode .prototype .build .call (this, 3, this .triangleIndex .length, 3, this .triangleIndex .length);
@@ -89715,7 +89809,6 @@ x_ite_Namespace .add ("TriangleStripSet", "x_ite/Components/Rendering/TriangleSt
89715
89809
 
89716
89810
 
89717
89811
 
89718
-
89719
89812
 
89720
89813
 
89721
89814
  const Rendering_default_ = {
@@ -89745,7 +89838,6 @@ const Rendering_default_ = {
89745
89838
  Rendering_X3DCoordinateNode,
89746
89839
  Rendering_X3DGeometricPropertyNode,
89747
89840
  Rendering_X3DGeometryNode,
89748
- Rendering_X3DLineGeometryNode,
89749
89841
  Rendering_X3DNormalNode,
89750
89842
  ],
89751
89843
  };
@@ -89863,7 +89955,7 @@ const X3DShaderNode_default_ = X3DShaderNode;
89863
89955
  x_ite_Namespace .add ("X3DShaderNode", "x_ite/Components/Shaders/X3DShaderNode", X3DShaderNode_default_);
89864
89956
  /* harmony default export */ const Shaders_X3DShaderNode = (X3DShaderNode_default_);
89865
89957
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js
89866
- /* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(237);
89958
+ /* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(275);
89867
89959
  /*******************************************************************************
89868
89960
  *
89869
89961
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -90171,11 +90263,27 @@ Object .assign (X3DProgrammableShaderObject .prototype,
90171
90263
  "Vertex",
90172
90264
  "Particle",
90173
90265
  "ParticleMatrix",
90266
+ "ParticleNormalMatrix",
90267
+ "InstanceMatrix",
90268
+ "InstanceNormalMatrix",
90174
90269
  ];
90175
90270
 
90271
+ const attributeMappings = {
90272
+ "InstanceMatrix": ["ParticleMatrix"],
90273
+ "InstanceNormalMatrix": ["ParticleNormalMatrix"],
90274
+ };
90275
+
90176
90276
  for (const name of attributes)
90177
90277
  {
90178
- const attribute = gl .getAttribLocation (program, `x3d_${name}`);
90278
+ let attribute = gl .getAttribLocation (program, `x3d_${name}`);
90279
+
90280
+ for (const alias of attributeMappings [name] ?? [ ])
90281
+ {
90282
+ if (attribute === -1)
90283
+ attribute = gl .getAttribLocation (program, `x3d_${alias}`);
90284
+ else
90285
+ break;
90286
+ }
90179
90287
 
90180
90288
  this [`x3d_${name}`] = attribute;
90181
90289
 
@@ -91116,11 +91224,11 @@ Object .assign (X3DProgrammableShaderObject .prototype,
91116
91224
  gl .vertexAttribPointer (location, 4, gl .FLOAT, false, stride, offset);
91117
91225
  gl .vertexAttribDivisor (location, divisor);
91118
91226
  },
91119
- enableParticleMatrixAttribute (gl, buffer, stride, offset, divisor)
91227
+ enableInstanceMatrixAttribute (gl, buffer, stride, offset, divisor)
91120
91228
  {
91121
- const location0 = this .x3d_ParticleMatrix;
91229
+ const location0 = this .x3d_InstanceMatrix;
91122
91230
 
91123
- stride = stride || 64;
91231
+ stride = stride || 64; // 4 Bytes * 16
91124
91232
 
91125
91233
  gl .bindBuffer (gl .ARRAY_BUFFER, buffer);
91126
91234
 
@@ -91133,6 +91241,23 @@ Object .assign (X3DProgrammableShaderObject .prototype,
91133
91241
  gl .vertexAttribDivisor (location, divisor);
91134
91242
  }
91135
91243
  },
91244
+ enableInstanceNormalMatrixAttribute (gl, buffer, stride, offset, divisor)
91245
+ {
91246
+ const location0 = this .x3d_InstanceNormalMatrix;
91247
+
91248
+ stride = stride || 36; // 4 Bytes * 9
91249
+
91250
+ gl .bindBuffer (gl .ARRAY_BUFFER, buffer);
91251
+
91252
+ for (let i = 0; i < 3; ++ i)
91253
+ {
91254
+ const location = location0 + i;
91255
+
91256
+ gl .enableVertexAttribArray (location);
91257
+ gl .vertexAttribPointer (location, 3, gl .FLOAT, false, stride, offset + 12 * i);
91258
+ gl .vertexAttribDivisor (location, divisor);
91259
+ }
91260
+ },
91136
91261
  getProgramInfo ()
91137
91262
  {
91138
91263
  function cmp (lhs, rhs) { return lhs < rhs ? -1 : lhs > rhs ? 1 : 0; }
@@ -93599,23 +93724,29 @@ return normalize(normal)*facing;
93599
93724
 
93600
93725
  x_ite_Namespace .add ("Normal2.glsl", "assets/shaders/webgl2/common/Normal2.glsl", Normal2_glsl_default_);
93601
93726
  /* harmony default export */ const Normal2_glsl = (Normal2_glsl_default_);
93602
- ;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Particle2.glsl.js
93603
- const Particle2_glsl_default_ = /* glsl */ `#if defined(X3D_PARTICLE_SYSTEM)
93727
+ ;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Instancing2.glsl.js
93728
+ const Instancing2_glsl_default_ = /* glsl */ `#if defined(X3D_INSTANCING)
93604
93729
  #if defined(X3D_TEX_COORD_RAMP)
93605
- uniform sampler2D x3d_TexCoordRamp;in vec4 x3d_Particle;vec4 getParticleTexCoord(const in vec4 texCoord){const int map[6]=int[6](0,1,2,0,2,3);int index0=int(x3d_Particle[3]);return texelFetch(x3d_TexCoordRamp,index0+map[gl_VertexID % 6],0);}
93730
+ uniform sampler2D x3d_TexCoordRamp;in vec4 x3d_Particle;vec4 getInstanceTexCoord(const in vec4 texCoord){const int map[6]=int[6](0,1,2,0,2,3);int index0=int(x3d_Particle[3]);return texelFetch(x3d_TexCoordRamp,index0+map[gl_VertexID % 6],0);}
93731
+ #else
93732
+ #define getInstanceTexCoord(texCoord)(texCoord)
93733
+ #endif
93734
+ #if defined(X3D_INSTANCE_NORMAL)
93735
+ in mat3 x3d_InstanceNormalMatrix;vec3 getInstanceNormal(const in vec3 normal){return x3d_InstanceNormalMatrix*normal;}
93606
93736
  #else
93607
- #define getParticleTexCoord(texCoord)(texCoord)
93737
+ #define getInstanceNormal(normal)(normal)
93608
93738
  #endif
93609
- in mat4 x3d_ParticleMatrix;vec4 getParticleVertex(const in vec4 vertex){return x3d_ParticleMatrix*vertex;}
93739
+ in mat4 x3d_InstanceMatrix;vec4 getInstanceVertex(const in vec4 vertex){return x3d_InstanceMatrix*vertex;}
93610
93740
  #else
93611
- #define getParticleVertex(vertex)(vertex)
93612
- #define getParticleTexCoord(texCoord)(texCoord)
93741
+ #define getInstanceVertex(vertex)(vertex)
93742
+ #define getInstanceNormal(normal)(normal)
93743
+ #define getInstanceTexCoord(texCoord)(texCoord)
93613
93744
  #endif
93614
93745
  `
93615
93746
  ;
93616
93747
 
93617
- x_ite_Namespace .add ("Particle2.glsl", "assets/shaders/webgl2/common/Particle2.glsl", Particle2_glsl_default_);
93618
- /* harmony default export */ const Particle2_glsl = (Particle2_glsl_default_);
93748
+ x_ite_Namespace .add ("Instancing2.glsl", "assets/shaders/webgl2/common/Instancing2.glsl", Instancing2_glsl_default_);
93749
+ /* harmony default export */ const Instancing2_glsl = (Instancing2_glsl_default_);
93619
93750
  ;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Perlin2.glsl.js
93620
93751
  const Perlin2_glsl_default_ = /* glsl */ `float rand(const in vec2 co){return fract(sin(dot(co.xy,vec2(12.9898,78.233)))*43758.5453);}float rand(const in vec2 co,const in float l){return rand(vec2(rand(co),l));}float rand(const in vec2 co,const in float l,const in float t){return rand(vec2(rand(co,l),t));}float perlin(const in vec2 p,const in float dim,const in float time){const float M_PI=3.14159265358979323846;vec2 pos=floor(p*dim);vec2 posx=pos+vec2(1.0,0.0);vec2 posy=pos+vec2(0.0,1.0);vec2 posxy=pos+vec2(1.0);float c=rand(pos,dim,time);float cx=rand(posx,dim,time);float cy=rand(posy,dim,time);float cxy=rand(posxy,dim,time);vec2 d=fract(p*dim);d=-0.5*cos(d*M_PI)+0.5;float ccx=mix(c,cx,d.x);float cycxy=mix(cy,cxy,d.x);float center=mix(ccx,cycxy,d.y);return center*2.0-1.0;}vec3 perlin(const in vec3 p){return vec3(perlin(p.xy,1.0,0.0),perlin(p.yz,1.0,0.0),perlin(p.zx,1.0,0.0));}`
93621
93752
  ;
@@ -93714,6 +93845,8 @@ in float x3d_CoordIndex;uniform sampler2D x3d_JointsTexture;uniform sampler2D x3
93714
93845
  #if defined(X3D_NORMALS)
93715
93846
  vec3 skinNormal=vec3(0.0);mat3 getJointNormalMatrix(const in int joint){vec4 a=texelFetch(x3d_JointMatricesTexture,joint*8+4,0);vec4 b=texelFetch(x3d_JointMatricesTexture,joint*8+5,0);vec4 c=texelFetch(x3d_JointMatricesTexture,joint*8+6,0);return mat3(a.xyz,vec3(a.w,b.xy),vec3(b.zw,c.x));}
93716
93847
  #define getSkinNormal(normal)(skinNormal)
93848
+ #else
93849
+ #define getSkinNormal(normal)(normal)
93717
93850
  #endif
93718
93851
  vec4 getSkinVertex(const in vec4 vertex,const in vec3 normal){int coordIndex=int(x3d_CoordIndex);vec4 skin=vertex;
93719
93852
  #if defined(X3D_NORMALS)
@@ -93835,7 +93968,7 @@ currentColor*=mix(vec3(1.0),T.rgb*x3d_TextureProjectorColor[i],T.a*x3d_TexturePr
93835
93968
  x_ite_Namespace .add ("Texture2.glsl", "assets/shaders/webgl2/common/Texture2.glsl", Texture2_glsl_default_);
93836
93969
  /* harmony default export */ const Texture2_glsl = (Texture2_glsl_default_);
93837
93970
  ;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Utils2.glsl.js
93838
- const Utils2_glsl_default_ = /* glsl */ `#if defined(X3D_SKINNING)||defined(X3D_PARTICLE_SYSTEM)
93971
+ const Utils2_glsl_default_ = /* glsl */ `#if defined(X3D_SKINNING)||defined(X3D_INSTANCING)
93839
93972
  vec4 texelFetch(const in sampler2D _sampler,const in int index,const in int lod){int x=textureSize(_sampler,lod).x;ivec2 p=ivec2(index % x,index/x);vec4 t=texelFetch(_sampler,p,lod);return t;}
93840
93973
  #endif
93841
93974
  `
@@ -93903,13 +94036,13 @@ out float depth;
93903
94036
  #endif
93904
94037
  #pragma X3D include "Utils.glsl"
93905
94038
  #pragma X3D include "Skin.glsl"
93906
- #pragma X3D include "Particle.glsl"
94039
+ #pragma X3D include "Instancing.glsl"
93907
94040
  #pragma X3D include "PointSize.glsl"
93908
94041
  void vertex_main(){
93909
94042
  #if defined(X3D_NORMALS)
93910
- vec4 x3d_TransformedVertex=getParticleVertex(getSkinVertex(x3d_Vertex,x3d_Normal));vec3 x3d_TransformedNormal=getSkinNormal(x3d_Normal);
94043
+ vec4 x3d_TransformedVertex=getInstanceVertex(getSkinVertex(x3d_Vertex,x3d_Normal));vec3 x3d_TransformedNormal=getInstanceNormal(getSkinNormal(x3d_Normal));
93911
94044
  #else
93912
- vec4 x3d_TransformedVertex=getParticleVertex(getSkinVertex(x3d_Vertex,vec3(0.0)));
94045
+ vec4 x3d_TransformedVertex=getInstanceVertex(getSkinVertex(x3d_Vertex,vec3(0.0)));
93913
94046
  #endif
93914
94047
  vec4 position=x3d_ModelViewMatrix*x3d_TransformedVertex;vertex=position.xyz;
93915
94048
  #if defined(X3D_GEOMETRY_0D)
@@ -93933,7 +94066,7 @@ color=x3d_Color;
93933
94066
 
93934
94067
  ${Array .from ({ length: maxTexCoords }, (_, i) => /* glsl */ `
93935
94068
  #if X3D_NUM_TEXTURE_COORDINATES > ${i}
93936
- texCoord${i} = getParticleTexCoord (x3d_TexCoord${i});
94069
+ texCoord${i} = getInstanceTexCoord (x3d_TexCoord${i});
93937
94070
  #endif
93938
94071
  `) .join ("\n")}
93939
94072
 
@@ -94401,9 +94534,9 @@ const Depth2_vs_default_ = /* glsl */ `#version 300 es
94401
94534
  precision highp float;precision highp int;precision highp sampler2D;uniform mat4 x3d_ProjectionMatrix;uniform mat4 x3d_ModelViewMatrix;in vec4 x3d_Vertex;out vec3 vertex;
94402
94535
  #pragma X3D include "common/Utils.glsl"
94403
94536
  #pragma X3D include "common/Skin.glsl"
94404
- #pragma X3D include "common/Particle.glsl"
94537
+ #pragma X3D include "common/Instancing.glsl"
94405
94538
  #pragma X3D include "common/PointSize.glsl"
94406
- void main(){vec4 x3d_TransformedVertex=getParticleVertex(getSkinVertex(x3d_Vertex,vec3(0.0)));vec4 position=x3d_ModelViewMatrix*x3d_TransformedVertex;vertex=position.xyz;
94539
+ void main(){vec4 x3d_TransformedVertex=getInstanceVertex(getSkinVertex(x3d_Vertex,vec3(0.0)));vec4 position=x3d_ModelViewMatrix*x3d_TransformedVertex;vertex=position.xyz;
94407
94540
  #if defined(X3D_GEOMETRY_0D)
94408
94541
  #if defined(X3D_STYLE_PROPERTIES)
94409
94542
  gl_PointSize=max(pointSize=getPointSize(vertex),2.0);
@@ -94744,7 +94877,12 @@ x_ite_Namespace .add ("Pointing2.fs", "assets/shaders/webgl2/Pointing2.fs", Poin
94744
94877
  /* harmony default export */ const Pointing2_fs = (Pointing2_fs_default_);
94745
94878
  ;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/Pointing2.vs.js
94746
94879
  const Pointing2_vs_default_ = /* glsl */ `#version 300 es
94747
- precision highp float;precision highp int;precision highp sampler2D;uniform mat4 x3d_ProjectionMatrix;uniform mat4 x3d_ModelViewMatrix;in vec4 x3d_Vertex;in vec3 x3d_Normal;
94880
+ precision highp float;precision highp int;precision highp sampler2D;uniform mat4 x3d_ProjectionMatrix;uniform mat4 x3d_ModelViewMatrix;in vec4 x3d_Vertex;
94881
+ #if defined(X3D_NORMALS)
94882
+ in vec3 x3d_Normal;
94883
+ #else
94884
+ const vec3 x3d_Normal=vec3(0.0,0.0,1.0);
94885
+ #endif
94748
94886
  #if!defined(X3D_GEOMETRY_0D)&&!defined(X3D_GEOMETRY_1D)
94749
94887
  in vec4 x3d_TexCoord0;
94750
94888
  #endif
@@ -94760,13 +94898,13 @@ flat out float lengthSoFar;flat out vec2 startPoint;out vec2 midPoint;
94760
94898
  #endif
94761
94899
  #pragma X3D include "common/Utils.glsl"
94762
94900
  #pragma X3D include "common/Skin.glsl"
94763
- #pragma X3D include "common/Particle.glsl"
94901
+ #pragma X3D include "common/Instancing.glsl"
94764
94902
  #pragma X3D include "common/PointSize.glsl"
94765
94903
  void main(){
94766
94904
  #if defined(X3D_GEOMETRY_1D)&&defined(X3D_STYLE_PROPERTIES)
94767
94905
  lengthSoFar=x3d_LineStipple.z;startPoint=x3d_LineStipple.xy;midPoint=x3d_LineStipple.xy;
94768
94906
  #endif
94769
- vec4 x3d_TransformedVertex=getParticleVertex(getSkinVertex(x3d_Vertex,vec3(0.0)));vec4 position=x3d_ModelViewMatrix*x3d_TransformedVertex;vertex=position.xyz;normal=x3d_Normal;
94907
+ vec4 x3d_TransformedVertex=getInstanceVertex(getSkinVertex(x3d_Vertex,x3d_Normal));vec4 position=x3d_ModelViewMatrix*x3d_TransformedVertex;vertex=position.xyz;normal=getInstanceNormal(getSkinNormal(x3d_Normal));
94770
94908
  #if defined(X3D_GEOMETRY_0D)
94771
94909
  #if defined(X3D_STYLE_PROPERTIES)
94772
94910
  gl_PointSize=max(pointSize=getPointSize(vertex),2.0);
@@ -95339,7 +95477,7 @@ const ShaderRegistry = {
95339
95477
  Line2: Line22_glsl,
95340
95478
  Material: Material2_glsl,
95341
95479
  Normal: Normal2_glsl,
95342
- Particle: Particle2_glsl,
95480
+ Instancing: Instancing2_glsl,
95343
95481
  Perlin: Perlin2_glsl,
95344
95482
  Point: Point2_glsl,
95345
95483
  PointSize: PointSize2_glsl,
@@ -95504,7 +95642,7 @@ const ShaderCompiler_default_ = ShaderCompiler;
95504
95642
  x_ite_Namespace .add ("ShaderCompiler", "x_ite/Browser/Shaders/ShaderCompiler", ShaderCompiler_default_);
95505
95643
  /* harmony default export */ const Shaders_ShaderCompiler = (ShaderCompiler_default_);
95506
95644
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/ShaderPart.js
95507
- /* provided dependency */ var ShaderPart_$ = __webpack_require__(237);
95645
+ /* provided dependency */ var ShaderPart_$ = __webpack_require__(275);
95508
95646
  /*******************************************************************************
95509
95647
  *
95510
95648
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -96161,7 +96299,7 @@ const X3DAppearanceNode_default_ = X3DAppearanceNode;
96161
96299
  x_ite_Namespace .add ("X3DAppearanceNode", "x_ite/Components/Shape/X3DAppearanceNode", X3DAppearanceNode_default_);
96162
96300
  /* harmony default export */ const Shape_X3DAppearanceNode = (X3DAppearanceNode_default_);
96163
96301
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Shape/Appearance.js
96164
- /* provided dependency */ var Appearance_$ = __webpack_require__(237);
96302
+ /* provided dependency */ var Appearance_$ = __webpack_require__(275);
96165
96303
  /*******************************************************************************
96166
96304
  *
96167
96305
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -97122,7 +97260,8 @@ Object .assign (Object .setPrototypeOf (X3DMaterialNode .prototype, Shape_X3DApp
97122
97260
  key += textureNode ?.getTextureBits () .toString (16) ?? 0;
97123
97261
  }
97124
97262
 
97125
- return this .shaderNodes .get (key) ?? this .createShader (key, geometryContext, renderContext);
97263
+ return this .shaderNodes .get (key)
97264
+ ?? this .createShader (key, geometryContext, renderContext);
97126
97265
  },
97127
97266
  getShaderOptions (geometryContext, renderContext)
97128
97267
  {
@@ -97265,10 +97404,13 @@ Object .assign (Object .setPrototypeOf (X3DMaterialNode .prototype, Shape_X3DApp
97265
97404
  switch (shapeNode .getShapeKey ())
97266
97405
  {
97267
97406
  case 1:
97268
- options .push ("X3D_PARTICLE_SYSTEM");
97407
+ options .push ("X3D_INSTANCING");
97269
97408
  break;
97270
97409
  case 2:
97271
- options .push ("X3D_PARTICLE_SYSTEM", "X3D_TEX_COORD_RAMP");
97410
+ options .push ("X3D_INSTANCING", "X3D_TEX_COORD_RAMP");
97411
+ break;
97412
+ case 3:
97413
+ options .push ("X3D_INSTANCING", "X3D_INSTANCE_NORMAL");
97272
97414
  break;
97273
97415
  }
97274
97416
  }
@@ -98708,6 +98850,10 @@ Object .assign (Object .setPrototypeOf (X3DShapeNode .prototype, Core_X3DChildNo
98708
98850
  {
98709
98851
  return this .geometryNode;
98710
98852
  },
98853
+ getGeometryContext ()
98854
+ {
98855
+ return this .getGeometry ();
98856
+ },
98711
98857
  set_appearance__ ()
98712
98858
  {
98713
98859
  if (this .appearanceNode)
@@ -98886,7 +99032,10 @@ Object .assign (Object .setPrototypeOf (Shape .prototype, Shape_X3DShapeNode .pr
98886
99032
  {
98887
99033
  return 0;
98888
99034
  },
98889
- getGeometryContext: Shape_X3DShapeNode .prototype .getGeometry,
99035
+ getNumInstances ()
99036
+ {
99037
+ return 1;
99038
+ },
98890
99039
  set_geometry__ ()
98891
99040
  {
98892
99041
  Shape_X3DShapeNode .prototype .set_geometry__ .call (this);
@@ -98937,13 +99086,17 @@ Object .assign (Object .setPrototypeOf (Shape .prototype, Shape_X3DShapeNode .pr
98937
99086
  case Rendering_TraverseType .DISPLAY:
98938
99087
  {
98939
99088
  if (renderObject .addDisplayShape (this))
98940
- this .getAppearance () .traverse (type, renderObject); // Currently used for GeneratedCubeMapTexture.
99089
+ {
99090
+ // Currently used for GeneratedCubeMapTexture.
99091
+ this .getAppearance () .traverse (type, renderObject);
99092
+ }
98941
99093
 
98942
99094
  break;
98943
99095
  }
98944
99096
  }
98945
99097
 
98946
- this .getGeometry () .traverse (type, renderObject); // Currently used for ScreenText.
99098
+ // Currently used for ScreenText and Tools.
99099
+ this .getGeometry () .traverse (type, renderObject);
98947
99100
  },
98948
99101
  picking (renderObject)
98949
99102
  {
@@ -104636,28 +104789,6 @@ Object .assign (Object .setPrototypeOf (StreamAudioSource .prototype, Sound_X3DS
104636
104789
  {
104637
104790
  Sound_X3DSoundSourceNode .prototype .initialize .call (this);
104638
104791
  },
104639
- // createPeerConnection ()
104640
- // {
104641
- // const peerConnection = new RTCPeerConnection ();
104642
-
104643
- // peerConnection .ontrack = function (event)
104644
- // {
104645
- // console.log ("Remote Streams", event .streams .length)
104646
-
104647
- // const remoteVideo = document .getElementById ("remoteVideo")
104648
-
104649
- // for (const stream of event .streams)
104650
- // {
104651
- // console .log (stream .id)
104652
-
104653
- // if (!this .streamIdentifier .include (stream .id))
104654
- // continue;
104655
-
104656
- // if (remoteVideo .srcObject !== stream)
104657
- // remoteVideo .srcObject = stream;
104658
- // }
104659
- // };
104660
- // }
104661
104792
  });
104662
104793
 
104663
104794
 
@@ -105117,8 +105248,8 @@ const GifMedia_default_ = GifMedia;
105117
105248
  x_ite_Namespace .add ("GifMedia", "x_ite/Browser/Texturing/GifMedia", GifMedia_default_);
105118
105249
  /* harmony default export */ const Texturing_GifMedia = (GifMedia_default_);
105119
105250
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/MovieTexture.js
105120
- /* provided dependency */ var MovieTexture_$ = __webpack_require__(237);
105121
- /* provided dependency */ var SuperGif = __webpack_require__(646);
105251
+ /* provided dependency */ var MovieTexture_$ = __webpack_require__(275);
105252
+ /* provided dependency */ var SuperGif = __webpack_require__(964);
105122
105253
  /*******************************************************************************
105123
105254
  *
105124
105255
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -107723,6 +107854,8 @@ x_ite_Namespace .add ("Time", "x_ite/Components/Time", Time_default_);
107723
107854
 
107724
107855
 
107725
107856
 
107857
+ const nop = Function .prototype;
107858
+
107726
107859
  const Context =
107727
107860
  {
107728
107861
  excludes: new Set ([
@@ -107755,10 +107888,16 @@ const Context =
107755
107888
  {
107756
107889
  const ext = gl .getExtension ("OES_vertex_array_object");
107757
107890
 
107758
- gl .bindVertexArray = ext .bindVertexArrayOES .bind (ext);
107759
- gl .createVertexArray = ext .createVertexArrayOES .bind (ext);
107760
- gl .deleteVertexArray = ext .deleteVertexArrayOES .bind (ext);
107761
- gl .isVertexArray = ext .isVertexArrayOES .bind (ext);
107891
+ gl .bindVertexArray = ext ?.bindVertexArrayOES .bind (ext) ?? nop;
107892
+ gl .createVertexArray = ext ?.createVertexArrayOES .bind (ext) ?? nop;
107893
+ gl .deleteVertexArray = ext ?.deleteVertexArrayOES .bind (ext) ?? nop;
107894
+ gl .isVertexArray = ext ?.isVertexArrayOES .bind (ext) ?? nop;
107895
+ }
107896
+
107897
+ {
107898
+ const ext = gl .getExtension ("ANGLE_instanced_arrays");
107899
+
107900
+ gl .drawArraysInstanced = ext ?.drawArraysInstancedANGLE .bind (ext) ?? nop;
107762
107901
  }
107763
107902
  }
107764
107903
  }
@@ -107780,7 +107919,7 @@ const Context =
107780
107919
 
107781
107920
  if (aliasedLineWidthRange [0] === 1 && aliasedLineWidthRange [1] === 1)
107782
107921
  {
107783
- gl .lineWidth = Function .prototype;
107922
+ gl .lineWidth = nop;
107784
107923
  gl .HAS_FEATURE_TRANSFORMED_LINES = gl .getVersion () >= 2;
107785
107924
 
107786
107925
  if (DEVELOPMENT)
@@ -107903,377 +108042,528 @@ const Context_default_ = Context;
107903
108042
 
107904
108043
  x_ite_Namespace .add ("Context", "x_ite/Browser/Core/Context", Context_default_);
107905
108044
  /* harmony default export */ const Core_Context = (Context_default_);
107906
- ;// CONCATENATED MODULE: ./src/locale/de.po.js
107907
- const de_po_default_ = `msgid ""
107908
- msgstr ""
107909
- "Project-Id-Version: X_ITE\n"
107910
- "POT-Creation-Date: 2015-12-23 04:56+0100\n"
107911
- "PO-Revision-Date: 2015-12-23 04:57+0100\n"
107912
- "Last-Translator: Holger Seelig <holger.seelig@yahoo.de>\n"
107913
- "Language-Team: \n"
107914
- "Language: de\n"
107915
- "MIME-Version: 1.0\n"
107916
- "Content-Type: text/plain; charset=UTF-8\n"
107917
- "Content-Transfer-Encoding: 8bit\n"
107918
- "X-Generator: Poedit 1.8.4\n"
107919
- "X-Poedit-Basepath: ../x_ite\n"
107920
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
107921
- "X-Poedit-SourceCharset: UTF-8\n"
107922
- "X-Poedit-SearchPath-0: .\n"
107923
-
107924
- msgid "Less Properties"
107925
- msgstr "Weniger Eigenschaften"
107926
-
107927
- msgid "More Properties"
107928
- msgstr "Mehr Eigenschaften"
107929
-
107930
- msgid "Frame rate"
107931
- msgstr "Bildrate"
107932
-
107933
- msgid "fps"
107934
- msgstr "BpS"
107935
-
107936
- msgid "Speed"
107937
- msgstr "Geschwindigkeit"
107938
-
107939
- msgid "m/s"
107940
- msgstr ""
107941
-
107942
- msgid "km/h"
107943
- msgstr ""
107944
-
107945
- msgid "Browser"
107946
- msgstr ""
107947
-
107948
- msgid "ms"
107949
- msgstr ""
107950
-
107951
- msgid "X3D total"
107952
- msgstr "X3D gesamt"
107953
-
107954
- msgid "Event Processing"
107955
- msgstr "Ereignisverarbeitung"
107956
-
107957
- msgid "Pointer"
107958
- msgstr "Zeigegerät"
107959
-
107960
- msgid "Camera"
107961
- msgstr "Kamera"
107962
-
107963
- msgid "Collision Detection"
107964
- msgstr "Kollisionserkennung"
107965
-
107966
- msgid "Rendering"
107967
- msgstr "Rendering"
107968
-
107969
- msgid "Number of Shapes"
107970
- msgstr "Anzahl der Formen"
107971
-
107972
- msgid "Number of Sensors"
107973
- msgstr "Anzahl der Sensoren"
107974
-
107975
- msgid "Browser Timings"
107976
- msgstr "Zeitberechnung"
107977
-
107978
- msgid "X_ITE Browser"
107979
- msgstr ""
107980
-
107981
- msgid "Viewpoints"
107982
- msgstr "Ansichtspunkte"
107983
-
107984
- msgid "Available Viewers"
107985
- msgstr "Verfügbare Betrachter"
107986
-
107987
- msgid "Straighten Horizon"
107988
- msgstr "Horizont gerade richten"
107989
-
107990
- msgid "Primitive Quality"
107991
- msgstr "Qualität der Grundobjekte"
107992
-
107993
- msgid "High"
107994
- msgstr "Hoch"
107995
-
107996
- msgid "high"
107997
- msgstr "hoch"
107998
-
107999
- msgid "Medium"
108000
- msgstr "Mittel"
108001
-
108002
- msgid "medium"
108003
- msgstr "mittel"
108004
-
108005
- msgid "Low"
108006
- msgstr "Niedrig"
108007
-
108008
- msgid "low"
108009
- msgstr "niedrig"
108010
-
108011
- msgid "Texture Quality"
108012
- msgstr "Textur Qualität"
108013
-
108014
- msgid "Display Rubberband"
108015
- msgstr "Gummiband anzeigen"
108016
-
108017
- msgid "Rubberband"
108018
- msgstr "Gummiband"
108019
-
108020
- msgid "on"
108021
- msgstr "an"
108022
-
108023
- msgid "off"
108024
- msgstr "aus"
108025
-
108026
- msgid "Mute Browser"
108027
- msgstr "Browser stumm schalten"
108028
-
108029
- msgid "Browser muted"
108030
- msgstr "Browser stumm geschalten"
108031
-
108032
- msgid "Browser unmuted"
108033
- msgstr "Browser Ton an"
108034
-
108035
- msgid "Leave Fullscreen"
108036
- msgstr "Vollbild verlassen"
108037
-
108038
- msgid "Fullscreen"
108039
- msgstr "Vollbild"
108040
-
108041
- msgid "About X_ITE"
108042
- msgstr "Über X_ITE"
108043
-
108044
- msgid "Examine Viewer"
108045
- msgstr "Untersuchen"
108046
-
108047
- msgid "Walk Viewer"
108048
- msgstr "Laufen"
108049
-
108050
- msgid "Fly Viewer"
108051
- msgstr "Fliegen"
108052
-
108053
- msgid "Plane Viewer"
108054
- msgstr "Ebenen Betrachter"
108055
-
108056
- msgid "Look At Viewer"
108057
- msgstr "Auf Objekte zielen"
108058
-
108059
- msgid "None Viewer"
108060
- msgstr "Kein Betrachter"
108061
-
108062
- msgid "Points"
108063
- msgstr "Punkte"
108064
-
108065
- msgid "Flat"
108066
- msgstr "Flach"
108067
-
108068
- msgid "Wireframe"
108069
- msgstr "Drahtgittermodel"
108070
-
108071
- msgid "Loading %1 file"
108072
- msgstr "Lade %1 Datei"
108073
-
108074
- msgid "Loading %1 files"
108075
- msgstr "Lade %1 Dateien"
108076
-
108077
- msgid "Loading done"
108078
- msgstr "Fertig mit Laden"
108045
+ ;// CONCATENATED MODULE: ./src/x_ite/Browser/ParticleSystems/GeometryTypes.js
108046
+ /*******************************************************************************
108047
+ *
108048
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
108049
+ *
108050
+ * Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
108051
+ *
108052
+ * All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
108053
+ *
108054
+ * The copyright notice above does not evidence any actual of intended
108055
+ * publication of such source code, and is an unpublished work by create3000.
108056
+ * This material contains CONFIDENTIAL INFORMATION that is the property of
108057
+ * create3000.
108058
+ *
108059
+ * No permission is granted to copy, distribute, or create derivative works from
108060
+ * the contents of this software, in whole or in part, without the prior written
108061
+ * permission of create3000.
108062
+ *
108063
+ * NON-MILITARY USE ONLY
108064
+ *
108065
+ * All create3000 software are effectively free software with a non-military use
108066
+ * restriction. It is free. Well commented source is provided. You may reuse the
108067
+ * source in any way you please with the exception anything that uses it must be
108068
+ * marked to indicate is contains 'non-military use only' components.
108069
+ *
108070
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
108071
+ *
108072
+ * Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
108073
+ *
108074
+ * This file is part of the X_ITE Project.
108075
+ *
108076
+ * X_ITE is free software: you can redistribute it and/or modify it under the
108077
+ * terms of the GNU General Public License version 3 only, as published by the
108078
+ * Free Software Foundation.
108079
+ *
108080
+ * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
108081
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
108082
+ * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
108083
+ * details (a copy is included in the LICENSE file that accompanied this code).
108084
+ *
108085
+ * You should have received a copy of the GNU General Public License version 3
108086
+ * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
108087
+ * copy of the GPLv3 License.
108088
+ *
108089
+ * For Silvio, Joy and Adi.
108090
+ *
108091
+ ******************************************************************************/
108079
108092
 
108080
- msgid "Failed loading world."
108081
- msgstr "Laden der Dateien fehlgeschlagen."
108093
+ let GeometryTypes_i = 0;
108082
108094
 
108083
- msgid "Show World Info"
108084
- msgstr "World Info anzeigen"
108095
+ const GeometryTypes = {
108096
+ POINT: GeometryTypes_i ++,
108097
+ LINE: GeometryTypes_i ++,
108098
+ TRIANGLE: GeometryTypes_i ++,
108099
+ QUAD: GeometryTypes_i ++,
108100
+ SPRITE: GeometryTypes_i ++,
108101
+ GEOMETRY: GeometryTypes_i ++,
108102
+ };
108085
108103
 
108086
- msgid "Viewpoint is copied to clipboard."
108087
- msgstr "Ansichtspunkt wurde in die Zwischenablage kopiert."
108088
- `;
108104
+ const GeometryTypes_default_ = GeometryTypes;
108089
108105
  ;
108090
108106
 
108091
- x_ite_Namespace .add ("de.po", "locale/de.po", de_po_default_);
108092
- /* harmony default export */ const de_po = (de_po_default_);
108093
- ;// CONCATENATED MODULE: ./src/locale/fr.po.js
108094
- const fr_po_default_ = `msgid ""
108095
- msgstr ""
108096
- "Project-Id-Version: X_ITE\n"
108097
- "POT-Creation-Date: 2015-12-23 04:58+0100\n"
108098
- "PO-Revision-Date: 2015-12-23 05:07+0100\n"
108099
- "Last-Translator: Holger Seelig <holger.seelig@yahoo.de>\n"
108100
- "Language-Team: \n"
108101
- "Language: fr\n"
108102
- "MIME-Version: 1.0\n"
108103
- "Content-Type: text/plain; charset=UTF-8\n"
108104
- "Content-Transfer-Encoding: 8bit\n"
108105
- "X-Generator: Poedit 1.8.4\n"
108106
- "X-Poedit-Basepath: ../x_ite\n"
108107
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
108108
- "X-Poedit-SourceCharset: UTF-8\n"
108109
- "X-Poedit-SearchPath-0: .\n"
108110
-
108111
- msgid "Less Properties"
108112
- msgstr "Moins de Propriétés"
108113
-
108114
- msgid "More Properties"
108115
- msgstr "Plus de Propriétés"
108116
-
108117
- msgid "Frame rate"
108118
- msgstr "Fréquence d'Images"
108119
-
108120
- msgid "fps"
108121
- msgstr "fps"
108122
-
108123
- msgid "Speed"
108124
- msgstr "Vélocité"
108125
-
108126
- msgid "m/s"
108127
- msgstr ""
108128
-
108129
- msgid "km/h"
108130
- msgstr ""
108131
-
108132
- msgid "Browser"
108133
- msgstr "X_ITE Navigateur"
108134
-
108135
- msgid "ms"
108136
- msgstr ""
108137
-
108138
- msgid "X3D total"
108139
- msgstr "X3D total"
108140
-
108141
- msgid "Event Processing"
108142
- msgstr "Traitement des Événements"
108143
-
108144
- msgid "Pointer"
108145
- msgstr "Pointeur"
108146
-
108147
- msgid "Camera"
108148
- msgstr "Caméra"
108149
-
108150
- msgid "Collision Detection"
108151
- msgstr "Détection des Collisions"
108152
-
108153
- msgid "Rendering"
108154
- msgstr "Rendement"
108155
-
108156
- msgid "Number of Shapes"
108157
- msgstr "Nombre de Formes"
108158
-
108159
- msgid "Number of Sensors"
108160
- msgstr "Nombre de Senseurs"
108161
-
108162
- msgid "Browser Timings"
108163
- msgstr "Calcul du Temps"
108164
-
108165
- msgid "X_ITE Browser"
108166
- msgstr "X_ITE Navigateur"
108167
-
108168
- msgid "Viewpoints"
108169
- msgstr "Points de Vue"
108170
-
108171
- msgid "Available Viewers"
108172
- msgstr "Visionneurs disponibles"
108173
-
108174
- msgid "Straighten Horizon"
108175
- msgstr "Redresser l'Horizon"
108176
-
108177
- msgid "Primitive Quality"
108178
- msgstr "Qualité des Objets simples"
108179
-
108180
- msgid "High"
108181
- msgstr "Haut"
108182
-
108183
- msgid "high"
108184
- msgstr "haut"
108185
-
108186
- msgid "Medium"
108187
- msgstr "Moyenne"
108188
-
108189
- msgid "medium"
108190
- msgstr "moyenne"
108191
-
108192
- msgid "Low"
108193
- msgstr "Faible"
108194
-
108195
- msgid "low"
108196
- msgstr "faible"
108197
-
108198
- msgid "Texture Quality"
108199
- msgstr "Qualité des Textures"
108200
-
108201
- msgid "Display Rubberband"
108202
- msgstr "Présenter le Bande élastique"
108203
-
108204
- msgid "Rubberband"
108205
- msgstr "Bande élastique"
108206
-
108207
- msgid "on"
108208
- msgstr "marche"
108209
-
108210
- msgid "off"
108211
- msgstr "arrêt"
108212
-
108213
- msgid "Mute Browser"
108214
- msgstr "Rendre Navigateur muet"
108215
-
108216
- msgid "Browser muted"
108217
- msgstr "Navigateur muet"
108218
-
108219
- msgid "Browser unmuted"
108220
- msgstr "Son de Navigateur réactivé"
108221
-
108222
- msgid "Leave Fullscreen"
108223
- msgstr "Laisser le plein Écran"
108224
-
108225
- msgid "Fullscreen"
108226
- msgstr "Plein Écran"
108227
-
108228
- msgid "About X_ITE"
108229
- msgstr "À propos de X_ITE"
108230
-
108231
- msgid "Examine Viewer"
108232
- msgstr "Examiner"
108233
-
108234
- msgid "Walk Viewer"
108235
- msgstr "Aller"
108236
-
108237
- msgid "Fly Viewer"
108238
- msgstr "Voler"
108239
-
108240
- msgid "Plane Viewer"
108241
- msgstr "Visionneur de la Plaine"
108242
-
108243
- msgid "Look At Viewer"
108244
- msgstr "Regarder un Objet de près"
108245
-
108246
- msgid "None Viewer"
108247
- msgstr "Pas de Visionneur"
108248
-
108249
- msgid "Flat"
108250
- msgstr "Plat"
108251
-
108252
- msgid "Wireframe"
108253
- msgstr "Image filaire"
108254
-
108255
- msgid "Loading %1 file"
108256
- msgstr "Télécharger %1 Fichier"
108257
-
108258
- msgid "Loading %1 files"
108259
- msgstr "Télécharger %1 Fichiers"
108260
-
108261
- msgid "Loading done"
108262
- msgstr "Téléchargement fini"
108263
-
108264
- msgid "Failed loading world."
108265
- msgstr "Le chargement des Fichiers a échoué."
108266
-
108267
- msgid "Show World Info"
108268
- msgstr "Afficher World Info"
108107
+ x_ite_Namespace .add ("GeometryTypes", "x_ite/Browser/ParticleSystems/GeometryTypes", GeometryTypes_default_);
108108
+ /* harmony default export */ const ParticleSystems_GeometryTypes = (GeometryTypes_default_);
108109
+ ;// CONCATENATED MODULE: ./src/locale/de.js
108110
+ const de_default_ = [
108111
+ [
108112
+ "Less Properties",
108113
+ "Weniger Eigenschaften",
108114
+ ],
108115
+ [
108116
+ "More Properties",
108117
+ "Mehr Eigenschaften",
108118
+ ],
108119
+ [
108120
+ "Frame rate",
108121
+ "Bildrate",
108122
+ ],
108123
+ [
108124
+ "fps",
108125
+ "BpS",
108126
+ ],
108127
+ [
108128
+ "Speed",
108129
+ "Geschwindigkeit",
108130
+ ],
108131
+ [
108132
+ "m/s",
108133
+ "",
108134
+ ],
108135
+ [
108136
+ "km/h",
108137
+ "",
108138
+ ],
108139
+ [
108140
+ "Browser",
108141
+ "",
108142
+ ],
108143
+ [
108144
+ "ms",
108145
+ "",
108146
+ ],
108147
+ [
108148
+ "X3D total",
108149
+ "X3D gesamt",
108150
+ ],
108151
+ [
108152
+ "Event Processing",
108153
+ "Ereignisverarbeitung",
108154
+ ],
108155
+ [
108156
+ "Pointer",
108157
+ "Zeigegerät",
108158
+ ],
108159
+ [
108160
+ "Camera",
108161
+ "Kamera",
108162
+ ],
108163
+ [
108164
+ "Collision Detection",
108165
+ "Kollisionserkennung",
108166
+ ],
108167
+ [
108168
+ "Rendering",
108169
+ "Rendering",
108170
+ ],
108171
+ [
108172
+ "Number of Primitives",
108173
+ "Anzahl der Grundobjekte",
108174
+ ],
108175
+ [
108176
+ "Number of Shapes",
108177
+ "Anzahl der Formen",
108178
+ ],
108179
+ [
108180
+ "Number of Sensors",
108181
+ "Anzahl der Sensoren",
108182
+ ],
108183
+ [
108184
+ "Browser Timings",
108185
+ "Zeitberechnung",
108186
+ ],
108187
+ [
108188
+ "X_ITE Browser",
108189
+ "",
108190
+ ],
108191
+ [
108192
+ "Viewpoints",
108193
+ "Ansichtspunkte",
108194
+ ],
108195
+ [
108196
+ "Available Viewers",
108197
+ "Verfügbare Betrachter",
108198
+ ],
108199
+ [
108200
+ "Straighten Horizon",
108201
+ "Horizont gerade richten",
108202
+ ],
108203
+ [
108204
+ "Primitive Quality",
108205
+ "Qualität der Grundobjekte",
108206
+ ],
108207
+ [
108208
+ "High",
108209
+ "Hoch",
108210
+ ],
108211
+ [
108212
+ "high",
108213
+ "hoch",
108214
+ ],
108215
+ [
108216
+ "Medium",
108217
+ "Mittel",
108218
+ ],
108219
+ [
108220
+ "medium",
108221
+ "mittel",
108222
+ ],
108223
+ [
108224
+ "Low",
108225
+ "Niedrig",
108226
+ ],
108227
+ [
108228
+ "low",
108229
+ "niedrig",
108230
+ ],
108231
+ [
108232
+ "Texture Quality",
108233
+ "Textur Qualität",
108234
+ ],
108235
+ [
108236
+ "Display Rubberband",
108237
+ "Gummiband anzeigen",
108238
+ ],
108239
+ [
108240
+ "Rubberband",
108241
+ "Gummiband",
108242
+ ],
108243
+ [
108244
+ "on",
108245
+ "an",
108246
+ ],
108247
+ [
108248
+ "off",
108249
+ "aus",
108250
+ ],
108251
+ [
108252
+ "Mute Browser",
108253
+ "Browser stumm schalten",
108254
+ ],
108255
+ [
108256
+ "Browser muted",
108257
+ "Browser stumm geschalten",
108258
+ ],
108259
+ [
108260
+ "Browser unmuted",
108261
+ "Browser Ton an",
108262
+ ],
108263
+ [
108264
+ "Leave Fullscreen",
108265
+ "Vollbild verlassen",
108266
+ ],
108267
+ [
108268
+ "Fullscreen",
108269
+ "Vollbild",
108270
+ ],
108271
+ [
108272
+ "About X_ITE",
108273
+ "Über X_ITE",
108274
+ ],
108275
+ [
108276
+ "Examine Viewer",
108277
+ "Untersuchen",
108278
+ ],
108279
+ [
108280
+ "Walk Viewer",
108281
+ "Laufen",
108282
+ ],
108283
+ [
108284
+ "Fly Viewer",
108285
+ "Fliegen",
108286
+ ],
108287
+ [
108288
+ "Plane Viewer",
108289
+ "Ebenen Betrachter",
108290
+ ],
108291
+ [
108292
+ "Look At Viewer",
108293
+ "Auf Objekte zielen",
108294
+ ],
108295
+ [
108296
+ "None Viewer",
108297
+ "Kein Betrachter",
108298
+ ],
108299
+ [
108300
+ "Points",
108301
+ "Punkte",
108302
+ ],
108303
+ [
108304
+ "Flat",
108305
+ "Flach",
108306
+ ],
108307
+ [
108308
+ "Wireframe",
108309
+ "Drahtgittermodel",
108310
+ ],
108311
+ [
108312
+ "Loading %1 file",
108313
+ "Lade %1 Datei",
108314
+ ],
108315
+ [
108316
+ "Loading %1 files",
108317
+ "Lade %1 Dateien",
108318
+ ],
108319
+ [
108320
+ "Loading done",
108321
+ "Fertig mit Laden",
108322
+ ],
108323
+ [
108324
+ "Failed loading world.",
108325
+ "Laden der Dateien fehlgeschlagen.",
108326
+ ],
108327
+ [
108328
+ "Show World Info",
108329
+ "World Info anzeigen",
108330
+ ],
108331
+ [
108332
+ "Viewpoint is copied to clipboard.",
108333
+ "Ansichtspunkt wurde in die Zwischenablage kopiert.",
108334
+ ],
108335
+ ];
108336
+ ;
108269
108337
 
108270
- msgid "Viewpoint is copied to clipboard."
108271
- msgstr "Le point de Vue est copié dans le Presse-Papiers."
108272
- `;
108338
+ x_ite_Namespace .add ("de", "locale/de", de_default_);
108339
+ /* harmony default export */ const de = (de_default_);
108340
+ ;// CONCATENATED MODULE: ./src/locale/fr.js
108341
+ const fr_default_ = [
108342
+ [
108343
+ "Less Properties",
108344
+ "Moins de Propriétés",
108345
+ ],
108346
+ [
108347
+ "More Properties",
108348
+ "Plus de Propriétés",
108349
+ ],
108350
+ [
108351
+ "Frame rate",
108352
+ "Fréquence d'Images",
108353
+ ],
108354
+ [
108355
+ "fps",
108356
+ "fps",
108357
+ ],
108358
+ [
108359
+ "Speed",
108360
+ "Vélocité",
108361
+ ],
108362
+ [
108363
+ "m/s",
108364
+ "",
108365
+ ],
108366
+ [
108367
+ "km/h",
108368
+ "",
108369
+ ],
108370
+ [
108371
+ "Browser",
108372
+ "X_ITE Navigateur",
108373
+ ],
108374
+ [
108375
+ "ms",
108376
+ "",
108377
+ ],
108378
+ [
108379
+ "X3D total",
108380
+ "X3D total",
108381
+ ],
108382
+ [
108383
+ "Event Processing",
108384
+ "Traitement des Événements",
108385
+ ],
108386
+ [
108387
+ "Pointer",
108388
+ "Pointeur",
108389
+ ],
108390
+ [
108391
+ "Camera",
108392
+ "Caméra",
108393
+ ],
108394
+ [
108395
+ "Collision Detection",
108396
+ "Détection des Collisions",
108397
+ ],
108398
+ [
108399
+ "Rendering",
108400
+ "Rendement",
108401
+ ],
108402
+ [
108403
+ "Number of Primitives",
108404
+ "Nombre d'Objets de Base",
108405
+ ],
108406
+ [
108407
+ "Number of Shapes",
108408
+ "Nombre de Formes",
108409
+ ],
108410
+ [
108411
+ "Number of Sensors",
108412
+ "Nombre de Senseurs",
108413
+ ],
108414
+ [
108415
+ "Browser Timings",
108416
+ "Calcul du Temps",
108417
+ ],
108418
+ [
108419
+ "X_ITE Browser",
108420
+ "X_ITE Navigateur",
108421
+ ],
108422
+ [
108423
+ "Viewpoints",
108424
+ "Points de Vue",
108425
+ ],
108426
+ [
108427
+ "Available Viewers",
108428
+ "Visionneurs disponibles",
108429
+ ],
108430
+ [
108431
+ "Straighten Horizon",
108432
+ "Redresser l'Horizon",
108433
+ ],
108434
+ [
108435
+ "Primitive Quality",
108436
+ "Qualité des Objets simples",
108437
+ ],
108438
+ [
108439
+ "High",
108440
+ "Haut",
108441
+ ],
108442
+ [
108443
+ "high",
108444
+ "haut",
108445
+ ],
108446
+ [
108447
+ "Medium",
108448
+ "Moyenne",
108449
+ ],
108450
+ [
108451
+ "medium",
108452
+ "moyenne",
108453
+ ],
108454
+ [
108455
+ "Low",
108456
+ "Faible",
108457
+ ],
108458
+ [
108459
+ "low",
108460
+ "faible",
108461
+ ],
108462
+ [
108463
+ "Texture Quality",
108464
+ "Qualité des Textures",
108465
+ ],
108466
+ [
108467
+ "Display Rubberband",
108468
+ "Présenter le Bande élastique",
108469
+ ],
108470
+ [
108471
+ "Rubberband",
108472
+ "Bande élastique",
108473
+ ],
108474
+ [
108475
+ "on",
108476
+ "marche",
108477
+ ],
108478
+ [
108479
+ "off",
108480
+ "arrêt",
108481
+ ],
108482
+ [
108483
+ "Mute Browser",
108484
+ "Rendre Navigateur muet",
108485
+ ],
108486
+ [
108487
+ "Browser muted",
108488
+ "Navigateur muet",
108489
+ ],
108490
+ [
108491
+ "Browser unmuted",
108492
+ "Son de Navigateur réactivé",
108493
+ ],
108494
+ [
108495
+ "Leave Fullscreen",
108496
+ "Laisser le plein Écran",
108497
+ ],
108498
+ [
108499
+ "Fullscreen",
108500
+ "Plein Écran",
108501
+ ],
108502
+ [
108503
+ "About X_ITE",
108504
+ "À propos de X_ITE",
108505
+ ],
108506
+ [
108507
+ "Examine Viewer",
108508
+ "Examiner",
108509
+ ],
108510
+ [
108511
+ "Walk Viewer",
108512
+ "Aller",
108513
+ ],
108514
+ [
108515
+ "Fly Viewer",
108516
+ "Voler",
108517
+ ],
108518
+ [
108519
+ "Plane Viewer",
108520
+ "Visionneur de la Plaine",
108521
+ ],
108522
+ [
108523
+ "Look At Viewer",
108524
+ "Regarder un Objet de près",
108525
+ ],
108526
+ [
108527
+ "None Viewer",
108528
+ "Pas de Visionneur",
108529
+ ],
108530
+ [
108531
+ "Flat",
108532
+ "Plat",
108533
+ ],
108534
+ [
108535
+ "Wireframe",
108536
+ "Image filaire",
108537
+ ],
108538
+ [
108539
+ "Loading %1 file",
108540
+ "Télécharger %1 Fichier",
108541
+ ],
108542
+ [
108543
+ "Loading %1 files",
108544
+ "Télécharger %1 Fichiers",
108545
+ ],
108546
+ [
108547
+ "Loading done",
108548
+ "Téléchargement fini",
108549
+ ],
108550
+ [
108551
+ "Failed loading world.",
108552
+ "Le chargement des Fichiers a échoué.",
108553
+ ],
108554
+ [
108555
+ "Show World Info",
108556
+ "Afficher World Info",
108557
+ ],
108558
+ [
108559
+ "Viewpoint is copied to clipboard.",
108560
+ "Le point de Vue est copié dans le Presse-Papiers.",
108561
+ ]
108562
+ ];
108273
108563
  ;
108274
108564
 
108275
- x_ite_Namespace .add ("fr.po", "locale/fr.po", fr_po_default_);
108276
- /* harmony default export */ const fr_po = (fr_po_default_);
108565
+ x_ite_Namespace .add ("fr", "locale/fr", fr_default_);
108566
+ /* harmony default export */ const fr = (fr_default_);
108277
108567
  ;// CONCATENATED MODULE: ./src/locale/gettext.js
108278
108568
  /*******************************************************************************
108279
108569
  *
@@ -108325,17 +108615,10 @@ x_ite_Namespace .add ("fr.po", "locale/fr.po", fr_po_default_);
108325
108615
 
108326
108616
 
108327
108617
 
108328
- function execAll (regex, string)
108329
- {
108330
- const matches = [ ];
108331
-
108332
- let match = null;
108333
-
108334
- while (match = regex .exec (string))
108335
- matches .push (match);
108336
-
108337
- return matches;
108338
- }
108618
+ const locales = new Map ([
108619
+ ["de", de],
108620
+ ["fr", fr],
108621
+ ]);
108339
108622
 
108340
108623
  function getLanguage ()
108341
108624
  {
@@ -108343,64 +108626,22 @@ function getLanguage ()
108343
108626
  {
108344
108627
  const language = value .split ("-") [0];
108345
108628
 
108346
- if (locales [language])
108629
+ if (locales .get (language))
108347
108630
  return language;
108348
108631
  }
108349
108632
 
108350
108633
  return (navigator .language || navigator .userLanguage) .split ("-") [0];
108351
108634
  }
108352
108635
 
108353
- function setLocale (language)
108354
- {
108355
- if (locales [language])
108356
- {
108357
- const
108358
- matches = execAll (msg, locales [language]),
108359
- locale = locales [language] = { };
108360
-
108361
- for (var i = 0, length = matches .length; i < length; ++ i)
108362
- {
108363
- if (matches [i] [2] .length)
108364
- locale [matches [i] [1]] = matches [i] [2];
108365
- }
108366
- }
108367
- }
108368
-
108369
- const locales =
108370
- {
108371
- en: "C",
108372
- de: de_po,
108373
- fr: fr_po,
108374
- };
108375
-
108376
- const
108377
- msg = /msgid\s+"(.*?)"\nmsgstr\s+"(.*?)"\n/g,
108378
- language = getLanguage ();
108379
-
108380
- setLocale (language);
108381
-
108382
- function gettext (string)
108383
- {
108384
- const locale = locales [language];
108385
-
108386
- if (locale === undefined)
108387
- return string;
108388
-
108389
- const translation = locale [string];
108390
-
108391
- if (translation === undefined)
108392
- return string;
108636
+ const locale = new Map (locales .get (getLanguage ()) ?? [ ]);
108393
108637
 
108394
- return translation;
108395
- }
108396
-
108397
- const gettext_default_ = gettext;
108638
+ const gettext_default_ = (string) => locale .get (string) || string;
108398
108639
  ;
108399
108640
 
108400
108641
  x_ite_Namespace .add ("gettext", "locale/gettext", gettext_default_);
108401
- /* harmony default export */ const locale_gettext = (gettext_default_);
108642
+ /* harmony default export */ const gettext = (gettext_default_);
108402
108643
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserTimings.js
108403
- /* provided dependency */ var BrowserTimings_$ = __webpack_require__(237);
108644
+ /* provided dependency */ var BrowserTimings_$ = __webpack_require__(275);
108404
108645
  /*******************************************************************************
108405
108646
  *
108406
108647
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -108452,12 +108693,15 @@ x_ite_Namespace .add ("gettext", "locale/gettext", gettext_default_);
108452
108693
 
108453
108694
 
108454
108695
 
108696
+
108697
+
108455
108698
  function BrowserTimings (executionContext)
108456
108699
  {
108457
108700
  Base_X3DBaseNode .call (this, executionContext);
108458
108701
 
108459
108702
  this .localStorage = this .getBrowser () .getLocalStorage () .addNameSpace ("BrowserTimings.");
108460
108703
  this .fps = new Time_StopWatch ();
108704
+ this .primitives = { };
108461
108705
  }
108462
108706
 
108463
108707
  Object .assign (Object .setPrototypeOf (BrowserTimings .prototype, Base_X3DBaseNode .prototype),
@@ -108481,7 +108725,7 @@ Object .assign (Object .setPrototypeOf (BrowserTimings .prototype, Base_X3DBaseN
108481
108725
  this .header = BrowserTimings_$("<thead></thead>")
108482
108726
  .append (BrowserTimings_$("<tr></tr>")
108483
108727
  .append (BrowserTimings_$("<th colspan='2'></th>")
108484
- .text (locale_gettext("Browser Timings"))))
108728
+ .text (gettext("Browser Timings"))))
108485
108729
  .appendTo (this .table);
108486
108730
 
108487
108731
  this .body = BrowserTimings_$("<tbody></tbody>")
@@ -108508,56 +108752,61 @@ Object .assign (Object .setPrototypeOf (BrowserTimings .prototype, Base_X3DBaseN
108508
108752
  this .pickingTime = BrowserTimings_$("<td></td>");
108509
108753
  this .collisionTime = BrowserTimings_$("<td></td>");
108510
108754
  this .renderTime = BrowserTimings_$("<td></td>");
108755
+ this .numPrimitives = BrowserTimings_$("<td></td>");
108511
108756
  this .numShapes = BrowserTimings_$("<td></td>");
108512
108757
  this .sensors = BrowserTimings_$("<td></td>");
108513
108758
 
108514
108759
  this .body .append (BrowserTimings_$("<tr></tr>")
108515
- .append (BrowserTimings_$("<td></td>") .text (locale_gettext("Frame rate") + ":"))
108760
+ .append (BrowserTimings_$("<td></td>") .text (gettext("Frame rate") + ":"))
108516
108761
  .append (this .frameRate));
108517
108762
 
108518
108763
  this .body .append (BrowserTimings_$("<tr></tr>")
108519
- .append (BrowserTimings_$("<td></td>") .text (locale_gettext("Speed") + ":"))
108764
+ .append (BrowserTimings_$("<td></td>") .text (gettext("Speed") + ":"))
108520
108765
  .append (this .speed)
108521
108766
  .addClass ("x_ite-private-more"));
108522
108767
 
108523
108768
  this .body .append (BrowserTimings_$("<tr></tr>")
108524
- .append (BrowserTimings_$("<td></td>") .text (locale_gettext("Browser") + ":"))
108769
+ .append (BrowserTimings_$("<td></td>") .text (gettext("Browser") + ":"))
108525
108770
  .append (this .browserTime));
108526
108771
 
108527
108772
  this .body .append (BrowserTimings_$("<tr></tr>")
108528
- .append (BrowserTimings_$("<td></td>") .text (locale_gettext("X3D total") + ":"))
108773
+ .append (BrowserTimings_$("<td></td>") .text (gettext("X3D total") + ":"))
108529
108774
  .append (this .x3dTotal));
108530
108775
 
108531
108776
  this .body .append (BrowserTimings_$("<tr></tr>")
108532
- .append (BrowserTimings_$("<td></td>") .text (locale_gettext("Event Processing") + ":"))
108777
+ .append (BrowserTimings_$("<td></td>") .text (gettext("Event Processing") + ":"))
108533
108778
  .append (this .eventProcessing));
108534
108779
 
108535
108780
  this .body .append (BrowserTimings_$("<tr></tr>")
108536
- .append (BrowserTimings_$("<td></td>") .text (locale_gettext("Pointer") + ":"))
108781
+ .append (BrowserTimings_$("<td></td>") .text (gettext("Pointer") + ":"))
108537
108782
  .append (this .pointerTime));
108538
108783
 
108539
108784
  this .body .append (BrowserTimings_$("<tr></tr>")
108540
- .append (BrowserTimings_$("<td></td>") .text (locale_gettext("Camera") + ":"))
108785
+ .append (BrowserTimings_$("<td></td>") .text (gettext("Camera") + ":"))
108541
108786
  .append (this .cameraTime));
108542
108787
 
108543
108788
  this .body .append (BrowserTimings_$("<tr></tr>")
108544
- .append (BrowserTimings_$("<td></td>") .text (locale_gettext("Picking") + ":"))
108789
+ .append (BrowserTimings_$("<td></td>") .text (gettext("Picking") + ":"))
108545
108790
  .append (this .pickingTime));
108546
108791
 
108547
108792
  this .body .append (BrowserTimings_$("<tr></tr>")
108548
- .append (BrowserTimings_$("<td></td>") .text (locale_gettext("Collision Detection") + ":"))
108793
+ .append (BrowserTimings_$("<td></td>") .text (gettext("Collision Detection") + ":"))
108549
108794
  .append (this .collisionTime));
108550
108795
 
108551
108796
  this .body .append (BrowserTimings_$("<tr></tr>")
108552
- .append (BrowserTimings_$("<td></td>") .text (locale_gettext("Rendering") + ":"))
108797
+ .append (BrowserTimings_$("<td></td>") .text (gettext("Rendering") + ":"))
108553
108798
  .append (this .renderTime));
108554
108799
 
108555
108800
  this .body .append (BrowserTimings_$("<tr></tr>")
108556
- .append (BrowserTimings_$("<td></td>") .text (locale_gettext("Number of Shapes") + ":"))
108801
+ .append (BrowserTimings_$("<td></td>") .text (gettext("Number of Primitives") + ":"))
108802
+ .append (this .numPrimitives));
108803
+
108804
+ this .body .append (BrowserTimings_$("<tr></tr>")
108805
+ .append (BrowserTimings_$("<td></td>") .text (gettext("Number of Shapes") + ":"))
108557
108806
  .append (this .numShapes));
108558
108807
 
108559
108808
  this .body .append (BrowserTimings_$("<tr></tr>")
108560
- .append (BrowserTimings_$("<td></td>") .text (locale_gettext("Number of Sensors") + ":"))
108809
+ .append (BrowserTimings_$("<td></td>") .text (gettext("Number of Sensors") + ":"))
108561
108810
  .append (this .sensors));
108562
108811
 
108563
108812
  this .button .on ("click touchend", this .set_type__ .bind (this));
@@ -108572,13 +108821,14 @@ Object .assign (Object .setPrototypeOf (BrowserTimings .prototype, Base_X3DBaseN
108572
108821
  {
108573
108822
  this .element .stop (true, true) .fadeIn ();
108574
108823
  this .fps .reset ();
108824
+ this .getBrowser () .addBrowserCallback (this, Base_X3DConstants .INITIALIZED_EVENT, () => this .reset ());
108575
108825
  this .getBrowser () .prepareEvents () .addInterest ("update", this);
108576
- this .update ();
108577
- this .build ();
108826
+ this .reset ();
108578
108827
  }
108579
108828
  else
108580
108829
  {
108581
108830
  this .element .stop (true, true) .fadeOut ();
108831
+ this .getBrowser () .removeBrowserCallback (this, Base_X3DConstants .INITIALIZED_EVENT);
108582
108832
  this .getBrowser () .prepareEvents () .removeInterest ("update", this);
108583
108833
  }
108584
108834
  },
@@ -108603,9 +108853,19 @@ Object .assign (Object .setPrototypeOf (BrowserTimings .prototype, Base_X3DBaseN
108603
108853
  set_button__ ()
108604
108854
  {
108605
108855
  if (this .localStorage .type === "MORE")
108606
- this .button .text (locale_gettext("Less Properties"));
108856
+ this .button .text (gettext("Less Properties"));
108607
108857
  else
108608
- this .button .text (locale_gettext("More Properties"));
108858
+ this .button .text (gettext("More Properties"));
108859
+ },
108860
+ reset ()
108861
+ {
108862
+ this .getBrowser () .addBrowserEvent ();
108863
+
108864
+ requestAnimationFrame (() =>
108865
+ {
108866
+ this .fps .reset ();
108867
+ this .build ();
108868
+ });
108609
108869
  },
108610
108870
  update ()
108611
108871
  {
@@ -108623,8 +108883,16 @@ Object .assign (Object .setPrototypeOf (BrowserTimings .prototype, Base_X3DBaseN
108623
108883
  {
108624
108884
  const browser = this .getBrowser ();
108625
108885
 
108626
- this .frameRate .text (`${f2 (1000 / this .fps .averageTime)} ${locale_gettext("fps")}`);
108627
- this .speed .text (`${f2 (this .getSpeed (browser .currentSpeed))} ${this .getSpeedUnit (browser .currentSpeed)}`);
108886
+ if (this .fps .elapsedTime)
108887
+ {
108888
+ this .frameRate .text (`${f2 (1000 / this .fps .averageTime)} ${gettext("fps")}`);
108889
+ this .speed .text (`${f2 (this .getSpeed (browser .currentSpeed ))} ${this .getSpeedUnit (browser .currentSpeed)}`);
108890
+ }
108891
+ else
108892
+ {
108893
+ this .frameRate .text (`${f2 (0)} ${gettext("fps")}`);
108894
+ this .speed .text (`${f2 (this .getSpeed (0))} ${this .getSpeedUnit (0)}`);
108895
+ }
108628
108896
 
108629
108897
  if (this .localStorage .type !== "MORE" || !browser .getWorld ())
108630
108898
  return;
@@ -108637,19 +108905,21 @@ Object .assign (Object .setPrototypeOf (BrowserTimings .prototype, Base_X3DBaseN
108637
108905
  routingTime = Math .max (0, browser .getBrowserTime () .averageTime - (browser .getCameraTime () .averageTime + browser .getCollisionTime () .averageTime + browser .getDisplayTime () .averageTime)),
108638
108906
  prepareEvents = browser .prepareEvents () .getInterests () .size - 1,
108639
108907
  sensors = browser .sensorEvents () .getInterests () .size,
108640
- opaqueShapes = layers .reduce ((n, layer) => n + layer .getNumOpaqueShapes (), 0),
108641
- transparentShapes = layers .reduce ((n, layer) => n + layer .getNumTransparentShapes (), 0);
108642
-
108643
- this .browserTime .text (`${f2 (browser .getSystemTime () .averageTime)} ${locale_gettext("ms")}`);
108644
- this .x3dTotal .text (`${f2 (browser .getBrowserTime () .averageTime)} ${locale_gettext("ms")}`);
108645
- this .eventProcessing .text (`${f2 (routingTime)} ${locale_gettext("ms")}`);
108646
- this .pointerTime .text (`${f2 (browser .getPointingTime () .averageTime)} ${locale_gettext("ms")}`);
108647
- this .cameraTime .text (`${f2 (browser .getCameraTime () .averageTime)} ${locale_gettext("ms")}`);
108648
- this .pickingTime .text (`${f2 (browser .getPickingTime () .averageTime)} ${locale_gettext("ms")}`);
108649
- this .collisionTime .text (`${f2 (collisionTime)} ${locale_gettext("ms")}`);
108650
- this .renderTime .text (`${f2 (browser .getDisplayTime () .averageTime)} ${locale_gettext("ms")}`);
108651
- this .numShapes .text (`${opaqueShapes} + ${transparentShapes}`);
108652
- this .sensors .text (prepareEvents + sensors);
108908
+ primitives = this .getPrimitives (layers),
108909
+ opaqueShapes = this .getOpaqueShapes (layers),
108910
+ transparentShapes = this .getTransparentShapes (layers);
108911
+
108912
+ this .browserTime .text (`${f2 (browser .getSystemTime () .averageTime)} ${gettext("ms")}`);
108913
+ this .x3dTotal .text (`${f2 (browser .getBrowserTime () .averageTime)} ${gettext("ms")}`);
108914
+ this .eventProcessing .text (`${f2 (routingTime)} ${gettext("ms")}`);
108915
+ this .pointerTime .text (`${f2 (browser .getPointingTime () .averageTime)} ${gettext("ms")}`);
108916
+ this .cameraTime .text (`${f2 (browser .getCameraTime () .averageTime)} ${gettext("ms")}`);
108917
+ this .pickingTime .text (`${f2 (browser .getPickingTime () .averageTime)} ${gettext("ms")}`);
108918
+ this .collisionTime .text (`${f2 (collisionTime)} ${gettext("ms")}`);
108919
+ this .renderTime .text (`${f2 (browser .getDisplayTime () .averageTime)} ${gettext("ms")}`);
108920
+ this .numPrimitives .text (`${f0 (primitives .points)}; ${f0 (primitives .lines)}; ${f0 (primitives .triangles)}`);
108921
+ this .numShapes .text (`${f0 (opaqueShapes)} + ${f0 (transparentShapes)}`);
108922
+ this .sensors .text (f0 (prepareEvents + sensors));
108653
108923
 
108654
108924
  browser .getSystemTime () .reset ();
108655
108925
  browser .getBrowserTime () .reset ();
@@ -108671,9 +108941,119 @@ Object .assign (Object .setPrototypeOf (BrowserTimings .prototype, Base_X3DBaseN
108671
108941
  getSpeedUnit (speed)
108672
108942
  {
108673
108943
  if (speed < 15)
108674
- return locale_gettext("m/s");
108944
+ return gettext("m/s");
108945
+
108946
+ return gettext("km/h");
108947
+ },
108948
+ getPrimitives (layerNodes)
108949
+ {
108950
+ this .primitives .points = 0;
108951
+ this .primitives .lines = 0;
108952
+ this .primitives .triangles = 0;
108953
+
108954
+ for (const layerNode of layerNodes)
108955
+ {
108956
+ const
108957
+ numOpaqueShapes = layerNode .getNumOpaqueShapes (),
108958
+ numTransparentShapes = layerNode .getNumTransparentShapes (),
108959
+ opaqueShapes = layerNode .getOpaqueShapes (),
108960
+ transparentShapes = layerNode .getTransparentShapes ();
108961
+
108962
+ this .countPrimitives (opaqueShapes, numOpaqueShapes);
108963
+ this .countPrimitives (transparentShapes, numTransparentShapes);
108964
+ }
108675
108965
 
108676
- return locale_gettext("km/h");
108966
+ return this .primitives;
108967
+ },
108968
+ countPrimitives (shapes, numShapes)
108969
+ {
108970
+ for (let i = 0; i < numShapes; ++ i)
108971
+ {
108972
+ const
108973
+ shapeNode = shapes [i] .shapeNode,
108974
+ numInstances = shapeNode .getNumInstances ();
108975
+
108976
+ if (shapeNode .getType () .at (-1) === Base_X3DConstants .ParticleSystem)
108977
+ {
108978
+ switch (shapeNode .getGeometryType ())
108979
+ {
108980
+ case ParticleSystems_GeometryTypes .POINT:
108981
+ {
108982
+ this .primitives .points += numInstances;
108983
+ continue;
108984
+ }
108985
+ case ParticleSystems_GeometryTypes .LINE:
108986
+ {
108987
+ this .primitives .lines += numInstances;
108988
+ continue;
108989
+ }
108990
+ case ParticleSystems_GeometryTypes .TRIANGLE:
108991
+ case ParticleSystems_GeometryTypes .QUAD:
108992
+ case ParticleSystems_GeometryTypes .SPRITE:
108993
+ {
108994
+ this .primitives .triangles += numInstances * 2;
108995
+ continue;
108996
+ }
108997
+ case ParticleSystems_GeometryTypes .GEOMETRY:
108998
+ {
108999
+ break;
109000
+ }
109001
+ }
109002
+ }
109003
+
109004
+ const geometryNode = shapeNode .getGeometry ();
109005
+
109006
+ // ParticleSystem nodes may have no geometry.
109007
+ if (!geometryNode)
109008
+ continue;
109009
+
109010
+ if (!geometryNode .getExecutionContext () .getCountPrimitives ())
109011
+ continue;
109012
+
109013
+ const vertices = geometryNode .getVertices () .length / 4 * numInstances;
109014
+
109015
+ switch (geometryNode .getGeometryType ())
109016
+ {
109017
+ case 0:
109018
+ {
109019
+ this .primitives .points += vertices;
109020
+ break;
109021
+ }
109022
+ case 1:
109023
+ {
109024
+ this .primitives .lines += vertices / 2;
109025
+ break;
109026
+ }
109027
+ case 2:
109028
+ case 3:
109029
+ {
109030
+ this .primitives .triangles += vertices / 3;
109031
+ break;
109032
+ }
109033
+ }
109034
+ }
109035
+ },
109036
+ getOpaqueShapes (layers)
109037
+ {
109038
+ return layers .reduce ((n, layer) => n + this .countShapes (layer .getOpaqueShapes (), layer .getNumOpaqueShapes ()), 0);
109039
+ },
109040
+ getTransparentShapes (layers)
109041
+ {
109042
+ return layers .reduce ((n, layer) => n + this .countShapes (layer .getTransparentShapes (), layer .getNumTransparentShapes ()), 0);
109043
+ },
109044
+ countShapes (shapes, numShapes)
109045
+ {
109046
+ let count = 0;
109047
+
109048
+ for (let i = 0; i < numShapes; ++ i)
109049
+ {
109050
+ if (!shapes [i] .shapeNode .getExecutionContext () .getCountPrimitives ())
109051
+ continue;
109052
+
109053
+ ++ count;
109054
+ }
109055
+
109056
+ return count;
108677
109057
  },
108678
109058
  });
108679
109059
 
@@ -108686,19 +109066,23 @@ Object .defineProperties (BrowserTimings,
108686
109066
  },
108687
109067
  });
108688
109068
 
108689
- const f2 = (() =>
109069
+ function format (minimumFractionDigits, maximumFractionDigits)
108690
109070
  {
108691
109071
  const format = new Intl .NumberFormat (navigator .language || navigator .userLanguage, {
108692
109072
  notation: "standard",
108693
- minimumFractionDigits: 2,
108694
- maximumFractionDigits: 2,
109073
+ minimumFractionDigits,
109074
+ maximumFractionDigits,
108695
109075
  }) .format;
108696
109076
 
108697
109077
  return function (value)
108698
109078
  {
108699
109079
  return format (Number .isFinite (value) ? value : 0);
108700
109080
  };
108701
- })();
109081
+ }
109082
+
109083
+ const
109084
+ f0 = format (0, 0),
109085
+ f2 = format (2, 2);
108702
109086
 
108703
109087
  const BrowserTimings_default_ = BrowserTimings;
108704
109088
  ;
@@ -108830,7 +109214,7 @@ const TextureQuality_default_ = TextureQuality;
108830
109214
  x_ite_Namespace .add ("TextureQuality", "x_ite/Browser/Core/TextureQuality", TextureQuality_default_);
108831
109215
  /* harmony default export */ const Core_TextureQuality = (TextureQuality_default_);
108832
109216
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserOptions.js
108833
- /* provided dependency */ var BrowserOptions_$ = __webpack_require__(237);
109217
+ /* provided dependency */ var BrowserOptions_$ = __webpack_require__(275);
108834
109218
  /*******************************************************************************
108835
109219
  *
108836
109220
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109424,7 +109808,7 @@ const RenderingProperties_default_ = RenderingProperties;
109424
109808
  x_ite_Namespace .add ("RenderingProperties", "x_ite/Browser/Core/RenderingProperties", RenderingProperties_default_);
109425
109809
  /* harmony default export */ const Core_RenderingProperties = (RenderingProperties_default_);
109426
109810
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/Notification.js
109427
- /* provided dependency */ var Notification_$ = __webpack_require__(237);
109811
+ /* provided dependency */ var Notification_$ = __webpack_require__(275);
109428
109812
  /*******************************************************************************
109429
109813
  *
109430
109814
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109547,8 +109931,8 @@ const Notification_default_ = Notification;
109547
109931
  x_ite_Namespace .add ("Notification", "x_ite/Browser/Core/Notification", Notification_default_);
109548
109932
  /* harmony default export */ const Core_Notification = (Notification_default_);
109549
109933
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/ContextMenu.js
109550
- /* provided dependency */ var jquery_fullscreen = __webpack_require__(133);
109551
- /* provided dependency */ var ContextMenu_$ = __webpack_require__(237);
109934
+ /* provided dependency */ var jquery_fullscreen = __webpack_require__(543);
109935
+ /* provided dependency */ var ContextMenu_$ = __webpack_require__(275);
109552
109936
  /*******************************************************************************
109553
109937
  *
109554
109938
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109668,16 +110052,16 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
109668
110052
  },
109669
110053
  "separator0": "--------",
109670
110054
  "viewpoints": {
109671
- name: locale_gettext("Viewpoints"),
110055
+ name: gettext("Viewpoints"),
109672
110056
  className: "context-menu-icon x_ite-private-icon-viewpoint",
109673
110057
  items: this .getViewpoints (),
109674
110058
  },
109675
110059
  "available-viewers": {
109676
- name: locale_gettext("Available Viewers"),
110060
+ name: gettext("Available Viewers"),
109677
110061
  items: this .getAvailableViewers (),
109678
110062
  },
109679
110063
  "straighten-horizon": {
109680
- name: locale_gettext("Straighten Horizon"),
110064
+ name: gettext("Straighten Horizon"),
109681
110065
  type: "checkbox",
109682
110066
  selected: browser .getBrowserOption ("StraightenHorizon"),
109683
110067
  events: {
@@ -109688,14 +110072,14 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
109688
110072
  browser .setBrowserOption ("StraightenHorizon", straightenHorizon);
109689
110073
 
109690
110074
  if (straightenHorizon)
109691
- browser .getNotification () ._string = locale_gettext("Straighten Horizon") + ": " + locale_gettext("on");
110075
+ browser .getNotification () ._string = gettext("Straighten Horizon") + ": " + gettext("on");
109692
110076
  else
109693
- browser .getNotification () ._string = locale_gettext("Straighten Horizon") + ": " + locale_gettext("off");
110077
+ browser .getNotification () ._string = gettext("Straighten Horizon") + ": " + gettext("off");
109694
110078
  },
109695
110079
  },
109696
110080
  },
109697
110081
  "display-rubberband": {
109698
- name: locale_gettext("Display Rubberband"),
110082
+ name: gettext("Display Rubberband"),
109699
110083
  type: "checkbox",
109700
110084
  selected: browser .getBrowserOption ("Rubberband"),
109701
110085
  events: {
@@ -109706,19 +110090,19 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
109706
110090
  browser .setBrowserOption ("Rubberband", rubberband);
109707
110091
 
109708
110092
  if (rubberband)
109709
- browser .getNotification () ._string = locale_gettext("Rubberband") + ": " + locale_gettext("on");
110093
+ browser .getNotification () ._string = gettext("Rubberband") + ": " + gettext("on");
109710
110094
  else
109711
- browser .getNotification () ._string = locale_gettext("Rubberband") + ": " + locale_gettext("off");
110095
+ browser .getNotification () ._string = gettext("Rubberband") + ": " + gettext("off");
109712
110096
  },
109713
110097
  },
109714
110098
  },
109715
110099
  "separator1": "--------",
109716
110100
  "primitive-quality": {
109717
- name: locale_gettext("Primitive Quality"),
110101
+ name: gettext("Primitive Quality"),
109718
110102
  className: "context-menu-icon x_ite-private-icon-primitive-quality",
109719
110103
  items: {
109720
110104
  "high": {
109721
- name: locale_gettext("High"),
110105
+ name: gettext("High"),
109722
110106
  type: "radio",
109723
110107
  radio: "primitive-quality",
109724
110108
  selected: browser .getBrowserOption ("PrimitiveQuality") === "HIGH",
@@ -109726,12 +110110,12 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
109726
110110
  click: () =>
109727
110111
  {
109728
110112
  browser .setBrowserOption ("PrimitiveQuality", "HIGH");
109729
- browser .getNotification () ._string = locale_gettext("Primitive Quality") + ": " + locale_gettext("high");
110113
+ browser .getNotification () ._string = gettext("Primitive Quality") + ": " + gettext("high");
109730
110114
  },
109731
110115
  },
109732
110116
  },
109733
110117
  "medium": {
109734
- name: locale_gettext("Medium"),
110118
+ name: gettext("Medium"),
109735
110119
  type: "radio",
109736
110120
  radio: "primitive-quality",
109737
110121
  selected: browser .getBrowserOption ("PrimitiveQuality") === "MEDIUM",
@@ -109739,12 +110123,12 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
109739
110123
  click: () =>
109740
110124
  {
109741
110125
  browser .setBrowserOption ("PrimitiveQuality", "MEDIUM");
109742
- browser .getNotification () ._string = locale_gettext("Primitive Quality") + ": " + locale_gettext("medium");
110126
+ browser .getNotification () ._string = gettext("Primitive Quality") + ": " + gettext("medium");
109743
110127
  },
109744
110128
  },
109745
110129
  },
109746
110130
  "low": {
109747
- name: locale_gettext("Low"),
110131
+ name: gettext("Low"),
109748
110132
  type: "radio",
109749
110133
  radio: "primitive-quality",
109750
110134
  selected: browser .getBrowserOption ("PrimitiveQuality") === "LOW",
@@ -109752,18 +110136,18 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
109752
110136
  click: () =>
109753
110137
  {
109754
110138
  browser .setBrowserOption ("PrimitiveQuality", "LOW");
109755
- browser .getNotification () ._string = locale_gettext("Primitive Quality") + ": " + locale_gettext("low");
110139
+ browser .getNotification () ._string = gettext("Primitive Quality") + ": " + gettext("low");
109756
110140
  },
109757
110141
  },
109758
110142
  },
109759
110143
  },
109760
110144
  },
109761
110145
  "texture-quality": {
109762
- name: locale_gettext("Texture Quality"),
110146
+ name: gettext("Texture Quality"),
109763
110147
  className: "context-menu-icon x_ite-private-icon-texture-quality",
109764
110148
  items: {
109765
110149
  "high": {
109766
- name: locale_gettext("High"),
110150
+ name: gettext("High"),
109767
110151
  type: "radio",
109768
110152
  radio: "texture-quality",
109769
110153
  selected: browser .getBrowserOption ("TextureQuality") === "HIGH",
@@ -109771,12 +110155,12 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
109771
110155
  click: () =>
109772
110156
  {
109773
110157
  browser .setBrowserOption ("TextureQuality", "HIGH");
109774
- browser .getNotification () ._string = locale_gettext("Texture Quality") + ": " + locale_gettext("high");
110158
+ browser .getNotification () ._string = gettext("Texture Quality") + ": " + gettext("high");
109775
110159
  },
109776
110160
  },
109777
110161
  },
109778
110162
  "medium": {
109779
- name: locale_gettext("Medium"),
110163
+ name: gettext("Medium"),
109780
110164
  type: "radio",
109781
110165
  radio: "texture-quality",
109782
110166
  selected: browser .getBrowserOption ("TextureQuality") === "MEDIUM",
@@ -109784,12 +110168,12 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
109784
110168
  click: () =>
109785
110169
  {
109786
110170
  browser .setBrowserOption ("TextureQuality", "MEDIUM");
109787
- browser .getNotification () ._string = locale_gettext("Texture Quality") + ": " + locale_gettext("medium");
110171
+ browser .getNotification () ._string = gettext("Texture Quality") + ": " + gettext("medium");
109788
110172
  },
109789
110173
  },
109790
110174
  },
109791
110175
  "low": {
109792
- name: locale_gettext("Low"),
110176
+ name: gettext("Low"),
109793
110177
  type: "radio",
109794
110178
  radio: "texture-quality",
109795
110179
  selected: browser .getBrowserOption ("TextureQuality") === "LOW",
@@ -109797,18 +110181,18 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
109797
110181
  click: () =>
109798
110182
  {
109799
110183
  browser .setBrowserOption ("TextureQuality", "LOW");
109800
- browser .getNotification () ._string = locale_gettext("Texture Quality") + ": " + locale_gettext("low");
110184
+ browser .getNotification () ._string = gettext("Texture Quality") + ": " + gettext("low");
109801
110185
  },
109802
110186
  },
109803
110187
  },
109804
110188
  },
109805
110189
  },
109806
110190
  "shading": {
109807
- name: locale_gettext("Shading"),
110191
+ name: gettext("Shading"),
109808
110192
  className: "context-menu-icon x_ite-private-icon-shading",
109809
110193
  items: {
109810
110194
  "point": {
109811
- name: locale_gettext("Points"),
110195
+ name: gettext("Points"),
109812
110196
  type: "radio",
109813
110197
  radio: "shading",
109814
110198
  selected: browser .getBrowserOption ("Shading") === "POINT",
@@ -109816,12 +110200,12 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
109816
110200
  click: () =>
109817
110201
  {
109818
110202
  browser .setBrowserOption ("Shading", "POINT");
109819
- browser .getNotification () ._string = locale_gettext("Shading") + ": " + locale_gettext("Points");
110203
+ browser .getNotification () ._string = gettext("Shading") + ": " + gettext("Points");
109820
110204
  },
109821
110205
  },
109822
110206
  },
109823
110207
  "wireframe": {
109824
- name: locale_gettext("Wireframe"),
110208
+ name: gettext("Wireframe"),
109825
110209
  type: "radio",
109826
110210
  radio: "shading",
109827
110211
  selected: browser .getBrowserOption ("Shading") === "WIREFRAME",
@@ -109829,12 +110213,12 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
109829
110213
  click: () =>
109830
110214
  {
109831
110215
  browser .setBrowserOption ("Shading", "WIREFRAME");
109832
- browser .getNotification () ._string = locale_gettext("Shading") + ": " + locale_gettext("Wireframe");
110216
+ browser .getNotification () ._string = gettext("Shading") + ": " + gettext("Wireframe");
109833
110217
  },
109834
110218
  },
109835
110219
  },
109836
110220
  "flat": {
109837
- name: locale_gettext("Flat"),
110221
+ name: gettext("Flat"),
109838
110222
  type: "radio",
109839
110223
  radio: "shading",
109840
110224
  selected: browser .getBrowserOption ("Shading") === "FLAT",
@@ -109842,12 +110226,12 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
109842
110226
  click: () =>
109843
110227
  {
109844
110228
  browser .setBrowserOption ("Shading", "FLAT");
109845
- browser .getNotification () ._string = locale_gettext("Shading") + ": " + locale_gettext("Flat");
110229
+ browser .getNotification () ._string = gettext("Shading") + ": " + gettext("Flat");
109846
110230
  },
109847
110231
  },
109848
110232
  },
109849
110233
  "gouraud": {
109850
- name: locale_gettext("Gouraud"),
110234
+ name: gettext("Gouraud"),
109851
110235
  type: "radio",
109852
110236
  radio: "shading",
109853
110237
  selected: browser .getBrowserOption ("Shading") === "GOURAUD",
@@ -109855,12 +110239,12 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
109855
110239
  click: () =>
109856
110240
  {
109857
110241
  browser .setBrowserOption ("Shading", "GOURAUD");
109858
- browser .getNotification () ._string = locale_gettext("Shading") + ": " + locale_gettext("Gouraud");
110242
+ browser .getNotification () ._string = gettext("Shading") + ": " + gettext("Gouraud");
109859
110243
  },
109860
110244
  },
109861
110245
  },
109862
110246
  "phong": {
109863
- name: locale_gettext("Phong"),
110247
+ name: gettext("Phong"),
109864
110248
  type: "radio",
109865
110249
  radio: "shading",
109866
110250
  selected: browser .getBrowserOption ("Shading") === "PHONG",
@@ -109868,7 +110252,7 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
109868
110252
  click: () =>
109869
110253
  {
109870
110254
  browser .setBrowserOption ("Shading", "PHONG");
109871
- browser .getNotification () ._string = locale_gettext("Shading") + ": " + locale_gettext("Phong");
110255
+ browser .getNotification () ._string = gettext("Shading") + ": " + gettext("Phong");
109872
110256
  },
109873
110257
  },
109874
110258
  },
@@ -109876,7 +110260,7 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
109876
110260
  },
109877
110261
  "separator2": "--------",
109878
110262
  "browser-timings": {
109879
- name: locale_gettext("Browser Timings"),
110263
+ name: gettext("Browser Timings"),
109880
110264
  type: "checkbox",
109881
110265
  selected: browser .getBrowserOption ("Timings"),
109882
110266
  events: {
@@ -109888,7 +110272,7 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
109888
110272
  },
109889
110273
  },
109890
110274
  "fullscreen": {
109891
- name: fullscreen ? locale_gettext("Leave Fullscreen") : locale_gettext("Fullscreen"),
110275
+ name: fullscreen ? gettext("Leave Fullscreen") : gettext("Fullscreen"),
109892
110276
  className: "context-menu-icon " + (fullscreen
109893
110277
  ? "x_ite-private-icon-leave-fullscreen"
109894
110278
  : "x_ite-private-icon-enter-fullscreen"),
@@ -109906,7 +110290,7 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
109906
110290
  Object .assign (menu .items, {
109907
110291
  "separator4": "--------",
109908
110292
  "world-info": {
109909
- name: locale_gettext("Show World Info"),
110293
+ name: gettext("Show World Info"),
109910
110294
  className: "context-menu-icon x_ite-private-icon-world-info",
109911
110295
  callback ()
109912
110296
  {
@@ -109936,7 +110320,7 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
109936
110320
  },
109937
110321
  },
109938
110322
  "about": {
109939
- name: locale_gettext("About X_ITE"),
110323
+ name: gettext("About X_ITE"),
109940
110324
  className: "context-menu-icon x_ite-private-icon-help-about",
109941
110325
  callback ()
109942
110326
  {
@@ -110026,12 +110410,12 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
110026
110410
  for (const viewer of availableViewers)
110027
110411
  {
110028
110412
  menu [viewer] = {
110029
- name: locale_gettext(this .getViewerName (viewer)),
110413
+ name: gettext(this .getViewerName (viewer)),
110030
110414
  className: "context-menu-icon x_ite-private-icon-" + viewer .toLowerCase () + "-viewer",
110031
110415
  callback: () =>
110032
110416
  {
110033
110417
  browser ._viewer = viewer;
110034
- browser .getNotification () ._string = locale_gettext(this .getViewerName (viewer));
110418
+ browser .getNotification () ._string = gettext(this .getViewerName (viewer));
110035
110419
  browser .getSurface () .focus ();
110036
110420
  },
110037
110421
  };
@@ -110047,17 +110431,17 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
110047
110431
  switch (viewer)
110048
110432
  {
110049
110433
  case "EXAMINE":
110050
- return locale_gettext("Examine Viewer");
110434
+ return gettext("Examine Viewer");
110051
110435
  case "WALK":
110052
- return locale_gettext("Walk Viewer");
110436
+ return gettext("Walk Viewer");
110053
110437
  case "FLY":
110054
- return locale_gettext("Fly Viewer");
110438
+ return gettext("Fly Viewer");
110055
110439
  case "PLANE":
110056
- return locale_gettext("Plane Viewer");
110440
+ return gettext("Plane Viewer");
110057
110441
  case "LOOKAT":
110058
- return locale_gettext("Look At Viewer");
110442
+ return gettext("Look At Viewer");
110059
110443
  case "NONE":
110060
- return locale_gettext("None Viewer");
110444
+ return gettext("None Viewer");
110061
110445
  }
110062
110446
  },
110063
110447
  init (options)
@@ -111373,7 +111757,7 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
111373
111757
 
111374
111758
  this .updateExportedNode (exportedName, node);
111375
111759
 
111376
- this ._exportedNodes_changed = this .getBrowser () .getCurrentTime ();
111760
+ this ._sceneGraph_changed = this .getBrowser () .getCurrentTime ();
111377
111761
  },
111378
111762
  updateExportedNode (exportedName, node)
111379
111763
  {
@@ -111393,7 +111777,7 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
111393
111777
 
111394
111778
  this [_exportedNodes] .update (exportedName, exportedName, exportedNode);
111395
111779
 
111396
- this ._exportedNodes_changed = this .getBrowser () .getCurrentTime ();
111780
+ this ._sceneGraph_changed = this .getBrowser () .getCurrentTime ();
111397
111781
  },
111398
111782
  removeExportedNode (exportedName)
111399
111783
  {
@@ -111401,7 +111785,7 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
111401
111785
 
111402
111786
  this [_exportedNodes] .remove (exportedName);
111403
111787
 
111404
- this ._exportedNodes_changed = this .getBrowser () .getCurrentTime ();
111788
+ this ._sceneGraph_changed = this .getBrowser () .getCurrentTime ();
111405
111789
  },
111406
111790
  getExportedNode (exportedName)
111407
111791
  {
@@ -112309,7 +112693,7 @@ const DataStorage_default_ = DataStorage;
112309
112693
  x_ite_Namespace .add ("DataStorage", "standard/Utility/DataStorage", DataStorage_default_);
112310
112694
  /* harmony default export */ const Utility_DataStorage = (DataStorage_default_);
112311
112695
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/X3DCoreContext.js
112312
- /* provided dependency */ var X3DCoreContext_$ = __webpack_require__(237);
112696
+ /* provided dependency */ var X3DCoreContext_$ = __webpack_require__(275);
112313
112697
  /*******************************************************************************
112314
112698
  *
112315
112699
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -113020,7 +113404,7 @@ Object .assign (X3DCoreContext .prototype,
113020
113404
  text += "\n";
113021
113405
 
113022
113406
  this .copyToClipboard (text);
113023
- this .getNotification () ._string = locale_gettext ("Viewpoint copied to clipboard.");
113407
+ this .getNotification () ._string = gettext ("Viewpoint copied to clipboard.");
113024
113408
 
113025
113409
  console .log ("Viewpoint copied to clipboard.");
113026
113410
  console .debug (text);
@@ -114832,8 +115216,8 @@ const X3DViewer_default_ = X3DViewer;
114832
115216
  x_ite_Namespace .add ("X3DViewer", "x_ite/Browser/Navigation/X3DViewer", X3DViewer_default_);
114833
115217
  /* harmony default export */ const Navigation_X3DViewer = (X3DViewer_default_);
114834
115218
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/ExamineViewer.js
114835
- /* provided dependency */ var jquery_mousewheel = __webpack_require__(789);
114836
- /* provided dependency */ var ExamineViewer_$ = __webpack_require__(237);
115219
+ /* provided dependency */ var jquery_mousewheel = __webpack_require__(419);
115220
+ /* provided dependency */ var ExamineViewer_$ = __webpack_require__(275);
114837
115221
  /*******************************************************************************
114838
115222
  *
114839
115223
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -115705,8 +116089,8 @@ const ExamineViewer_default_ = ExamineViewer;
115705
116089
  x_ite_Namespace .add ("ExamineViewer", "x_ite/Browser/Navigation/ExamineViewer", ExamineViewer_default_);
115706
116090
  /* harmony default export */ const Navigation_ExamineViewer = (ExamineViewer_default_);
115707
116091
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/X3DFlyViewer.js
115708
- /* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(789);
115709
- /* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(237);
116092
+ /* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(419);
116093
+ /* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(275);
115710
116094
  /*******************************************************************************
115711
116095
  *
115712
116096
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -116715,8 +117099,8 @@ const FlyViewer_default_ = FlyViewer;
116715
117099
  x_ite_Namespace .add ("FlyViewer", "x_ite/Browser/Navigation/FlyViewer", FlyViewer_default_);
116716
117100
  /* harmony default export */ const Navigation_FlyViewer = (FlyViewer_default_);
116717
117101
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/PlaneViewer.js
116718
- /* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(789);
116719
- /* provided dependency */ var PlaneViewer_$ = __webpack_require__(237);
117102
+ /* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(419);
117103
+ /* provided dependency */ var PlaneViewer_$ = __webpack_require__(275);
116720
117104
  /*******************************************************************************
116721
117105
  *
116722
117106
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -117047,8 +117431,8 @@ const NoneViewer_default_ = NoneViewer;
117047
117431
  x_ite_Namespace .add ("NoneViewer", "x_ite/Browser/Navigation/NoneViewer", NoneViewer_default_);
117048
117432
  /* harmony default export */ const Navigation_NoneViewer = (NoneViewer_default_);
117049
117433
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/LookAtViewer.js
117050
- /* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(789);
117051
- /* provided dependency */ var LookAtViewer_$ = __webpack_require__(237);
117434
+ /* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(419);
117435
+ /* provided dependency */ var LookAtViewer_$ = __webpack_require__(275);
117052
117436
  /*******************************************************************************
117053
117437
  *
117054
117438
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -118006,12 +118390,12 @@ Object .assign (X3DNetworkingContext .prototype,
118006
118390
  if (this ._loadCount .getValue () || this [_loading])
118007
118391
  {
118008
118392
  var string = ((loadingDisplay || 1) === 1
118009
- ? locale_gettext ("Loading %1 file")
118010
- : locale_gettext ("Loading %1 files")) .replace ("%1", loadingDisplay || 1);
118393
+ ? gettext ("Loading %1 file")
118394
+ : gettext ("Loading %1 files")) .replace ("%1", loadingDisplay || 1);
118011
118395
  }
118012
118396
  else
118013
118397
  {
118014
- var string = locale_gettext("Loading done");
118398
+ var string = gettext("Loading done");
118015
118399
  this .setCursor ("DEFAULT");
118016
118400
  }
118017
118401
 
@@ -118187,8 +118571,8 @@ const X3DPickingContext_default_ = X3DPickingContext;
118187
118571
  x_ite_Namespace .add ("X3DPickingContext", "x_ite/Browser/Picking/X3DPickingContext", X3DPickingContext_default_);
118188
118572
  /* harmony default export */ const Picking_X3DPickingContext = (X3DPickingContext_default_);
118189
118573
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js
118190
- /* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(789);
118191
- /* provided dependency */ var PointingDevice_$ = __webpack_require__(237);
118574
+ /* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(419);
118575
+ /* provided dependency */ var PointingDevice_$ = __webpack_require__(275);
118192
118576
  /*******************************************************************************
118193
118577
  *
118194
118578
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119008,34 +119392,36 @@ Object .assign (X3DPointingDeviceSensorContext .prototype,
119008
119392
  },
119009
119393
  getPointingShader (numClipPlanes, shapeNode, humanoidNode)
119010
119394
  {
119011
- const geometryContext = shapeNode .getGeometryContext ();
119395
+ const { geometryType, hasNormals } = shapeNode .getGeometryContext ();
119012
119396
 
119013
119397
  let key = "";
119014
119398
 
119015
119399
  key += numClipPlanes;
119016
119400
  key += ".";
119017
119401
  key += shapeNode .getShapeKey ();
119018
- key += geometryContext .geometryType;
119402
+ key += geometryType;
119403
+ key += hasNormals;
119019
119404
  key += ".";
119020
119405
  key += humanoidNode ?.getHumanoidKey () ?? "";
119021
119406
  key += ".";
119022
119407
 
119023
- if (geometryContext .geometryType >= 2)
119408
+ if (geometryType >= 2)
119024
119409
  {
119025
119410
  key += "0.0.0";
119026
119411
  }
119027
119412
  else
119028
119413
  {
119029
- const appearanceNode = shapeNode .getAppearance ();
119414
+ const appearanceNode = shapeNode .getAppearance ();
119030
119415
 
119031
- key += appearanceNode .getStyleProperties (geometryContext .geometryType) ? 1 : 0;
119416
+ key += appearanceNode .getStyleProperties (geometryType) ? 1 : 0;
119032
119417
  key += ".";
119033
119418
  key += appearanceNode .getTextureBits () .toString (16); // Textures for point and line.
119034
119419
  key += ".";
119035
119420
  key += appearanceNode .getMaterial () .getTextureBits () .toString (16); // Textures for point and line.
119036
119421
  }
119037
119422
 
119038
- return this [_pointingShaders] .get (key) || this .createPointingShader (key, numClipPlanes, shapeNode, humanoidNode);
119423
+ return this [_pointingShaders] .get (key)
119424
+ ?? this .createPointingShader (key, numClipPlanes, shapeNode, humanoidNode);
119039
119425
  },
119040
119426
  createPointingShader (key, numClipPlanes, shapeNode, humanoidNode)
119041
119427
  {
@@ -119044,14 +119430,25 @@ Object .assign (X3DPointingDeviceSensorContext .prototype,
119044
119430
  geometryContext = shapeNode .getGeometryContext (),
119045
119431
  options = [ ];
119046
119432
 
119433
+ if (geometryContext .hasNormals)
119434
+ options .push ("X3D_NORMALS");
119435
+
119047
119436
  if (numClipPlanes)
119048
119437
  {
119049
119438
  options .push ("X3D_CLIP_PLANES");
119050
119439
  options .push ("X3D_NUM_CLIP_PLANES " + numClipPlanes);
119051
119440
  }
119052
119441
 
119053
- if (shapeNode .getShapeKey () > 0)
119054
- options .push ("X3D_PARTICLE_SYSTEM");
119442
+ switch (shapeNode .getShapeKey ())
119443
+ {
119444
+ case 1:
119445
+ case 2:
119446
+ options .push ("X3D_INSTANCING");
119447
+ break;
119448
+ case 3:
119449
+ options .push ("X3D_INSTANCING", "X3D_INSTANCE_NORMAL");
119450
+ break;
119451
+ }
119055
119452
 
119056
119453
  options .push (`X3D_GEOMETRY_${geometryContext .geometryType}D`);
119057
119454
 
@@ -119479,7 +119876,7 @@ const MultiSampleFrameBuffer_default_ = MultiSampleFrameBuffer;
119479
119876
  x_ite_Namespace .add ("MultiSampleFrameBuffer", "x_ite/Rendering/MultiSampleFrameBuffer", MultiSampleFrameBuffer_default_);
119480
119877
  /* harmony default export */ const Rendering_MultiSampleFrameBuffer = (MultiSampleFrameBuffer_default_);
119481
119878
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/X3DRenderingContext.js
119482
- /* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(237);
119879
+ /* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(275);
119483
119880
  /*******************************************************************************
119484
119881
  *
119485
119882
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119701,7 +120098,8 @@ Object .assign (X3DRenderingContext .prototype,
119701
120098
  key += appearanceNode .getMaterial () .getTextureBits () .toString (16); // Textures for point and line.
119702
120099
  }
119703
120100
 
119704
- return this [_depthShaders] .get (key) || this .createDepthShader (key, numClipPlanes, shapeNode, humanoidNode);
120101
+ return this [_depthShaders] .get (key)
120102
+ ?? this .createDepthShader (key, numClipPlanes, shapeNode, humanoidNode);
119705
120103
  },
119706
120104
  createDepthShader (key, numClipPlanes, shapeNode, humanoidNode)
119707
120105
  {
@@ -119717,7 +120115,7 @@ Object .assign (X3DRenderingContext .prototype,
119717
120115
  }
119718
120116
 
119719
120117
  if (shapeNode .getShapeKey () > 0)
119720
- options .push ("X3D_PARTICLE_SYSTEM");
120118
+ options .push ("X3D_INSTANCING");
119721
120119
 
119722
120120
  options .push (`X3D_GEOMETRY_${geometryContext .geometryType}D`);
119723
120121
 
@@ -120391,7 +120789,7 @@ const X3DSoundContext_default_ = X3DSoundContext;
120391
120789
  x_ite_Namespace .add ("X3DSoundContext", "x_ite/Browser/Sound/X3DSoundContext", X3DSoundContext_default_);
120392
120790
  /* harmony default export */ const Sound_X3DSoundContext = (X3DSoundContext_default_);
120393
120791
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/KTXDecoder.js
120394
- /* provided dependency */ var KTXDecoder_$ = __webpack_require__(237);
120792
+ /* provided dependency */ var KTXDecoder_$ = __webpack_require__(275);
120395
120793
  const KTXDecoder_default_ = class KTXDecoder
120396
120794
  {
120397
120795
  constructor (gl, externalKtxlib, scriptDir)
@@ -121945,7 +122343,7 @@ const Components_default_ = Components;
121945
122343
  x_ite_Namespace .add ("Components", "x_ite/Components", Components_default_);
121946
122344
  /* harmony default export */ const x_ite_Components = ((/* unused pure expression or super */ null && (Components_default_)));
121947
122345
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/DOMIntegration.js
121948
- /* provided dependency */ var DOMIntegration_$ = __webpack_require__(237);
122346
+ /* provided dependency */ var DOMIntegration_$ = __webpack_require__(275);
121949
122347
  /*******************************************************************************
121950
122348
  * MIT License
121951
122349
  *
@@ -123078,7 +123476,7 @@ const SupportedProfiles_default_ = SupportedProfiles;
123078
123476
  x_ite_Namespace .add ("SupportedProfiles", "x_ite/Configuration/SupportedProfiles", SupportedProfiles_default_);
123079
123477
  /* harmony default export */ const Configuration_SupportedProfiles = (SupportedProfiles_default_);
123080
123478
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/X3DBrowser.js
123081
- /* provided dependency */ var X3DBrowser_$ = __webpack_require__(237);
123479
+ /* provided dependency */ var X3DBrowser_$ = __webpack_require__(275);
123082
123480
  /*******************************************************************************
123083
123481
  *
123084
123482
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -123705,7 +124103,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
123705
124103
  {
123706
124104
  this .getSplashScreen ()
123707
124105
  .find (".x_ite-private-spinner-text")
123708
- .text (locale_gettext ("Failed loading world."));
124106
+ .text (gettext ("Failed loading world."));
123709
124107
  });
123710
124108
 
123711
124109
  reject (new Error ("Couldn't load X3D file."));
@@ -124170,7 +124568,7 @@ const X3DBrowser_default_ = X3DBrowser;
124170
124568
  x_ite_Namespace .add ("X3DBrowser", "x_ite/Browser/X3DBrowser", X3DBrowser_default_);
124171
124569
  /* harmony default export */ const Browser_X3DBrowser = (X3DBrowser_default_);
124172
124570
  ;// CONCATENATED MODULE: ./src/x_ite/X3DCanvasElement.js
124173
- /* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(237);
124571
+ /* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(275);
124174
124572
  /*******************************************************************************
124175
124573
  *
124176
124574
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -124307,8 +124705,8 @@ const X3DCanvasElement_default_ = X3DCanvasElement;
124307
124705
  x_ite_Namespace .add ("X3DCanvasElement", "x_ite/X3DCanvasElement", X3DCanvasElement_default_);
124308
124706
  /* harmony default export */ const x_ite_X3DCanvasElement = (X3DCanvasElement_default_);
124309
124707
  ;// CONCATENATED MODULE: ./src/lib/jquery.js
124310
- /* provided dependency */ var jquery_$ = __webpack_require__(237);
124311
- /* provided dependency */ var pako = __webpack_require__(121);
124708
+ /* provided dependency */ var jquery_$ = __webpack_require__(275);
124709
+ /* provided dependency */ var pako = __webpack_require__(35);
124312
124710
  Object .assign (jquery_$,
124313
124711
  {
124314
124712
  decodeText (input)
@@ -124385,14 +124783,14 @@ const jquery_default_ = jquery_$;
124385
124783
  x_ite_Namespace .add ("jquery", "lib/jquery", jquery_default_);
124386
124784
  /* harmony default export */ const jquery = ((/* unused pure expression or super */ null && (jquery_default_)));
124387
124785
  ;// CONCATENATED MODULE: ./src/lib/libtess.js
124388
- /* provided dependency */ var libtess_libtess = __webpack_require__(414);
124786
+ /* provided dependency */ var libtess_libtess = __webpack_require__(224);
124389
124787
  const libtess_default_ = libtess_libtess;
124390
124788
  ;
124391
124789
 
124392
124790
  x_ite_Namespace .add ("libtess", "lib/libtess", libtess_default_);
124393
124791
  /* harmony default export */ const lib_libtess = ((/* unused pure expression or super */ null && (libtess_default_)));
124394
124792
  ;// CONCATENATED MODULE: ./src/x_ite/X3D.js
124395
- /* provided dependency */ var X3D_$ = __webpack_require__(237);
124793
+ /* provided dependency */ var X3D_$ = __webpack_require__(275);
124396
124794
  /*******************************************************************************
124397
124795
  *
124398
124796
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -124700,7 +125098,7 @@ Object .assign (X3D,
124700
125098
 
124701
125099
  // Assign X3D to global namespace.
124702
125100
 
124703
- window [Symbol .for ("X_ITE.X3D-9.4.4")] = x_ite_X3D;
125101
+ window [Symbol .for ("X_ITE.X3D-9.5.0")] = x_ite_X3D;
124704
125102
 
124705
125103
  customElements .define ("x3d-canvas", x_ite_X3DCanvasElement);
124706
125104