x_ite 11.2.2 → 11.3.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 (129) hide show
  1. package/README.md +4 -4
  2. package/dist/assets/components/AnnotationComponent.js +3 -3
  3. package/dist/assets/components/AnnotationComponent.min.js +2 -2
  4. package/dist/assets/components/CADGeometryComponent.js +130 -58
  5. package/dist/assets/components/CADGeometryComponent.min.js +2 -2
  6. package/dist/assets/components/CubeMapTexturingComponent.js +4 -4
  7. package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
  8. package/dist/assets/components/DISComponent.js +2 -2
  9. package/dist/assets/components/DISComponent.min.js +2 -2
  10. package/dist/assets/components/EventUtilitiesComponent.js +2 -2
  11. package/dist/assets/components/EventUtilitiesComponent.min.js +2 -2
  12. package/dist/assets/components/Geometry2DComponent.js +2 -2
  13. package/dist/assets/components/Geometry2DComponent.min.js +2 -2
  14. package/dist/assets/components/GeospatialComponent.js +92 -127
  15. package/dist/assets/components/GeospatialComponent.min.js +2 -2
  16. package/dist/assets/components/HAnimComponent.js +16 -13
  17. package/dist/assets/components/HAnimComponent.min.js +2 -2
  18. package/dist/assets/components/KeyDeviceSensorComponent.js +2 -2
  19. package/dist/assets/components/KeyDeviceSensorComponent.min.js +2 -2
  20. package/dist/assets/components/LayoutComponent.js +22 -7
  21. package/dist/assets/components/LayoutComponent.min.js +2 -2
  22. package/dist/assets/components/NURBSComponent.js +2 -2
  23. package/dist/assets/components/NURBSComponent.min.js +2 -2
  24. package/dist/assets/components/ParticleSystemsComponent.js +38 -97
  25. package/dist/assets/components/ParticleSystemsComponent.min.js +2 -2
  26. package/dist/assets/components/PickingComponent.js +78 -81
  27. package/dist/assets/components/PickingComponent.min.js +2 -2
  28. package/dist/assets/components/RigidBodyPhysicsComponent.js +245 -292
  29. package/dist/assets/components/RigidBodyPhysicsComponent.min.js +2 -2
  30. package/dist/assets/components/ScriptingComponent.js +2 -2
  31. package/dist/assets/components/ScriptingComponent.min.js +2 -2
  32. package/dist/assets/components/TextComponent.js +16336 -14672
  33. package/dist/assets/components/TextComponent.min.js +2 -2
  34. package/dist/assets/components/TextureProjectionComponent.js +2 -2
  35. package/dist/assets/components/TextureProjectionComponent.min.js +2 -2
  36. package/dist/assets/components/Texturing3DComponent.js +29 -29
  37. package/dist/assets/components/Texturing3DComponent.min.js +2 -2
  38. package/dist/assets/components/VolumeRenderingComponent.js +15 -10
  39. package/dist/assets/components/VolumeRenderingComponent.min.js +2 -2
  40. package/dist/assets/components/WebXRComponent.js +121 -73
  41. package/dist/assets/components/WebXRComponent.min.js +2 -2
  42. package/dist/assets/components/X_ITEComponent.js +6 -66
  43. package/dist/assets/components/X_ITEComponent.min.js +2 -2
  44. package/dist/assets/fonts/Droid/DroidSerif-Bold.woff2 +0 -0
  45. package/dist/assets/fonts/Droid/DroidSerif-BoldItalic.woff2 +0 -0
  46. package/dist/assets/fonts/Droid/DroidSerif-Italic.woff2 +0 -0
  47. package/dist/assets/fonts/Droid/DroidSerif-Regular.woff2 +0 -0
  48. package/dist/assets/fonts/PT_Sans/PTSans-Bold.woff2 +0 -0
  49. package/dist/assets/fonts/PT_Sans/PTSans-BoldItalic.woff2 +0 -0
  50. package/dist/assets/fonts/PT_Sans/PTSans-Italic.woff2 +0 -0
  51. package/dist/assets/fonts/PT_Sans/PTSans-Regular.woff2 +0 -0
  52. package/dist/assets/fonts/Ubuntu/Ubuntu-B.woff2 +0 -0
  53. package/dist/assets/fonts/Ubuntu/Ubuntu-BI.woff2 +0 -0
  54. package/dist/assets/fonts/Ubuntu/Ubuntu-R.woff2 +0 -0
  55. package/dist/assets/fonts/Ubuntu/Ubuntu-RI.woff2 +0 -0
  56. package/dist/assets/fonts/Ubuntu/UbuntuMono-B.woff2 +0 -0
  57. package/dist/assets/fonts/Ubuntu/UbuntuMono-BI.woff2 +0 -0
  58. package/dist/assets/fonts/Ubuntu/UbuntuMono-R.woff2 +0 -0
  59. package/dist/assets/fonts/Ubuntu/UbuntuMono-RI.woff2 +0 -0
  60. package/dist/assets/hatching/1.png +0 -0
  61. package/dist/assets/hatching/10.png +0 -0
  62. package/dist/assets/hatching/11.png +0 -0
  63. package/dist/assets/hatching/12.png +0 -0
  64. package/dist/assets/hatching/13.png +0 -0
  65. package/dist/assets/hatching/14.png +0 -0
  66. package/dist/assets/hatching/15.png +0 -0
  67. package/dist/assets/hatching/16.png +0 -0
  68. package/dist/assets/hatching/17.png +0 -0
  69. package/dist/assets/hatching/18.png +0 -0
  70. package/dist/assets/hatching/19.png +0 -0
  71. package/dist/assets/hatching/2.png +0 -0
  72. package/dist/assets/hatching/3.png +0 -0
  73. package/dist/assets/hatching/4.png +0 -0
  74. package/dist/assets/hatching/5.png +0 -0
  75. package/dist/assets/hatching/6.png +0 -0
  76. package/dist/assets/hatching/7.png +0 -0
  77. package/dist/assets/hatching/8.png +0 -0
  78. package/dist/assets/hatching/9.png +0 -0
  79. package/dist/assets/images/ExamineViewer.png +0 -0
  80. package/dist/assets/images/FlyViewer.png +0 -0
  81. package/dist/assets/images/NoneViewer.png +0 -0
  82. package/dist/assets/images/PlaneViewer.png +0 -0
  83. package/dist/assets/images/PrimitiveQuality.png +0 -0
  84. package/dist/assets/images/Shading.png +0 -0
  85. package/dist/assets/images/TextureQuality.png +0 -0
  86. package/dist/assets/images/Time.png +0 -0
  87. package/dist/assets/images/Viewpoint.png +0 -0
  88. package/dist/assets/images/WalkViewer.png +0 -0
  89. package/dist/assets/images/go-next.png +0 -0
  90. package/dist/assets/images/gtk-fullscreen.png +0 -0
  91. package/dist/assets/images/gtk-leave-fullscreen.png +0 -0
  92. package/dist/assets/images/gtk-zoom-fit.png +0 -0
  93. package/dist/assets/images/gtk-zoom-in.png +0 -0
  94. package/dist/assets/images/help-about.png +0 -0
  95. package/dist/assets/images/icon.bw.png +0 -0
  96. package/dist/assets/images/icon.png +0 -0
  97. package/dist/assets/images/logo.128.png +0 -0
  98. package/dist/assets/images/logo.bw.png +0 -0
  99. package/dist/assets/images/logo.png +0 -0
  100. package/dist/assets/lib/decompress_binding.js +1 -0
  101. package/dist/assets/lib/lut_charlie.png +0 -0
  102. package/dist/assets/lib/lut_ggx.png +0 -0
  103. package/dist/assets/lib/lut_sheen_E.png +0 -0
  104. package/dist/assets/linetype/linetypes.png +0 -0
  105. package/dist/example.html +1 -1
  106. package/dist/x_ite.css +1 -1
  107. package/dist/x_ite.d.ts +1 -1
  108. package/dist/x_ite.js +53942 -53841
  109. package/dist/x_ite.min.js +2 -2
  110. package/dist/x_ite.min.mjs +2 -2
  111. package/dist/x_ite.mjs +54498 -54397
  112. package/dist/x_ite.zip +0 -0
  113. package/package.json +3 -2
  114. package/dist/assets/fonts/Droid/DroidSerif-Bold.ttf +0 -0
  115. package/dist/assets/fonts/Droid/DroidSerif-BoldItalic.ttf +0 -0
  116. package/dist/assets/fonts/Droid/DroidSerif-Italic.ttf +0 -0
  117. package/dist/assets/fonts/Droid/DroidSerif-Regular.ttf +0 -0
  118. package/dist/assets/fonts/PT_Sans/PTSans-Bold.ttf +0 -0
  119. package/dist/assets/fonts/PT_Sans/PTSans-BoldItalic.ttf +0 -0
  120. package/dist/assets/fonts/PT_Sans/PTSans-Italic.ttf +0 -0
  121. package/dist/assets/fonts/PT_Sans/PTSans-Regular.ttf +0 -0
  122. package/dist/assets/fonts/Ubuntu/Ubuntu-B.ttf +0 -0
  123. package/dist/assets/fonts/Ubuntu/Ubuntu-BI.ttf +0 -0
  124. package/dist/assets/fonts/Ubuntu/Ubuntu-R.ttf +0 -0
  125. package/dist/assets/fonts/Ubuntu/Ubuntu-RI.ttf +0 -0
  126. package/dist/assets/fonts/Ubuntu/UbuntuMono-B.ttf +0 -0
  127. package/dist/assets/fonts/Ubuntu/UbuntuMono-BI.ttf +0 -0
  128. package/dist/assets/fonts/Ubuntu/UbuntuMono-R.ttf +0 -0
  129. package/dist/assets/fonts/Ubuntu/UbuntuMono-RI.ttf +0 -0
