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
package/README.md CHANGED
@@ -36,10 +36,10 @@ If you are going to use X_ITE in a production environment, you should use a fixe
36
36
  jsDelivr is an open-source content delivery network (CDN) renowned for its no-cost access, swift performance, and reliable service.
37
37
 
38
38
  ```html
39
- <script defer src="https://cdn.jsdelivr.net/npm/x_ite@11.2.2/dist/x_ite.min.js"></script>
39
+ <script defer src="https://cdn.jsdelivr.net/npm/x_ite@11.3.0/dist/x_ite.min.js"></script>
40
40
  <!-- or as ES module for use in scripts -->
41
41
  <script type="module">
42
- import X3D from "https://cdn.jsdelivr.net/npm/x_ite@11.2.2/dist/x_ite.min.mjs";
42
+ import X3D from "https://cdn.jsdelivr.net/npm/x_ite@11.3.0/dist/x_ite.min.mjs";
43
43
  </script>
44
44
  ```
45
45
 
@@ -68,7 +68,7 @@ This script initializes an X3D canvas within an HTML page, configuring it to con
68
68
  ### Declarative Syntax
69
69
 
70
70
  ```html
71
- <script defer src="https://cdn.jsdelivr.net/npm/x_ite@11.2.2/dist/x_ite.min.js"></script>
71
+ <script defer src="https://cdn.jsdelivr.net/npm/x_ite@11.3.0/dist/x_ite.min.js"></script>
72
72
  <x3d-canvas>
73
73
  <X3D profile='Interchange' version='4.0'>
74
74
  <head>
@@ -107,7 +107,7 @@ The same scene can also be created using pure JavaScript:
107
107
 
108
108
  ```html
109
109
  <script type="module">
110
- import X3D from "https://cdn.jsdelivr.net/npm/x_ite@11.2.2/dist/x_ite.min.mjs";
110
+ import X3D from "https://cdn.jsdelivr.net/npm/x_ite@11.3.0/dist/x_ite.min.mjs";
111
111
 
112
112
  const
113
113
  browser = X3D .getBrowser (),