@@ -1,9 +1,41 @@
1
- /* X_ITE v11.2.2 */
2
- const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.2.2")];
1
+ /* X_ITE v11.3.0 */
2
+ const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.3.0")];
3
3
  /******/ (() => { // webpackBootstrap
4
4
  /******/ "use strict";
5
- /******/ // The require scope
6
- /******/ var __webpack_require__ = {};
5
+ /******/ var __webpack_modules__ = ({
6
+
7
+ /***/ 254:
8
+ /***/ ((module) => {
9
+
10
+ module.exports = __X_ITE_X3D__ .jquery;
11
+
12
+ /***/ })
13
+
14
+ /******/ });
15
+ /************************************************************************/
16
+ /******/ // The module cache
17
+ /******/ var __webpack_module_cache__ = {};
18
+ /******/
19
+ /******/ // The require function
20
+ /******/ function __webpack_require__(moduleId) {
21
+ /******/ // Check if module is in cache
22
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
23
+ /******/ if (cachedModule !== undefined) {
24
+ /******/ return cachedModule.exports;
25
+ /******/ }
26
+ /******/ // Create a new module (and put it into the cache)
27
+ /******/ var module = __webpack_module_cache__[moduleId] = {
28
+ /******/ // no module.id needed
29
+ /******/ // no module.loaded needed
30
+ /******/ exports: {}
31
+ /******/ };
32
+ /******/
33
+ /******/ // Execute the module function
34
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
35
+ /******/
36
+ /******/ // Return the exports of the module
37
+ /******/ return module.exports;
38
+ /******/ }
7
39
  /******/
8
40
  /************************************************************************/
9
41
  /******/ /* webpack/runtime/compat get default export */
@@ -297,8 +329,7 @@ var external_X_ITE_X3D_Lock_default = /*#__PURE__*/__webpack_require__.n(externa
297
329
  ;// external "__X_ITE_X3D__ .ExamineViewer"
298
330
  const external_X_ITE_X3D_ExamineViewer_namespaceObject = __X_ITE_X3D__ .ExamineViewer;
299
331
  var external_X_ITE_X3D_ExamineViewer_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_ExamineViewer_namespaceObject);
300
- ;// ./src/x_ite/Browser/WebXR/WebXRExamineViewer.js
301
-
332
+ ;// ./src/x_ite/Browser/WebXR/xrExamineViewer.js
302
333
 
303
334
 
304
335
  const
@@ -354,7 +385,7 @@ Object .assign ((external_X_ITE_X3D_ExamineViewer_default()).prototype,
354
385
  {
355
386
  // Rotate
356
387
 
357
- this .startRotate (0, 0);
388
+ this .startRotate (0, 0, 1);
358
389
  this .rotate (-gamepad .axes [2] * GAMEPAD_SPIN_FACTOR * f, gamepad .axes [3] * GAMEPAD_SPIN_FACTOR * f);
359
390
  }
360
391
  },
@@ -363,7 +394,7 @@ Object .assign ((external_X_ITE_X3D_ExamineViewer_default()).prototype,
363
394
  ;// external "__X_ITE_X3D__ .X3DFlyViewer"
364
395
  const external_X_ITE_X3D_X3DFlyViewer_namespaceObject = __X_ITE_X3D__ .X3DFlyViewer;
365
396
  var external_X_ITE_X3D_X3DFlyViewer_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DFlyViewer_namespaceObject);
366
- ;// ./src/x_ite/Browser/WebXR/WebXRX3DFlyViewer.js
397
+ ;// ./src/x_ite/Browser/WebXR/xrX3DFlyViewer.js
367
398
 
368
399
 
369
400
 
@@ -419,7 +450,7 @@ Object .assign ((external_X_ITE_X3D_X3DFlyViewer_default()).prototype,
419
450
  ;// external "__X_ITE_X3D__ .X3DViewer"
420
451
  const external_X_ITE_X3D_X3DViewer_namespaceObject = __X_ITE_X3D__ .X3DViewer;
421
452
  var external_X_ITE_X3D_X3DViewer_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DViewer_namespaceObject);
422
- ;// ./src/x_ite/Browser/WebXR/WebXRX3DViewer.js
453
+ ;// ./src/x_ite/Browser/WebXR/xrX3DViewer.js
423
454
 
424
455
 
425
456
  Object .assign ((external_X_ITE_X3D_X3DViewer_default()).prototype,
@@ -429,6 +460,7 @@ Object .assign ((external_X_ITE_X3D_X3DViewer_default()).prototype,
429
460
  });
430
461
 
431
462
  ;// ./src/x_ite/Browser/WebXR/X3DWebXRContext.js
463
+ /* provided dependency */ var $ = __webpack_require__(254);
432
464
  /*******************************************************************************
433
465
  *
434
466
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -490,9 +522,11 @@ Object .assign ((external_X_ITE_X3D_X3DViewer_default()).prototype,
490
522
 
491
523
 
492
524
  const
525
+ _sessionLock = Symbol (),
493
526
  _referenceSpace = Symbol (),
494
527
  _baseLayer = Symbol (),
495
528
  _pose = Symbol (),
529
+ _visible = Symbol (),
496
530
  _inputSources = Symbol (),
497
531
  _inputRay = Symbol (),
498
532
  _inputPoint = Symbol (),
@@ -510,9 +544,34 @@ Object .assign (X3DWebXRContext .prototype,
510
544
  {
511
545
  return this [_pose];
512
546
  },
513
- async initXRSession ()
547
+ xrAddButton ()
514
548
  {
515
- return external_X_ITE_X3D_Lock_default().acquire (`X3DWebXRContext.session-${this .getId ()}`, async () =>
549
+ if (!this .getBrowserOption ("XRButton"))
550
+ return;
551
+
552
+ $("<div></div>")
553
+ .attr ("part", "xr-button")
554
+ .attr ("title", "Start WebXR session.")
555
+ .addClass ("x_ite-private-xr-button")
556
+ .on ("mousedown touchstart", false)
557
+ .on ("mouseup touchend", event =>
558
+ {
559
+ event .preventDefault ();
560
+ event .stopImmediatePropagation ();
561
+ event .stopPropagation ();
562
+
563
+ this .startAudioElements ();
564
+
565
+ if (this .getSession () === window)
566
+ this .xrStartSession ();
567
+ else
568
+ this .xrStopSession ();
569
+ })
570
+ .appendTo (this .getSurface ());
571
+ },
572
+ async xrStartSession ()
573
+ {
574
+ return external_X_ITE_X3D_Lock_default().acquire (_sessionLock, async () =>
516
575
  {
517
576
  if (this .getSession () !== window)
518
577
  return;
@@ -520,25 +579,21 @@ Object .assign (X3DWebXRContext .prototype,
520
579
  const
521
580
  gl = this .getContext (),
522
581
  mode = this .getBrowserOption ("XRSessionMode") .toLowerCase () .replaceAll ("_", "-"),
523
- compatible = await gl .makeXRCompatible (),
524
582
  session = await navigator .xr .requestSession (mode),
525
- referenceSpace = await session .requestReferenceSpace ("local");
583
+ referenceSpace = await session .requestReferenceSpace ("local"),
584
+ compatible = await gl .makeXRCompatible ();
526
585
 
527
- // WebXR Emulator: must bind default framebuffer, to get xr emulator working.
528
- gl .bindFramebuffer (gl .FRAMEBUFFER, null);
529
-
530
- this .cameraEvents () .addInterest ("xrUpdatePose", this);
531
586
  this .finishedEvents () .addInterest ("xrUpdatePointers", this);
532
- this .endEvents () .addInterest ("xrEndFrame", this);
533
587
 
588
+ session .addEventListener ("visibilitychange", () => this .xrUpdateVisibility ());
534
589
  session .addEventListener ("inputsourceschange", event => this .xrUpdateInputSources (event));
535
- session .addEventListener ("end", () => this .stopXRSession ());
590
+ session .addEventListener ("end", () => this .xrStopSession ());
536
591
 
537
592
  this [_referenceSpace] = referenceSpace;
538
-
539
- this [_inputSources] = new Set ();
540
- this [_inputRay] = new (external_X_ITE_X3D_ScreenLine_default()) (this, 4, 2, 0.9);
541
- this [_inputPoint] = new Rendering_ScreenPoint (this);
593
+ this [_visible] = true;
594
+ this [_inputSources] = new Set ();
595
+ this [_inputRay] = new (external_X_ITE_X3D_ScreenLine_default()) (this, 4, 2, 0.9);
596
+ this [_inputPoint] = new Rendering_ScreenPoint (this);
542
597
 
543
598
  Object .assign (this [_gamepads], { action: true });
544
599
 
@@ -568,18 +623,16 @@ Object .assign (X3DWebXRContext .prototype,
568
623
  // });
569
624
  });
570
625
  },
571
- stopXRSession ()
626
+ xrStopSession ()
572
627
  {
573
- return external_X_ITE_X3D_Lock_default().acquire (`X3DWebXRContext.session-${this .getId ()}`, async () =>
628
+ return external_X_ITE_X3D_Lock_default().acquire (_sessionLock, async () =>
574
629
  {
575
630
  if (this .getSession () === window)
576
631
  return;
577
632
 
578
633
  await this .getSession () .end () .catch (Function .prototype);
579
634
 
580
- this .cameraEvents () .removeInterest ("xrUpdatePose", this);
581
635
  this .finishedEvents () .removeInterest ("xrUpdatePointers", this);
582
- this .endEvents () .removeInterest ("xrEndFrame", this);
583
636
 
584
637
  this .setSession (window);
585
638
  this .setDefaultFramebuffer (null);
@@ -590,6 +643,7 @@ Object .assign (X3DWebXRContext .prototype,
590
643
  this [_referenceSpace] = null;
591
644
  this [_baseLayer] = null;
592
645
  this [_pose] = null;
646
+ this [_visible] = false;
593
647
  this [_inputSources] = null;
594
648
  this [_inputRay] = null;
595
649
  this [_inputPoint] = null;
@@ -650,6 +704,20 @@ Object .assign (X3DWebXRContext .prototype,
650
704
  this .getSession () .updateRenderState (nearFarPlanes);
651
705
  };
652
706
  })(),
707
+ xrUpdateVisibility (event)
708
+ {
709
+ switch (this .getSession () .visibilityState)
710
+ {
711
+ case "visible-blurred":
712
+ case "hidden":
713
+ this [_visible] = false;
714
+ break;
715
+
716
+ default:
717
+ this [_visible] = true;
718
+ break;
719
+ }
720
+ },
653
721
  xrUpdateInputSources (event)
654
722
  {
655
723
  for (const inputSource of event .added)
@@ -679,35 +747,15 @@ Object .assign (X3DWebXRContext .prototype,
679
747
  this .removeHit (inputSource .hit);
680
748
  this [_inputSources] .delete (inputSource);
681
749
  }
750
+
751
+ this .xrUpdateGamepads ();
682
752
  },
683
- xrFrame (frame)
753
+ xrUpdateGamepads ()
684
754
  {
685
- if (!frame)
686
- return;
687
-
688
- this [_frame] = frame;
689
-
690
- // Emulator
691
-
692
- const emulator = !this .getCanvas () .parent () .is (this .getSurface ());
693
-
694
- // WebXR Emulator or polyfill.
695
- if (emulator)
696
- this .getCanvas () .css (this .getXREmulatorCSS ());
697
-
698
- // Projection matrix
699
-
700
- this .xrUpdateNearFarPlanes ();
701
-
702
- // Navigation
703
-
704
755
  this [_gamepads] .length = 0;
705
756
 
706
- for (const { active, gamepad } of this [_inputSources])
757
+ for (const { gamepad } of this [_inputSources])
707
758
  {
708
- if (!active)
709
- continue;
710
-
711
759
  if (!gamepad)
712
760
  continue;
713
761
 
@@ -716,8 +764,22 @@ Object .assign (X3DWebXRContext .prototype,
716
764
 
717
765
  this [_gamepads] .push (gamepad);
718
766
  }
767
+ },
768
+ xrFrame (frame)
769
+ {
770
+ if (!frame)
771
+ return;
772
+
773
+ this [_frame] = frame;
774
+
775
+ // Projection matrix
776
+
777
+ this .xrUpdateNearFarPlanes ();
778
+
779
+ // Navigation
719
780
 
720
781
  this .getViewer () .gamepads (this [_gamepads]);
782
+ this .xrUpdatePose ();
721
783
 
722
784
  // Trigger new frame.
723
785
 
@@ -734,7 +796,7 @@ Object .assign (X3DWebXRContext .prototype,
734
796
  pose .cameraSpaceMatrix .assign (originalPose .transform .matrix);
735
797
  pose .viewMatrix .assign (originalPose .transform .inverse .matrix);
736
798
 
737
- let v = 0;
799
+ let i = 0;
738
800
 
739
801
  for (const originalView of originalPose .views)
740
802
  {
@@ -744,9 +806,9 @@ Object .assign (X3DWebXRContext .prototype,
744
806
  if (!width)
745
807
  continue;
746
808
 
747
- this .reshapeFramebuffer (v, x|0, y|0, width|0, height|0);
809
+ this .reshapeFramebuffer (i, x, y, width, height);
748
810
 
749
- const view = pose .views [v] ??= {
811
+ const view = pose .views [i] ??= {
750
812
  projectionMatrix: new (external_X_ITE_X3D_Matrix4_default()) (),
751
813
  cameraSpaceMatrix: new (external_X_ITE_X3D_Matrix4_default()) (),
752
814
  viewMatrix: new (external_X_ITE_X3D_Matrix4_default()) (),
@@ -761,11 +823,11 @@ Object .assign (X3DWebXRContext .prototype,
761
823
  view .matrix .assign (pose .cameraSpaceMatrix) .multRight (view .viewMatrix);
762
824
  view .inverse .assign (view .cameraSpaceMatrix) .multRight (pose .viewMatrix);
763
825
 
764
- ++ v;
826
+ ++ i;
765
827
  }
766
828
 
767
- pose .views .length = v;
768
- this .getFramebuffers () .length = v;
829
+ this .getFramebuffers () .length = i;
830
+ pose .views .length = i;
769
831
  },
770
832
  xrUpdatePointers: (function ()
771
833
  {
@@ -884,15 +946,8 @@ Object .assign (X3DWebXRContext .prototype,
884
946
 
885
947
  // Draw input source rays.
886
948
 
887
- // switch (this .getSession () .visibilityState)
888
- // {
889
- // case "visible-blurred":
890
- // case "hidden":
891
- // return;
892
-
893
- // default:
894
- // break;
895
- // }
949
+ if (!this [_visible])
950
+ return;
896
951
 
897
952
  for (const [i, { viewMatrix, projectionMatrix }] of pose .views .entries ())
898
953
  {
@@ -952,13 +1007,6 @@ Object .assign (X3DWebXRContext .prototype,
952
1007
  }
953
1008
  };
954
1009
  })(),
955
- xrEndFrame ()
956
- {
957
- const gl = this .getContext ();
958
-
959
- // WebXR Emulator and polyfill: bind to null, to prevent changes.
960
- gl .bindVertexArray (null);
961
- },
962
1010
  xrSensorHitPulse (hit, gamepad)
963
1011
  {
964
1012
  if (hit .sensors .size)
@@ -1,2 +1,2 @@
1
- /* X_ITE v11.2.2 */
2
- const e=window[Symbol.for("X_ITE.X3D-11.2.2")];(()=>{var t={n:e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return t.d(i,{a:i}),i},d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const i=e.Components;var s=t.n(i);const r=e.ScreenLine;var n=t.n(r);const a=e.GeometryContext;var o=t.n(a);const c=e.AlphaMode;var h=t.n(c);const d=e.VertexArray;var l=t.n(d);const u=e.Layer;var x=t.n(u);const p=e.Matrix4;var m=t.n(p);const f=e.Namespace;var g=t.n(f);function v(e){const t=e.getContext();this.browser=e,this.vertexArrayObject=new(l())(t),this.circleVertexBuffer=t.createBuffer(),this.circleGeometryContext=new(o())({renderObject:new(x())(e.getPrivateScene()),alphaMode:h().BLEND,geometryType:1}),this.circleGeometryContext.renderObject.setup();const i=e.getCircle2DOptions().getGeometry().getVertices();this.circleNumVertices=i.length/4,t.bindBuffer(t.ARRAY_BUFFER,this.circleVertexBuffer),t.bufferData(t.ARRAY_BUFFER,i.getValue(),t.STATIC_DRAW),this.diskVertexBuffer=t.createBuffer(),this.diskGeometryContext=new(o())({renderObject:this.circleGeometryContext.renderObject,alphaMode:h().BLEND,geometryType:3});const s=e.getDisk2DOptions().getDiskVertices();this.diskNumVertices=s.length/4,t.bindBuffer(t.ARRAY_BUFFER,this.diskVertexBuffer),t.bufferData(t.ARRAY_BUFFER,s.getValue(),t.STATIC_DRAW)}Object.assign(v.prototype,{display:(()=>{const e=new Float32Array(m().Identity),t=new Float32Array(m().Identity),i=new Float32Array(m().Identity),s=new(m()),r=[];return function(n,a,o,c,h,d,l){const u=this.browser,x=u.getContext(),p=u.getViewport();l.bind(),x.viewport(...p),x.scissor(...p);const m=n*Math.abs(h.origin.z),f=h.xAxis.normalize().multiply(m),g=h.yAxis.normalize().multiply(m),v=h.zAxis.normalize().multiply(m);s.set(...f,0,...g,0,...v,0,...h.origin,1),e.set(d),t.set(s),x.depthMask(!1),x.disable(x.DEPTH_TEST),x.enable(x.BLEND),x.disable(x.CULL_FACE);{const s=u.getDefaultMaterial().getShader(this.circleGeometryContext);s.enable(x),s.setClipPlanes(x,r),x.uniformMatrix4fv(s.x3d_ProjectionMatrix,!1,e),x.uniformMatrix4fv(s.x3d_ModelViewMatrix,!1,t),x.uniformMatrix4fv(s.x3d_EyeMatrix,!1,i),x.uniform3f(s.x3d_EmissiveColor,0,0,0),x.uniform1f(s.x3d_Transparency,c),this.vertexArrayObject.enable(s.getProgram())&&s.enableVertexAttribute(x,this.circleVertexBuffer,0,0),x.drawArrays(x.LINES,0,this.circleNumVertices)}{const s=u.getDefaultMaterial().getShader(this.diskGeometryContext);s.enable(x),s.setClipPlanes(x,r),x.uniformMatrix4fv(s.x3d_ProjectionMatrix,!1,e),x.uniformMatrix4fv(s.x3d_ModelViewMatrix,!1,t),x.uniformMatrix4fv(s.x3d_EyeMatrix,!1,i),x.uniform3f(s.x3d_EmissiveColor,...a),x.uniform1f(s.x3d_Transparency,o),this.vertexArrayObject.enable(s.getProgram())&&s.enableVertexAttribute(x,this.diskVertexBuffer,0,0),x.drawArrays(x.TRIANGLES,0,this.diskNumVertices)}x.depthMask(!0),x.enable(x.DEPTH_TEST),x.disable(x.BLEND)}})(),dispose(){const e=this.browser.getContext();e.deleteBuffer(this.diskVertexBuffer),this.diskVertexArrayObject.dispose(e)}});const w=v,b=g().add("ScreenPoint",w),y=e.ViewVolume;var M=t.n(y);const S=e.Color3;var R=t.n(S);const V=e.Vector3;var C=t.n(V);const E=e.Rotation4;var P=t.n(E);const A=e.Lock;var F=t.n(A);const j=e.ExamineViewer;var D=t.n(j);Object.assign(D().prototype,{gamepads(e){const t=e.find((({axes:e})=>e[2]||e[3]));if(!t)return void(e.action&&(e.action=!1,this.disconnect()));const i=t.buttons[0].pressed,s=t.buttons[1].pressed;e.button0===i&&e.button1===s||(e.button0=i,e.button1=s,this.disconnect());const r=60/this.getBrowser().currentFrameRate;e.action=!0,i?this.zoom(.005*t.axes[3]*r,Math.sign(-t.axes[3])):s?(this.startPan(0,0),this.pan(5*-t.axes[2]*r,5*t.axes[3]*r)):(this.startRotate(0,0),this.rotate(10*-t.axes[2]*r,10*t.axes[3]*r))}});const B=e.X3DFlyViewer;var _=t.n(B);const N=new(C())(300,300,400);Object.assign(_().prototype,{gamepads:function(){const e=new(C());return function(t){const i=t.find((({axes:e})=>e[2]||e[3]));if(!i)return void(this.startTime=Date.now());const s=i.buttons[0].pressed;i.buttons[1].pressed?(e.set(i.axes[2],-i.axes[3],0).multVec(N),this.direction.add(e).divide(2),this.pan()):(e.set(i.axes[2],0,i.axes[3]).multVec(N).multiply(s?2:1),this.direction.add(e).divide(2),this.fly())}}()});const O=e.X3DViewer;var I=t.n(O);Object.assign(I().prototype,{gamepads(){}});const L=Symbol(),X=Symbol(),U=Symbol(),T=Symbol(),k=Symbol(),z=Symbol(),G=Symbol(),H=Symbol();function W(){this[G]=[]}Object.assign(W.prototype,{getPose(){return this[U]},async initXRSession(){return F().acquire(`X3DWebXRContext.session-${this.getId()}`,(async()=>{if(this.getSession()!==window)return;const e=this.getContext(),t=this.getBrowserOption("XRSessionMode").toLowerCase().replaceAll("_","-"),i=(await e.makeXRCompatible(),await navigator.xr.requestSession(t)),s=await i.requestReferenceSpace("local");e.bindFramebuffer(e.FRAMEBUFFER,null),this.cameraEvents().addInterest("xrUpdatePose",this),this.finishedEvents().addInterest("xrUpdatePointers",this),this.endEvents().addInterest("xrEndFrame",this),i.addEventListener("inputsourceschange",(e=>this.xrUpdateInputSources(e))),i.addEventListener("end",(()=>this.stopXRSession())),this[L]=s,this[T]=new Set,this[k]=new(n())(this,4,2,.9),this[z]=new b(this),Object.assign(this[G],{action:!0}),this[U]={cameraSpaceMatrix:new(m()),viewMatrix:new(m()),views:[]},this.xrUpdateBaseLayer({},i),this.setSession(i),this.removeHit(this.getHit()),this.getRenderingProperties()._ContentScale.addInterest("xrContentScale",this),this.getRenderingProperties()._XRSession=!0}))},stopXRSession(){return F().acquire(`X3DWebXRContext.session-${this.getId()}`,(async()=>{if(this.getSession()!==window){await this.getSession().end().catch(Function.prototype),this.cameraEvents().removeInterest("xrUpdatePose",this),this.finishedEvents().removeInterest("xrUpdatePointers",this),this.endEvents().removeInterest("xrEndFrame",this),this.setSession(window),this.setDefaultFramebuffer(null);for(const{hit:e}of this[T])this.removeHit(e);this[L]=null,this[X]=null,this[U]=null,this[T]=null,this[k]=null,this[z]=null,this[H]=null,this.getRenderingProperties()._ContentScale.removeInterest("xrContentScale",this),this.getRenderingProperties()._XRSession=!1}}))},xrContentScale(){this.xrUpdateBaseLayer()},xrUpdateBaseLayer(e={},t=this.getSession()){if(t===window)return;const i=new XRWebGLLayer(t,this.getContext(),Object.assign({antialias:!1,alpha:!0,depth:!1,ignoreDepthValues:!0,framebufferScaleFactor:this.getRenderingProperty("ContentScale")},e));this[X]=i,t.updateRenderState({baseLayer:i}),this.setDefaultFramebuffer(i.framebuffer)},xrUpdateNearFarPlanes:function(){const e={};return function(){const t=this.getActiveNavigationInfo(),i=this.getActiveViewpoint();i?(e.depthNear=i.getNearDistance(t),e.depthFar=i.getFarDistance(t)):(e.depthNear=.1,e.depthFar=1e4),this.getSession().updateRenderState(e)}}(),xrUpdateInputSources(e){for(const t of e.added)this[T].add(Object.assign(t,{active:!1,matrix:new(m()),inverse:new(m()),hit:Object.assign(this.getHit().copy(),{button:!1,pressed:!1,pulse:!0,poseViewMatrix:new(m()),originalPoint:new(C()),originalNormal:new(C())})})),t.gamepad&&(t.gamepad.hit=t.hit);for(const t of e.removed)this.removeHit(t.hit),this[T].delete(t)},xrFrame(e){if(!e)return;this[H]=e;!this.getCanvas().parent().is(this.getSurface())&&this.getCanvas().css(this.getXREmulatorCSS()),this.xrUpdateNearFarPlanes(),this[G].length=0;for(const{active:e,gamepad:t}of this[T])e&&t&&(t.axes.length<4||this[G].push(t));this.getViewer().gamepads(this[G]),this.addBrowserEvent()},xrUpdatePose(){const e=this[H].getViewerPose(this[L]),t=this[U];t.cameraSpaceMatrix.assign(e.transform.matrix),t.viewMatrix.assign(e.transform.inverse.matrix);let i=0;for(const s of e.views){const{x:e,y:r,width:n,height:a}=this[X].getViewport(s);if(!n)continue;this.reshapeFramebuffer(i,0|e,0|r,0|n,0|a);const o=t.views[i]??={projectionMatrix:new(m()),cameraSpaceMatrix:new(m()),viewMatrix:new(m()),matrix:new(m()),inverse:new(m())};o.projectionMatrix.assign(s.projectionMatrix),o.cameraSpaceMatrix.assign(s.transform.matrix),o.viewMatrix.assign(s.transform.inverse.matrix),o.matrix.assign(t.cameraSpaceMatrix).multRight(o.viewMatrix),o.inverse.assign(o.cameraSpaceMatrix).multRight(t.viewMatrix),++i}t.views.length=i,this.getFramebuffers().length=i},xrUpdatePointers:function(){const e=new(R())(.5,.75,1),t=new(m()),i=new(C())(0,0,-.5),s=new(C()),r=new(C()),n=new(C()),a=new(P());return function(){const o=this.getViewport().getValue(),c=this[U];for(const e of this[T]){const{targetRaySpace:t,matrix:i,inverse:s}=e,r=this[H].getPose(t,this[L]);e.active=!!r,r&&(i.assign(r.transform.matrix),s.assign(r.transform.inverse.matrix))}for(const e of this[T]){const{active:i,gamepad:s,matrix:r,hit:n}=e;if(!i)continue;if(this.touch(o[2]/2,o[3]/2,n,e),this.xrSensorHitPulse(n,s),!n.id)continue;const a=c.views[0].projectionMatrix;n.pressed||n.poseViewMatrix.assign(c.viewMatrix),t.assign(r).multRight(n.poseViewMatrix);for(const e of n.sensors.values())e.projectionMatrix.assign(a),e.modelViewMatrix.multRight(t);M().projectPoint(n.point,t,a,o,n.pointer),n.originalPoint.assign(n.point),n.originalNormal.assign(n.normal),n.ray.multLineMatrix(t),t.multVecMatrix(n.point),t.submatrix.inverse().multMatrixVec(n.normal)}for(const{active:e,gamepad:t,hit:i}of this[T]){if(!e)continue;const s=t?.buttons[0];s?.pressed?i.button||(i.button=!0,i.pressed||=this.buttonPressEvent(0,0,i)):(i.button=!1,i.pressed&&(i.pressed=!1,this.buttonReleaseEvent(i))),this.motionNotifyEvent(0,0,i)}for(const[h,{viewMatrix:d,projectionMatrix:l}]of c.views.entries()){const c=this.getFramebuffers()[h];for(const{active:h,gamepad:u,matrix:x,hit:p}of this[T]){if(!h)continue;const m=u?.buttons.some((e=>e.pressed)),f=m?e:R().White;if(t.assign(x).multRight(d),t.multVecMatrix(s.assign(C().Zero)),t.multVecMatrix(r.assign(i)),t.multVecMatrix(n.assign(p.originalPoint)),p.id&&n.distance(s)<r.distance(s)&&r.assign(n),s.z>0||r.z>0)continue;if(M().projectPointMatrix(s,l,o,s),M().projectPointMatrix(r,l,o,r),s.z=0,r.z=0,this[k].setColor(f).display(s,r,c),!p.id)continue;const g=m?.005:.007;t.assign(x).multRight(d).translate(p.originalPoint).rotate(a.setFromToVec(C().zAxis,p.originalNormal)),this[z].display(g,f,.3,.8,t,l,c)}}}}(),xrEndFrame(){this.getContext().bindVertexArray(null)},xrSensorHitPulse(e,t){e.sensors.size?e.pulse&&(t?.hapticActuators?.[0]?.pulse(.25,10),e.pulse=!1):e.pulse=!0}});const q=W,Y=g().add("X3DWebXRContext",q);s().add({name:"WebXR",concreteNodes:[],abstractNodes:[],browserContext:Y});g().add("WebXRComponent",undefined)})();
1
+ /* X_ITE v11.3.0 */
2
+ const t=window[Symbol.for("X_ITE.X3D-11.3.0")];(()=>{var e={254:e=>{e.exports=t.jquery}},i={};function s(t){var r=i[t];if(void 0!==r)return r.exports;var n=i[t]={exports:{}};return e[t](n,n.exports,s),n.exports}s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const r=t.Components;var n=s.n(r);const a=t.ScreenLine;var o=s.n(a);const c=t.GeometryContext;var h=s.n(c);const d=t.AlphaMode;var l=s.n(d);const u=t.VertexArray;var p=s.n(u);const x=t.Layer;var m=s.n(x);const f=t.Matrix4;var g=s.n(f);const w=t.Namespace;var b=s.n(w);function v(t){const e=t.getContext();this.browser=t,this.vertexArrayObject=new(p())(e),this.circleVertexBuffer=e.createBuffer(),this.circleGeometryContext=new(h())({renderObject:new(m())(t.getPrivateScene()),alphaMode:l().BLEND,geometryType:1}),this.circleGeometryContext.renderObject.setup();const i=t.getCircle2DOptions().getGeometry().getVertices();this.circleNumVertices=i.length/4,e.bindBuffer(e.ARRAY_BUFFER,this.circleVertexBuffer),e.bufferData(e.ARRAY_BUFFER,i.getValue(),e.STATIC_DRAW),this.diskVertexBuffer=e.createBuffer(),this.diskGeometryContext=new(h())({renderObject:this.circleGeometryContext.renderObject,alphaMode:l().BLEND,geometryType:3});const s=t.getDisk2DOptions().getDiskVertices();this.diskNumVertices=s.length/4,e.bindBuffer(e.ARRAY_BUFFER,this.diskVertexBuffer),e.bufferData(e.ARRAY_BUFFER,s.getValue(),e.STATIC_DRAW)}Object.assign(v.prototype,{display:(()=>{const t=new Float32Array(g().Identity),e=new Float32Array(g().Identity),i=new Float32Array(g().Identity),s=new(g()),r=[];return function(n,a,o,c,h,d,l){const u=this.browser,p=u.getContext(),x=u.getViewport();l.bind(),p.viewport(...x),p.scissor(...x);const m=n*Math.abs(h.origin.z),f=h.xAxis.normalize().multiply(m),g=h.yAxis.normalize().multiply(m),w=h.zAxis.normalize().multiply(m);s.set(...f,0,...g,0,...w,0,...h.origin,1),t.set(d),e.set(s),p.depthMask(!1),p.disable(p.DEPTH_TEST),p.enable(p.BLEND),p.disable(p.CULL_FACE);{const s=u.getDefaultMaterial().getShader(this.circleGeometryContext);s.enable(p),s.setClipPlanes(p,r),p.uniformMatrix4fv(s.x3d_ProjectionMatrix,!1,t),p.uniformMatrix4fv(s.x3d_ModelViewMatrix,!1,e),p.uniformMatrix4fv(s.x3d_EyeMatrix,!1,i),p.uniform3f(s.x3d_EmissiveColor,0,0,0),p.uniform1f(s.x3d_Transparency,c),this.vertexArrayObject.enable(s.getProgram())&&s.enableVertexAttribute(p,this.circleVertexBuffer,0,0),p.drawArrays(p.LINES,0,this.circleNumVertices)}{const s=u.getDefaultMaterial().getShader(this.diskGeometryContext);s.enable(p),s.setClipPlanes(p,r),p.uniformMatrix4fv(s.x3d_ProjectionMatrix,!1,t),p.uniformMatrix4fv(s.x3d_ModelViewMatrix,!1,e),p.uniformMatrix4fv(s.x3d_EyeMatrix,!1,i),p.uniform3f(s.x3d_EmissiveColor,...a),p.uniform1f(s.x3d_Transparency,o),this.vertexArrayObject.enable(s.getProgram())&&s.enableVertexAttribute(p,this.diskVertexBuffer,0,0),p.drawArrays(p.TRIANGLES,0,this.diskNumVertices)}p.depthMask(!0),p.enable(p.DEPTH_TEST),p.disable(p.BLEND)}})(),dispose(){const t=this.browser.getContext();t.deleteBuffer(this.diskVertexBuffer),this.diskVertexArrayObject.dispose(t)}});const y=v,S=b().add("ScreenPoint",y),M=t.ViewVolume;var V=s.n(M);const R=t.Color3;var P=s.n(R);const A=t.Vector3;var C=s.n(A);const j=t.Rotation4;var E=s.n(j);const B=t.Lock;var F=s.n(B);const _=t.ExamineViewer;var D=s.n(_);Object.assign(D().prototype,{gamepads(t){const e=t.find((({axes:t})=>t[2]||t[3]));if(!e)return void(t.action&&(t.action=!1,this.disconnect()));const i=e.buttons[0].pressed,s=e.buttons[1].pressed;t.button0===i&&t.button1===s||(t.button0=i,t.button1=s,this.disconnect());const r=60/this.getBrowser().currentFrameRate;t.action=!0,i?this.zoom(.005*e.axes[3]*r,Math.sign(-e.axes[3])):s?(this.startPan(0,0),this.pan(5*-e.axes[2]*r,5*e.axes[3]*r)):(this.startRotate(0,0,1),this.rotate(10*-e.axes[2]*r,10*e.axes[3]*r))}});const O=t.X3DFlyViewer;var N=s.n(O);const L=new(C())(300,300,400);Object.assign(N().prototype,{gamepads:function(){const t=new(C());return function(e){const i=e.find((({axes:t})=>t[2]||t[3]));if(!i)return void(this.startTime=Date.now());const s=i.buttons[0].pressed;i.buttons[1].pressed?(t.set(i.axes[2],-i.axes[3],0).multVec(L),this.direction.add(t).divide(2),this.pan()):(t.set(i.axes[2],0,i.axes[3]).multVec(L).multiply(s?2:1),this.direction.add(t).divide(2),this.fly())}}()});const U=t.X3DViewer;var T=s.n(U);Object.assign(T().prototype,{gamepads(){}});var k=s(254);const I=Symbol(),X=Symbol(),z=Symbol(),G=Symbol(),H=Symbol(),W=Symbol(),q=Symbol(),Y=Symbol(),Z=Symbol(),J=Symbol();function K(){this[Z]=[]}Object.assign(K.prototype,{getPose(){return this[G]},xrAddButton(){this.getBrowserOption("XRButton")&&k("<div></div>").attr("part","xr-button").attr("title","Start WebXR session.").addClass("x_ite-private-xr-button").on("mousedown touchstart",!1).on("mouseup touchend",(t=>{t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),this.startAudioElements(),this.getSession()===window?this.xrStartSession():this.xrStopSession()})).appendTo(this.getSurface())},async xrStartSession(){return F().acquire(I,(async()=>{if(this.getSession()!==window)return;const t=this.getContext(),e=this.getBrowserOption("XRSessionMode").toLowerCase().replaceAll("_","-"),i=await navigator.xr.requestSession(e),s=await i.requestReferenceSpace("local");await t.makeXRCompatible();this.finishedEvents().addInterest("xrUpdatePointers",this),i.addEventListener("visibilitychange",(()=>this.xrUpdateVisibility())),i.addEventListener("inputsourceschange",(t=>this.xrUpdateInputSources(t))),i.addEventListener("end",(()=>this.xrStopSession())),this[X]=s,this[H]=!0,this[W]=new Set,this[q]=new(o())(this,4,2,.9),this[Y]=new S(this),Object.assign(this[Z],{action:!0}),this[G]={cameraSpaceMatrix:new(g()),viewMatrix:new(g()),views:[]},this.xrUpdateBaseLayer({},i),this.setSession(i),this.removeHit(this.getHit()),this.getRenderingProperties()._ContentScale.addInterest("xrContentScale",this),this.getRenderingProperties()._XRSession=!0}))},xrStopSession(){return F().acquire(I,(async()=>{if(this.getSession()!==window){await this.getSession().end().catch(Function.prototype),this.finishedEvents().removeInterest("xrUpdatePointers",this),this.setSession(window),this.setDefaultFramebuffer(null);for(const{hit:t}of this[W])this.removeHit(t);this[X]=null,this[z]=null,this[G]=null,this[H]=!1,this[W]=null,this[q]=null,this[Y]=null,this[J]=null,this.getRenderingProperties()._ContentScale.removeInterest("xrContentScale",this),this.getRenderingProperties()._XRSession=!1}}))},xrContentScale(){this.xrUpdateBaseLayer()},xrUpdateBaseLayer(t={},e=this.getSession()){if(e===window)return;const i=new XRWebGLLayer(e,this.getContext(),Object.assign({antialias:!1,alpha:!0,depth:!1,ignoreDepthValues:!0,framebufferScaleFactor:this.getRenderingProperty("ContentScale")},t));this[z]=i,e.updateRenderState({baseLayer:i}),this.setDefaultFramebuffer(i.framebuffer)},xrUpdateNearFarPlanes:function(){const t={};return function(){const e=this.getActiveNavigationInfo(),i=this.getActiveViewpoint();i?(t.depthNear=i.getNearDistance(e),t.depthFar=i.getFarDistance(e)):(t.depthNear=.1,t.depthFar=1e4),this.getSession().updateRenderState(t)}}(),xrUpdateVisibility(t){switch(this.getSession().visibilityState){case"visible-blurred":case"hidden":this[H]=!1;break;default:this[H]=!0}},xrUpdateInputSources(t){for(const e of t.added)this[W].add(Object.assign(e,{active:!1,matrix:new(g()),inverse:new(g()),hit:Object.assign(this.getHit().copy(),{button:!1,pressed:!1,pulse:!0,poseViewMatrix:new(g()),originalPoint:new(C()),originalNormal:new(C())})})),e.gamepad&&(e.gamepad.hit=e.hit);for(const e of t.removed)this.removeHit(e.hit),this[W].delete(e);this.xrUpdateGamepads()},xrUpdateGamepads(){this[Z].length=0;for(const{gamepad:t}of this[W])t&&(t.axes.length<4||this[Z].push(t))},xrFrame(t){t&&(this[J]=t,this.xrUpdateNearFarPlanes(),this.getViewer().gamepads(this[Z]),this.xrUpdatePose(),this.addBrowserEvent())},xrUpdatePose(){const t=this[J].getViewerPose(this[X]),e=this[G];e.cameraSpaceMatrix.assign(t.transform.matrix),e.viewMatrix.assign(t.transform.inverse.matrix);let i=0;for(const s of t.views){const{x:t,y:r,width:n,height:a}=this[z].getViewport(s);if(!n)continue;this.reshapeFramebuffer(i,t,r,n,a);const o=e.views[i]??={projectionMatrix:new(g()),cameraSpaceMatrix:new(g()),viewMatrix:new(g()),matrix:new(g()),inverse:new(g())};o.projectionMatrix.assign(s.projectionMatrix),o.cameraSpaceMatrix.assign(s.transform.matrix),o.viewMatrix.assign(s.transform.inverse.matrix),o.matrix.assign(e.cameraSpaceMatrix).multRight(o.viewMatrix),o.inverse.assign(o.cameraSpaceMatrix).multRight(e.viewMatrix),++i}this.getFramebuffers().length=i,e.views.length=i},xrUpdatePointers:function(){const t=new(P())(.5,.75,1),e=new(g()),i=new(C())(0,0,-.5),s=new(C()),r=new(C()),n=new(C()),a=new(E());return function(){const o=this.getViewport().getValue(),c=this[G];for(const t of this[W]){const{targetRaySpace:e,matrix:i,inverse:s}=t,r=this[J].getPose(e,this[X]);t.active=!!r,r&&(i.assign(r.transform.matrix),s.assign(r.transform.inverse.matrix))}for(const t of this[W]){const{active:i,gamepad:s,matrix:r,hit:n}=t;if(!i)continue;if(this.touch(o[2]/2,o[3]/2,n,t),this.xrSensorHitPulse(n,s),!n.id)continue;const a=c.views[0].projectionMatrix;n.pressed||n.poseViewMatrix.assign(c.viewMatrix),e.assign(r).multRight(n.poseViewMatrix);for(const t of n.sensors.values())t.projectionMatrix.assign(a),t.modelViewMatrix.multRight(e);V().projectPoint(n.point,e,a,o,n.pointer),n.originalPoint.assign(n.point),n.originalNormal.assign(n.normal),n.ray.multLineMatrix(e),e.multVecMatrix(n.point),e.submatrix.inverse().multMatrixVec(n.normal)}for(const{active:t,gamepad:e,hit:i}of this[W]){if(!t)continue;const s=e?.buttons[0];s?.pressed?i.button||(i.button=!0,i.pressed||=this.buttonPressEvent(0,0,i)):(i.button=!1,i.pressed&&(i.pressed=!1,this.buttonReleaseEvent(i))),this.motionNotifyEvent(0,0,i)}if(this[H])for(const[h,{viewMatrix:d,projectionMatrix:l}]of c.views.entries()){const c=this.getFramebuffers()[h];for(const{active:h,gamepad:u,matrix:p,hit:x}of this[W]){if(!h)continue;const m=u?.buttons.some((t=>t.pressed)),f=m?t:P().White;if(e.assign(p).multRight(d),e.multVecMatrix(s.assign(C().Zero)),e.multVecMatrix(r.assign(i)),e.multVecMatrix(n.assign(x.originalPoint)),x.id&&n.distance(s)<r.distance(s)&&r.assign(n),s.z>0||r.z>0)continue;if(V().projectPointMatrix(s,l,o,s),V().projectPointMatrix(r,l,o,r),s.z=0,r.z=0,this[q].setColor(f).display(s,r,c),!x.id)continue;const g=m?.005:.007;e.assign(p).multRight(d).translate(x.originalPoint).rotate(a.setFromToVec(C().zAxis,x.originalNormal)),this[Y].display(g,f,.3,.8,e,l,c)}}}}(),xrSensorHitPulse(t,e){t.sensors.size?t.pulse&&(e?.hapticActuators?.[0]?.pulse(.25,10),t.pulse=!1):t.pulse=!0}});const Q=K,$=b().add("X3DWebXRContext",Q);n().add({name:"WebXR",concreteNodes:[],abstractNodes:[],browserContext:$});b().add("WebXRComponent",undefined)})();
@@ -1,5 +1,5 @@
1
- /* X_ITE v11.2.2 */
2
- const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.2.2")];
1
+ /* X_ITE v11.3.0 */
2
+ const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.3.0")];
3
3
  /******/ (() => { // webpackBootstrap
4
4
  /******/ "use strict";
5
5
  /******/ // The require scope
@@ -1299,9 +1299,6 @@ const EmissiveStrengthMaterialExtension_default_ = EmissiveStrengthMaterialExten
1299
1299
  ;// external "__X_ITE_X3D__ .X3DShapeNode"
1300
1300
  const external_X_ITE_X3D_X3DShapeNode_namespaceObject = __X_ITE_X3D__ .X3DShapeNode;
1301
1301
  var external_X_ITE_X3D_X3DShapeNode_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DShapeNode_namespaceObject);
1302
- ;// external "__X_ITE_X3D__ .TraverseType"
1303
- const external_X_ITE_X3D_TraverseType_namespaceObject = __X_ITE_X3D__ .TraverseType;
1304
- var external_X_ITE_X3D_TraverseType_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_TraverseType_namespaceObject);
1305
1302
  ;// external "__X_ITE_X3D__ .VertexArray"
1306
1303
  const external_X_ITE_X3D_VertexArray_namespaceObject = __X_ITE_X3D__ .VertexArray;
1307
1304
  var external_X_ITE_X3D_VertexArray_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_VertexArray_namespaceObject);