@@ -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
@@ -513,7 +513,7 @@ Object .assign (Object .setPrototypeOf (IconAnnotation .prototype, Annotation_X3
513
513
  Annotation_X3DAnnotationNode .prototype .initialize .call (this);
514
514
  external_X_ITE_X3D_X3DUrlObject_default().prototype .initialize .call (this);
515
515
  },
516
- requestImmediateLoad (cache = true)
516
+ async requestImmediateLoad (cache = true)
517
517
  { },
518
518
  dispose ()
519
519
  {
@@ -1,2 +1,2 @@
1
- /* X_ITE v11.2.2 */
2
- const t=window[Symbol.for("X_ITE.X3D-11.2.2")];(()=>{var n={n:t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},d:(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n)};const e=t.Components;var i=n.n(e);const o=t.Fields;var a=n.n(o);const p=t.X3DFieldDefinition;var r=n.n(p);const u=t.FieldDefinitionArray;var l=n.n(u);const s=t.X3DNode;var d=n.n(s);const c=t.X3DLayerNode;var w=n.n(c);const O=t.Viewpoint;var y=n.n(O);const S=t.Group;var f=n.n(S);const b=t.X3DConstants;var h=n.n(b);const F=t.Namespace;var g=n.n(F);function A(t){w().call(this,t,new(y())(t),new(f())(t)),this.addType(h().AnnotationLayer)}Object.assign(Object.setPrototypeOf(A.prototype,w().prototype),{initialize(){w().prototype.initialize.call(this)}}),Object.defineProperties(A,{...d().getStaticProperties("AnnotationLayer","Annotation",1,"layers","4.0"),fieldDefinitions:{value:new(l())([new(r())(h().inputOutput,"metadata",new(a().SFNode)),new(r())(h().inputOutput,"isPickable",new(a().SFBool)(!0)),new(r())(h().inputOutput,"layoutPolicy",new(a().MFString)),new(r())(h().inputOutput,"shownGroupID",new(a().MFString)),new(r())(h().inputOutput,"viewport",new(a().SFNode))]),enumerable:!0}});const P=A,N=g().add("AnnotationLayer",P),m=t.X3DChildNode;var v=n.n(m);function D(t){v().call(this,t),this.addType(h().AnnotationTarget)}Object.assign(Object.setPrototypeOf(D.prototype,v().prototype),{initialize(){v().prototype.initialize.call(this)}}),Object.defineProperties(D,{...d().getStaticProperties("AnnotationTarget","Annotation",1,"children","4.0"),fieldDefinitions:{value:new(l())([new(r())(h().inputOutput,"metadata",new(a().SFNode)),new(r())(h().inputOutput,"referencePoint",new(a().SFVec3f)),new(r())(h().inputOutput,"leadLineStyle",new(a().SFNode)),new(r())(h().inputOutput,"marker",new(a().SFNode)),new(r())(h().inputOutput,"annotations",new(a().MFNode))]),enumerable:!0}});const j=D,z=g().add("AnnotationTarget",j),T=t.X3DGroupingNode;var X=n.n(T);function G(t){v().call(this,t),this.addType(h().X3DAnnotationNode)}Object.assign(Object.setPrototypeOf(G.prototype,v().prototype),{initialize(){v().prototype.initialize.call(this)}}),Object.defineProperties(G,d().getStaticProperties("X3DAnnotationNode","Annotation",1));const I=G,L=g().add("X3DAnnotationNode",I);function E(t){X().call(this,t),L.call(this,t),this.addType(h().GroupAnnotation)}Object.assign(Object.setPrototypeOf(E.prototype,X().prototype),L.prototype,{initialize(){X().prototype.initialize.call(this),L.prototype.initialize.call(this)},dispose(){L.prototype.dispose.call(this),X().prototype.dispose.call(this)}}),Object.defineProperties(E,{...d().getStaticProperties("GroupAnnotation","Annotation",1,"children","4.0"),fieldDefinitions:{value:new(l())([new(r())(h().inputOutput,"metadata",new(a().SFNode)),new(r())(h().inputOutput,"enabled",new(a().SFBool)(!0)),new(r())(h().inputOutput,"annotationGroupID",new(a().SFString)),new(r())(h().inputOutput,"displayPolicy",new(a().SFString)("NEVER")),new(r())(h().inputOutput,"visible",new(a().SFBool)(!0)),new(r())(h().inputOutput,"bboxDisplay",new(a().SFBool)),new(r())(h().initializeOnly,"bboxSize",new(a().SFVec3f)(-1,-1,-1)),new(r())(h().initializeOnly,"bboxCenter",new(a().SFVec3f)),new(r())(h().inputOnly,"addChildren",new(a().MFNode)),new(r())(h().inputOnly,"removeChildren",new(a().MFNode)),new(r())(h().inputOutput,"children",new(a().MFNode))]),enumerable:!0}});const M=E,R=g().add("GroupAnnotation",M),x=t.X3DUrlObject;var V=n.n(x);function B(t){L.call(this,t),V().call(this,t),this.addType(h().IconAnnotation)}Object.assign(Object.setPrototypeOf(B.prototype,L.prototype),V().prototype,{initialize(){L.prototype.initialize.call(this),V().prototype.initialize.call(this)},requestImmediateLoad(t=!0){},dispose(){V().prototype.dispose.call(this),L.prototype.dispose.call(this)}}),Object.defineProperties(B,{...d().getStaticProperties("IconAnnotation","Annotation",1,"children","4.0"),fieldDefinitions:{value:new(l())([new(r())(h().inputOutput,"metadata",new(a().SFNode)),new(r())(h().inputOutput,"enabled",new(a().SFBool)(!0)),new(r())(h().inputOutput,"annotationGroupID",new(a().SFString)),new(r())(h().inputOutput,"displayPolicy",new(a().SFString)("NEVER")),new(r())(h().inputOutput,"url",new(a().MFString)),new(r())(h().inputOutput,"autoRefresh",new(a().SFTime)(0)),new(r())(h().inputOutput,"autoRefreshTimeLimit",new(a().SFTime)(3600))]),enumerable:!0}});const C=B,U=g().add("IconAnnotation",C);function _(t){L.call(this,t),this.addType(h().TextAnnotation)}Object.assign(Object.setPrototypeOf(_.prototype,L.prototype),{initialize(){L.prototype.initialize.call(this)}}),Object.defineProperties(_,{...d().getStaticProperties("TextAnnotation","Annotation",1,"children","4.0"),fieldDefinitions:{value:new(l())([new(r())(h().inputOutput,"metadata",new(a().SFNode)),new(r())(h().inputOutput,"enabled",new(a().SFBool)(!0)),new(r())(h().inputOutput,"annotationGroupID",new(a().SFString)),new(r())(h().inputOutput,"displayPolicy",new(a().SFString)("NEVER")),new(r())(h().inputOutput,"contentType",new(a().SFString)("text/plain")),new(r())(h().inputOutput,"text",new(a().SFString))]),enumerable:!0}});const k=_,q=g().add("TextAnnotation",k);function H(t){L.call(this,t),this.addType(h().URLAnnotation)}Object.assign(Object.setPrototypeOf(H.prototype,L.prototype),{initialize(){L.prototype.initialize.call(this)}}),Object.defineProperties(H,{...d().getStaticProperties("URLAnnotation","Annotation",1,"children","4.0"),fieldDefinitions:{value:new(l())([new(r())(h().inputOutput,"metadata",new(a().SFNode)),new(r())(h().inputOutput,"enabled",new(a().SFBool)(!0)),new(r())(h().inputOutput,"annotationGroupID",new(a().SFString)),new(r())(h().inputOutput,"displayPolicy",new(a().SFString)("NEVER")),new(r())(h().inputOutput,"url",new(a().MFString))]),enumerable:!0}});const J=H,K=g().add("URLAnnotation",J);i().add({name:"Annotation",concreteNodes:[N,z,R,U,q,K],abstractNodes:[L]});g().add("AnnotationComponent",undefined)})();
1
+ /* X_ITE v11.3.0 */
2
+ const t=window[Symbol.for("X_ITE.X3D-11.3.0")];(()=>{var n={n:t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},d:(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n)};const e=t.Components;var i=n.n(e);const o=t.Fields;var a=n.n(o);const p=t.X3DFieldDefinition;var r=n.n(p);const u=t.FieldDefinitionArray;var l=n.n(u);const s=t.X3DNode;var d=n.n(s);const c=t.X3DLayerNode;var w=n.n(c);const y=t.Viewpoint;var O=n.n(y);const S=t.Group;var f=n.n(S);const b=t.X3DConstants;var h=n.n(b);const F=t.Namespace;var g=n.n(F);function A(t){w().call(this,t,new(O())(t),new(f())(t)),this.addType(h().AnnotationLayer)}Object.assign(Object.setPrototypeOf(A.prototype,w().prototype),{initialize(){w().prototype.initialize.call(this)}}),Object.defineProperties(A,{...d().getStaticProperties("AnnotationLayer","Annotation",1,"layers","4.0"),fieldDefinitions:{value:new(l())([new(r())(h().inputOutput,"metadata",new(a().SFNode)),new(r())(h().inputOutput,"isPickable",new(a().SFBool)(!0)),new(r())(h().inputOutput,"layoutPolicy",new(a().MFString)),new(r())(h().inputOutput,"shownGroupID",new(a().MFString)),new(r())(h().inputOutput,"viewport",new(a().SFNode))]),enumerable:!0}});const P=A,N=g().add("AnnotationLayer",P),m=t.X3DChildNode;var v=n.n(m);function D(t){v().call(this,t),this.addType(h().AnnotationTarget)}Object.assign(Object.setPrototypeOf(D.prototype,v().prototype),{initialize(){v().prototype.initialize.call(this)}}),Object.defineProperties(D,{...d().getStaticProperties("AnnotationTarget","Annotation",1,"children","4.0"),fieldDefinitions:{value:new(l())([new(r())(h().inputOutput,"metadata",new(a().SFNode)),new(r())(h().inputOutput,"referencePoint",new(a().SFVec3f)),new(r())(h().inputOutput,"leadLineStyle",new(a().SFNode)),new(r())(h().inputOutput,"marker",new(a().SFNode)),new(r())(h().inputOutput,"annotations",new(a().MFNode))]),enumerable:!0}});const j=D,z=g().add("AnnotationTarget",j),T=t.X3DGroupingNode;var X=n.n(T);function G(t){v().call(this,t),this.addType(h().X3DAnnotationNode)}Object.assign(Object.setPrototypeOf(G.prototype,v().prototype),{initialize(){v().prototype.initialize.call(this)}}),Object.defineProperties(G,d().getStaticProperties("X3DAnnotationNode","Annotation",1));const I=G,L=g().add("X3DAnnotationNode",I);function E(t){X().call(this,t),L.call(this,t),this.addType(h().GroupAnnotation)}Object.assign(Object.setPrototypeOf(E.prototype,X().prototype),L.prototype,{initialize(){X().prototype.initialize.call(this),L.prototype.initialize.call(this)},dispose(){L.prototype.dispose.call(this),X().prototype.dispose.call(this)}}),Object.defineProperties(E,{...d().getStaticProperties("GroupAnnotation","Annotation",1,"children","4.0"),fieldDefinitions:{value:new(l())([new(r())(h().inputOutput,"metadata",new(a().SFNode)),new(r())(h().inputOutput,"enabled",new(a().SFBool)(!0)),new(r())(h().inputOutput,"annotationGroupID",new(a().SFString)),new(r())(h().inputOutput,"displayPolicy",new(a().SFString)("NEVER")),new(r())(h().inputOutput,"visible",new(a().SFBool)(!0)),new(r())(h().inputOutput,"bboxDisplay",new(a().SFBool)),new(r())(h().initializeOnly,"bboxSize",new(a().SFVec3f)(-1,-1,-1)),new(r())(h().initializeOnly,"bboxCenter",new(a().SFVec3f)),new(r())(h().inputOnly,"addChildren",new(a().MFNode)),new(r())(h().inputOnly,"removeChildren",new(a().MFNode)),new(r())(h().inputOutput,"children",new(a().MFNode))]),enumerable:!0}});const M=E,R=g().add("GroupAnnotation",M),x=t.X3DUrlObject;var V=n.n(x);function B(t){L.call(this,t),V().call(this,t),this.addType(h().IconAnnotation)}Object.assign(Object.setPrototypeOf(B.prototype,L.prototype),V().prototype,{initialize(){L.prototype.initialize.call(this),V().prototype.initialize.call(this)},async requestImmediateLoad(t=!0){},dispose(){V().prototype.dispose.call(this),L.prototype.dispose.call(this)}}),Object.defineProperties(B,{...d().getStaticProperties("IconAnnotation","Annotation",1,"children","4.0"),fieldDefinitions:{value:new(l())([new(r())(h().inputOutput,"metadata",new(a().SFNode)),new(r())(h().inputOutput,"enabled",new(a().SFBool)(!0)),new(r())(h().inputOutput,"annotationGroupID",new(a().SFString)),new(r())(h().inputOutput,"displayPolicy",new(a().SFString)("NEVER")),new(r())(h().inputOutput,"url",new(a().MFString)),new(r())(h().inputOutput,"autoRefresh",new(a().SFTime)(0)),new(r())(h().inputOutput,"autoRefreshTimeLimit",new(a().SFTime)(3600))]),enumerable:!0}});const C=B,U=g().add("IconAnnotation",C);function _(t){L.call(this,t),this.addType(h().TextAnnotation)}Object.assign(Object.setPrototypeOf(_.prototype,L.prototype),{initialize(){L.prototype.initialize.call(this)}}),Object.defineProperties(_,{...d().getStaticProperties("TextAnnotation","Annotation",1,"children","4.0"),fieldDefinitions:{value:new(l())([new(r())(h().inputOutput,"metadata",new(a().SFNode)),new(r())(h().inputOutput,"enabled",new(a().SFBool)(!0)),new(r())(h().inputOutput,"annotationGroupID",new(a().SFString)),new(r())(h().inputOutput,"displayPolicy",new(a().SFString)("NEVER")),new(r())(h().inputOutput,"contentType",new(a().SFString)("text/plain")),new(r())(h().inputOutput,"text",new(a().SFString))]),enumerable:!0}});const k=_,q=g().add("TextAnnotation",k);function H(t){L.call(this,t),this.addType(h().URLAnnotation)}Object.assign(Object.setPrototypeOf(H.prototype,L.prototype),{initialize(){L.prototype.initialize.call(this)}}),Object.defineProperties(H,{...d().getStaticProperties("URLAnnotation","Annotation",1,"children","4.0"),fieldDefinitions:{value:new(l())([new(r())(h().inputOutput,"metadata",new(a().SFNode)),new(r())(h().inputOutput,"enabled",new(a().SFBool)(!0)),new(r())(h().inputOutput,"annotationGroupID",new(a().SFString)),new(r())(h().inputOutput,"displayPolicy",new(a().SFString)("NEVER")),new(r())(h().inputOutput,"url",new(a().MFString))]),enumerable:!0}});const J=H,K=g().add("URLAnnotation",J);i().add({name:"Annotation",concreteNodes:[N,z,R,U,q,K],abstractNodes:[L]});g().add("AnnotationComponent",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
@@ -197,10 +197,7 @@ function CADAssembly (executionContext)
197
197
  this .addType ((external_X_ITE_X3D_X3DConstants_default()).CADAssembly);
198
198
  }
199
199
 
200
- Object .assign (Object .setPrototypeOf (CADAssembly .prototype, (external_X_ITE_X3D_X3DGroupingNode_default()).prototype),
201
- //X3DProductStructureChildNode .prototype,
202
- {
203
- });
200
+ Object .setPrototypeOf (CADAssembly .prototype, (external_X_ITE_X3D_X3DGroupingNode_default()).prototype);
204
201
 
205
202
  Object .defineProperties (CADAssembly,
206
203
  {
@@ -299,6 +296,13 @@ function CADFace (executionContext)
299
296
  external_X_ITE_X3D_X3DBoundedObject_default().call (this, executionContext);
300
297
 
301
298
  this .addType ((external_X_ITE_X3D_X3DConstants_default()).CADFace);
299
+
300
+ this .addChildObjects ((external_X_ITE_X3D_X3DConstants_default()).outputOnly, "rebuild", new (external_X_ITE_X3D_Fields_default()).SFTime ());
301
+
302
+ this .setPointingObject (true);
303
+ this .setCollisionObject (true);
304
+ this .setShadowObject (true);
305
+ this .setVisibleObject (true);
302
306
  }
303
307
 
304
308
  Object .assign (Object .setPrototypeOf (CADFace .prototype, CADGeometry_X3DProductStructureChildNode .prototype),
@@ -309,29 +313,56 @@ Object .assign (Object .setPrototypeOf (CADFace .prototype, CADGeometry_X3DProdu
309
313
  CADGeometry_X3DProductStructureChildNode .prototype .initialize .call (this);
310
314
  external_X_ITE_X3D_X3DBoundedObject_default().prototype .initialize .call (this);
311
315
 
312
- this ._shape .addInterest ("set_shape__", this);
316
+ this ._rebuild .addInterest ("set_children__", this);
317
+ this ._shape .addInterest ("requestRebuild", this);
313
318
 
314
- this .set_shape__ ();
319
+ this .set_children__ ();
315
320
  },
316
321
  getBBox (bbox, shadows)
317
322
  {
318
- if (this ._bboxSize .getValue () .equals (this .getDefaultBBoxSize ()))
323
+ if (this .isDefaultBBoxSize ())
319
324
  return this .visibleNode ?.getBBox (bbox, shadows) ?? bbox .set ();
320
325
 
321
326
  return bbox .set (this ._bboxSize .getValue (), this ._bboxCenter .getValue ());
322
327
  },
323
- set_shape__ ()
328
+ requestRebuild ()
324
329
  {
330
+ this ._rebuild .addEvent ();
331
+ },
332
+ set_children__ ()
333
+ {
334
+ // Remove node.
335
+
325
336
  if (this .childNode)
326
337
  {
327
- this .childNode ._isCameraObject .removeInterest ("set_cameraObject__", this);
328
- this .childNode ._isPickableObject .removeInterest ("set_transformSensors__", this);
338
+ const childNode = this .childNode;
329
339
 
330
- this .childNode ._display .removeInterest ("set_display__", this);
331
- this .childNode ._bboxDisplay .removeInterest ("set_bboxDisplay__", this);
340
+ childNode ._isPointingObject .removeInterest ("requestRebuild", this);
341
+ childNode ._isCameraObject .removeInterest ("requestRebuild", this);
342
+ childNode ._isPickableObject .removeInterest ("requestRebuild", this);
343
+ childNode ._isCollisionObject .removeInterest ("requestRebuild", this);
344
+ childNode ._isShadowObject .removeInterest ("requestRebuild", this);
345
+ childNode ._isVisibleObject .removeInterest ("requestRebuild", this);
346
+
347
+ if (external_X_ITE_X3D_X3DCast_default() ((external_X_ITE_X3D_X3DConstants_default()).X3DBoundedObject, childNode))
348
+ {
349
+ childNode ._display .removeInterest ("requestRebuild", this);
350
+ childNode ._bboxDisplay .removeInterest ("requestRebuild", this);
351
+ }
332
352
  }
333
353
 
334
- this .childNode = null;
354
+ // Clear node.
355
+
356
+ this .childNode = null;
357
+ this .pointingNode = null;
358
+ this .cameraObject = null;
359
+ this .pickableObject = null;
360
+ this .collisionObject = null;
361
+ this .shadowObject = null;
362
+ this .visibleNode = null;
363
+ this .boundedObject = null;
364
+
365
+ // Add node.
335
366
 
336
367
  const childNode = external_X_ITE_X3D_X3DCast_default() ((external_X_ITE_X3D_X3DConstants_default()).X3DChildNode, this ._shape);
337
368
 
@@ -347,13 +378,45 @@ Object .assign (Object .setPrototypeOf (CADFace .prototype, CADGeometry_X3DProdu
347
378
  case (external_X_ITE_X3D_X3DConstants_default()).Transform:
348
379
  case (external_X_ITE_X3D_X3DConstants_default()).X3DShapeNode:
349
380
  {
350
- childNode ._isCameraObject .addInterest ("set_cameraObject__", this);
351
- childNode ._isPickableObject .addInterest ("set_transformSensors__", this);
352
-
353
- childNode ._display .addInterest ("set_display__", this);
354
- childNode ._bboxDisplay .addInterest ("set_bboxDisplay__", this);
381
+ childNode ._isPointingObject .addInterest ("requestRebuild", this);
382
+ childNode ._isCameraObject .addInterest ("requestRebuild", this);
383
+ childNode ._isPickableObject .addInterest ("requestRebuild", this);
384
+ childNode ._isCollisionObject .addInterest ("requestRebuild", this);
385
+ childNode ._isShadowObject .addInterest ("requestRebuild", this);
386
+ childNode ._isVisibleObject .addInterest ("requestRebuild", this);
355
387
 
356
388
  this .childNode = childNode;
389
+
390
+ if (childNode .isVisible ())
391
+ {
392
+ if (childNode .isPointingObject ())
393
+ this .pointingNode = childNode;
394
+
395
+ if (childNode .isCameraObject ())
396
+ this .cameraObject = childNode;
397
+
398
+ if (childNode .isPickableObject ())
399
+ this .pickableObject = childNode;
400
+
401
+ if (childNode .isCollisionObject ())
402
+ this .collisionObject = childNode;
403
+
404
+ if (childNode .isShadowObject ())
405
+ this .shadowObject = childNode;
406
+
407
+ if (childNode .isVisibleObject ())
408
+ this .visibleNode = childNode;
409
+ }
410
+
411
+ if (external_X_ITE_X3D_X3DCast_default() ((external_X_ITE_X3D_X3DConstants_default()).X3DBoundedObject, childNode))
412
+ {
413
+ childNode ._display .addInterest ("requestRebuild", this);
414
+ childNode ._bboxDisplay .addInterest ("requestRebuild", this);
415
+
416
+ if (childNode .isBBoxVisible ())
417
+ this .boundedObject = childNode;
418
+ }
419
+
357
420
  break;
358
421
  }
359
422
  default:
@@ -364,76 +427,88 @@ Object .assign (Object .setPrototypeOf (CADFace .prototype, CADGeometry_X3DProdu
364
427
  }
365
428
  }
366
429
 
367
- if (this .childNode)
368
- {
369
- delete this .traverse;
370
- }
371
- else
372
- {
373
- this .traverse = Function .prototype;
374
- }
375
-
376
- this .set_display__ ();
377
- this .set_bboxDisplay__ ();
430
+ this .set_pointingObjects__ ();
431
+ this .set_cameraObjects__ ();
432
+ this .set_pickableObjects__ ();
433
+ this .set_collisionObjects__ ();
434
+ this .set_shadowObjects__ ();
435
+ this .set_visibleObjects__ ();
378
436
  },
379
- set_cameraObject__ ()
437
+ set_pointingObjects__ ()
380
438
  {
381
- this .setCameraObject (this .visibleNode ?.isCameraObject ());
439
+ this .setPointingObject (this .pointingNode);
382
440
  },
383
- set_transformSensors__ ()
441
+ set_cameraObjects__ ()
384
442
  {
385
- this .setPickableObject (this .visibleNode ?.isPickableObject ());
443
+ this .setCameraObject (this .cameraObject);
386
444
  },
387
- set_display__ ()
445
+ set_pickableObjects__ ()
388
446
  {
389
- if (this .childNode)
390
- this .visibleNode = this .childNode ._display .getValue () ? this .childNode : null;
391
- else
392
- this .visibleNode = null;
393
-
394
- this .set_cameraObject__ ();
395
- this .set_transformSensors__ ();
447
+ this .setPickableObject (this .getTransformSensors () .size || this .pickableObject);
396
448
  },
397
- set_bboxDisplay__ ()
449
+ set_collisionObjects__ ()
398
450
  {
399
- if (this .childNode)
400
- this .boundedObject = this .childNode ._bboxDisplay .getValue () ? this .childNode : null;
401
- else
402
- this .boundedObject = null;
451
+ this .setCollisionObject (this .collisionObject);
452
+ },
453
+ set_shadowObjects__ ()
454
+ {
455
+ this .setShadowObject (this .shadowObject);
456
+ },
457
+ set_visibleObjects__ ()
458
+ {
459
+ this .setVisibleObject (this .visibleNode || this .boundedObject);
403
460
  },
404
461
  traverse (type, renderObject)
405
462
  {
406
463
  switch (type)
407
464
  {
408
465
  case (external_X_ITE_X3D_TraverseType_default()).POINTER:
466
+ {
467
+ this .pointingNode ?.traverse (type, renderObject);
468
+ return;
469
+ }
409
470
  case (external_X_ITE_X3D_TraverseType_default()).CAMERA:
410
- case (external_X_ITE_X3D_TraverseType_default()).SHADOW:
411
471
  {
412
- this .visibleNode ?.traverse (type, renderObject);
472
+ this .cameraObject ?.traverse (type, renderObject);
413
473
  return;
414
474
  }
415
475
  case (external_X_ITE_X3D_TraverseType_default()).PICKING:
416
476
  {
477
+ if (this .getTransformSensors () .size)
478
+ {
479
+ const modelMatrix = renderObject .getModelViewMatrix () .get ();
480
+
481
+ for (const transformSensorNode of this .getTransformSensors ())
482
+ transformSensorNode .collect (modelMatrix);
483
+ }
484
+
417
485
  const
418
486
  browser = this .getBrowser (),
419
487
  pickingHierarchy = browser .getPickingHierarchy ();
420
488
 
421
489
  pickingHierarchy .push (this);
422
490
 
423
- this .visibleNode ?.traverse (type, renderObject);
491
+ if (browser .getPickable () .at (-1))
492
+ this .visibleNode ?.traverse (type, renderObject);
493
+ else
494
+ this .pickableObject ?.traverse (type, renderObject);
424
495
 
425
496
  pickingHierarchy .pop ();
426
497
  return;
427
498
  }
428
499
  case (external_X_ITE_X3D_TraverseType_default()).COLLISION:
429
500
  {
430
- this .visibleNode ?.traverse (type, renderObject);
501
+ this .collisionObject ?.traverse (type, renderObject);
502
+ return;
503
+ }
504
+ case (external_X_ITE_X3D_TraverseType_default()).SHADOW:
505
+ {
506
+ this .shadowObject ?.traverse (type, renderObject);
431
507
  return;
432
508
  }
433
509
  case (external_X_ITE_X3D_TraverseType_default()).DISPLAY:
434
510
  {
435
- this .visibleNode ?.traverse (type, renderObject);
436
-
511
+ this .visibleNode ?.traverse (type, renderObject);
437
512
  this .boundedObject ?.displayBBox (type, renderObject);
438
513
  return;
439
514
  }
@@ -623,10 +698,7 @@ function CADPart (executionContext)
623
698
  this .addType ((external_X_ITE_X3D_X3DConstants_default()).CADPart);
624
699
  }
625
700
 
626
- Object .assign (Object .setPrototypeOf (CADPart .prototype, (external_X_ITE_X3D_X3DTransformNode_default()).prototype),
627
- //X3DProductStructureChildNode .prototype,
628
- {
629
- });
701
+ Object .setPrototypeOf (CADPart .prototype, (external_X_ITE_X3D_X3DTransformNode_default()).prototype);
630
702
 
631
703
  Object .defineProperties (CADPart,
632
704
  {
@@ -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 n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const n=e.Components;var i=t.n(n);const o=e.Fields;var s=t.n(o);const r=e.X3DFieldDefinition;var a=t.n(r);const l=e.FieldDefinitionArray;var d=t.n(l);const u=e.X3DNode;var p=t.n(u);const c=e.X3DGroupingNode;var w=t.n(c);const h=e.X3DChildNode;var b=t.n(h);const O=e.X3DConstants;var y=t.n(O);const S=e.Namespace;var _=t.n(S);function F(e){b().call(this,e),this.addType(y().X3DProductStructureChildNode)}Object.setPrototypeOf(F.prototype,b().prototype),Object.defineProperties(F,p().getStaticProperties("X3DProductStructureChildNode","CADGeometry",2));const N=F,f=_().add("X3DProductStructureChildNode",N);function m(e){w().call(this,e),f.call(this,e),this.addType(y().CADAssembly)}Object.assign(Object.setPrototypeOf(m.prototype,w().prototype),{}),Object.defineProperties(m,{...p().getStaticProperties("CADAssembly","CADGeometry",2,"children","3.1"),fieldDefinitions:{value:new(d())([new(a())(y().inputOutput,"metadata",new(s().SFNode)),new(a())(y().inputOutput,"name",new(s().SFString)),new(a())(y().inputOutput,"visible",new(s().SFBool)(!0)),new(a())(y().inputOutput,"bboxDisplay",new(s().SFBool)),new(a())(y().initializeOnly,"bboxSize",new(s().SFVec3f)(-1,-1,-1)),new(a())(y().initializeOnly,"bboxCenter",new(s().SFVec3f)),new(a())(y().inputOnly,"addChildren",new(s().MFNode)),new(a())(y().inputOnly,"removeChildren",new(s().MFNode)),new(a())(y().inputOutput,"children",new(s().MFNode))]),enumerable:!0}});const D=m,g=_().add("CADAssembly",D),C=e.X3DBoundedObject;var v=t.n(C);const P=e.TraverseType;var x=t.n(P);const j=e.X3DCast;var z=t.n(j);function A(e){f.call(this,e),v().call(this,e),this.addType(y().CADFace)}Object.assign(Object.setPrototypeOf(A.prototype,f.prototype),v().prototype,{initialize(){f.prototype.initialize.call(this),v().prototype.initialize.call(this),this._shape.addInterest("set_shape__",this),this.set_shape__()},getBBox(e,t){return this._bboxSize.getValue().equals(this.getDefaultBBoxSize())?this.visibleNode?.getBBox(e,t)??e.set():e.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},set_shape__(){this.childNode&&(this.childNode._isCameraObject.removeInterest("set_cameraObject__",this),this.childNode._isPickableObject.removeInterest("set_transformSensors__",this),this.childNode._display.removeInterest("set_display__",this),this.childNode._bboxDisplay.removeInterest("set_bboxDisplay__",this)),this.childNode=null;const e=z()(y().X3DChildNode,this._shape);if(e){const t=e.getType();for(let n=t.length-1;n>=0;--n){switch(t[n]){case y().LOD:case y().Transform:case y().X3DShapeNode:e._isCameraObject.addInterest("set_cameraObject__",this),e._isPickableObject.addInterest("set_transformSensors__",this),e._display.addInterest("set_display__",this),e._bboxDisplay.addInterest("set_bboxDisplay__",this),this.childNode=e;break;default:continue}break}}this.childNode?delete this.traverse:this.traverse=Function.prototype,this.set_display__(),this.set_bboxDisplay__()},set_cameraObject__(){this.setCameraObject(this.visibleNode?.isCameraObject())},set_transformSensors__(){this.setPickableObject(this.visibleNode?.isPickableObject())},set_display__(){this.childNode?this.visibleNode=this.childNode._display.getValue()?this.childNode:null:this.visibleNode=null,this.set_cameraObject__(),this.set_transformSensors__()},set_bboxDisplay__(){this.childNode?this.boundedObject=this.childNode._bboxDisplay.getValue()?this.childNode:null:this.boundedObject=null},traverse(e,t){switch(e){case x().POINTER:case x().CAMERA:case x().SHADOW:return void this.visibleNode?.traverse(e,t);case x().PICKING:{const n=this.getBrowser().getPickingHierarchy();return n.push(this),this.visibleNode?.traverse(e,t),void n.pop()}case x().COLLISION:return void this.visibleNode?.traverse(e,t);case x().DISPLAY:return this.visibleNode?.traverse(e,t),void this.boundedObject?.displayBBox(e,t)}},dispose(){v().prototype.dispose.call(this),f.prototype.dispose.call(this)}}),Object.defineProperties(A,{...p().getStaticProperties("CADFace","CADGeometry",2,"children","3.1"),fieldDefinitions:{value:new(d())([new(a())(y().inputOutput,"metadata",new(s().SFNode)),new(a())(y().inputOutput,"name",new(s().SFString)),new(a())(y().inputOutput,"visible",new(s().SFBool)(!0)),new(a())(y().inputOutput,"bboxDisplay",new(s().SFBool)),new(a())(y().initializeOnly,"bboxSize",new(s().SFVec3f)(-1,-1,-1)),new(a())(y().initializeOnly,"bboxCenter",new(s().SFVec3f)),new(a())(y().inputOutput,"shape",new(s().SFNode))]),enumerable:!0}});const B=A,I=_().add("CADFace",B);function V(e){w().call(this,e),this.addType(y().CADLayer)}Object.setPrototypeOf(V.prototype,w().prototype),Object.defineProperties(V,{...p().getStaticProperties("CADLayer","CADGeometry",2,"children","3.1"),fieldDefinitions:{value:new(d())([new(a())(y().inputOutput,"metadata",new(s().SFNode)),new(a())(y().inputOutput,"name",new(s().SFString)),new(a())(y().inputOutput,"visible",new(s().SFBool)(!0)),new(a())(y().inputOutput,"bboxDisplay",new(s().SFBool)),new(a())(y().initializeOnly,"bboxSize",new(s().SFVec3f)(-1,-1,-1)),new(a())(y().initializeOnly,"bboxCenter",new(s().SFVec3f)),new(a())(y().inputOnly,"addChildren",new(s().MFNode)),new(a())(y().inputOnly,"removeChildren",new(s().MFNode)),new(a())(y().inputOutput,"children",new(s().MFNode))]),enumerable:!0}});const M=V,T=_().add("CADLayer",M),X=e.X3DTransformNode;var G=t.n(X);function k(e){G().call(this,e),f.call(this,e),this.addType(y().CADPart)}Object.assign(Object.setPrototypeOf(k.prototype,G().prototype),{}),Object.defineProperties(k,{...p().getStaticProperties("CADPart","CADGeometry",2,"children","3.1"),fieldDefinitions:{value:new(d())([new(a())(y().inputOutput,"metadata",new(s().SFNode)),new(a())(y().inputOutput,"name",new(s().SFString)),new(a())(y().inputOutput,"translation",new(s().SFVec3f)),new(a())(y().inputOutput,"rotation",new(s().SFRotation)),new(a())(y().inputOutput,"scale",new(s().SFVec3f)(1,1,1)),new(a())(y().inputOutput,"scaleOrientation",new(s().SFRotation)),new(a())(y().inputOutput,"center",new(s().SFVec3f)),new(a())(y().inputOutput,"visible",new(s().SFBool)(!0)),new(a())(y().inputOutput,"bboxDisplay",new(s().SFBool)),new(a())(y().initializeOnly,"bboxSize",new(s().SFVec3f)(-1,-1,-1)),new(a())(y().initializeOnly,"bboxCenter",new(s().SFVec3f)),new(a())(y().inputOnly,"addChildren",new(s().MFNode)),new(a())(y().inputOnly,"removeChildren",new(s().MFNode)),new(a())(y().inputOutput,"children",new(s().MFNode))]),enumerable:!0}});const L=k,Q=_().add("CADPart",L),R=e.X3DComposedGeometryNode;var E=t.n(R);function H(e){E().call(this,e),this.addType(y().IndexedQuadSet)}Object.assign(Object.setPrototypeOf(H.prototype,E().prototype),{initialize(){E().prototype.initialize.call(this),this._set_index.addFieldInterest(this._index)},getTriangleIndex(e){const t=e%6;return 4*Math.floor(e/6)+t%3+Math.floor(t/4)},getPolygonIndex(e){return this._index[e]},getVerticesPerPolygon:()=>4,getNumVertices(){return this._index.length},build(){let e=this._index.length;e-=e%4,E().prototype.build.call(this,4,e,6,e/4*6)}}),Object.defineProperties(H,{...p().getStaticProperties("IndexedQuadSet","CADGeometry",1,"geometry","3.1"),fieldDefinitions:{value:new(d())([new(a())(y().inputOutput,"metadata",new(s().SFNode)),new(a())(y().inputOnly,"set_index",new(s().MFInt32)),new(a())(y().initializeOnly,"solid",new(s().SFBool)(!0)),new(a())(y().initializeOnly,"ccw",new(s().SFBool)(!0)),new(a())(y().initializeOnly,"colorPerVertex",new(s().SFBool)(!0)),new(a())(y().initializeOnly,"normalPerVertex",new(s().SFBool)(!0)),new(a())(y().initializeOnly,"index",new(s().MFInt32)),new(a())(y().inputOutput,"attrib",new(s().MFNode)),new(a())(y().inputOutput,"fogCoord",new(s().SFNode)),new(a())(y().inputOutput,"color",new(s().SFNode)),new(a())(y().inputOutput,"texCoord",new(s().SFNode)),new(a())(y().inputOutput,"tangent",new(s().SFNode)),new(a())(y().inputOutput,"normal",new(s().SFNode)),new(a())(y().inputOutput,"coord",new(s().SFNode))]),enumerable:!0}});const q=H,K=_().add("IndexedQuadSet",q);function W(e){E().call(this,e),this.addType(y().QuadSet)}Object.assign(Object.setPrototypeOf(W.prototype,E().prototype),{getTriangleIndex(e){const t=e%6;return 4*Math.floor(e/6)+t%3+Math.floor(t/4)},getVerticesPerPolygon:()=>4,getNumVertices(){return this.getCoord()?.getSize()},build(){if(!this.getCoord())return;let e=this.getCoord().getSize();e-=e%4,E().prototype.build.call(this,4,e,6,e/4*6)},createNormals(e,t,n){return this.createFaceNormals(e,t,n)}}),Object.defineProperties(W,{...p().getStaticProperties("QuadSet","CADGeometry",1,"geometry","3.1"),fieldDefinitions:{value:new(d())([new(a())(y().inputOutput,"metadata",new(s().SFNode)),new(a())(y().initializeOnly,"solid",new(s().SFBool)(!0)),new(a())(y().initializeOnly,"ccw",new(s().SFBool)(!0)),new(a())(y().initializeOnly,"colorPerVertex",new(s().SFBool)(!0)),new(a())(y().initializeOnly,"normalPerVertex",new(s().SFBool)(!0)),new(a())(y().inputOutput,"attrib",new(s().MFNode)),new(a())(y().inputOutput,"fogCoord",new(s().SFNode)),new(a())(y().inputOutput,"color",new(s().SFNode)),new(a())(y().inputOutput,"texCoord",new(s().SFNode)),new(a())(y().inputOutput,"tangent",new(s().SFNode)),new(a())(y().inputOutput,"normal",new(s().SFNode)),new(a())(y().inputOutput,"coord",new(s().SFNode))]),enumerable:!0}});const Y=W,J=_().add("QuadSet",Y);i().add({name:"CADGeometry",concreteNodes:[g,I,T,Q,K,J],abstractNodes:[f]});_().add("CADGeometryComponent",undefined)})();
1
+ /* X_ITE v11.3.0 */
2
+ const e=window[Symbol.for("X_ITE.X3D-11.3.0")];(()=>{var t={n:e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return t.d(i,{a:i}),i},d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const i=e.Components;var n=t.n(i);const o=e.Fields;var s=t.n(o);const r=e.X3DFieldDefinition;var l=t.n(r);const d=e.FieldDefinitionArray;var a=t.n(d);const u=e.X3DNode;var c=t.n(u);const p=e.X3DGroupingNode;var b=t.n(p);const h=e.X3DChildNode;var O=t.n(h);const w=e.X3DConstants;var y=t.n(w);const S=e.Namespace;var j=t.n(S);function _(e){O().call(this,e),this.addType(y().X3DProductStructureChildNode)}Object.setPrototypeOf(_.prototype,O().prototype),Object.defineProperties(_,c().getStaticProperties("X3DProductStructureChildNode","CADGeometry",2));const F=_,m=j().add("X3DProductStructureChildNode",F);function f(e){b().call(this,e),m.call(this,e),this.addType(y().CADAssembly)}Object.setPrototypeOf(f.prototype,b().prototype),Object.defineProperties(f,{...c().getStaticProperties("CADAssembly","CADGeometry",2,"children","3.1"),fieldDefinitions:{value:new(a())([new(l())(y().inputOutput,"metadata",new(s().SFNode)),new(l())(y().inputOutput,"name",new(s().SFString)),new(l())(y().inputOutput,"visible",new(s().SFBool)(!0)),new(l())(y().inputOutput,"bboxDisplay",new(s().SFBool)),new(l())(y().initializeOnly,"bboxSize",new(s().SFVec3f)(-1,-1,-1)),new(l())(y().initializeOnly,"bboxCenter",new(s().SFVec3f)),new(l())(y().inputOnly,"addChildren",new(s().MFNode)),new(l())(y().inputOnly,"removeChildren",new(s().MFNode)),new(l())(y().inputOutput,"children",new(s().MFNode))]),enumerable:!0}});const g=f,N=j().add("CADAssembly",g),v=e.X3DBoundedObject;var C=t.n(v);const D=e.TraverseType;var P=t.n(D);const x=e.X3DCast;var I=t.n(x);function z(e){m.call(this,e),C().call(this,e),this.addType(y().CADFace),this.addChildObjects(y().outputOnly,"rebuild",new(s().SFTime)),this.setPointingObject(!0),this.setCollisionObject(!0),this.setShadowObject(!0),this.setVisibleObject(!0)}Object.assign(Object.setPrototypeOf(z.prototype,m.prototype),C().prototype,{initialize(){m.prototype.initialize.call(this),C().prototype.initialize.call(this),this._rebuild.addInterest("set_children__",this),this._shape.addInterest("requestRebuild",this),this.set_children__()},getBBox(e,t){return this.isDefaultBBoxSize()?this.visibleNode?.getBBox(e,t)??e.set():e.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},requestRebuild(){this._rebuild.addEvent()},set_children__(){if(this.childNode){const e=this.childNode;e._isPointingObject.removeInterest("requestRebuild",this),e._isCameraObject.removeInterest("requestRebuild",this),e._isPickableObject.removeInterest("requestRebuild",this),e._isCollisionObject.removeInterest("requestRebuild",this),e._isShadowObject.removeInterest("requestRebuild",this),e._isVisibleObject.removeInterest("requestRebuild",this),I()(y().X3DBoundedObject,e)&&(e._display.removeInterest("requestRebuild",this),e._bboxDisplay.removeInterest("requestRebuild",this))}this.childNode=null,this.pointingNode=null,this.cameraObject=null,this.pickableObject=null,this.collisionObject=null,this.shadowObject=null,this.visibleNode=null,this.boundedObject=null;const e=I()(y().X3DChildNode,this._shape);if(e){const t=e.getType();for(let i=t.length-1;i>=0;--i){switch(t[i]){case y().LOD:case y().Transform:case y().X3DShapeNode:e._isPointingObject.addInterest("requestRebuild",this),e._isCameraObject.addInterest("requestRebuild",this),e._isPickableObject.addInterest("requestRebuild",this),e._isCollisionObject.addInterest("requestRebuild",this),e._isShadowObject.addInterest("requestRebuild",this),e._isVisibleObject.addInterest("requestRebuild",this),this.childNode=e,e.isVisible()&&(e.isPointingObject()&&(this.pointingNode=e),e.isCameraObject()&&(this.cameraObject=e),e.isPickableObject()&&(this.pickableObject=e),e.isCollisionObject()&&(this.collisionObject=e),e.isShadowObject()&&(this.shadowObject=e),e.isVisibleObject()&&(this.visibleNode=e)),I()(y().X3DBoundedObject,e)&&(e._display.addInterest("requestRebuild",this),e._bboxDisplay.addInterest("requestRebuild",this),e.isBBoxVisible()&&(this.boundedObject=e));break;default:continue}break}}this.set_pointingObjects__(),this.set_cameraObjects__(),this.set_pickableObjects__(),this.set_collisionObjects__(),this.set_shadowObjects__(),this.set_visibleObjects__()},set_pointingObjects__(){this.setPointingObject(this.pointingNode)},set_cameraObjects__(){this.setCameraObject(this.cameraObject)},set_pickableObjects__(){this.setPickableObject(this.getTransformSensors().size||this.pickableObject)},set_collisionObjects__(){this.setCollisionObject(this.collisionObject)},set_shadowObjects__(){this.setShadowObject(this.shadowObject)},set_visibleObjects__(){this.setVisibleObject(this.visibleNode||this.boundedObject)},traverse(e,t){switch(e){case P().POINTER:return void this.pointingNode?.traverse(e,t);case P().CAMERA:return void this.cameraObject?.traverse(e,t);case P().PICKING:{if(this.getTransformSensors().size){const e=t.getModelViewMatrix().get();for(const t of this.getTransformSensors())t.collect(e)}const i=this.getBrowser(),n=i.getPickingHierarchy();return n.push(this),i.getPickable().at(-1)?this.visibleNode?.traverse(e,t):this.pickableObject?.traverse(e,t),void n.pop()}case P().COLLISION:return void this.collisionObject?.traverse(e,t);case P().SHADOW:return void this.shadowObject?.traverse(e,t);case P().DISPLAY:return this.visibleNode?.traverse(e,t),void this.boundedObject?.displayBBox(e,t)}},dispose(){C().prototype.dispose.call(this),m.prototype.dispose.call(this)}}),Object.defineProperties(z,{...c().getStaticProperties("CADFace","CADGeometry",2,"children","3.1"),fieldDefinitions:{value:new(a())([new(l())(y().inputOutput,"metadata",new(s().SFNode)),new(l())(y().inputOutput,"name",new(s().SFString)),new(l())(y().inputOutput,"visible",new(s().SFBool)(!0)),new(l())(y().inputOutput,"bboxDisplay",new(s().SFBool)),new(l())(y().initializeOnly,"bboxSize",new(s().SFVec3f)(-1,-1,-1)),new(l())(y().initializeOnly,"bboxCenter",new(s().SFVec3f)),new(l())(y().inputOutput,"shape",new(s().SFNode))]),enumerable:!0}});const B=z,A=j().add("CADFace",B);function V(e){b().call(this,e),this.addType(y().CADLayer)}Object.setPrototypeOf(V.prototype,b().prototype),Object.defineProperties(V,{...c().getStaticProperties("CADLayer","CADGeometry",2,"children","3.1"),fieldDefinitions:{value:new(a())([new(l())(y().inputOutput,"metadata",new(s().SFNode)),new(l())(y().inputOutput,"name",new(s().SFString)),new(l())(y().inputOutput,"visible",new(s().SFBool)(!0)),new(l())(y().inputOutput,"bboxDisplay",new(s().SFBool)),new(l())(y().initializeOnly,"bboxSize",new(s().SFVec3f)(-1,-1,-1)),new(l())(y().initializeOnly,"bboxCenter",new(s().SFVec3f)),new(l())(y().inputOnly,"addChildren",new(s().MFNode)),new(l())(y().inputOnly,"removeChildren",new(s().MFNode)),new(l())(y().inputOutput,"children",new(s().MFNode))]),enumerable:!0}});const R=V,M=j().add("CADLayer",R),T=e.X3DTransformNode;var q=t.n(T);function X(e){q().call(this,e),m.call(this,e),this.addType(y().CADPart)}Object.setPrototypeOf(X.prototype,q().prototype),Object.defineProperties(X,{...c().getStaticProperties("CADPart","CADGeometry",2,"children","3.1"),fieldDefinitions:{value:new(a())([new(l())(y().inputOutput,"metadata",new(s().SFNode)),new(l())(y().inputOutput,"name",new(s().SFString)),new(l())(y().inputOutput,"translation",new(s().SFVec3f)),new(l())(y().inputOutput,"rotation",new(s().SFRotation)),new(l())(y().inputOutput,"scale",new(s().SFVec3f)(1,1,1)),new(l())(y().inputOutput,"scaleOrientation",new(s().SFRotation)),new(l())(y().inputOutput,"center",new(s().SFVec3f)),new(l())(y().inputOutput,"visible",new(s().SFBool)(!0)),new(l())(y().inputOutput,"bboxDisplay",new(s().SFBool)),new(l())(y().initializeOnly,"bboxSize",new(s().SFVec3f)(-1,-1,-1)),new(l())(y().initializeOnly,"bboxCenter",new(s().SFVec3f)),new(l())(y().inputOnly,"addChildren",new(s().MFNode)),new(l())(y().inputOnly,"removeChildren",new(s().MFNode)),new(l())(y().inputOutput,"children",new(s().MFNode))]),enumerable:!0}});const k=X,G=j().add("CADPart",k),L=e.X3DComposedGeometryNode;var Q=t.n(L);function E(e){Q().call(this,e),this.addType(y().IndexedQuadSet)}Object.assign(Object.setPrototypeOf(E.prototype,Q().prototype),{initialize(){Q().prototype.initialize.call(this),this._set_index.addFieldInterest(this._index)},getTriangleIndex(e){const t=e%6;return 4*Math.floor(e/6)+t%3+Math.floor(t/4)},getPolygonIndex(e){return this._index[e]},getVerticesPerPolygon:()=>4,getNumVertices(){return this._index.length},build(){let e=this._index.length;e-=e%4,Q().prototype.build.call(this,4,e,6,e/4*6)}}),Object.defineProperties(E,{...c().getStaticProperties("IndexedQuadSet","CADGeometry",1,"geometry","3.1"),fieldDefinitions:{value:new(a())([new(l())(y().inputOutput,"metadata",new(s().SFNode)),new(l())(y().inputOnly,"set_index",new(s().MFInt32)),new(l())(y().initializeOnly,"solid",new(s().SFBool)(!0)),new(l())(y().initializeOnly,"ccw",new(s().SFBool)(!0)),new(l())(y().initializeOnly,"colorPerVertex",new(s().SFBool)(!0)),new(l())(y().initializeOnly,"normalPerVertex",new(s().SFBool)(!0)),new(l())(y().initializeOnly,"index",new(s().MFInt32)),new(l())(y().inputOutput,"attrib",new(s().MFNode)),new(l())(y().inputOutput,"fogCoord",new(s().SFNode)),new(l())(y().inputOutput,"color",new(s().SFNode)),new(l())(y().inputOutput,"texCoord",new(s().SFNode)),new(l())(y().inputOutput,"tangent",new(s().SFNode)),new(l())(y().inputOutput,"normal",new(s().SFNode)),new(l())(y().inputOutput,"coord",new(s().SFNode))]),enumerable:!0}});const H=E,K=j().add("IndexedQuadSet",H);function W(e){Q().call(this,e),this.addType(y().QuadSet)}Object.assign(Object.setPrototypeOf(W.prototype,Q().prototype),{getTriangleIndex(e){const t=e%6;return 4*Math.floor(e/6)+t%3+Math.floor(t/4)},getVerticesPerPolygon:()=>4,getNumVertices(){return this.getCoord()?.getSize()},build(){if(!this.getCoord())return;let e=this.getCoord().getSize();e-=e%4,Q().prototype.build.call(this,4,e,6,e/4*6)},createNormals(e,t,i){return this.createFaceNormals(e,t,i)}}),Object.defineProperties(W,{...c().getStaticProperties("QuadSet","CADGeometry",1,"geometry","3.1"),fieldDefinitions:{value:new(a())([new(l())(y().inputOutput,"metadata",new(s().SFNode)),new(l())(y().initializeOnly,"solid",new(s().SFBool)(!0)),new(l())(y().initializeOnly,"ccw",new(s().SFBool)(!0)),new(l())(y().initializeOnly,"colorPerVertex",new(s().SFBool)(!0)),new(l())(y().initializeOnly,"normalPerVertex",new(s().SFBool)(!0)),new(l())(y().inputOutput,"attrib",new(s().MFNode)),new(l())(y().inputOutput,"fogCoord",new(s().SFNode)),new(l())(y().inputOutput,"color",new(s().SFNode)),new(l())(y().inputOutput,"texCoord",new(s().SFNode)),new(l())(y().inputOutput,"tangent",new(s().SFNode)),new(l())(y().inputOutput,"normal",new(s().SFNode)),new(l())(y().inputOutput,"coord",new(s().SFNode))]),enumerable:!0}});const Y=W,J=j().add("QuadSet",Y);n().add({name:"CADGeometry",concreteNodes:[N,A,M,G,K,J],abstractNodes:[m]});j().add("CADGeometryComponent",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
  /******/ var __webpack_modules__ = ({
@@ -904,10 +904,10 @@ Object .assign (Object .setPrototypeOf (GeneratedCubeMapTexture .prototype, Cube
904
904
  if (this ._update .getValue () === "NONE")
905
905
  return;
906
906
 
907
- if (! renderObject .isIndependent ())
907
+ if (!renderObject .isIndependent ())
908
908
  return;
909
909
 
910
- if (! this .frameBuffer)
910
+ if (!this .frameBuffer)
911
911
  return;
912
912
 
913
913
  renderObject .getGeneratedCubeMapTextures () .push (this);
@@ -1,2 +1,2 @@
1
- /* X_ITE v11.2.2 */
2
- const e=window[Symbol.for("X_ITE.X3D-11.2.2")];(()=>{var t={254:t=>{t.exports=e.jquery}},r={};function i(e){var s=r[e];if(void 0!==s)return s.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,i),a.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const s=e.Components;var a=i.n(s);const n=e.Namespace;var o=i.n(n);const u=o().add("Panorama1.fs","\nprecision highp float;precision highp int;precision highp sampler2D;const float M_PI=3.1415926535897932384626433832795;varying vec2 texCoord;uniform sampler2D x3d_PanoramaTexture;uniform int x3d_CurrentFace;vec3 uvToXYZ(const in int face,const in vec2 uv){vec3 xyz;if(face==0)xyz=vec3(1.0,uv.y,uv.x);else if(face==1)xyz=vec3(-1.0,uv.y,-uv.x);else if(face==2)xyz=vec3(uv.x,uv.y,-1.0);else if(face==3)xyz=vec3(-uv.x,uv.y,1.0);else if(face==4)xyz=vec3(uv.y,-1.0,uv.x);else xyz=vec3(-uv.y,1.0,uv.x);return xyz;}vec2 dirToUV(const in vec3 dir){return vec2(0.5+0.5*atan(dir.z,dir.x)/M_PI,1.0-acos(dir.y)/M_PI);}vec3 panoramaToCubeMap(const in int face,const in vec2 texCoord){vec3 scan=uvToXYZ(face,texCoord);vec3 direction=normalize(scan);vec2 src=dirToUV(direction);return texture2D(x3d_PanoramaTexture,src).rgb;}void main(){gl_FragColor=vec4(panoramaToCubeMap(x3d_CurrentFace,texCoord),1.0);}"),h=o().add("Panorama2.fs","#version 300 es\nprecision highp float;precision highp int;precision highp sampler2D;const float M_PI=3.1415926535897932384626433832795;in vec2 texCoord;out vec4 x3d_FragColor;uniform sampler2D x3d_PanoramaTexture;uniform int x3d_CurrentFace;vec3 uvToXYZ(const in int face,const in vec2 uv){switch(face){case 0:return vec3(1.0,uv.y,uv.x);case 1:return vec3(-1.0,uv.y,-uv.x);case 2:return vec3(uv.x,uv.y,-1.0);case 3:return vec3(-uv.x,uv.y,1.0);case 4:return vec3(uv.y,-1.0,uv.x);default:return vec3(-uv.y,1.0,uv.x);}}vec2 dirToUV(const in vec3 dir){return vec2(0.5+0.5*atan(dir.z,dir.x)/M_PI,1.0-acos(dir.y)/M_PI);}vec3 panoramaToCubeMap(const in int face,const in vec2 texCoord){vec3 scan=uvToXYZ(face,texCoord);vec3 direction=normalize(scan);vec2 src=dirToUV(direction);return texture(x3d_PanoramaTexture,src).rgb;}void main(){x3d_FragColor=vec4(panoramaToCubeMap(x3d_CurrentFace,texCoord),1.0);}"),d=Symbol();function c(){}Object.assign(c.prototype,{getPanoramaShader(){return this[d]?this[d]:this[d]=this.createShader("Panorama","FullScreen","data:x-shader/x-fragment,"+["",u,h][this.getContext().getVersion()],[],["x3d_PanoramaTexture","x3d_CurrentFace"])}});const T=c,p=o().add("X3DCubeMapTexturingContext",T),x=e.Fields;var g=i.n(x);const l=e.X3DFieldDefinition;var _=i.n(l);const f=e.FieldDefinitionArray;var m=i.n(f);const E=e.X3DNode;var w=i.n(E);const b=e.X3DSingleTextureNode;var v=i.n(b);const R=e.X3DConstants;var M=i.n(R);function C(e){v().call(this,e),this.addType(M().X3DEnvironmentTextureNode);const t=this.getBrowser().getContext();this.target=t.TEXTURE_CUBE_MAP,this.targets=[t.TEXTURE_CUBE_MAP_POSITIVE_Z,t.TEXTURE_CUBE_MAP_NEGATIVE_Z,t.TEXTURE_CUBE_MAP_NEGATIVE_X,t.TEXTURE_CUBE_MAP_POSITIVE_X,t.TEXTURE_CUBE_MAP_POSITIVE_Y,t.TEXTURE_CUBE_MAP_NEGATIVE_Y],this.size=1,this.levels=0}Object.assign(Object.setPrototypeOf(C.prototype,v().prototype),{getTarget(){return this.target},getTextureType:()=>4,getTargets(){return this.targets},getSize(){return this.size},setSize(e){this.size=e,this.levels=Math.floor(Math.log2(Math.max(e,1)))},getLevels(){return this.levels},clearTexture:(()=>{const e=new Uint8Array([255,255,255,255]);return function(){const t=this.getBrowser().getContext();t.bindTexture(this.getTarget(),this.getTexture());for(const r of this.getTargets())t.texImage2D(r,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,e);this.setSize(1),this.setTransparent(!1),this.updateTextureParameters()}})(),updateTextureParameters(){v().prototype.updateTextureParameters.call(this,this.target,this._textureProperties.getValue(),this.texturePropertiesNode,this.size,this.size,!1,!1,!1)},setShaderUniforms(e,t,r,i=t.x3d_Texture[0]){const s=this.getBrowser().getTextureCubeUnit();e.activeTexture(e.TEXTURE0+s),e.bindTexture(e.TEXTURE_CUBE_MAP,this.getTexture()),e.uniform1i(i.textureCube,s)}}),Object.defineProperties(C,w().getStaticProperties("X3DEnvironmentTextureNode","CubeMapTexturing",1));const y=C,S=o().add("X3DEnvironmentTextureNode",y),U=e.X3DCast;var P=i.n(U);const A=e.BitSet;var O=i.n(A);function I(e){S.call(this,e),this.addType(M().ComposedCubeMapTexture),this.addChildObjects(M().outputOnly,"update",new(g().SFTime)),e.getSpecificationVersion()<=3.3&&(this.addAlias("front",this._frontTexture),this.addAlias("back",this._backTexture),this.addAlias("left",this._leftTexture),this.addAlias("right",this._rightTexture),this.addAlias("top",this._topTexture),this.addAlias("bottom",this._bottomTexture)),this.textureNodes=[null,null,null,null,null,null],this.textureBits=new(O())}Object.assign(Object.setPrototypeOf(I.prototype,S.prototype),{initialize(){S.prototype.initialize.call(this);const e=this.getBrowser().getContext();this.frameBuffer=e.createFramebuffer(),this.clearTexture(),this._frontTexture.addInterest("set_texture__",this,0),this._backTexture.addInterest("set_texture__",this,1),this._leftTexture.addInterest("set_texture__",this,2),this._rightTexture.addInterest("set_texture__",this,3),this._topTexture.addInterest("set_texture__",this,5),this._bottomTexture.addInterest("set_texture__",this,4),this._update.addInterest("update",this),this.set_texture__(0,this._frontTexture),this.set_texture__(1,this._backTexture),this.set_texture__(2,this._leftTexture),this.set_texture__(3,this._rightTexture),this.set_texture__(4,this._topTexture),this.set_texture__(5,this._bottomTexture)},set_texture__(e,t){let r=this.textureNodes[e];r?.removeInterest(`set_loadState${e}__`,this),r=this.textureNodes[e]=P()(M().X3DTexture2DNode,t),r?.addInterest(`set_loadState${e}__`,this,e,r),this.set_loadState__(e,r)},set_loadState__(e,t){this.setTextureBit(e,t?.checkLoadState()),this._update.addEvent()},setTextureBit(e,t){this.textureBits.set(e,t===M().COMPLETE_STATE)},isComplete(){if(63!=+this.textureBits)return!1;const e=this.textureNodes,t=e[0].getWidth();for(const r of e){if(r.getWidth()!==t)return!1;if(r.getHeight()!==t)return!1}return!0},update(){if(this.isComplete()){const e=this.getBrowser().getContext(),t=this.textureNodes,r=t[0].getWidth();if(r!==this.getSize()){const t=new Uint8Array(r*r*4);e.bindTexture(this.getTarget(),this.getTexture());for(let i=0;i<6;++i)e.texImage2D(this.getTargets()[i],0,e.RGBA,r,r,0,e.RGBA,e.UNSIGNED_BYTE,t);this.setSize(r),this.updateTextureParameters()}e.bindFramebuffer(e.FRAMEBUFFER,this.frameBuffer);for(let i=0;i<6;++i){const s=t[i];if(e.bindTexture(e.TEXTURE_2D,s.getTexture()),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,s.getTexture(),0),e.bindTexture(this.getTarget(),this.getTexture()),1===s.getTextureType())e.copyTexSubImage2D(this.getTargets()[i],0,0,0,0,0,r,r);else for(let t=0;t<r;++t)e.copyTexSubImage2D(this.getTargets()[i],0,0,r-t-1,0,t,r,1)}this.setTransparent(t.some((e=>e.isTransparent()))),this.setLinear(t.some((e=>e.isLinear()))),this.setMipMaps(t.every((e=>e.canMipMaps()))),this.updateTextureParameters()}else this.clearTexture()}}),Object.defineProperties(I,{...w().getStaticProperties("ComposedCubeMapTexture","CubeMapTexturing",1,"texture","3.1"),fieldDefinitions:{value:new(m())([new(_())(M().inputOutput,"metadata",new(g().SFNode)),new(_())(M().inputOutput,"description",new(g().SFString)),new(_())(M().inputOutput,"frontTexture",new(g().SFNode)),new(_())(M().inputOutput,"backTexture",new(g().SFNode)),new(_())(M().inputOutput,"leftTexture",new(g().SFNode)),new(_())(M().inputOutput,"rightTexture",new(g().SFNode)),new(_())(M().inputOutput,"topTexture",new(g().SFNode)),new(_())(M().inputOutput,"bottomTexture",new(g().SFNode)),new(_())(M().initializeOnly,"textureProperties",new(g().SFNode))]),enumerable:!0}});for(let e=0;e<6;++e)I.prototype[`set_loadState${e}__`]=function(e,t){this.set_loadState__(e,t)};const F=I,D=o().add("ComposedCubeMapTexture",F),B=e.X3DBaseNode;var N=i.n(B);const L=e.X3DRenderObject;var X=i.n(L);const z=e.TraverseType;var V=i.n(z);function j(e,t,r){N().call(this,e),X().call(this,e),this.renderObject=t,this.node=r,this.framebuffers=[]}Object.assign(Object.setPrototypeOf(j.prototype,N().prototype),X().prototype,{initialize(){N().prototype.initialize.call(this),X().prototype.initialize.call(this)},isIndependent:()=>!1,getNode(){return this.node},getLayer(){return this.renderObject.getLayer()},getBackground(){return this.renderObject.getBackground()},getFog(){return this.renderObject.getFog()},getNavigationInfo(){return this.renderObject.getNavigationInfo()},getViewpoint(){return this.renderObject.getViewpoint()},getViewpointStack(){return this.renderObject.getViewpointStack()},getLightContainer(){return this.renderObject.getLights()[this.lightIndex++]},getFramebuffers(){return this.framebuffers},setFramebuffer(e){this.framebuffers[0]=e},render(e,t,r){switch(e){case V().COLLISION:case V().SHADOW:X().prototype.render.call(this,e,t,r);break;case V().DISPLAY:this.lightIndex=0,X().prototype.render.call(this,e,t,r);for(const e of this.renderObject.getLights())e.modelViewMatrix.pop()}}});for(const e of Object.keys(j.prototype))Object.defineProperty(j.prototype,e,{enumerable:!1});const G=j,k=o().add("DependentRenderer",G),Y=e.TextureBuffer;var W=i.n(Y);const H=e.Camera;var $=i.n(H);const Z=e.ViewVolume;var K=i.n(Z);const q=e.Rotation4;var J=i.n(q);const Q=e.Vector3;var ee=i.n(Q);const te=e.Vector4;var re=i.n(te);const ie=e.Matrix4;var se=i.n(ie);const ae=e.Algorithm;var ne=i.n(ae);function oe(e){S.call(this,e),this.addType(M().GeneratedCubeMapTexture),this.dependentRenderers=new WeakMap,this.projectionMatrix=new(se()),this.modelMatrix=new(se()),this.viewVolume=new(K())}Object.assign(Object.setPrototypeOf(oe.prototype,S.prototype),{initialize(){S.prototype.initialize.call(this),this._size.addInterest("set_size__",this),this.set_size__()},set_size__(){const e=this.getBrowser().getContext(),t=e.getVersion()>=2?this._size.getValue():ne().nextPowerOfTwo(this._size.getValue());if(t>0){const r=new Uint8Array(t*t*4);e.bindTexture(this.getTarget(),this.getTexture());for(const i of this.getTargets())e.texImage2D(i,0,e.RGBA,t,t,0,e.RGBA,e.UNSIGNED_BYTE,r);this.updateTextureParameters(),this.viewport=new(re())(0,0,t,t),this.frameBuffer=new(W())(this.getBrowser(),t,t),this.setSize(t)}else this.frameBuffer=null,this.setSize(0)},traverse(e,t){"NONE"!==this._update.getValue()&&t.isIndependent()&&this.frameBuffer&&(t.getGeneratedCubeMapTextures().push(this),this.modelMatrix.assign(t.getModelViewMatrix().get()).multRight(t.getCameraSpaceMatrix().get()))},renderTexture:(()=>{const e=[new(J())(ee().zAxis,new(ee())(0,0,-1)),new(J())(ee().zAxis,new(ee())(0,0,1)),new(J())(ee().zAxis,new(ee())(1,0,0)),new(J())(ee().zAxis,new(ee())(-1,0,0)),new(J())(ee().zAxis,new(ee())(0,-1,0)),new(J())(ee().zAxis,new(ee())(0,1,0))],t=[new(ee())(-1,-1,1),new(ee())(-1,-1,1),new(ee())(-1,-1,1),new(ee())(-1,-1,1),new(ee())(1,1,1),new(ee())(1,1,1)],r=new(se());return function(i){if(!this.dependentRenderers.has(i)){const e=new k(this.getExecutionContext(),i,this);e.setup(),this.dependentRenderers.set(i,e)}const s=this.dependentRenderers.get(i),a=this.getBrowser(),n=i.getLayer(),o=a.getContext(),u=s.getBackground(),h=s.getNavigationInfo(),d=s.getViewpoint(),c=a.getHeadlight(),T=h._headlight.getValue(),p=d.getNearDistance(h),x=d.getFarDistance(h),g=$().perspective(ne().radians(90),p,x,1,1,this.projectionMatrix),l=this.frameBuffer.getWidth(),_=this.frameBuffer.getHeight();this.setTransparent(u.isTransparent()),s.setFramebuffer(this.frameBuffer),s.getViewVolumes().push(this.viewVolume.set(g,this.viewport,this.viewport)),s.getProjectionMatrix().push(g),o.bindTexture(this.getTarget(),this.getTexture());for(let i=0;i<6;++i)o.clear(o.COLOR_BUFFER_BIT),s.getCameraSpaceMatrix().push(this.modelMatrix),s.getCameraSpaceMatrix().rotate(e[i]),s.getCameraSpaceMatrix().scale(t[i]),s.getViewMatrix().push(r.assign(s.getCameraSpaceMatrix().get()).inverse()),s.getModelViewMatrix().push(r),T&&(c.modelViewMatrix.push(r),c.modelViewMatrix.multLeft(d.getCameraSpaceMatrix())),n.traverse(V().DISPLAY,s),T&&c.modelViewMatrix.pop(),s.getModelViewMatrix().pop(),s.getCameraSpaceMatrix().pop(),s.getViewMatrix().pop(),o.bindTexture(this.getTarget(),this.getTexture()),o.copyTexSubImage2D(this.getTargets()[i],0,0,0,0,0,l,_);this.updateTextureParameters(),s.getProjectionMatrix().pop(),s.getViewVolumes().pop(),"NEXT_FRAME_ONLY"===this._update.getValue()&&(this._update="NONE")}})(),setShaderUniforms:(()=>{const e=new Float32Array(16);return function(t,r,i,s){S.prototype.setShaderUniforms.call(this,t,r,i,s),i.getNode()===this&&t.uniformMatrix4fv(r.x3d_ModelViewMatrix,!1,e)}})()}),Object.defineProperties(oe,{...w().getStaticProperties("GeneratedCubeMapTexture","CubeMapTexturing",3,"texture","3.0"),fieldDefinitions:{value:new(m())([new(_())(M().inputOutput,"metadata",new(g().SFNode)),new(_())(M().inputOutput,"description",new(g().SFString)),new(_())(M().inputOutput,"update",new(g().SFString)("NONE")),new(_())(M().initializeOnly,"size",new(g().SFInt32)(128)),new(_())(M().initializeOnly,"textureProperties",new(g().SFNode))]),enumerable:!0}});const ue=oe,he=o().add("GeneratedCubeMapTexture",ue),de=e.X3DUrlObject;var ce=i.n(de);const Te=e.Vector2;var pe=i.n(Te);const xe=e.DEVELOPMENT;var ge=i.n(xe),le=i(254);const _e=new Uint8Array([255,255,255,255]);function fe(e){S.call(this,e),ce().call(this,e),this.addType(M().ImageCubeMapTexture),this.image=le("<img></img>"),this.urlStack=new(g().MFString)}Object.assign(Object.setPrototypeOf(fe.prototype,S.prototype),ce().prototype,{initialize(){S.prototype.initialize.call(this),ce().prototype.initialize.call(this);const e=this.getBrowser().getContext();e.bindTexture(this.getTarget(),this.getTexture());for(let t=0;t<6;++t)e.texImage2D(this.getTargets()[t],0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,_e);this.image.on("load",this.setImage.bind(this)).on("abort error",this.setError.bind(this)).attr("crossorigin","anonymous"),this.requestImmediateLoad().catch(Function.prototype)},unloadData(){this.clearTexture()},loadData(){this.urlStack.setValue(this._url),this.loadNext()},loadNext(){if(0===this.urlStack.length)return this.clearTexture(),void this.setLoadState(M().FAILED_STATE);this.URL=new URL(this.urlStack.shift(),this.getExecutionContext().getBaseURL()),this.URL.pathname.match(/\.ktx2?(?:\.gz)?$/)||this.URL.href.match(/^data:image\/ktx2[;,]/)?(this.setLinear(!0),this.setMipMaps(!1),this.getBrowser().getKTXDecoder().then((e=>e.loadKTXFromURL(this.URL,this.getCache()))).then((e=>this.setKTXTexture(e))).catch((e=>this.setError({type:e.message})))):(this.setLinear(!1),this.setMipMaps(!0),"data:"!==this.URL.protocol&&(this.getCache()||this.URL.searchParams.set("_",Date.now())),this.image.attr("src",this.URL.href))},setError(e){"data:"!==this.URL.protocol&&console.warn(`Error loading image '${decodeURI(this.URL.href)}':`,e.type),this.loadNext()},setKTXTexture(e){if(e.target!==this.getTarget())return this.setError({type:"Invalid KTX texture target, must be 'TEXTURE_CUBE_MAP'."});ge()&&"data:"!==this.URL.protocol&&console.info(`Done loading image cube map texture '${decodeURI(this.URL.href)}'.`);try{this.setTexture(e),this.setTransparent(!1),this.setSize(e.baseWidth),this.updateTextureParameters(),this.setLoadState(M().COMPLETE_STATE)}catch(e){this.setError({type:e.message})}},setImage(){ge()&&"data:"!==this.URL.protocol&&console.info(`Done loading image cube map texture '${decodeURI(this.URL.href)}'.`);try{const e=this.getBrowser().getContext(),t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,this.image[0]),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),this.imageToCubeMap(t,this.image.prop("width"),this.image.prop("height"),!1),this.setLoadState(M().COMPLETE_STATE)}catch(e){this.setError({type:e.message})}},imageToCubeMap(e,t,r){const i=t/r;Math.abs(i-4/3)<.01&&this.skyBoxToCubeMap(e,t,r),Math.abs(i-2)<.01&&this.panoramaToCubeMap(e,t,r),this.updateTextureParameters()},skyBoxToCubeMap:function(){const e=[new(pe())(1,1),new(pe())(3,1),new(pe())(0,1),new(pe())(2,1),new(pe())(1,0),new(pe())(1,2)];return function(t,r,i){const s=this.getBrowser().getContext(),a=s.createFramebuffer(),n=Math.floor(r/4),o=Math.floor(i/3),u=new Uint8Array(n*o*4);s.bindTexture(this.getTarget(),this.getTexture());for(let e=0;e<6;++e)s.texImage2D(this.getTargets()[e],0,s.RGBA,n,o,0,s.RGBA,s.UNSIGNED_BYTE,null);s.bindFramebuffer(s.FRAMEBUFFER,a),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,t,0);let h=!1;s.bindTexture(this.getTarget(),this.getTexture());for(let t=0;t<6;++t)s.copyTexSubImage2D(this.getTargets()[t],0,0,0,e[t].x*n,e[t].y*o,n,o),h||(s.readPixels(e[t].x*n,e[t].y*o,n,o,s.RGBA,s.UNSIGNED_BYTE,u),h=this.isImageTransparent(u));s.deleteFramebuffer(a),s.deleteTexture(t),this.setTransparent(h),this.setSize(n)}}(),panoramaToCubeMap(e,t,r){const i=this.getBrowser(),s=i.getContext(),a=i.getPanoramaShader(),n=s.createFramebuffer(),o=i.getTextureCubeUnit(),u=Math.floor(r/2),h=new Uint8Array(u*u*4);s.bindTexture(s.TEXTURE_2D,e),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.MIRRORED_REPEAT),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.MIRRORED_REPEAT),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,s.LINEAR),s.bindTexture(this.getTarget(),this.getTexture());for(let e=0;e<6;++e)s.texImage2D(this.getTargets()[e],0,s.RGBA,u,u,0,s.RGBA,s.UNSIGNED_BYTE,null);s.useProgram(a.getProgram()),s.activeTexture(s.TEXTURE0+o),s.bindTexture(s.TEXTURE_2D,e),s.uniform1i(a.x3d_PanoramaTexture,o),s.bindFramebuffer(s.FRAMEBUFFER,n),s.viewport(0,0,u,u),s.scissor(0,0,u,u),s.disable(s.DEPTH_TEST),s.enable(s.CULL_FACE),s.frontFace(s.CCW),s.clearColor(0,0,0,0),s.bindVertexArray(i.getFullscreenVertexArrayObject());let d=!1;for(let e=0;e<6;++e)s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,this.getTargets()[e],this.getTexture(),0),s.clear(s.COLOR_BUFFER_BIT),s.uniform1i(a.x3d_CurrentFace,e),s.drawArrays(s.TRIANGLES,0,6),d||(s.readPixels(0,0,u,u,s.RGBA,s.UNSIGNED_BYTE,h),d=this.isImageTransparent(h));s.enable(s.DEPTH_TEST),s.deleteFramebuffer(n),s.deleteTexture(e),i.resetTextureUnits(),this.setTransparent(d),this.setSize(u)},dispose(){ce().prototype.dispose.call(this),S.prototype.dispose.call(this)}}),Object.defineProperties(fe,{...w().getStaticProperties("ImageCubeMapTexture","CubeMapTexturing",2,"texture","3.0"),fieldDefinitions:{value:new(m())([new(_())(M().inputOutput,"metadata",new(g().SFNode)),new(_())(M().inputOutput,"description",new(g().SFString)),new(_())(M().inputOutput,"load",new(g().SFBool)(!0)),new(_())(M().inputOutput,"url",new(g().MFString)),new(_())(M().inputOutput,"autoRefresh",new(g().SFTime)(0)),new(_())(M().inputOutput,"autoRefreshTimeLimit",new(g().SFTime)(3600)),new(_())(M().initializeOnly,"textureProperties",new(g().SFNode))]),enumerable:!0}});const me=fe,Ee=o().add("ImageCubeMapTexture",me);a().add({name:"CubeMapTexturing",concreteNodes:[D,he,Ee],abstractNodes:[S],browserContext:p});o().add("CubeMapTexturingComponent",undefined)})();
1
+ /* X_ITE v11.3.0 */
2
+ const e=window[Symbol.for("X_ITE.X3D-11.3.0")];(()=>{var t={254:t=>{t.exports=e.jquery}},r={};function i(e){var s=r[e];if(void 0!==s)return s.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,i),a.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const s=e.Components;var a=i.n(s);const n=e.Namespace;var o=i.n(n);const u=o().add("Panorama1.fs","\nprecision highp float;precision highp int;precision highp sampler2D;const float M_PI=3.1415926535897932384626433832795;varying vec2 texCoord;uniform sampler2D x3d_PanoramaTexture;uniform int x3d_CurrentFace;vec3 uvToXYZ(const in int face,const in vec2 uv){vec3 xyz;if(face==0)xyz=vec3(1.0,uv.y,uv.x);else if(face==1)xyz=vec3(-1.0,uv.y,-uv.x);else if(face==2)xyz=vec3(uv.x,uv.y,-1.0);else if(face==3)xyz=vec3(-uv.x,uv.y,1.0);else if(face==4)xyz=vec3(uv.y,-1.0,uv.x);else xyz=vec3(-uv.y,1.0,uv.x);return xyz;}vec2 dirToUV(const in vec3 dir){return vec2(0.5+0.5*atan(dir.z,dir.x)/M_PI,1.0-acos(dir.y)/M_PI);}vec3 panoramaToCubeMap(const in int face,const in vec2 texCoord){vec3 scan=uvToXYZ(face,texCoord);vec3 direction=normalize(scan);vec2 src=dirToUV(direction);return texture2D(x3d_PanoramaTexture,src).rgb;}void main(){gl_FragColor=vec4(panoramaToCubeMap(x3d_CurrentFace,texCoord),1.0);}"),h=o().add("Panorama2.fs","#version 300 es\nprecision highp float;precision highp int;precision highp sampler2D;const float M_PI=3.1415926535897932384626433832795;in vec2 texCoord;out vec4 x3d_FragColor;uniform sampler2D x3d_PanoramaTexture;uniform int x3d_CurrentFace;vec3 uvToXYZ(const in int face,const in vec2 uv){switch(face){case 0:return vec3(1.0,uv.y,uv.x);case 1:return vec3(-1.0,uv.y,-uv.x);case 2:return vec3(uv.x,uv.y,-1.0);case 3:return vec3(-uv.x,uv.y,1.0);case 4:return vec3(uv.y,-1.0,uv.x);default:return vec3(-uv.y,1.0,uv.x);}}vec2 dirToUV(const in vec3 dir){return vec2(0.5+0.5*atan(dir.z,dir.x)/M_PI,1.0-acos(dir.y)/M_PI);}vec3 panoramaToCubeMap(const in int face,const in vec2 texCoord){vec3 scan=uvToXYZ(face,texCoord);vec3 direction=normalize(scan);vec2 src=dirToUV(direction);return texture(x3d_PanoramaTexture,src).rgb;}void main(){x3d_FragColor=vec4(panoramaToCubeMap(x3d_CurrentFace,texCoord),1.0);}"),d=Symbol();function c(){}Object.assign(c.prototype,{getPanoramaShader(){return this[d]?this[d]:this[d]=this.createShader("Panorama","FullScreen","data:x-shader/x-fragment,"+["",u,h][this.getContext().getVersion()],[],["x3d_PanoramaTexture","x3d_CurrentFace"])}});const T=c,p=o().add("X3DCubeMapTexturingContext",T),x=e.Fields;var g=i.n(x);const l=e.X3DFieldDefinition;var _=i.n(l);const f=e.FieldDefinitionArray;var m=i.n(f);const E=e.X3DNode;var w=i.n(E);const b=e.X3DSingleTextureNode;var v=i.n(b);const R=e.X3DConstants;var M=i.n(R);function C(e){v().call(this,e),this.addType(M().X3DEnvironmentTextureNode);const t=this.getBrowser().getContext();this.target=t.TEXTURE_CUBE_MAP,this.targets=[t.TEXTURE_CUBE_MAP_POSITIVE_Z,t.TEXTURE_CUBE_MAP_NEGATIVE_Z,t.TEXTURE_CUBE_MAP_NEGATIVE_X,t.TEXTURE_CUBE_MAP_POSITIVE_X,t.TEXTURE_CUBE_MAP_POSITIVE_Y,t.TEXTURE_CUBE_MAP_NEGATIVE_Y],this.size=1,this.levels=0}Object.assign(Object.setPrototypeOf(C.prototype,v().prototype),{getTarget(){return this.target},getTextureType:()=>4,getTargets(){return this.targets},getSize(){return this.size},setSize(e){this.size=e,this.levels=Math.floor(Math.log2(Math.max(e,1)))},getLevels(){return this.levels},clearTexture:(()=>{const e=new Uint8Array([255,255,255,255]);return function(){const t=this.getBrowser().getContext();t.bindTexture(this.getTarget(),this.getTexture());for(const r of this.getTargets())t.texImage2D(r,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,e);this.setSize(1),this.setTransparent(!1),this.updateTextureParameters()}})(),updateTextureParameters(){v().prototype.updateTextureParameters.call(this,this.target,this._textureProperties.getValue(),this.texturePropertiesNode,this.size,this.size,!1,!1,!1)},setShaderUniforms(e,t,r,i=t.x3d_Texture[0]){const s=this.getBrowser().getTextureCubeUnit();e.activeTexture(e.TEXTURE0+s),e.bindTexture(e.TEXTURE_CUBE_MAP,this.getTexture()),e.uniform1i(i.textureCube,s)}}),Object.defineProperties(C,w().getStaticProperties("X3DEnvironmentTextureNode","CubeMapTexturing",1));const y=C,S=o().add("X3DEnvironmentTextureNode",y),U=e.X3DCast;var P=i.n(U);const A=e.BitSet;var O=i.n(A);function I(e){S.call(this,e),this.addType(M().ComposedCubeMapTexture),this.addChildObjects(M().outputOnly,"update",new(g().SFTime)),e.getSpecificationVersion()<=3.3&&(this.addAlias("front",this._frontTexture),this.addAlias("back",this._backTexture),this.addAlias("left",this._leftTexture),this.addAlias("right",this._rightTexture),this.addAlias("top",this._topTexture),this.addAlias("bottom",this._bottomTexture)),this.textureNodes=[null,null,null,null,null,null],this.textureBits=new(O())}Object.assign(Object.setPrototypeOf(I.prototype,S.prototype),{initialize(){S.prototype.initialize.call(this);const e=this.getBrowser().getContext();this.frameBuffer=e.createFramebuffer(),this.clearTexture(),this._frontTexture.addInterest("set_texture__",this,0),this._backTexture.addInterest("set_texture__",this,1),this._leftTexture.addInterest("set_texture__",this,2),this._rightTexture.addInterest("set_texture__",this,3),this._topTexture.addInterest("set_texture__",this,5),this._bottomTexture.addInterest("set_texture__",this,4),this._update.addInterest("update",this),this.set_texture__(0,this._frontTexture),this.set_texture__(1,this._backTexture),this.set_texture__(2,this._leftTexture),this.set_texture__(3,this._rightTexture),this.set_texture__(4,this._topTexture),this.set_texture__(5,this._bottomTexture)},set_texture__(e,t){let r=this.textureNodes[e];r?.removeInterest(`set_loadState${e}__`,this),r=this.textureNodes[e]=P()(M().X3DTexture2DNode,t),r?.addInterest(`set_loadState${e}__`,this,e,r),this.set_loadState__(e,r)},set_loadState__(e,t){this.setTextureBit(e,t?.checkLoadState()),this._update.addEvent()},setTextureBit(e,t){this.textureBits.set(e,t===M().COMPLETE_STATE)},isComplete(){if(63!=+this.textureBits)return!1;const e=this.textureNodes,t=e[0].getWidth();for(const r of e){if(r.getWidth()!==t)return!1;if(r.getHeight()!==t)return!1}return!0},update(){if(this.isComplete()){const e=this.getBrowser().getContext(),t=this.textureNodes,r=t[0].getWidth();if(r!==this.getSize()){const t=new Uint8Array(r*r*4);e.bindTexture(this.getTarget(),this.getTexture());for(let i=0;i<6;++i)e.texImage2D(this.getTargets()[i],0,e.RGBA,r,r,0,e.RGBA,e.UNSIGNED_BYTE,t);this.setSize(r),this.updateTextureParameters()}e.bindFramebuffer(e.FRAMEBUFFER,this.frameBuffer);for(let i=0;i<6;++i){const s=t[i];if(e.bindTexture(e.TEXTURE_2D,s.getTexture()),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,s.getTexture(),0),e.bindTexture(this.getTarget(),this.getTexture()),1===s.getTextureType())e.copyTexSubImage2D(this.getTargets()[i],0,0,0,0,0,r,r);else for(let t=0;t<r;++t)e.copyTexSubImage2D(this.getTargets()[i],0,0,r-t-1,0,t,r,1)}this.setTransparent(t.some((e=>e.isTransparent()))),this.setLinear(t.some((e=>e.isLinear()))),this.setMipMaps(t.every((e=>e.canMipMaps()))),this.updateTextureParameters()}else this.clearTexture()}}),Object.defineProperties(I,{...w().getStaticProperties("ComposedCubeMapTexture","CubeMapTexturing",1,"texture","3.1"),fieldDefinitions:{value:new(m())([new(_())(M().inputOutput,"metadata",new(g().SFNode)),new(_())(M().inputOutput,"description",new(g().SFString)),new(_())(M().inputOutput,"frontTexture",new(g().SFNode)),new(_())(M().inputOutput,"backTexture",new(g().SFNode)),new(_())(M().inputOutput,"leftTexture",new(g().SFNode)),new(_())(M().inputOutput,"rightTexture",new(g().SFNode)),new(_())(M().inputOutput,"topTexture",new(g().SFNode)),new(_())(M().inputOutput,"bottomTexture",new(g().SFNode)),new(_())(M().initializeOnly,"textureProperties",new(g().SFNode))]),enumerable:!0}});for(let e=0;e<6;++e)I.prototype[`set_loadState${e}__`]=function(e,t){this.set_loadState__(e,t)};const F=I,D=o().add("ComposedCubeMapTexture",F),B=e.X3DBaseNode;var N=i.n(B);const L=e.X3DRenderObject;var X=i.n(L);const z=e.TraverseType;var V=i.n(z);function j(e,t,r){N().call(this,e),X().call(this,e),this.renderObject=t,this.node=r,this.framebuffers=[]}Object.assign(Object.setPrototypeOf(j.prototype,N().prototype),X().prototype,{initialize(){N().prototype.initialize.call(this),X().prototype.initialize.call(this)},isIndependent:()=>!1,getNode(){return this.node},getLayer(){return this.renderObject.getLayer()},getBackground(){return this.renderObject.getBackground()},getFog(){return this.renderObject.getFog()},getNavigationInfo(){return this.renderObject.getNavigationInfo()},getViewpoint(){return this.renderObject.getViewpoint()},getViewpointStack(){return this.renderObject.getViewpointStack()},getLightContainer(){return this.renderObject.getLights()[this.lightIndex++]},getFramebuffers(){return this.framebuffers},setFramebuffer(e){this.framebuffers[0]=e},render(e,t,r){switch(e){case V().COLLISION:case V().SHADOW:X().prototype.render.call(this,e,t,r);break;case V().DISPLAY:this.lightIndex=0,X().prototype.render.call(this,e,t,r);for(const e of this.renderObject.getLights())e.modelViewMatrix.pop()}}});for(const e of Object.keys(j.prototype))Object.defineProperty(j.prototype,e,{enumerable:!1});const G=j,k=o().add("DependentRenderer",G),Y=e.TextureBuffer;var W=i.n(Y);const H=e.Camera;var $=i.n(H);const Z=e.ViewVolume;var K=i.n(Z);const q=e.Rotation4;var J=i.n(q);const Q=e.Vector3;var ee=i.n(Q);const te=e.Vector4;var re=i.n(te);const ie=e.Matrix4;var se=i.n(ie);const ae=e.Algorithm;var ne=i.n(ae);function oe(e){S.call(this,e),this.addType(M().GeneratedCubeMapTexture),this.dependentRenderers=new WeakMap,this.projectionMatrix=new(se()),this.modelMatrix=new(se()),this.viewVolume=new(K())}Object.assign(Object.setPrototypeOf(oe.prototype,S.prototype),{initialize(){S.prototype.initialize.call(this),this._size.addInterest("set_size__",this),this.set_size__()},set_size__(){const e=this.getBrowser().getContext(),t=e.getVersion()>=2?this._size.getValue():ne().nextPowerOfTwo(this._size.getValue());if(t>0){const r=new Uint8Array(t*t*4);e.bindTexture(this.getTarget(),this.getTexture());for(const i of this.getTargets())e.texImage2D(i,0,e.RGBA,t,t,0,e.RGBA,e.UNSIGNED_BYTE,r);this.updateTextureParameters(),this.viewport=new(re())(0,0,t,t),this.frameBuffer=new(W())(this.getBrowser(),t,t),this.setSize(t)}else this.frameBuffer=null,this.setSize(0)},traverse(e,t){"NONE"!==this._update.getValue()&&t.isIndependent()&&this.frameBuffer&&(t.getGeneratedCubeMapTextures().push(this),this.modelMatrix.assign(t.getModelViewMatrix().get()).multRight(t.getCameraSpaceMatrix().get()))},renderTexture:(()=>{const e=[new(J())(ee().zAxis,new(ee())(0,0,-1)),new(J())(ee().zAxis,new(ee())(0,0,1)),new(J())(ee().zAxis,new(ee())(1,0,0)),new(J())(ee().zAxis,new(ee())(-1,0,0)),new(J())(ee().zAxis,new(ee())(0,-1,0)),new(J())(ee().zAxis,new(ee())(0,1,0))],t=[new(ee())(-1,-1,1),new(ee())(-1,-1,1),new(ee())(-1,-1,1),new(ee())(-1,-1,1),new(ee())(1,1,1),new(ee())(1,1,1)],r=new(se());return function(i){if(!this.dependentRenderers.has(i)){const e=new k(this.getExecutionContext(),i,this);e.setup(),this.dependentRenderers.set(i,e)}const s=this.dependentRenderers.get(i),a=this.getBrowser(),n=i.getLayer(),o=a.getContext(),u=s.getBackground(),h=s.getNavigationInfo(),d=s.getViewpoint(),c=a.getHeadlight(),T=h._headlight.getValue(),p=d.getNearDistance(h),x=d.getFarDistance(h),g=$().perspective(ne().radians(90),p,x,1,1,this.projectionMatrix),l=this.frameBuffer.getWidth(),_=this.frameBuffer.getHeight();this.setTransparent(u.isTransparent()),s.setFramebuffer(this.frameBuffer),s.getViewVolumes().push(this.viewVolume.set(g,this.viewport,this.viewport)),s.getProjectionMatrix().push(g),o.bindTexture(this.getTarget(),this.getTexture());for(let i=0;i<6;++i)o.clear(o.COLOR_BUFFER_BIT),s.getCameraSpaceMatrix().push(this.modelMatrix),s.getCameraSpaceMatrix().rotate(e[i]),s.getCameraSpaceMatrix().scale(t[i]),s.getViewMatrix().push(r.assign(s.getCameraSpaceMatrix().get()).inverse()),s.getModelViewMatrix().push(r),T&&(c.modelViewMatrix.push(r),c.modelViewMatrix.multLeft(d.getCameraSpaceMatrix())),n.traverse(V().DISPLAY,s),T&&c.modelViewMatrix.pop(),s.getModelViewMatrix().pop(),s.getCameraSpaceMatrix().pop(),s.getViewMatrix().pop(),o.bindTexture(this.getTarget(),this.getTexture()),o.copyTexSubImage2D(this.getTargets()[i],0,0,0,0,0,l,_);this.updateTextureParameters(),s.getProjectionMatrix().pop(),s.getViewVolumes().pop(),"NEXT_FRAME_ONLY"===this._update.getValue()&&(this._update="NONE")}})(),setShaderUniforms:(()=>{const e=new Float32Array(16);return function(t,r,i,s){S.prototype.setShaderUniforms.call(this,t,r,i,s),i.getNode()===this&&t.uniformMatrix4fv(r.x3d_ModelViewMatrix,!1,e)}})()}),Object.defineProperties(oe,{...w().getStaticProperties("GeneratedCubeMapTexture","CubeMapTexturing",3,"texture","3.0"),fieldDefinitions:{value:new(m())([new(_())(M().inputOutput,"metadata",new(g().SFNode)),new(_())(M().inputOutput,"description",new(g().SFString)),new(_())(M().inputOutput,"update",new(g().SFString)("NONE")),new(_())(M().initializeOnly,"size",new(g().SFInt32)(128)),new(_())(M().initializeOnly,"textureProperties",new(g().SFNode))]),enumerable:!0}});const ue=oe,he=o().add("GeneratedCubeMapTexture",ue),de=e.X3DUrlObject;var ce=i.n(de);const Te=e.Vector2;var pe=i.n(Te);const xe=e.DEVELOPMENT;var ge=i.n(xe),le=i(254);const _e=new Uint8Array([255,255,255,255]);function fe(e){S.call(this,e),ce().call(this,e),this.addType(M().ImageCubeMapTexture),this.image=le("<img></img>"),this.urlStack=new(g().MFString)}Object.assign(Object.setPrototypeOf(fe.prototype,S.prototype),ce().prototype,{initialize(){S.prototype.initialize.call(this),ce().prototype.initialize.call(this);const e=this.getBrowser().getContext();e.bindTexture(this.getTarget(),this.getTexture());for(let t=0;t<6;++t)e.texImage2D(this.getTargets()[t],0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,_e);this.image.on("load",this.setImage.bind(this)).on("abort error",this.setError.bind(this)).attr("crossorigin","anonymous"),this.requestImmediateLoad().catch(Function.prototype)},unloadData(){this.clearTexture()},loadData(){this.urlStack.setValue(this._url),this.loadNext()},loadNext(){if(0===this.urlStack.length)return this.clearTexture(),void this.setLoadState(M().FAILED_STATE);this.URL=new URL(this.urlStack.shift(),this.getExecutionContext().getBaseURL()),this.URL.pathname.match(/\.ktx2?(?:\.gz)?$/)||this.URL.href.match(/^data:image\/ktx2[;,]/)?(this.setLinear(!0),this.setMipMaps(!1),this.getBrowser().getKTXDecoder().then((e=>e.loadKTXFromURL(this.URL,this.getCache()))).then((e=>this.setKTXTexture(e))).catch((e=>this.setError({type:e.message})))):(this.setLinear(!1),this.setMipMaps(!0),"data:"!==this.URL.protocol&&(this.getCache()||this.URL.searchParams.set("_",Date.now())),this.image.attr("src",this.URL.href))},setError(e){"data:"!==this.URL.protocol&&console.warn(`Error loading image '${decodeURI(this.URL.href)}':`,e.type),this.loadNext()},setKTXTexture(e){if(e.target!==this.getTarget())return this.setError({type:"Invalid KTX texture target, must be 'TEXTURE_CUBE_MAP'."});ge()&&"data:"!==this.URL.protocol&&console.info(`Done loading image cube map texture '${decodeURI(this.URL.href)}'.`);try{this.setTexture(e),this.setTransparent(!1),this.setSize(e.baseWidth),this.updateTextureParameters(),this.setLoadState(M().COMPLETE_STATE)}catch(e){this.setError({type:e.message})}},setImage(){ge()&&"data:"!==this.URL.protocol&&console.info(`Done loading image cube map texture '${decodeURI(this.URL.href)}'.`);try{const e=this.getBrowser().getContext(),t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,this.image[0]),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),this.imageToCubeMap(t,this.image.prop("width"),this.image.prop("height"),!1),this.setLoadState(M().COMPLETE_STATE)}catch(e){this.setError({type:e.message})}},imageToCubeMap(e,t,r){const i=t/r;Math.abs(i-4/3)<.01&&this.skyBoxToCubeMap(e,t,r),Math.abs(i-2)<.01&&this.panoramaToCubeMap(e,t,r),this.updateTextureParameters()},skyBoxToCubeMap:function(){const e=[new(pe())(1,1),new(pe())(3,1),new(pe())(0,1),new(pe())(2,1),new(pe())(1,0),new(pe())(1,2)];return function(t,r,i){const s=this.getBrowser().getContext(),a=s.createFramebuffer(),n=Math.floor(r/4),o=Math.floor(i/3),u=new Uint8Array(n*o*4);s.bindTexture(this.getTarget(),this.getTexture());for(let e=0;e<6;++e)s.texImage2D(this.getTargets()[e],0,s.RGBA,n,o,0,s.RGBA,s.UNSIGNED_BYTE,null);s.bindFramebuffer(s.FRAMEBUFFER,a),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,t,0);let h=!1;s.bindTexture(this.getTarget(),this.getTexture());for(let t=0;t<6;++t)s.copyTexSubImage2D(this.getTargets()[t],0,0,0,e[t].x*n,e[t].y*o,n,o),h||(s.readPixels(e[t].x*n,e[t].y*o,n,o,s.RGBA,s.UNSIGNED_BYTE,u),h=this.isImageTransparent(u));s.deleteFramebuffer(a),s.deleteTexture(t),this.setTransparent(h),this.setSize(n)}}(),panoramaToCubeMap(e,t,r){const i=this.getBrowser(),s=i.getContext(),a=i.getPanoramaShader(),n=s.createFramebuffer(),o=i.getTextureCubeUnit(),u=Math.floor(r/2),h=new Uint8Array(u*u*4);s.bindTexture(s.TEXTURE_2D,e),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.MIRRORED_REPEAT),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.MIRRORED_REPEAT),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,s.LINEAR),s.bindTexture(this.getTarget(),this.getTexture());for(let e=0;e<6;++e)s.texImage2D(this.getTargets()[e],0,s.RGBA,u,u,0,s.RGBA,s.UNSIGNED_BYTE,null);s.useProgram(a.getProgram()),s.activeTexture(s.TEXTURE0+o),s.bindTexture(s.TEXTURE_2D,e),s.uniform1i(a.x3d_PanoramaTexture,o),s.bindFramebuffer(s.FRAMEBUFFER,n),s.viewport(0,0,u,u),s.scissor(0,0,u,u),s.disable(s.DEPTH_TEST),s.enable(s.CULL_FACE),s.frontFace(s.CCW),s.clearColor(0,0,0,0),s.bindVertexArray(i.getFullscreenVertexArrayObject());let d=!1;for(let e=0;e<6;++e)s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,this.getTargets()[e],this.getTexture(),0),s.clear(s.COLOR_BUFFER_BIT),s.uniform1i(a.x3d_CurrentFace,e),s.drawArrays(s.TRIANGLES,0,6),d||(s.readPixels(0,0,u,u,s.RGBA,s.UNSIGNED_BYTE,h),d=this.isImageTransparent(h));s.enable(s.DEPTH_TEST),s.deleteFramebuffer(n),s.deleteTexture(e),i.resetTextureUnits(),this.setTransparent(d),this.setSize(u)},dispose(){ce().prototype.dispose.call(this),S.prototype.dispose.call(this)}}),Object.defineProperties(fe,{...w().getStaticProperties("ImageCubeMapTexture","CubeMapTexturing",2,"texture","3.0"),fieldDefinitions:{value:new(m())([new(_())(M().inputOutput,"metadata",new(g().SFNode)),new(_())(M().inputOutput,"description",new(g().SFString)),new(_())(M().inputOutput,"load",new(g().SFBool)(!0)),new(_())(M().inputOutput,"url",new(g().MFString)),new(_())(M().inputOutput,"autoRefresh",new(g().SFTime)(0)),new(_())(M().inputOutput,"autoRefreshTimeLimit",new(g().SFTime)(3600)),new(_())(M().initializeOnly,"textureProperties",new(g().SFNode))]),enumerable:!0}});const me=fe,Ee=o().add("ImageCubeMapTexture",me);a().add({name:"CubeMapTexturing",concreteNodes:[D,he,Ee],abstractNodes:[S],browserContext:p});o().add("CubeMapTexturingComponent",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