@@ -1369,7 +1366,6 @@ var external_X_ITE_X3D_Box3_default = /*#__PURE__*/__webpack_require__.n(externa
1369
1366
 
1370
1367
 
1371
1368
 
1372
-
1373
1369
  /**
1374
1370
  * THIS NODE IS STILL EXPERIMENTAL.
1375
1371
  */
@@ -1424,7 +1420,7 @@ Object .assign (Object .setPrototypeOf (InstancedShape .prototype, (external_X_I
1424
1420
  this ._centers .addInterest ("set_transform__", this);
1425
1421
  this ._matrices .addInterest ("set_matrices__", this);
1426
1422
 
1427
- this .set_transform__ ();
1423
+ this .set_matrices__ ();
1428
1424
  },
1429
1425
  getShapeKey ()
1430
1426
  {
@@ -1444,7 +1440,7 @@ Object .assign (Object .setPrototypeOf (InstancedShape .prototype, (external_X_I
1444
1440
 
1445
1441
  return function ()
1446
1442
  {
1447
- if (this ._bboxSize .getValue () .equals (this .getDefaultBBoxSize ()))
1443
+ if (this .isDefaultBBoxSize ())
1448
1444
  {
1449
1445
  if (this .getGeometry ())
1450
1446
  {
@@ -1515,67 +1511,11 @@ Object .assign (Object .setPrototypeOf (InstancedShape .prototype, (external_X_I
1515
1511
  gl .bufferData (gl .ARRAY_BUFFER, data, gl .DYNAMIC_DRAW);
1516
1512
 
1517
1513
  this .set_bbox__ ();
1518
- },
1519
- set_geometry__ ()
1520
- {
1521
- external_X_ITE_X3D_X3DShapeNode_default().prototype .set_geometry__ .call (this);
1522
-
1523
- if (this .getGeometry ())
1524
- delete this .traverse;
1525
- else
1526
- this .traverse = Function .prototype;
1527
-
1528
- this .set_transform__ ();
1514
+ this .set_objects__ ();
1515
+ this .set_traverse__ ();
1529
1516
  },
1530
1517
  intersectsBox (box, clipPlanes, modelViewMatrix)
1531
1518
  { },
1532
- traverse (type, renderObject)
1533
- {
1534
- if (!this .numInstances)
1535
- return;
1536
-
1537
- // Always look at ParticleSystem if you do modify something here and there.
1538
-
1539
- switch (type)
1540
- {
1541
- case (external_X_ITE_X3D_TraverseType_default()).POINTER:
1542
- {
1543
- if (this ._pointerEvents .getValue ())
1544
- renderObject .addPointingShape (this);
1545
-
1546
- break;
1547
- }
1548
- case (external_X_ITE_X3D_TraverseType_default()).PICKING:
1549
- {
1550
- break;
1551
- }
1552
- case (external_X_ITE_X3D_TraverseType_default()).COLLISION:
1553
- {
1554
- renderObject .addCollisionShape (this);
1555
- break;
1556
- }
1557
- case (external_X_ITE_X3D_TraverseType_default()).SHADOW:
1558
- {
1559
- if (this ._castShadow .getValue ())
1560
- renderObject .addShadowShape (this);
1561
-
1562
- break;
1563
- }
1564
- case (external_X_ITE_X3D_TraverseType_default()).DISPLAY:
1565
- {
1566
- if (renderObject .addDisplayShape (this))
1567
- {
1568
- // Currently used for GeneratedCubeMapTexture.
1569
- this .getAppearance () .traverse (type, renderObject);
1570
- }
1571
-
1572
- break;
1573
- }
1574
- }
1575
-
1576
- // Currently used for ScreenText and Tools.
1577
- this .getGeometry () .traverse (type, renderObject);
1578
- },
1579
1519
  displaySimple (gl, renderContext, shaderNode)
1580
1520
  {
1581
1521
  this .getGeometry () .displaySimpleInstanced (gl, shaderNode, this);