x_ite 4.7.5 → 4.7.9

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 (157) hide show
  1. package/.vscode/launch.json +15 -0
  2. package/.vscode/settings.json +2 -5
  3. package/Makefile +1 -0
  4. package/README.md +1 -1
  5. package/build/components/annotation.build.js +2 -2
  6. package/build/components/cad-geometry.build.js +2 -2
  7. package/build/components/cube-map-texturing.build.js +2 -2
  8. package/build/components/dis.build.js +2 -2
  9. package/build/components/event-utilities.build.js +2 -2
  10. package/build/components/geometry2d.build.js +2 -2
  11. package/build/components/geospatial.build.js +2 -2
  12. package/build/components/h-anim.build.js +2 -2
  13. package/build/components/key-device-sensor.build.js +2 -2
  14. package/build/components/layout.build.js +2 -2
  15. package/build/components/nurbs.build.js +2 -2
  16. package/build/components/particle-systems.build.js +2 -2
  17. package/build/components/picking.build.js +2 -2
  18. package/build/components/projective-texture-mapping.build.js +2 -2
  19. package/build/components/rigid-body-physics.build.js +2 -2
  20. package/build/components/scripting.build.js +2 -2
  21. package/build/components/texturing-3d.build.js +2 -2
  22. package/build/components/volume-rendering.build.js +2 -2
  23. package/build/components/x_ite.build.js +2 -2
  24. package/build/parts/default.end.frag.js +2 -0
  25. package/build/parts/default.start.frag.js +8 -0
  26. package/build/parts/{x_ite.end.frag → x_ite.end.frag.js} +4 -2
  27. package/build/parts/x_ite.start.frag.js +16 -0
  28. package/build/x_ite.build.js +2 -2
  29. package/dist/assets/components/annotation.js +9 -7
  30. package/dist/assets/components/annotation.min.js +1 -1
  31. package/dist/assets/components/cad-geometry.js +9 -7
  32. package/dist/assets/components/cad-geometry.min.js +1 -1
  33. package/dist/assets/components/cube-map-texturing.js +9 -7
  34. package/dist/assets/components/cube-map-texturing.min.js +1 -1
  35. package/dist/assets/components/dis.js +9 -7
  36. package/dist/assets/components/dis.min.js +1 -1
  37. package/dist/assets/components/event-utilities.js +9 -7
  38. package/dist/assets/components/event-utilities.min.js +1 -1
  39. package/dist/assets/components/geometry2d.js +9 -7
  40. package/dist/assets/components/geometry2d.min.js +1 -1
  41. package/dist/assets/components/geospatial.js +9 -7
  42. package/dist/assets/components/geospatial.min.js +2 -2
  43. package/dist/assets/components/h-anim.js +9 -7
  44. package/dist/assets/components/h-anim.min.js +1 -1
  45. package/dist/assets/components/key-device-sensor.js +9 -7
  46. package/dist/assets/components/key-device-sensor.min.js +1 -1
  47. package/dist/assets/components/layout.js +9 -7
  48. package/dist/assets/components/layout.min.js +1 -1
  49. package/dist/assets/components/nurbs.js +9 -7
  50. package/dist/assets/components/nurbs.min.js +2 -2
  51. package/dist/assets/components/particle-systems.js +9 -7
  52. package/dist/assets/components/particle-systems.min.js +2 -2
  53. package/dist/assets/components/picking.js +13 -11
  54. package/dist/assets/components/picking.min.js +1 -1
  55. package/dist/assets/components/projective-texture-mapping.js +9 -7
  56. package/dist/assets/components/projective-texture-mapping.min.js +1 -1
  57. package/dist/assets/components/rigid-body-physics.js +9 -7
  58. package/dist/assets/components/rigid-body-physics.min.js +17 -17
  59. package/dist/assets/components/scripting.js +16 -9
  60. package/dist/assets/components/scripting.min.js +1 -1
  61. package/dist/assets/components/texturing-3d.js +9 -7
  62. package/dist/assets/components/texturing-3d.min.js +3 -3
  63. package/dist/assets/components/volume-rendering.js +11 -9
  64. package/dist/assets/components/volume-rendering.min.js +3 -3
  65. package/dist/assets/components/x_ite.js +9 -7
  66. package/dist/assets/components/x_ite.min.js +1 -1
  67. package/dist/assets/shaders/webgl1/FallbackUnlit.fs +3 -4
  68. package/dist/assets/shaders/webgl1/Gouraud.vs +0 -1
  69. package/dist/assets/shaders/webgl1/Phong.fs +0 -1
  70. package/dist/assets/shaders/webgl1/Unlit.fs +0 -3
  71. package/dist/assets/shaders/webgl2/Gouraud.vs +0 -1
  72. package/dist/assets/shaders/webgl2/Phong.fs +0 -1
  73. package/dist/assets/shaders/webgl2/Unlit.fs +0 -3
  74. package/dist/example.html +2 -2
  75. package/dist/x_ite.css +4 -3
  76. package/dist/x_ite.js +28281 -27706
  77. package/dist/x_ite.min.js +41 -41
  78. package/dist/x_ite.zip +0 -0
  79. package/docs/Accessing-the-External-Browser.md +32 -3
  80. package/docs/Custom-Shaders.md +165 -174
  81. package/docs/What's-New.md +61 -6
  82. package/docs/_config.yml +1 -1
  83. package/docs/index.md +21 -14
  84. package/docs/reference/Browser-Services.md +36 -8
  85. package/docs/reference/Script-Node-Authoring-Interface.md +12 -4
  86. package/package.json +13 -6
  87. package/src/assets/components/picking.js +2 -2
  88. package/src/assets/components/volume-rendering.js +2 -2
  89. package/src/assets/shaders/webgl1/FallbackUnlit.fs +3 -4
  90. package/src/assets/shaders/webgl1/Gouraud.vs +0 -1
  91. package/src/assets/shaders/webgl1/Phong.fs +0 -1
  92. package/src/assets/shaders/webgl1/Unlit.fs +0 -3
  93. package/src/assets/shaders/webgl2/Gouraud.vs +0 -1
  94. package/src/assets/shaders/webgl2/Phong.fs +0 -1
  95. package/src/assets/shaders/webgl2/Unlit.fs +0 -3
  96. package/src/bookmarks.js +8 -11
  97. package/src/examples.js +1 -1
  98. package/src/locale/de.po +19 -75
  99. package/src/locale/fr.po +18 -75
  100. package/src/standard/Time/MicroTime.js +3 -1
  101. package/src/standard/Utility/DataStorage.js +7 -10
  102. package/src/tests.js +2 -1
  103. package/src/x_ite/Browser/Core/BrowserOptions.js +40 -28
  104. package/src/x_ite/Browser/Core/BrowserTimings.js +13 -24
  105. package/src/x_ite/Browser/Core/ContextMenu.js +26 -12
  106. package/src/x_ite/Browser/Core/X3DCoreContext.js +95 -42
  107. package/src/x_ite/Browser/Navigation/ExamineViewer.js +3 -0
  108. package/src/x_ite/Browser/Navigation/LookAtViewer.js +3 -0
  109. package/src/x_ite/Browser/Navigation/PlaneViewer.js +3 -0
  110. package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +3 -0
  111. package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +1 -3
  112. package/src/x_ite/Browser/Networking/urls.js +25 -0
  113. package/src/x_ite/Browser/Picking/VolumePicker.js +1 -1
  114. package/src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js +4 -1
  115. package/src/x_ite/Browser/Shaders/ShaderTest.js +3 -3
  116. package/src/x_ite/Browser/VERSION.js +1 -1
  117. package/src/x_ite/Browser/X3DBrowser.js +70 -50
  118. package/src/x_ite/Components/Grouping/Switch.js +1 -1
  119. package/src/x_ite/Components/Lighting/DirectionalLight.js +1 -1
  120. package/src/x_ite/Components/Navigation/Collision.js +1 -1
  121. package/src/x_ite/Components/Navigation/LOD.js +1 -1
  122. package/src/x_ite/Components/Picking/PointPickSensor.js +1 -1
  123. package/src/x_ite/Components/Rendering/X3DGeometryNode.js +25 -11
  124. package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +35 -1
  125. package/src/x_ite/Components/Scripting/Script.js +7 -2
  126. package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +10 -12
  127. package/src/x_ite/Components/Shaders.js +9 -9
  128. package/src/x_ite/Execution/X3DExecutionContext.js +9 -11
  129. package/src/x_ite/Fields/SFColor.js +20 -7
  130. package/src/x_ite/Fields/SFColorRGBA.js +6 -6
  131. package/src/x_ite/Fields/SFDouble.js +2 -2
  132. package/src/x_ite/Fields/SFFloat.js +2 -2
  133. package/src/x_ite/Fields/SFImage.js +13 -13
  134. package/src/x_ite/Fields/SFMatrix3.js +5 -5
  135. package/src/x_ite/Fields/SFMatrix4.js +6 -6
  136. package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +14 -3
  137. package/src/x_ite/Fields/SFNode.js +23 -19
  138. package/src/x_ite/Fields/SFNodeCache.js +14 -10
  139. package/src/x_ite/Fields/SFRotation.js +10 -10
  140. package/src/x_ite/Fields/SFString.js +1 -1
  141. package/src/x_ite/Fields/SFTime.js +1 -1
  142. package/src/x_ite/Fields/SFVec2.js +6 -6
  143. package/src/x_ite/Fields/SFVec3.js +7 -7
  144. package/src/x_ite/Fields/SFVec4.js +8 -8
  145. package/src/x_ite/Fields/SFVecPrototypeTemplate.js +7 -6
  146. package/src/x_ite/InputOutput/Generator.js +85 -65
  147. package/src/x_ite/Parser/X3DParser.js +6 -0
  148. package/src/x_ite/Parser/XMLParser.js +1 -1
  149. package/src/x_ite/X3D.js +8 -2
  150. package/src/x_ite.config.js +0 -5
  151. package/src/x_ite.css +2 -1
  152. package/src/x_ite.html +3 -3
  153. package/src/x_ite.js +21 -12
  154. package/x_ite.min.html +3 -3
  155. package/build/parts/default.end.frag +0 -2
  156. package/build/parts/default.start.frag +0 -6
  157. package/build/parts/x_ite.start.frag +0 -8
@@ -1,9 +1,11 @@
1
- (function () {
1
+ (function ()
2
+ {
3
+ // Undefine global variables.
4
+ var module = { }, exports, process;
2
5
 
3
- var
4
- define = X3D .define,
5
- require = X3D .require,
6
- module = { };
6
+ const
7
+ define = X3D .define,
8
+ require = X3D .require;
7
9
  /* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
8
10
  *******************************************************************************
9
11
  *
@@ -1044,7 +1046,7 @@ function (Fields,
1044
1046
  ******************************************************************************/
1045
1047
 
1046
1048
 
1047
- define ([
1049
+ define (require .getComponentUrl ("h-anim"), [
1048
1050
  "x_ite/Components",
1049
1051
  "x_ite/Components/HAnim/HAnimDisplacer",
1050
1052
  "x_ite/Components/HAnim/HAnimHumanoid",
@@ -1081,4 +1083,4 @@ function (Components,
1081
1083
  });
1082
1084
 
1083
1085
 
1084
- }());
1086
+ })();
@@ -1 +1 @@
1
- !function(){var t=X3D.define;X3D.require;t("x_ite/Components/HAnim/HAnimDisplacer",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometricPropertyNode","x_ite/Bits/X3DConstants"],function(t,e,n,i,o){"use strict";function s(t){i.call(this,t),this.addType(o.HAnimDisplacer),this.displacements_.setUnit("length")}return s.prototype=Object.assign(Object.create(i.prototype),{constructor:s,fieldDefinitions:new n([new e(o.inputOutput,"metadata",new t.SFNode),new e(o.inputOutput,"name",new t.SFString),new e(o.inputOutput,"coordIndex",new t.MFInt32),new e(o.inputOutput,"weight",new t.SFFloat),new e(o.inputOutput,"displacements",new t.MFVec3f)]),getTypeName:function(){return"HAnimDisplacer"},getComponentName:function(){return"HAnim"},getContainerField:function(){return"displacers"}}),s}),t("x_ite/Components/HAnim/HAnimHumanoid",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Core/X3DChildNode","x_ite/Components/Grouping/Group","x_ite/Components/Grouping/Transform","x_ite/Components/Grouping/X3DBoundedObject","x_ite/Bits/TraverseType","x_ite/Bits/X3DConstants","x_ite/Bits/X3DCast","standard/Math/Numbers/Matrix4","standard/Math/Numbers/Vector3"],function(t,e,n,i,o,s,r,u,a,d,p,l){"use strict";function c(t){i.call(this,t),r.call(this,t),this.addType(a.HAnimHumanoid),this.translation_.setUnit("length"),this.center_.setUnit("length"),this.bboxSize_.setUnit("length"),this.bboxCenter_.setUnit("length"),this.viewpointsNode=new o(t),this.skeletonNode=new o(t),this.skinNode=new o(t),this.transformNode=new s(t),this.jointNodes=[],this.skinNormalNode=null,this.skinCoordNode=null,this.restNormalNode=null,this.restCoordNode=null}return c.prototype=Object.assign(Object.create(i.prototype),r.prototype,{constructor:c,fieldDefinitions:new n([new e(a.inputOutput,"metadata",new t.SFNode),new e(a.inputOutput,"name",new t.SFString),new e(a.inputOutput,"version",new t.SFString),new e(a.inputOutput,"info",new t.MFString),new e(a.inputOutput,"translation",new t.SFVec3f),new e(a.inputOutput,"rotation",new t.SFRotation),new e(a.inputOutput,"scale",new t.SFVec3f(1,1,1)),new e(a.inputOutput,"scaleOrientation",new t.SFRotation),new e(a.inputOutput,"center",new t.SFVec3f),new e(a.inputOutput,"visible",new t.SFBool(!0)),new e(a.inputOutput,"bboxDisplay",new t.SFBool),new e(a.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new e(a.initializeOnly,"bboxCenter",new t.SFVec3f),new e(a.inputOutput,"viewpoints",new t.MFNode),new e(a.inputOutput,"sites",new t.MFNode),new e(a.inputOutput,"joints",new t.MFNode),new e(a.inputOutput,"segments",new t.MFNode),new e(a.inputOutput,"motions",new t.MFNode),new e(a.inputOutput,"skeleton",new t.MFNode),new e(a.inputOutput,"skinNormal",new t.SFNode),new e(a.inputOutput,"skinCoord",new t.SFNode),new e(a.inputOutput,"skin",new t.MFNode)]),getTypeName:function(){return"HAnimHumanoid"},getComponentName:function(){return"HAnim"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this),r.prototype.initialize.call(this),this.viewpointsNode.setAllowedTypes(a.HAnimSite),this.skeletonNode.setAllowedTypes(a.HAnimJoint,a.HAnimSite),this.viewpoints_.addFieldInterest(this.viewpointsNode.children_),this.skeleton_.addFieldInterest(this.skeletonNode.children_),this.skin_.addFieldInterest(this.skinNode.children_),this.viewpointsNode.children_=this.viewpoints_,this.skeletonNode.children_=this.skeleton_,this.skinNode.children_=this.skin_,this.viewpointsNode.setPrivate(!0),this.skeletonNode.setPrivate(!0),this.skinNode.setPrivate(!0),this.translation_.addFieldInterest(this.transformNode.translation_),this.rotation_.addFieldInterest(this.transformNode.rotation_),this.scale_.addFieldInterest(this.transformNode.scale_),this.scaleOrientation_.addFieldInterest(this.transformNode.scaleOrientation_),this.center_.addFieldInterest(this.transformNode.center_),this.bboxSize_.addFieldInterest(this.transformNode.bboxSize_),this.bboxCenter_.addFieldInterest(this.transformNode.bboxCenter_),this.transformNode.translation_=this.translation_,this.transformNode.rotation_=this.rotation_,this.transformNode.scale_=this.scale_,this.transformNode.scaleOrientation_=this.scaleOrientation_,this.transformNode.center_=this.center_,this.transformNode.bboxSize_=this.bboxSize_,this.transformNode.bboxCenter_=this.bboxCenter_,this.transformNode.children_=[this.viewpointsNode,this.skeletonNode,this.skinNode],this.transformNode.isCameraObject_.addFieldInterest(this.isCameraObject_),this.transformNode.isPickableObject_.addFieldInterest(this.isPickableObject_),this.viewpointsNode.setup(),this.skeletonNode.setup(),this.skinNode.setup(),this.transformNode.setup(),this.setCameraObject(this.transformNode.getCameraObject()),this.setPickableObject(this.transformNode.getPickableObject()),this.joints_.addInterest("set_joints__",this),this.skinNormal_.addInterest("set_skinNormal__",this),this.skinCoord_.addInterest("set_skinCoord__",this),this.set_joints__(),this.set_skinNormal__(),this.set_skinCoord__()},getBBox:function(t,e){return this.transformNode.getBBox(t,e)},set_joints__:function(){var t=this.jointNodes;t.length=0;for(var e=0,n=this.joints_.length;e<n;++e){var i=d(a.HAnimJoint,this.joints_[e]);i&&t.push(i)}},set_skinNormal__:function(){this.restNormalNode=null,this.skinNormalNode=d(a.X3DNormalNode,this.skinNormal_),this.skinNormalNode&&(this.restNormalNode=this.skinNormalNode.flatCopy())},set_skinCoord__:function(){this.restCoordNode=null,this.skinCoordNode=d(a.X3DCoordinateNode,this.skinCoord_),this.skinCoordNode&&(this.restCoordNode=this.skinCoordNode.flatCopy())},traverse:function(t,e){this.transformNode.traverse(t,e),this.skinning(t,e)},skinning:function(){var t=new p,e=new l(0,0,0),n=new l(0,0,0),i=new l(0,0,0),o=new l(0,0,0);return function(s,r){try{if(s!==u.CAMERA)return;if(!this.skinCoordNode)return;var a=this.jointNodes,d=this.skinNormalNode,p=this.skinCoordNode,c=this.restNormalNode,w=this.restCoordNode;d&&d.vector_.assign(c.vector_),p.point_.assign(w.point_),t.assign(this.transformNode.getMatrix()).multRight(r.getModelViewMatrix().get()).inverse();for(var m=0,h=a.length;m<h;++m){var _=a[m],f=_.skinCoordIndex_.length;if(0!==f){for(var F=_.getModelMatrix().multRight(t),N=_.getDisplacers(),O=0,g=N.length;O<g;++O)for(var x=N[O],C=x.coordIndex_.getValue(),S=x.coordIndex_.length,b=x.weight_.getValue(),y=x.displacements_.getValue(),A=x.displacements_.length,M=0;M<S;++M){var H=3*M,k=C[M],D=M<A?o.set(y[H],y[H+1],y[H+2]):o.assign(l.Zero);p.get1Point(k,i),F.multDirMatrix(D).multiply(b).add(i),p.set1Point(k,D)}for(var v=d?F.submatrix.transpose().inverse():null,B=_.skinCoordIndex_.getValue(),j=_.skinCoordWeight_.getValue(),I=_.skinCoordWeight_.length,M=0;M<f;++M){var k=B[M],b=M<I?j[M]:1;d&&(n.assign(c.get1Vector(k,e)),d.get1Vector(k,i),v.multVecMatrix(e).subtract(n).multiply(b).add(i),d.set1Vector(k,e)),n.assign(w.get1Point(k,o)),p.get1Point(k,i),F.multVecMatrix(o).subtract(n).multiply(b).add(i),p.set1Point(k,o)}}}}catch(t){console.log(t)}}}()}),c}),t("x_ite/Components/HAnim/HAnimJoint",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Grouping/X3DTransformNode","x_ite/Bits/TraverseType","x_ite/Bits/X3DConstants","x_ite/Bits/X3DCast","standard/Math/Numbers/Matrix4"],function(t,e,n,i,o,s,r,u){"use strict";function a(t){i.call(this,t),this.addType(s.HAnimJoint),this.setAllowedTypes(s.HAnimJoint,s.HAnimSegment,s.HAnimSite),this.displacerNodes=[],this.modelMatrix=new u}return a.prototype=Object.assign(Object.create(i.prototype),{constructor:a,fieldDefinitions:new n([new e(s.inputOutput,"metadata",new t.SFNode),new e(s.inputOutput,"name",new t.SFString),new e(s.inputOutput,"translation",new t.SFVec3f),new e(s.inputOutput,"rotation",new t.SFRotation),new e(s.inputOutput,"scale",new t.SFVec3f(1,1,1)),new e(s.inputOutput,"scaleOrientation",new t.SFRotation),new e(s.inputOutput,"center",new t.SFVec3f),new e(s.inputOutput,"llimit",new t.MFFloat),new e(s.inputOutput,"ulimit",new t.MFFloat),new e(s.inputOutput,"limitOrientation",new t.SFRotation),new e(s.inputOutput,"stiffness",new t.MFFloat(0,0,0)),new e(s.inputOutput,"skinCoordIndex",new t.MFInt32),new e(s.inputOutput,"skinCoordWeight",new t.MFFloat),new e(s.inputOutput,"displacers",new t.MFNode),new e(s.inputOutput,"visible",new t.SFBool(!0)),new e(s.inputOutput,"bboxDisplay",new t.SFBool),new e(s.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new e(s.initializeOnly,"bboxCenter",new t.SFVec3f),new e(s.inputOnly,"addChildren",new t.MFNode),new e(s.inputOnly,"removeChildren",new t.MFNode),new e(s.inputOutput,"children",new t.MFNode)]),getTypeName:function(){return"HAnimJoint"},getComponentName:function(){return"HAnim"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this),this.displacers_.addInterest("set_displacers__",this),this.set_displacers__()},setCameraObject:function(t){i.prototype.setCameraObject.call(this,t||!!this.skinCoordIndex_.length)},getModelMatrix:function(){return this.modelMatrix},getDisplacers:function(){return this.displacerNodes},set_displacers__:function(){const t=this.displacerNodes;t.length=0;for(var e=0,n=this.displacers_.length;e<n;++e){const n=r(s.HAnimDisplacer,this.displacers_[e]);n&&t.push(n)}},getTraverse:function(){function t(t,n){t===o.CAMERA&&this.modelMatrix.assign(this.getMatrix()).multRight(n.getModelViewMatrix().get()),e.call(this,t,n)}const e=i.prototype.getTraverse();return function(){return this.skinCoordIndex_.length?t:e}}(),getGroupTraverse:function(){function t(t,n){t===o.CAMERA&&this.modelMatrix.assign(n.getModelViewMatrix().get()),e.call(this,t,n)}const e=i.prototype.getGroupTraverse();return function(){return this.skinCoordIndex_.length?t:e}}()}),a}),t("x_ite/Components/HAnim/HAnimMotion",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Core/X3DChildNode","x_ite/Bits/X3DConstants"],function(t,e,n,i,o){"use strict";function s(t){i.call(this,t),this.addType(o.HAnimMotion)}return s.prototype=Object.assign(Object.create(i.prototype),{constructor:s,fieldDefinitions:new n([new e(o.inputOutput,"metadata",new t.SFNode),new e(o.inputOutput,"description",new t.SFString),new e(o.inputOutput,"enabled",new t.SFBool(!0)),new e(o.inputOnly,"next",new t.SFBool),new e(o.inputOnly,"previous",new t.SFBool),new e(o.inputOutput,"frameDuration",new t.SFTime(.1)),new e(o.inputOutput,"frameIncrement",new t.SFInt32(1)),new e(o.inputOutput,"frameIndex",new t.SFInt32(0)),new e(o.inputOutput,"loop",new t.SFBool(!1)),new e(o.inputOutput,"channels",new t.SFString),new e(o.inputOutput,"channelsEnabled",new t.MFBool),new e(o.inputOutput,"joints",new t.MFString),new e(o.inputOutput,"loa",new t.SFInt32(-1)),new e(o.inputOutput,"values",new t.MFFloat),new e(o.outputOnly,"cycleTime",new t.SFTime),new e(o.outputOnly,"elapsedTime",new t.SFTime),new e(o.outputOnly,"frameCount",new t.SFInt32)]),getTypeName:function(){return"HAnimMotion"},getComponentName:function(){return"HAnim"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this)}}),s}),t("x_ite/Components/HAnim/HAnimSegment",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Bits/X3DConstants"],function(t,e,n,i,o){"use strict";function s(t){i.call(this,t),this.addType(o.HAnimSegment),this.mass_.setUnit("mass")}return s.prototype=Object.assign(Object.create(i.prototype),{constructor:s,fieldDefinitions:new n([new e(o.inputOutput,"metadata",new t.SFNode),new e(o.inputOutput,"name",new t.SFString),new e(o.inputOutput,"mass",new t.SFFloat),new e(o.inputOutput,"centerOfMass",new t.SFVec3f),new e(o.inputOutput,"momentsOfInertia",new t.MFFloat(0,0,0,0,0,0,0,0,0)),new e(o.inputOutput,"displacers",new t.MFNode),new e(o.inputOutput,"coord",new t.SFNode),new e(o.inputOutput,"visible",new t.SFBool(!0)),new e(o.inputOutput,"bboxDisplay",new t.SFBool),new e(o.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new e(o.initializeOnly,"bboxCenter",new t.SFVec3f),new e(o.inputOnly,"addChildren",new t.MFNode),new e(o.inputOnly,"removeChildren",new t.MFNode),new e(o.inputOutput,"children",new t.MFNode)]),getTypeName:function(){return"HAnimSegment"},getComponentName:function(){return"HAnim"},getContainerField:function(){return"children"}}),s}),t("x_ite/Components/HAnim/HAnimSite",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Grouping/X3DTransformNode","x_ite/Bits/X3DConstants"],function(t,e,n,i,o){"use strict";function s(t){i.call(this,t),this.addType(o.HAnimSite)}return s.prototype=Object.assign(Object.create(i.prototype),{constructor:s,fieldDefinitions:new n([new e(o.inputOutput,"metadata",new t.SFNode),new e(o.inputOutput,"name",new t.SFString),new e(o.inputOutput,"translation",new t.SFVec3f),new e(o.inputOutput,"rotation",new t.SFRotation),new e(o.inputOutput,"scale",new t.SFVec3f(1,1,1)),new e(o.inputOutput,"scaleOrientation",new t.SFRotation),new e(o.inputOutput,"center",new t.SFVec3f),new e(o.inputOutput,"visible",new t.SFBool(!0)),new e(o.inputOutput,"bboxDisplay",new t.SFBool),new e(o.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new e(o.initializeOnly,"bboxCenter",new t.SFVec3f),new e(o.inputOnly,"addChildren",new t.MFNode),new e(o.inputOnly,"removeChildren",new t.MFNode),new e(o.inputOutput,"children",new t.MFNode)]),getTypeName:function(){return"HAnimSite"},getComponentName:function(){return"HAnim"},getContainerField:function(){return"children"}}),s}),t(["x_ite/Components","x_ite/Components/HAnim/HAnimDisplacer","x_ite/Components/HAnim/HAnimHumanoid","x_ite/Components/HAnim/HAnimJoint","x_ite/Components/HAnim/HAnimMotion","x_ite/Components/HAnim/HAnimSegment","x_ite/Components/HAnim/HAnimSite"],function(t,e,n,i,o,s,r){"use strict";t.addComponent({name:"HAnim",types:{HAnimDisplacer:e,HAnimHumanoid:n,HAnimJoint:i,HAnimMotion:o,HAnimSegment:s,HAnimSite:r},abstractTypes:{}})})}();
1
+ !function(){const t=X3D.define,e=X3D.require;t("x_ite/Components/HAnim/HAnimDisplacer",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometricPropertyNode","x_ite/Bits/X3DConstants"],function(t,e,n,i,o){"use strict";function s(t){i.call(this,t),this.addType(o.HAnimDisplacer),this.displacements_.setUnit("length")}return s.prototype=Object.assign(Object.create(i.prototype),{constructor:s,fieldDefinitions:new n([new e(o.inputOutput,"metadata",new t.SFNode),new e(o.inputOutput,"name",new t.SFString),new e(o.inputOutput,"coordIndex",new t.MFInt32),new e(o.inputOutput,"weight",new t.SFFloat),new e(o.inputOutput,"displacements",new t.MFVec3f)]),getTypeName:function(){return"HAnimDisplacer"},getComponentName:function(){return"HAnim"},getContainerField:function(){return"displacers"}}),s}),t("x_ite/Components/HAnim/HAnimHumanoid",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Core/X3DChildNode","x_ite/Components/Grouping/Group","x_ite/Components/Grouping/Transform","x_ite/Components/Grouping/X3DBoundedObject","x_ite/Bits/TraverseType","x_ite/Bits/X3DConstants","x_ite/Bits/X3DCast","standard/Math/Numbers/Matrix4","standard/Math/Numbers/Vector3"],function(t,e,n,i,o,s,r,u,a,d,p,l){"use strict";function c(t){i.call(this,t),r.call(this,t),this.addType(a.HAnimHumanoid),this.translation_.setUnit("length"),this.center_.setUnit("length"),this.bboxSize_.setUnit("length"),this.bboxCenter_.setUnit("length"),this.viewpointsNode=new o(t),this.skeletonNode=new o(t),this.skinNode=new o(t),this.transformNode=new s(t),this.jointNodes=[],this.skinNormalNode=null,this.skinCoordNode=null,this.restNormalNode=null,this.restCoordNode=null}return c.prototype=Object.assign(Object.create(i.prototype),r.prototype,{constructor:c,fieldDefinitions:new n([new e(a.inputOutput,"metadata",new t.SFNode),new e(a.inputOutput,"name",new t.SFString),new e(a.inputOutput,"version",new t.SFString),new e(a.inputOutput,"info",new t.MFString),new e(a.inputOutput,"translation",new t.SFVec3f),new e(a.inputOutput,"rotation",new t.SFRotation),new e(a.inputOutput,"scale",new t.SFVec3f(1,1,1)),new e(a.inputOutput,"scaleOrientation",new t.SFRotation),new e(a.inputOutput,"center",new t.SFVec3f),new e(a.inputOutput,"visible",new t.SFBool(!0)),new e(a.inputOutput,"bboxDisplay",new t.SFBool),new e(a.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new e(a.initializeOnly,"bboxCenter",new t.SFVec3f),new e(a.inputOutput,"viewpoints",new t.MFNode),new e(a.inputOutput,"sites",new t.MFNode),new e(a.inputOutput,"joints",new t.MFNode),new e(a.inputOutput,"segments",new t.MFNode),new e(a.inputOutput,"motions",new t.MFNode),new e(a.inputOutput,"skeleton",new t.MFNode),new e(a.inputOutput,"skinNormal",new t.SFNode),new e(a.inputOutput,"skinCoord",new t.SFNode),new e(a.inputOutput,"skin",new t.MFNode)]),getTypeName:function(){return"HAnimHumanoid"},getComponentName:function(){return"HAnim"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this),r.prototype.initialize.call(this),this.viewpointsNode.setAllowedTypes(a.HAnimSite),this.skeletonNode.setAllowedTypes(a.HAnimJoint,a.HAnimSite),this.viewpoints_.addFieldInterest(this.viewpointsNode.children_),this.skeleton_.addFieldInterest(this.skeletonNode.children_),this.skin_.addFieldInterest(this.skinNode.children_),this.viewpointsNode.children_=this.viewpoints_,this.skeletonNode.children_=this.skeleton_,this.skinNode.children_=this.skin_,this.viewpointsNode.setPrivate(!0),this.skeletonNode.setPrivate(!0),this.skinNode.setPrivate(!0),this.translation_.addFieldInterest(this.transformNode.translation_),this.rotation_.addFieldInterest(this.transformNode.rotation_),this.scale_.addFieldInterest(this.transformNode.scale_),this.scaleOrientation_.addFieldInterest(this.transformNode.scaleOrientation_),this.center_.addFieldInterest(this.transformNode.center_),this.bboxSize_.addFieldInterest(this.transformNode.bboxSize_),this.bboxCenter_.addFieldInterest(this.transformNode.bboxCenter_),this.transformNode.translation_=this.translation_,this.transformNode.rotation_=this.rotation_,this.transformNode.scale_=this.scale_,this.transformNode.scaleOrientation_=this.scaleOrientation_,this.transformNode.center_=this.center_,this.transformNode.bboxSize_=this.bboxSize_,this.transformNode.bboxCenter_=this.bboxCenter_,this.transformNode.children_=[this.viewpointsNode,this.skeletonNode,this.skinNode],this.transformNode.isCameraObject_.addFieldInterest(this.isCameraObject_),this.transformNode.isPickableObject_.addFieldInterest(this.isPickableObject_),this.viewpointsNode.setup(),this.skeletonNode.setup(),this.skinNode.setup(),this.transformNode.setup(),this.setCameraObject(this.transformNode.getCameraObject()),this.setPickableObject(this.transformNode.getPickableObject()),this.joints_.addInterest("set_joints__",this),this.skinNormal_.addInterest("set_skinNormal__",this),this.skinCoord_.addInterest("set_skinCoord__",this),this.set_joints__(),this.set_skinNormal__(),this.set_skinCoord__()},getBBox:function(t,e){return this.transformNode.getBBox(t,e)},set_joints__:function(){var t=this.jointNodes;t.length=0;for(var e=0,n=this.joints_.length;e<n;++e){var i=d(a.HAnimJoint,this.joints_[e]);i&&t.push(i)}},set_skinNormal__:function(){this.restNormalNode=null,this.skinNormalNode=d(a.X3DNormalNode,this.skinNormal_),this.skinNormalNode&&(this.restNormalNode=this.skinNormalNode.flatCopy())},set_skinCoord__:function(){this.restCoordNode=null,this.skinCoordNode=d(a.X3DCoordinateNode,this.skinCoord_),this.skinCoordNode&&(this.restCoordNode=this.skinCoordNode.flatCopy())},traverse:function(t,e){this.transformNode.traverse(t,e),this.skinning(t,e)},skinning:function(){var t=new p,e=new l(0,0,0),n=new l(0,0,0),i=new l(0,0,0),o=new l(0,0,0);return function(s,r){try{if(s!==u.CAMERA)return;if(!this.skinCoordNode)return;var a=this.jointNodes,d=this.skinNormalNode,p=this.skinCoordNode,c=this.restNormalNode,w=this.restCoordNode;d&&d.vector_.assign(c.vector_),p.point_.assign(w.point_),t.assign(this.transformNode.getMatrix()).multRight(r.getModelViewMatrix().get()).inverse();for(var m=0,h=a.length;m<h;++m){var _=a[m],f=_.skinCoordIndex_.length;if(0!==f){for(var F=_.getModelMatrix().multRight(t),N=_.getDisplacers(),O=0,g=N.length;O<g;++O)for(var x=N[O],C=x.coordIndex_.getValue(),S=x.coordIndex_.length,b=x.weight_.getValue(),y=x.displacements_.getValue(),A=x.displacements_.length,M=0;M<S;++M){var H=3*M,k=C[M],D=M<A?o.set(y[H],y[H+1],y[H+2]):o.assign(l.Zero);p.get1Point(k,i),F.multDirMatrix(D).multiply(b).add(i),p.set1Point(k,D)}for(var v=d?F.submatrix.transpose().inverse():null,B=_.skinCoordIndex_.getValue(),j=_.skinCoordWeight_.getValue(),I=_.skinCoordWeight_.length,M=0;M<f;++M){var k=B[M],b=M<I?j[M]:1;d&&(n.assign(c.get1Vector(k,e)),d.get1Vector(k,i),v.multVecMatrix(e).subtract(n).multiply(b).add(i),d.set1Vector(k,e)),n.assign(w.get1Point(k,o)),p.get1Point(k,i),F.multVecMatrix(o).subtract(n).multiply(b).add(i),p.set1Point(k,o)}}}}catch(t){console.log(t)}}}()}),c}),t("x_ite/Components/HAnim/HAnimJoint",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Grouping/X3DTransformNode","x_ite/Bits/TraverseType","x_ite/Bits/X3DConstants","x_ite/Bits/X3DCast","standard/Math/Numbers/Matrix4"],function(t,e,n,i,o,s,r,u){"use strict";function a(t){i.call(this,t),this.addType(s.HAnimJoint),this.setAllowedTypes(s.HAnimJoint,s.HAnimSegment,s.HAnimSite),this.displacerNodes=[],this.modelMatrix=new u}return a.prototype=Object.assign(Object.create(i.prototype),{constructor:a,fieldDefinitions:new n([new e(s.inputOutput,"metadata",new t.SFNode),new e(s.inputOutput,"name",new t.SFString),new e(s.inputOutput,"translation",new t.SFVec3f),new e(s.inputOutput,"rotation",new t.SFRotation),new e(s.inputOutput,"scale",new t.SFVec3f(1,1,1)),new e(s.inputOutput,"scaleOrientation",new t.SFRotation),new e(s.inputOutput,"center",new t.SFVec3f),new e(s.inputOutput,"llimit",new t.MFFloat),new e(s.inputOutput,"ulimit",new t.MFFloat),new e(s.inputOutput,"limitOrientation",new t.SFRotation),new e(s.inputOutput,"stiffness",new t.MFFloat(0,0,0)),new e(s.inputOutput,"skinCoordIndex",new t.MFInt32),new e(s.inputOutput,"skinCoordWeight",new t.MFFloat),new e(s.inputOutput,"displacers",new t.MFNode),new e(s.inputOutput,"visible",new t.SFBool(!0)),new e(s.inputOutput,"bboxDisplay",new t.SFBool),new e(s.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new e(s.initializeOnly,"bboxCenter",new t.SFVec3f),new e(s.inputOnly,"addChildren",new t.MFNode),new e(s.inputOnly,"removeChildren",new t.MFNode),new e(s.inputOutput,"children",new t.MFNode)]),getTypeName:function(){return"HAnimJoint"},getComponentName:function(){return"HAnim"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this),this.displacers_.addInterest("set_displacers__",this),this.set_displacers__()},setCameraObject:function(t){i.prototype.setCameraObject.call(this,t||!!this.skinCoordIndex_.length)},getModelMatrix:function(){return this.modelMatrix},getDisplacers:function(){return this.displacerNodes},set_displacers__:function(){const t=this.displacerNodes;t.length=0;for(var e=0,n=this.displacers_.length;e<n;++e){const n=r(s.HAnimDisplacer,this.displacers_[e]);n&&t.push(n)}},getTraverse:function(){function t(t,n){t===o.CAMERA&&this.modelMatrix.assign(this.getMatrix()).multRight(n.getModelViewMatrix().get()),e.call(this,t,n)}const e=i.prototype.getTraverse();return function(){return this.skinCoordIndex_.length?t:e}}(),getGroupTraverse:function(){function t(t,n){t===o.CAMERA&&this.modelMatrix.assign(n.getModelViewMatrix().get()),e.call(this,t,n)}const e=i.prototype.getGroupTraverse();return function(){return this.skinCoordIndex_.length?t:e}}()}),a}),t("x_ite/Components/HAnim/HAnimMotion",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Core/X3DChildNode","x_ite/Bits/X3DConstants"],function(t,e,n,i,o){"use strict";function s(t){i.call(this,t),this.addType(o.HAnimMotion)}return s.prototype=Object.assign(Object.create(i.prototype),{constructor:s,fieldDefinitions:new n([new e(o.inputOutput,"metadata",new t.SFNode),new e(o.inputOutput,"description",new t.SFString),new e(o.inputOutput,"enabled",new t.SFBool(!0)),new e(o.inputOnly,"next",new t.SFBool),new e(o.inputOnly,"previous",new t.SFBool),new e(o.inputOutput,"frameDuration",new t.SFTime(.1)),new e(o.inputOutput,"frameIncrement",new t.SFInt32(1)),new e(o.inputOutput,"frameIndex",new t.SFInt32(0)),new e(o.inputOutput,"loop",new t.SFBool(!1)),new e(o.inputOutput,"channels",new t.SFString),new e(o.inputOutput,"channelsEnabled",new t.MFBool),new e(o.inputOutput,"joints",new t.MFString),new e(o.inputOutput,"loa",new t.SFInt32(-1)),new e(o.inputOutput,"values",new t.MFFloat),new e(o.outputOnly,"cycleTime",new t.SFTime),new e(o.outputOnly,"elapsedTime",new t.SFTime),new e(o.outputOnly,"frameCount",new t.SFInt32)]),getTypeName:function(){return"HAnimMotion"},getComponentName:function(){return"HAnim"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this)}}),s}),t("x_ite/Components/HAnim/HAnimSegment",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Bits/X3DConstants"],function(t,e,n,i,o){"use strict";function s(t){i.call(this,t),this.addType(o.HAnimSegment),this.mass_.setUnit("mass")}return s.prototype=Object.assign(Object.create(i.prototype),{constructor:s,fieldDefinitions:new n([new e(o.inputOutput,"metadata",new t.SFNode),new e(o.inputOutput,"name",new t.SFString),new e(o.inputOutput,"mass",new t.SFFloat),new e(o.inputOutput,"centerOfMass",new t.SFVec3f),new e(o.inputOutput,"momentsOfInertia",new t.MFFloat(0,0,0,0,0,0,0,0,0)),new e(o.inputOutput,"displacers",new t.MFNode),new e(o.inputOutput,"coord",new t.SFNode),new e(o.inputOutput,"visible",new t.SFBool(!0)),new e(o.inputOutput,"bboxDisplay",new t.SFBool),new e(o.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new e(o.initializeOnly,"bboxCenter",new t.SFVec3f),new e(o.inputOnly,"addChildren",new t.MFNode),new e(o.inputOnly,"removeChildren",new t.MFNode),new e(o.inputOutput,"children",new t.MFNode)]),getTypeName:function(){return"HAnimSegment"},getComponentName:function(){return"HAnim"},getContainerField:function(){return"children"}}),s}),t("x_ite/Components/HAnim/HAnimSite",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Grouping/X3DTransformNode","x_ite/Bits/X3DConstants"],function(t,e,n,i,o){"use strict";function s(t){i.call(this,t),this.addType(o.HAnimSite)}return s.prototype=Object.assign(Object.create(i.prototype),{constructor:s,fieldDefinitions:new n([new e(o.inputOutput,"metadata",new t.SFNode),new e(o.inputOutput,"name",new t.SFString),new e(o.inputOutput,"translation",new t.SFVec3f),new e(o.inputOutput,"rotation",new t.SFRotation),new e(o.inputOutput,"scale",new t.SFVec3f(1,1,1)),new e(o.inputOutput,"scaleOrientation",new t.SFRotation),new e(o.inputOutput,"center",new t.SFVec3f),new e(o.inputOutput,"visible",new t.SFBool(!0)),new e(o.inputOutput,"bboxDisplay",new t.SFBool),new e(o.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new e(o.initializeOnly,"bboxCenter",new t.SFVec3f),new e(o.inputOnly,"addChildren",new t.MFNode),new e(o.inputOnly,"removeChildren",new t.MFNode),new e(o.inputOutput,"children",new t.MFNode)]),getTypeName:function(){return"HAnimSite"},getComponentName:function(){return"HAnim"},getContainerField:function(){return"children"}}),s}),t(e.getComponentUrl("h-anim"),["x_ite/Components","x_ite/Components/HAnim/HAnimDisplacer","x_ite/Components/HAnim/HAnimHumanoid","x_ite/Components/HAnim/HAnimJoint","x_ite/Components/HAnim/HAnimMotion","x_ite/Components/HAnim/HAnimSegment","x_ite/Components/HAnim/HAnimSite"],function(t,e,n,i,o,s,r){"use strict";t.addComponent({name:"HAnim",types:{HAnimDisplacer:e,HAnimHumanoid:n,HAnimJoint:i,HAnimMotion:o,HAnimSegment:s,HAnimSite:r},abstractTypes:{}})})}();
@@ -1,9 +1,11 @@
1
- (function () {
1
+ (function ()
2
+ {
3
+ // Undefine global variables.
4
+ var module = { }, exports, process;
2
5
 
3
- var
4
- define = X3D .define,
5
- require = X3D .require,
6
- module = { };
6
+ const
7
+ define = X3D .define,
8
+ require = X3D .require;
7
9
  /* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
8
10
  *******************************************************************************
9
11
  *
@@ -815,7 +817,7 @@ function (Fields,
815
817
  ******************************************************************************/
816
818
 
817
819
 
818
- define ([
820
+ define (require .getComponentUrl ("key-device-sensor"), [
819
821
  "x_ite/Components",
820
822
  "x_ite/Browser/KeyDeviceSensor/X3DKeyDeviceSensorContext",
821
823
  "x_ite/Components/KeyDeviceSensor/KeySensor",
@@ -847,4 +849,4 @@ function (Components,
847
849
 
848
850
 
849
851
 
850
- }());
852
+ })();
@@ -1 +1 @@
1
- !function(){var e=X3D.define;X3D.require;e("x_ite/Browser/KeyDeviceSensor/X3DKeyDeviceSensorContext",["x_ite/Fields"],function(e){"use strict";function t(){}return t.prototype={initialize:function(){this.getElement().bind("keydown.X3DKeyDeviceSensorContext",this.keydown_X3DKeyDeviceSensorContext.bind(this)),this.getElement().bind("keyup.X3DKeyDeviceSensorContext",this.keyup_X3DKeyDeviceSensorContext.bind(this))},addKeyDeviceSensorNode:function(e){this.getKeyDeviceSensorNodes().add(e)},removeKeyDeviceSensorNode:function(e){this.getKeyDeviceSensorNodes().delete(e)},getKeyDeviceSensorNodes:function(){return void 0===this.keyDeviceSensorNodes&&(this.keyDeviceSensorNodes=new Set),this.keyDeviceSensorNodes},keydown_X3DKeyDeviceSensorContext:function(e){this.getKeyDeviceSensorNodes().forEach(function(t){t.keydown(e)})},keyup_X3DKeyDeviceSensorContext:function(e){this.getKeyDeviceSensorNodes().forEach(function(t){t.keyup(e)})}},t}),e("x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode",["x_ite/Components/Core/X3DSensorNode","x_ite/Bits/X3DConstants"],function(e,t){"use strict";function s(s){e.call(this,s),this.addType(t.X3DKeyDeviceSensorNode)}return s.prototype=Object.assign(Object.create(e.prototype),{constructor:s,initialize:function(){e.prototype.initialize.call(this),this.isLive().addInterest("set_live__",this),this.set_live__()},set_live__:function(){this.isLive().getValue()?(this.enabled_.addInterest("set_enabled__",this),this.enabled_.getValue()&&this.enable()):(this.enabled_.removeInterest("set_enabled__",this),this.disable())},set_enabled__:function(){this.enabled_.getValue()?this.enable():this.disable()},enable:function(){this.getBrowser().addKeyDeviceSensorNode(this)},disable:function(){this.getBrowser().removeKeyDeviceSensorNode(this),this.release()},keydown:function(){},keyup:function(){},release:function(){}}),s}),e("x_ite/Components/KeyDeviceSensor/KeySensor",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode","x_ite/Bits/X3DConstants"],function(e,t,s,i,n){"use strict";function a(e){i.call(this,e),this.addType(n.KeySensor)}return a.prototype=Object.assign(Object.create(i.prototype),{constructor:a,fieldDefinitions:new s([new t(n.inputOutput,"metadata",new e.SFNode),new t(n.inputOutput,"enabled",new e.SFBool(!0)),new t(n.outputOnly,"controlKey",new e.SFBool),new t(n.outputOnly,"shiftKey",new e.SFBool),new t(n.outputOnly,"altKey",new e.SFBool),new t(n.outputOnly,"actionKeyPress",new e.SFInt32),new t(n.outputOnly,"actionKeyRelease",new e.SFInt32),new t(n.outputOnly,"keyPress",new e.SFString),new t(n.outputOnly,"keyRelease",new e.SFString),new t(n.outputOnly,"isActive",new e.SFBool)]),getTypeName:function(){return"KeySensor"},getComponentName:function(){return"KeyDeviceSensor"},getContainerField:function(){return"children"},keydown:function(e){switch(e.preventDefault(),this.isActive_.getValue()||(this.isActive_=!0),e.which){case 16:this.shiftKey_=!0;break;case 17:this.controlKey_=!0;break;case 18:this.altKey_=!0;break;case 112:this.actionKeyPress_=1;break;case 113:this.actionKeyPress_=2;break;case 114:this.actionKeyPress_=3;break;case 115:this.actionKeyPress_=4;break;case 116:this.actionKeyPress_=5;break;case 117:this.actionKeyPress_=6;break;case 118:this.actionKeyPress_=7;break;case 119:this.actionKeyPress_=8;break;case 120:this.actionKeyPress_=9;break;case 121:this.actionKeyPress_=10;break;case 122:this.actionKeyPress_=11;break;case 123:this.actionKeyPress_=12;break;case 36:this.actionKeyPress_=13;break;case 35:this.actionKeyPress_=14;break;case 33:this.actionKeyPress_=15;break;case 34:this.actionKeyPress_=16;break;case 38:this.actionKeyPress_=17;break;case 40:this.actionKeyPress_=18;break;case 37:this.actionKeyPress_=19;break;case 39:this.actionKeyPress_=20;break;default:if(e.charCode||e.keyCode)switch(e.key){case"AltGraph":case"CapsLock":case"Insert":break;case"Backspace":this.keyPress_=String.fromCharCode(8);break;case"Delete":this.keyPress_=String.fromCharCode(127);break;case"Enter":this.keyPress_="\n";break;case"Escape":this.keyPress_=String.fromCharCode(27);break;case"Tab":this.keyPress_="\t";break;default:1===e.key.length&&(this.keyPress_=e.key)}}},keyup:function(e){switch(e.preventDefault(),e.which){case 16:this.shiftKey_=!1;break;case 17:this.controlKey_=!1;break;case 18:this.altKey_=!1;break;case 112:this.actionKeyRelease_=1;break;case 113:this.actionKeyRelease_=2;break;case 114:this.actionKeyRelease_=3;break;case 115:this.actionKeyRelease_=4;break;case 116:this.actionKeyRelease_=5;break;case 117:this.actionKeyRelease_=6;break;case 118:this.actionKeyRelease_=7;break;case 119:this.actionKeyRelease_=8;break;case 120:this.actionKeyRelease_=9;break;case 121:this.actionKeyRelease_=10;break;case 122:this.actionKeyRelease_=11;break;case 123:this.actionKeyRelease_=12;break;case 36:this.actionKeyRelease_=13;break;case 35:this.actionKeyRelease_=14;break;case 33:this.actionKeyRelease_=15;break;case 34:this.actionKeyRelease_=16;break;case 38:this.actionKeyRelease_=17;break;case 40:this.actionKeyRelease_=18;break;case 37:this.actionKeyRelease_=19;break;case 39:this.actionKeyRelease_=20;break;default:if(e.charCode||e.keyCode)switch(e.key){case"AltGraph":case"CapsLock":case"Insert":break;case"Backspace":this.keyRelease_=String.fromCharCode(8);break;case"Delete":this.keyRelease_=String.fromCharCode(127);break;case"Enter":this.keyRelease_="\n";break;case"Escape":this.keyRelease_=String.fromCharCode(27);break;case"Tab":this.keyRelease_="\t";break;default:1===e.key.length&&(this.keyRelease_=e.key)}}this.isActive_.getValue()&&(this.isActive_=!1)},release:function(){this.shiftKey_.getValue()&&(this.shiftKey_=!1),this.controlKey_.getValue()&&(this.controlKey_=!1),this.altKey_.getValue()&&(this.altKey_=!1)}}),a}),e("x_ite/Components/KeyDeviceSensor/StringSensor",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode","x_ite/Bits/X3DConstants"],function(e,t,s,i,n){"use strict";function a(e){i.call(this,e),this.addType(n.StringSensor)}return a.prototype=Object.assign(Object.create(i.prototype),{constructor:a,fieldDefinitions:new s([new t(n.inputOutput,"metadata",new e.SFNode),new t(n.inputOutput,"enabled",new e.SFBool(!0)),new t(n.inputOutput,"deletionAllowed",new e.SFBool(!0)),new t(n.outputOnly,"enteredText",new e.SFString),new t(n.outputOnly,"finalText",new e.SFString),new t(n.outputOnly,"isActive",new e.SFBool)]),getTypeName:function(){return"StringSensor"},getComponentName:function(){return"KeyDeviceSensor"},getContainerField:function(){return"children"},keydown:function(e){switch(e.preventDefault(),e.key){case"Backspace":this.isActive_.getValue()&&this.deletionAllowed_.getValue()&&this.enteredText_.length&&(this.enteredText_=this.enteredText_.getValue().substr(0,this.enteredText_.length-1));break;case"Enter":this.finalText_=this.enteredText_,this.enteredText_.set(""),this.isActive_.getValue()&&(this.isActive_=!1);break;case"Escape":this.enteredText_.set(""),this.isActive_.getValue()&&(this.isActive_=!1);break;case"Tab":break;default:(e.charCode||e.keyCode)&&1===e.key.length&&(this.isActive_.getValue()||(this.isActive_=!0,this.enteredText_=""),this.enteredText_=this.enteredText_.getValue()+e.key)}}}),a}),e(["x_ite/Components","x_ite/Browser/KeyDeviceSensor/X3DKeyDeviceSensorContext","x_ite/Components/KeyDeviceSensor/KeySensor","x_ite/Components/KeyDeviceSensor/StringSensor","x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode"],function(e,t,s,i,n){"use strict";e.addComponent({name:"KeyDeviceSensor",types:{KeySensor:s,StringSensor:i},abstractTypes:{X3DKeyDeviceSensorNode:n},browser:t})})}();
1
+ !function(){const e=X3D.define,t=X3D.require;e("x_ite/Browser/KeyDeviceSensor/X3DKeyDeviceSensorContext",["x_ite/Fields"],function(e){"use strict";function t(){}return t.prototype={initialize:function(){this.getElement().bind("keydown.X3DKeyDeviceSensorContext",this.keydown_X3DKeyDeviceSensorContext.bind(this)),this.getElement().bind("keyup.X3DKeyDeviceSensorContext",this.keyup_X3DKeyDeviceSensorContext.bind(this))},addKeyDeviceSensorNode:function(e){this.getKeyDeviceSensorNodes().add(e)},removeKeyDeviceSensorNode:function(e){this.getKeyDeviceSensorNodes().delete(e)},getKeyDeviceSensorNodes:function(){return void 0===this.keyDeviceSensorNodes&&(this.keyDeviceSensorNodes=new Set),this.keyDeviceSensorNodes},keydown_X3DKeyDeviceSensorContext:function(e){this.getKeyDeviceSensorNodes().forEach(function(t){t.keydown(e)})},keyup_X3DKeyDeviceSensorContext:function(e){this.getKeyDeviceSensorNodes().forEach(function(t){t.keyup(e)})}},t}),e("x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode",["x_ite/Components/Core/X3DSensorNode","x_ite/Bits/X3DConstants"],function(e,t){"use strict";function s(s){e.call(this,s),this.addType(t.X3DKeyDeviceSensorNode)}return s.prototype=Object.assign(Object.create(e.prototype),{constructor:s,initialize:function(){e.prototype.initialize.call(this),this.isLive().addInterest("set_live__",this),this.set_live__()},set_live__:function(){this.isLive().getValue()?(this.enabled_.addInterest("set_enabled__",this),this.enabled_.getValue()&&this.enable()):(this.enabled_.removeInterest("set_enabled__",this),this.disable())},set_enabled__:function(){this.enabled_.getValue()?this.enable():this.disable()},enable:function(){this.getBrowser().addKeyDeviceSensorNode(this)},disable:function(){this.getBrowser().removeKeyDeviceSensorNode(this),this.release()},keydown:function(){},keyup:function(){},release:function(){}}),s}),e("x_ite/Components/KeyDeviceSensor/KeySensor",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode","x_ite/Bits/X3DConstants"],function(e,t,s,i,n){"use strict";function a(e){i.call(this,e),this.addType(n.KeySensor)}return a.prototype=Object.assign(Object.create(i.prototype),{constructor:a,fieldDefinitions:new s([new t(n.inputOutput,"metadata",new e.SFNode),new t(n.inputOutput,"enabled",new e.SFBool(!0)),new t(n.outputOnly,"controlKey",new e.SFBool),new t(n.outputOnly,"shiftKey",new e.SFBool),new t(n.outputOnly,"altKey",new e.SFBool),new t(n.outputOnly,"actionKeyPress",new e.SFInt32),new t(n.outputOnly,"actionKeyRelease",new e.SFInt32),new t(n.outputOnly,"keyPress",new e.SFString),new t(n.outputOnly,"keyRelease",new e.SFString),new t(n.outputOnly,"isActive",new e.SFBool)]),getTypeName:function(){return"KeySensor"},getComponentName:function(){return"KeyDeviceSensor"},getContainerField:function(){return"children"},keydown:function(e){switch(e.preventDefault(),this.isActive_.getValue()||(this.isActive_=!0),e.which){case 16:this.shiftKey_=!0;break;case 17:this.controlKey_=!0;break;case 18:this.altKey_=!0;break;case 112:this.actionKeyPress_=1;break;case 113:this.actionKeyPress_=2;break;case 114:this.actionKeyPress_=3;break;case 115:this.actionKeyPress_=4;break;case 116:this.actionKeyPress_=5;break;case 117:this.actionKeyPress_=6;break;case 118:this.actionKeyPress_=7;break;case 119:this.actionKeyPress_=8;break;case 120:this.actionKeyPress_=9;break;case 121:this.actionKeyPress_=10;break;case 122:this.actionKeyPress_=11;break;case 123:this.actionKeyPress_=12;break;case 36:this.actionKeyPress_=13;break;case 35:this.actionKeyPress_=14;break;case 33:this.actionKeyPress_=15;break;case 34:this.actionKeyPress_=16;break;case 38:this.actionKeyPress_=17;break;case 40:this.actionKeyPress_=18;break;case 37:this.actionKeyPress_=19;break;case 39:this.actionKeyPress_=20;break;default:if(e.charCode||e.keyCode)switch(e.key){case"AltGraph":case"CapsLock":case"Insert":break;case"Backspace":this.keyPress_=String.fromCharCode(8);break;case"Delete":this.keyPress_=String.fromCharCode(127);break;case"Enter":this.keyPress_="\n";break;case"Escape":this.keyPress_=String.fromCharCode(27);break;case"Tab":this.keyPress_="\t";break;default:1===e.key.length&&(this.keyPress_=e.key)}}},keyup:function(e){switch(e.preventDefault(),e.which){case 16:this.shiftKey_=!1;break;case 17:this.controlKey_=!1;break;case 18:this.altKey_=!1;break;case 112:this.actionKeyRelease_=1;break;case 113:this.actionKeyRelease_=2;break;case 114:this.actionKeyRelease_=3;break;case 115:this.actionKeyRelease_=4;break;case 116:this.actionKeyRelease_=5;break;case 117:this.actionKeyRelease_=6;break;case 118:this.actionKeyRelease_=7;break;case 119:this.actionKeyRelease_=8;break;case 120:this.actionKeyRelease_=9;break;case 121:this.actionKeyRelease_=10;break;case 122:this.actionKeyRelease_=11;break;case 123:this.actionKeyRelease_=12;break;case 36:this.actionKeyRelease_=13;break;case 35:this.actionKeyRelease_=14;break;case 33:this.actionKeyRelease_=15;break;case 34:this.actionKeyRelease_=16;break;case 38:this.actionKeyRelease_=17;break;case 40:this.actionKeyRelease_=18;break;case 37:this.actionKeyRelease_=19;break;case 39:this.actionKeyRelease_=20;break;default:if(e.charCode||e.keyCode)switch(e.key){case"AltGraph":case"CapsLock":case"Insert":break;case"Backspace":this.keyRelease_=String.fromCharCode(8);break;case"Delete":this.keyRelease_=String.fromCharCode(127);break;case"Enter":this.keyRelease_="\n";break;case"Escape":this.keyRelease_=String.fromCharCode(27);break;case"Tab":this.keyRelease_="\t";break;default:1===e.key.length&&(this.keyRelease_=e.key)}}this.isActive_.getValue()&&(this.isActive_=!1)},release:function(){this.shiftKey_.getValue()&&(this.shiftKey_=!1),this.controlKey_.getValue()&&(this.controlKey_=!1),this.altKey_.getValue()&&(this.altKey_=!1)}}),a}),e("x_ite/Components/KeyDeviceSensor/StringSensor",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode","x_ite/Bits/X3DConstants"],function(e,t,s,i,n){"use strict";function a(e){i.call(this,e),this.addType(n.StringSensor)}return a.prototype=Object.assign(Object.create(i.prototype),{constructor:a,fieldDefinitions:new s([new t(n.inputOutput,"metadata",new e.SFNode),new t(n.inputOutput,"enabled",new e.SFBool(!0)),new t(n.inputOutput,"deletionAllowed",new e.SFBool(!0)),new t(n.outputOnly,"enteredText",new e.SFString),new t(n.outputOnly,"finalText",new e.SFString),new t(n.outputOnly,"isActive",new e.SFBool)]),getTypeName:function(){return"StringSensor"},getComponentName:function(){return"KeyDeviceSensor"},getContainerField:function(){return"children"},keydown:function(e){switch(e.preventDefault(),e.key){case"Backspace":this.isActive_.getValue()&&this.deletionAllowed_.getValue()&&this.enteredText_.length&&(this.enteredText_=this.enteredText_.getValue().substr(0,this.enteredText_.length-1));break;case"Enter":this.finalText_=this.enteredText_,this.enteredText_.set(""),this.isActive_.getValue()&&(this.isActive_=!1);break;case"Escape":this.enteredText_.set(""),this.isActive_.getValue()&&(this.isActive_=!1);break;case"Tab":break;default:(e.charCode||e.keyCode)&&1===e.key.length&&(this.isActive_.getValue()||(this.isActive_=!0,this.enteredText_=""),this.enteredText_=this.enteredText_.getValue()+e.key)}}}),a}),e(t.getComponentUrl("key-device-sensor"),["x_ite/Components","x_ite/Browser/KeyDeviceSensor/X3DKeyDeviceSensorContext","x_ite/Components/KeyDeviceSensor/KeySensor","x_ite/Components/KeyDeviceSensor/StringSensor","x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode"],function(e,t,s,i,n){"use strict";e.addComponent({name:"KeyDeviceSensor",types:{KeySensor:s,StringSensor:i},abstractTypes:{X3DKeyDeviceSensorNode:n},browser:t})})}();
@@ -1,9 +1,11 @@
1
- (function () {
1
+ (function ()
2
+ {
3
+ // Undefine global variables.
4
+ var module = { }, exports, process;
2
5
 
3
- var
4
- define = X3D .define,
5
- require = X3D .require,
6
- module = { };
6
+ const
7
+ define = X3D .define,
8
+ require = X3D .require;
7
9
  /* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
8
10
  *******************************************************************************
9
11
  *
@@ -1964,7 +1966,7 @@ function (Fields,
1964
1966
  ******************************************************************************/
1965
1967
 
1966
1968
 
1967
- define ([
1969
+ define (require .getComponentUrl ("layout"), [
1968
1970
  "x_ite/Components",
1969
1971
  "x_ite/Browser/Layout/X3DLayoutContext",
1970
1972
  "x_ite/Components/Layout/Layout",
@@ -2005,4 +2007,4 @@ function (Components,
2005
2007
 
2006
2008
 
2007
2009
 
2008
- }());
2010
+ })();
@@ -1 +1 @@
1
- !function(){var t=X3D.define;X3D.require;t("x_ite/Browser/Layout/X3DLayoutContext",["jquery","x_ite/Components/Texturing/TextureProperties"],function(t,e){"use strict";function i(){}return i.prototype={getScreenTextureProperties:function(){return this.screenTextureProperties=new e(this.getPrivateScene()),this.screenTextureProperties.boundaryModeS_="CLAMP",this.screenTextureProperties.boundaryModeT_="CLAMP",this.screenTextureProperties.boundaryModeR_="CLAMP",this.screenTextureProperties.minificationFilter_="NEAREST",this.screenTextureProperties.magnificationFilter_="NEAREST",this.screenTextureProperties.generateMipMaps_=!1,this.screenTextureProperties.setup(),this.getScreenTextureProperties=function(){return this.screenTextureProperties},this.screenTextureProperties},getPointSize:function(){if(void 0===this.pointSize){var e=t("<div></div>").css("height","1in").css("display","none");this.pointSize=e.appendTo(t("body")).height()/72,e.remove()}return this.pointSize}},i}),t("x_ite/Components/Layout/X3DLayoutNode",["x_ite/Components/Core/X3DChildNode","x_ite/Bits/X3DConstants"],function(t,e){"use strict";function i(i){t.call(this,i),this.addType(e.X3DLayoutNode)}return i.prototype=Object.assign(Object.create(t.prototype),{constructor:i}),i}),t("x_ite/Components/Layout/Layout",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Layout/X3DLayoutNode","x_ite/Bits/X3DCast","x_ite/Bits/X3DConstants","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4"],function(t,e,i,n,s,o,r,a,u,h){"use strict";function l(t){n.call(this,t),this.addType(o.Layout),this.alignX=y,this.alignY=y,this.offsetUnitX=g,this.offsetUnitY=g,this.offsetX=0,this.offsetY=0,this.sizeUnitX=g,this.sizeUnitY=g,this.sizeX=1,this.sizeY=1,this.scaleModeX=m,this.scaleModeY=m,this.parent=null,this.rectangleCenter=new r(0,0),this.rectangleSize=new r(0,0),this.matrix=new h}var c=0,d=c++,y=c++,p=c++,x=c++,f=c++,g=c++,_=c++,w=c++,m=c++,M=c++;return l.prototype=Object.assign(Object.create(n.prototype),{constructor:l,viewportPixel:new r(0,0),pixelSize:new r(0,0),translation:new a(0,0,0),offset:new a(0,0,0),scale:new a(1,1,1),currentTranslation:new a(0,0,0),currentRotation:new u(0,0,1,0),currentScale:new a(0,0,0),modelViewMatrix:new h,fieldDefinitions:new i([new e(o.inputOutput,"metadata",new t.SFNode),new e(o.inputOutput,"align",new t.MFString("CENTER","CENTER")),new e(o.inputOutput,"offsetUnits",new t.MFString("WORLD","WORLD")),new e(o.inputOutput,"offset",new t.MFFloat(0,0)),new e(o.inputOutput,"sizeUnits",new t.MFString("WORLD","WORLD")),new e(o.inputOutput,"size",new t.MFFloat(1,1)),new e(o.inputOutput,"scaleMode",new t.MFString("NONE","NONE"))]),getTypeName:function(){return"Layout"},getComponentName:function(){return"Layout"},getContainerField:function(){return"layout"},initialize:function(){n.prototype.initialize.call(this),this.align_.addInterest("set_align__",this),this.offsetUnits_.addInterest("set_offsetUnits__",this),this.offset_.addInterest("set_offset__",this),this.sizeUnits_.addInterest("set_sizeUnits__",this),this.size_.addInterest("set_size__",this),this.scaleMode_.addInterest("set_scaleMode__",this),this.set_align__(),this.set_offsetUnits__(),this.set_offset__(),this.set_sizeUnits__(),this.set_size__(),this.set_scaleMode__()},set_align__:function(){this.align_.length>0?"LEFT"===this.align_[0]?this.alignX=d:"RIGHT"===this.align_[0]?this.alignX=p:this.alignX=y:this.alignX=y,this.align_.length>1?"BOTTOM"===this.align_[1]?this.alignY=x:"TOP"===this.align_[1]?this.alignY=f:this.alignY=y:this.alignY=y},set_offsetUnits__:function(){this.offsetUnits_.length>0?("FRACTION"===this.offsetUnits_[0]?this.offsetUnitX=_:"PIXEL"===this.offsetUnits_[0]?this.offsetUnitX=w:this.offsetUnitX=g,this.offsetUnits_.length>1?"FRACTION"===this.offsetUnits_[1]?this.offsetUnitY=_:"PIXEL"===this.offsetUnits_[1]?this.offsetUnitY=w:this.offsetUnitY=g:this.offsetUnitY=this.offsetUnitX):(this.offsetUnitX=g,this.offsetUnitY=g)},set_offset__:function(){this.offset_.length>0?(this.offsetX=this.offset_[0],this.offset_.length>1?this.offsetY=this.offset_[1]:this.offsetY=offsetX):(this.offsetX=0,this.offsetY=0)},set_sizeUnits__:function(){this.sizeUnits_.length>0?("FRACTION"===this.sizeUnits_[0]?this.sizeUnitX=_:"PIXEL"===this.sizeUnits_[0]?this.sizeUnitX=w:this.sizeUnitX=g,this.sizeUnits_.length>1?"FRACTION"===this.sizeUnits_[1]?this.sizeUnitY=_:"PIXEL"===this.sizeUnits_[1]?this.sizeUnitY=w:this.sizeUnitY=g:this.sizeUnitY=this.sizeUnitX):(this.sizeUnitX=g,this.sizeUnitY=g)},set_size__:function(){this.size_.length>0?(this.sizeX=this.size_[0],this.size_.length>1?this.sizeY=this.size_[1]:this.sizeY=this.sizeX):(this.sizeX=0,this.sizeY=0)},set_scaleMode__:function(){this.scaleMode_.length>0?("FRACTION"===this.scaleMode_[0]?this.scaleModeX=_:"PIXEL"===this.scaleMode_[0]?this.scaleModeX=w:"STRETCH"===this.scaleMode_[0]?this.scaleModeX=M:this.scaleModeX=m,this.scaleMode_.length>1?"FRACTION"===this.scaleMode_[1]?this.scaleModeY=_:"PIXEL"===this.scaleMode_[1]?this.scaleModeY=w:"STRETCH"===this.scaleMode_[1]?this.scaleModeY=M:this.scaleModeY=m:this.scaleModeY=this.scaleModeX):(this.scaleModeX=m,this.scaleModeY=m)},getRectangleCenter:function(){return this.rectangleCenter},getRectangleSize:function(){return this.rectangleSize},getAlignX:function(){return this.alignX},getAlignY:function(){return this.alignY},getOffsetUnitX:function(){return this.offsetUnitX===g?this.parent?this.parent.getOffsetUnitX():_:this.offsetUnitX},getOffsetUnitY:function(){return this.offsetUnitY===g?this.parent?this.parent.getOffsetUnitY():_:this.offsetUnitY},getOffsetX:function(){return this.offsetX},getOffsetY:function(){return this.offsetY},getSizeUnitX:function(){return this.sizeUnitX===g?this.parent?this.parent.getSizeUnitX():_:this.sizeUnitX},getSizeUnitY:function(){return this.sizeUnitY===g?this.parent?this.parent.getSizeUnitY():_:this.sizeUnitY},getSizeX:function(){return this.sizeX},getSizeY:function(){return this.sizeY},getScaleModeX:function(){return this.parent?this.scaleModeX:this.scaleModeX===m?_:this.scaleModeX},getScaleModeY:function(){return this.parent?this.scaleModeY:this.scaleModeY===m?_:this.scaleModeY},transform:function(t,e){var i=this.parent=e.getParentLayout(),n=this.matrix,s=e.getViewpoint(),o=e.getNavigationInfo().getNearValue(),r=e.getViewVolume().getScissor(),a=s.getViewportSize(r,o),u=this.viewportPixel,h=this.pixelSize,l=i?i.getRectangleSize():a,c=this.rectangleSize,g=this.rectangleCenter;switch(u.set(r[2],r[3]),h.assign(a).divVec(u),this.getSizeUnitX()){case _:c.x=this.sizeX*l.x;break;case w:c.x=this.sizeX*h.x}switch(this.getSizeUnitY()){case _:c.y=this.sizeY*l.y;break;case w:c.y=this.sizeY*h.y}var z=this.translation.set(0,0,0);switch(this.getAlignX()){case d:z.x=-(l.x-c.x)/2;break;case y:this.getSizeUnitX()===w&&1&u.x&&(z.x=-h.x/2);break;case p:z.x=(l.x-c.x)/2}switch(this.getAlignY()){case x:z.y=-(l.y-c.y)/2;break;case y:this.getSizeUnitX===w&&1&u.y&&(z.y=-h.y/2);break;case f:z.y=(l.y-c.y)/2}var S=this.offset.set(0,0,0);switch(this.getOffsetUnitX()){case _:S.x=this.offsetX*l.x;break;case w:S.x=this.offsetX*a.x/u.x}switch(this.getOffsetUnitY()){case _:S.y=this.offsetY*l.y;break;case w:S.y=this.offsetY*a.y/u.y}var X=this.scale.set(1,1,1),N=this.currentTranslation,F=this.currentRotation,C=this.currentScale;switch(e.getModelViewMatrix().get().get(N,F,C),this.getScaleModeX()){case m:X.x=C.x;break;case _:X.x=c.x;break;case M:break;case w:X.x=a.x/u.x}switch(this.getScaleModeY()){case m:X.y=C.y;break;case _:X.y=c.y;break;case M:break;case w:X.y=a.y/u.y}return this.getScaleModeX()===M?this.getScaleModeY()===M?c.x>c.y?(X.x=c.x,X.y=X.x):(X.y=c.y,X.x=X.y):X.x=X.y:this.getScaleModeY()===M&&(X.y=X.x),g.assign(z).add(S),n.set(N,F),n.translate(z.add(S)),n.scale(X),n}}),l}),t("x_ite/Components/Layout/LayoutGroup",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Bits/X3DCast","x_ite/Bits/TraverseType","x_ite/Bits/X3DConstants","standard/Math/Numbers/Matrix4"],function(t,e,i,n,s,o,r,a){"use strict";function u(t){n.call(this,t),this.addType(r.LayoutGroup),this.viewportNode=null,this.layoutNode=null,this.modelViewMatrix=new a,this.screenMatrix=new a}return u.prototype=Object.assign(Object.create(n.prototype),{constructor:u,fieldDefinitions:new i([new e(r.inputOutput,"metadata",new t.SFNode),new e(r.inputOutput,"layout",new t.SFNode),new e(r.inputOutput,"viewport",new t.SFNode),new e(r.inputOutput,"visible",new t.SFBool(!0)),new e(r.inputOutput,"bboxDisplay",new t.SFBool),new e(r.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new e(r.initializeOnly,"bboxCenter",new t.SFVec3f),new e(r.inputOnly,"addChildren",new t.MFNode),new e(r.inputOnly,"removeChildren",new t.MFNode),new e(r.inputOutput,"children",new t.MFNode)]),getTypeName:function(){return"LayoutGroup"},getComponentName:function(){return"Layout"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.viewport_.addInterest("set_viewport__",this),this.layout_.addInterest("set_layout__",this),this.set_viewport__(),this.set_layout__()},set_viewport__:function(){this.viewportNode=s(r.X3DViewportNode,this.viewport_)},set_layout__:function(){this.layoutNode=s(r.X3DLayoutNode,this.layout_)},getBBox:function(t,e){return n.prototype.getBBox.call(this,t,e).multRight(this.getMatrix())},getMatrix:function(){try{this.layoutNode?this.matrix.assign(this.modelViewMatrix).inverse().multLeft(this.screenMatrix):this.matrix.identity()}catch(t){}return this.matrix},traverse:function(t,e){switch(t){case o.COLLISION:return;default:if(this.viewportNode&&this.viewportNode.push(),this.layoutNode){var i=e.getModelViewMatrix();this.modelViewMatrix.assign(i.get()),this.screenMatrix.assign(this.layoutNode.transform(t,e)),i.pushMatrix(this.screenMatrix),e.getLayouts().push(this.layoutNode),n.prototype.traverse.call(this,t,e),e.getLayouts().pop(),i.pop()}else n.prototype.traverse.call(this,t,e);return void(this.viewportNode&&this.viewportNode.pop())}}}),u}),t("x_ite/Components/Layout/LayoutLayer",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Layering/X3DLayerNode","x_ite/Components/Layout/LayoutGroup","x_ite/Components/Navigation/OrthoViewpoint","x_ite/Bits/X3DConstants"],function(t,e,i,n,s,o,r){"use strict";function a(t){n.call(this,t,new o(t),new s(t)),this.addType(r.LayoutLayer)}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,fieldDefinitions:new i([new e(r.inputOutput,"metadata",new t.SFNode),new e(r.inputOutput,"isPickable",new t.SFBool(!0)),new e(r.inputOutput,"layout",new t.SFNode),new e(r.inputOutput,"viewport",new t.SFNode),new e(r.inputOnly,"addChildren",new t.MFNode),new e(r.inputOnly,"removeChildren",new t.MFNode),new e(r.inputOutput,"children",new t.MFNode)]),getTypeName:function(){return"LayoutLayer"},getComponentName:function(){return"Layout"},getContainerField:function(){return"layers"},initialize:function(){n.prototype.initialize.call(this),this.layout_.addFieldInterest(this.getGroup().layout_),this.addChildren_.addFieldInterest(this.getGroup().addChildren_),this.removeChildren_.addFieldInterest(this.getGroup().removeChildren_),this.children_.addFieldInterest(this.getGroup().children_),this.getGroup().layout_=this.layout_,this.getGroup().children_=this.children_,this.getGroup().setPrivate(!0),this.getGroup().setup()}}),a}),t("x_ite/Browser/Layout/ScreenText",["jquery","x_ite/Browser/Text/X3DTextGeometry","x_ite/Browser/Text/TextAlignment","x_ite/Components/Texturing/PixelTexture","x_ite/Components/Rendering/X3DGeometryNode","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Box3","standard/Math/Geometry/ViewVolume","standard/Math/Algorithm"],function(t,e,i,n,s,o,r,a,u,h,l){"use strict";function c(i,o){e.call(this,i,o),i.setTransparent(!0),this.texCoordArray=s.createArray(),this.textureNode=new n(i.getExecutionContext()),this.canvas=t("<canvas></canvas>"),this.context=this.canvas[0].getContext("2d"),this.matrix=new a,this.textureNode.textureProperties_=o.getBrowser().getScreenTextureProperties(),this.textureNode.setup()}return c.prototype=Object.assign(Object.create(e.prototype),{constructor:c,modelViewMatrix:new a,getTransparent:function(){return!0},getMatrix:function(){return this.matrix},update:function(){var t=new o(0,0,0),n=new o(1,1,0);return function(){e.prototype.update.call(this);var s=this.getFontStyle(),o=this.getText();switch(o.textBounds_.x=Math.ceil(o.textBounds_.x)+1,o.textBounds_.y=Math.ceil(o.textBounds_.y)+1,this.getBBox().getExtents(t,n),t.x-=1,t.y-=1,s.getMajorAlignment()){case i.BEGIN:case i.FIRST:t.x=Math.floor(t.x),n.x=t.x+o.textBounds_.x;break;case i.MIDDLE:t.x=Math.round(t.x),n.x=t.x+o.textBounds_.x;break;case i.END:n.x=Math.ceil(n.x),t.x=n.x-o.textBounds_.x}switch(s.getMinorAlignment()){case i.BEGIN:case i.FIRST:n.y=Math.ceil(n.y),t.y=n.y-o.textBounds_.y;break;case i.MIDDLE:n.y=Math.round(n.y),t.y=n.y-o.textBounds_.y;break;case i.END:t.y=Math.floor(t.y),n.y=t.y+o.textBounds_.y}o.origin_.x=t.x,o.origin_.y=n.y,this.getBBox().setExtents(t,n)}}(),build:function(){var t=new o(0,0,0),e=new o(1,1,0);return function(){var i=this.getFontStyle(),n=i.getFont();if(n){var s=this.getText(),o=this.getGlyphs(),r=this.getMinorAlignment(),a=this.getTranslations(),u=this.getCharSpacings(),h=i.getScale(),c=h/n.unitsPerEm,d=this.texCoordArray,y=s.getNormals(),p=s.getVertices(),x=this.canvas[0],f=this.context;d.length=0,s.getMultiTexCoords().push(d),this.getBBox().getExtents(t,e),y.push(0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1),p.push(t.x,t.y,0,1,e.x,t.y,0,1,e.x,e.y,0,1,t.x,t.y,0,1,e.x,e.y,0,1,t.x,e.y,0,1);var g=s.textBounds_.x,_=s.textBounds_.y;x.width=l.nextPowerOfTwo(g),x.height=l.nextPowerOfTwo(_);var w=g/x.width,m=_/x.height,M=1-m;if(d.push(0,M,0,1,w,M,0,1,w,1,0,1,0,M,0,1,w,1,0,1,0,1,0,1),f.fillStyle="rgba(255,255,255,0)",f.fillRect(0,0,x.width,x.height),f.fillStyle="rgba(255,255,255,1)",i.horizontal_.getValue())for(var z=0,S=o.length;z<S;++z)for(var X=o[z],N=u[z],F=a[z],C=0,L=0,v=X.length;L<v;++L){var O=X[L],T=r.x+F.x+C+L*N-t.x,M=r.y+F.y-e.y;this.drawGlyph(f,n,O,T,M,h);var B=0;L+1<X.length&&(B=n.getKerningValue(O,X[L+1])),C+=(O.advanceWidth+B)*c}else for(var b=i.leftToRight_.getValue(),U=i.topToBottom_.getValue(),D=b?0:s.string_.length-1,Y=b?s.string_.length:-1,P=b?1:-1,z=D,V=0;z!==Y;z+=P)for(var X=o[z],I=X.length,G=U?0:I-1,E=U?I:-1,R=U?1:-1,L=G;L!==E;L+=R,++V){var F=a[V],T=r.x+F.x-t.x,M=r.y+F.y-e.y;this.drawGlyph(f,n,X[L],T,M,h)}var A=f.getImageData(0,0,x.width,x.height);A?this.textureNode.setTexture(x.width,x.height,!0,new Uint8Array(A.data),!0):this.textureNode.clear()}}}(),drawGlyph:function(t,e,i,n,s,o){var r=i.getPath(n,-s,o),a=r.commands;t.beginPath();for(var u=0,h=a.length;u<h;++u){var l=a[u];switch(l.type){case"M":t.moveTo(l.x,l.y);continue;case"Z":t.closePath();continue;case"L":t.lineTo(l.x,l.y);continue;case"Q":t.quadraticCurveTo(l.x1,l.y1,l.x,l.y);continue;case"C":t.bezierCurveTo(l.x1,l.y1,l.x2,l.y2,l.x,l.y);continue}}r.fill&&t.fill(),r.stroke&&(t.lineWidth=r.strokeWidth,t.stroke())},getGlyphExtents:function(t,e,i,n,s){var o=t.unitsPerEm;n.set((e.xMin||0)/o,(e.yMin||0)/o,0),s.set((e.xMax||0)/o,(e.yMax||0)/o,0)},transform:function(){var t=new r(0,0,0,0),e=new r(0,0,0,0),i=new r(0,0,0,0),n=new o(0,0,0),s=new a,l=new u;return function(r){var a=this.getText(),u=r.getModelViewMatrix().get(),c=r.getProjectionMatrix().get(),d=r.getViewVolume().getViewport(),y=r.getViewpoint().getScreenScale(u.origin,d);t.set(u[0],u[1],u[2],u[3]),e.set(u[4],u[5],u[6],u[7]),i.set(u[8],u[9],u[10],u[11]),t.normalize().multiply(y.x),e.normalize().multiply(y.y),i.normalize().multiply(y.z),s.set(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,i.x,i.y,i.z,i.w,u[12],u[13],u[14],u[15]),h.projectPoint(o.Zero,s,c,d,n),n.x=Math.round(n.x),n.y=Math.round(n.y),h.unProjectPoint(n.x,n.y,n.z,s,c,d,n),n.z=0,s.translate(n),this.matrix.assign(u).inverse().multLeft(s),l.assign(this.getBBox()).multRight(this.matrix),a.setBBox(l)}}(),traverse:function(t,e){this.transform(e)},display:function(t,e){a.prototype.multLeft.call(e.modelViewMatrix,this.matrix),e.textureNode=this.textureNode},transformLine:function(t){return t.multLineMatrix(a.inverse(this.matrix))},transformMatrix:function(t){return t.multLeft(this.matrix)}}),c}),t("x_ite/Components/Layout/ScreenFontStyle",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Text/X3DFontStyleNode","x_ite/Browser/Layout/ScreenText","x_ite/Bits/X3DConstants"],function(t,e,i,n,s,o){"use strict";function r(t){n.call(this,t),this.addType(o.ScreenFontStyle)}return r.prototype=Object.assign(Object.create(n.prototype),{constructor:r,fieldDefinitions:new i([new e(o.inputOutput,"metadata",new t.SFNode),new e(o.initializeOnly,"language",new t.SFString),new e(o.initializeOnly,"family",new t.MFString("SERIF")),new e(o.initializeOnly,"style",new t.SFString("PLAIN")),new e(o.initializeOnly,"pointSize",new t.SFFloat(12)),new e(o.initializeOnly,"spacing",new t.SFFloat(1)),new e(o.initializeOnly,"horizontal",new t.SFBool(!0)),new e(o.initializeOnly,"leftToRight",new t.SFBool(!0)),new e(o.initializeOnly,"topToBottom",new t.SFBool(!0)),new e(o.initializeOnly,"justify",new t.MFString("BEGIN"))]),getTypeName:function(){return"ScreenFontStyle"},getComponentName:function(){return"Layout"},getContainerField:function(){return"fontStyle"},getTextGeometry:function(t){return new s(t,this)},getScale:function(){return this.pointSize_.getValue()*this.getBrowser().getPointSize()}}),r}),t("x_ite/Components/Layout/ScreenGroup",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Bits/X3DConstants","x_ite/Bits/TraverseType","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Numbers/Matrix4","standard/Math/Geometry/ViewVolume"],function(t,e,i,n,s,o,r,a,u,h){"use strict";function l(t){n.call(this,t),this.addType(s.ScreenGroup),this.matrix=new u}return l.prototype=Object.assign(Object.create(n.prototype),{constructor:l,fieldDefinitions:new i([new e(s.inputOutput,"metadata",new t.SFNode),new e(s.inputOutput,"visible",new t.SFBool(!0)),new e(s.inputOutput,"bboxDisplay",new t.SFBool),new e(s.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new e(s.initializeOnly,"bboxCenter",new t.SFVec3f),new e(s.inputOnly,"addChildren",new t.MFNode),new e(s.inputOnly,"removeChildren",new t.MFNode),new e(s.inputOutput,"children",new t.MFNode)]),getTypeName:function(){return"ScreenGroup"},getComponentName:function(){return"Layout"},getContainerField:function(){return"children"},getBBox:function(t,e){return n.prototype.getBBox.call(this,t,e).multRight(this.matrix)},getMatrix:function(){return this.matrix},scale:function(){var t=new a(0,0,0,0),e=new a(0,0,0,0),i=new a(0,0,0,0),n=new r(0,0,0),s=new u;return function(o){var a=o.getModelViewMatrix().get(),u=o.getProjectionMatrix().get(),l=o.getViewVolume().getViewport(),c=o.getViewpoint().getScreenScale(a.origin,l);t.set(a[0],a[1],a[2],a[3]),e.set(a[4],a[5],a[6],a[7]),i.set(a[8],a[9],a[10],a[11]),t.normalize().multiply(c.x),e.normalize().multiply(c.y),i.normalize().multiply(c.z),s.set(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,i.x,i.y,i.z,i.w,a[12],a[13],a[14],a[15]),h.projectPoint(r.Zero,s,u,l,n),n.x=Math.round(n.x),n.y=Math.round(n.y),h.unProjectPoint(n.x,n.y,n.z,s,u,l,n),n.z=0,s.translate(n),this.matrix.assign(a).inverse().multLeft(s)}}(),traverse:function(t,e){try{switch(t){case o.CAMERA:case o.PICKING:case o.SHADOW:break;default:this.scale(e)}var i=e.getModelViewMatrix();i.push(),i.multLeft(this.matrix),n.prototype.traverse.call(this,t,e),i.pop()}catch(t){}}}),l}),t(["x_ite/Components","x_ite/Browser/Layout/X3DLayoutContext","x_ite/Components/Layout/Layout","x_ite/Components/Layout/LayoutGroup","x_ite/Components/Layout/LayoutLayer","x_ite/Components/Layout/ScreenFontStyle","x_ite/Components/Layout/ScreenGroup","x_ite/Components/Layout/X3DLayoutNode"],function(t,e,i,n,s,o,r,a){"use strict";t.addComponent({name:"Layout",types:{Layout:i,LayoutGroup:n,LayoutLayer:s,ScreenFontStyle:o,ScreenGroup:r},abstractTypes:{X3DLayoutNode:a},browser:e})})}();
1
+ !function(){const t=X3D.define,e=X3D.require;t("x_ite/Browser/Layout/X3DLayoutContext",["jquery","x_ite/Components/Texturing/TextureProperties"],function(t,e){"use strict";function i(){}return i.prototype={getScreenTextureProperties:function(){return this.screenTextureProperties=new e(this.getPrivateScene()),this.screenTextureProperties.boundaryModeS_="CLAMP",this.screenTextureProperties.boundaryModeT_="CLAMP",this.screenTextureProperties.boundaryModeR_="CLAMP",this.screenTextureProperties.minificationFilter_="NEAREST",this.screenTextureProperties.magnificationFilter_="NEAREST",this.screenTextureProperties.generateMipMaps_=!1,this.screenTextureProperties.setup(),this.getScreenTextureProperties=function(){return this.screenTextureProperties},this.screenTextureProperties},getPointSize:function(){if(void 0===this.pointSize){var e=t("<div></div>").css("height","1in").css("display","none");this.pointSize=e.appendTo(t("body")).height()/72,e.remove()}return this.pointSize}},i}),t("x_ite/Components/Layout/X3DLayoutNode",["x_ite/Components/Core/X3DChildNode","x_ite/Bits/X3DConstants"],function(t,e){"use strict";function i(i){t.call(this,i),this.addType(e.X3DLayoutNode)}return i.prototype=Object.assign(Object.create(t.prototype),{constructor:i}),i}),t("x_ite/Components/Layout/Layout",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Layout/X3DLayoutNode","x_ite/Bits/X3DCast","x_ite/Bits/X3DConstants","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4"],function(t,e,i,n,s,o,r,a,u,h){"use strict";function l(t){n.call(this,t),this.addType(o.Layout),this.alignX=y,this.alignY=y,this.offsetUnitX=g,this.offsetUnitY=g,this.offsetX=0,this.offsetY=0,this.sizeUnitX=g,this.sizeUnitY=g,this.sizeX=1,this.sizeY=1,this.scaleModeX=m,this.scaleModeY=m,this.parent=null,this.rectangleCenter=new r(0,0),this.rectangleSize=new r(0,0),this.matrix=new h}var c=0,d=c++,y=c++,p=c++,x=c++,f=c++,g=c++,_=c++,w=c++,m=c++,M=c++;return l.prototype=Object.assign(Object.create(n.prototype),{constructor:l,viewportPixel:new r(0,0),pixelSize:new r(0,0),translation:new a(0,0,0),offset:new a(0,0,0),scale:new a(1,1,1),currentTranslation:new a(0,0,0),currentRotation:new u(0,0,1,0),currentScale:new a(0,0,0),modelViewMatrix:new h,fieldDefinitions:new i([new e(o.inputOutput,"metadata",new t.SFNode),new e(o.inputOutput,"align",new t.MFString("CENTER","CENTER")),new e(o.inputOutput,"offsetUnits",new t.MFString("WORLD","WORLD")),new e(o.inputOutput,"offset",new t.MFFloat(0,0)),new e(o.inputOutput,"sizeUnits",new t.MFString("WORLD","WORLD")),new e(o.inputOutput,"size",new t.MFFloat(1,1)),new e(o.inputOutput,"scaleMode",new t.MFString("NONE","NONE"))]),getTypeName:function(){return"Layout"},getComponentName:function(){return"Layout"},getContainerField:function(){return"layout"},initialize:function(){n.prototype.initialize.call(this),this.align_.addInterest("set_align__",this),this.offsetUnits_.addInterest("set_offsetUnits__",this),this.offset_.addInterest("set_offset__",this),this.sizeUnits_.addInterest("set_sizeUnits__",this),this.size_.addInterest("set_size__",this),this.scaleMode_.addInterest("set_scaleMode__",this),this.set_align__(),this.set_offsetUnits__(),this.set_offset__(),this.set_sizeUnits__(),this.set_size__(),this.set_scaleMode__()},set_align__:function(){this.align_.length>0?"LEFT"===this.align_[0]?this.alignX=d:"RIGHT"===this.align_[0]?this.alignX=p:this.alignX=y:this.alignX=y,this.align_.length>1?"BOTTOM"===this.align_[1]?this.alignY=x:"TOP"===this.align_[1]?this.alignY=f:this.alignY=y:this.alignY=y},set_offsetUnits__:function(){this.offsetUnits_.length>0?("FRACTION"===this.offsetUnits_[0]?this.offsetUnitX=_:"PIXEL"===this.offsetUnits_[0]?this.offsetUnitX=w:this.offsetUnitX=g,this.offsetUnits_.length>1?"FRACTION"===this.offsetUnits_[1]?this.offsetUnitY=_:"PIXEL"===this.offsetUnits_[1]?this.offsetUnitY=w:this.offsetUnitY=g:this.offsetUnitY=this.offsetUnitX):(this.offsetUnitX=g,this.offsetUnitY=g)},set_offset__:function(){this.offset_.length>0?(this.offsetX=this.offset_[0],this.offset_.length>1?this.offsetY=this.offset_[1]:this.offsetY=offsetX):(this.offsetX=0,this.offsetY=0)},set_sizeUnits__:function(){this.sizeUnits_.length>0?("FRACTION"===this.sizeUnits_[0]?this.sizeUnitX=_:"PIXEL"===this.sizeUnits_[0]?this.sizeUnitX=w:this.sizeUnitX=g,this.sizeUnits_.length>1?"FRACTION"===this.sizeUnits_[1]?this.sizeUnitY=_:"PIXEL"===this.sizeUnits_[1]?this.sizeUnitY=w:this.sizeUnitY=g:this.sizeUnitY=this.sizeUnitX):(this.sizeUnitX=g,this.sizeUnitY=g)},set_size__:function(){this.size_.length>0?(this.sizeX=this.size_[0],this.size_.length>1?this.sizeY=this.size_[1]:this.sizeY=this.sizeX):(this.sizeX=0,this.sizeY=0)},set_scaleMode__:function(){this.scaleMode_.length>0?("FRACTION"===this.scaleMode_[0]?this.scaleModeX=_:"PIXEL"===this.scaleMode_[0]?this.scaleModeX=w:"STRETCH"===this.scaleMode_[0]?this.scaleModeX=M:this.scaleModeX=m,this.scaleMode_.length>1?"FRACTION"===this.scaleMode_[1]?this.scaleModeY=_:"PIXEL"===this.scaleMode_[1]?this.scaleModeY=w:"STRETCH"===this.scaleMode_[1]?this.scaleModeY=M:this.scaleModeY=m:this.scaleModeY=this.scaleModeX):(this.scaleModeX=m,this.scaleModeY=m)},getRectangleCenter:function(){return this.rectangleCenter},getRectangleSize:function(){return this.rectangleSize},getAlignX:function(){return this.alignX},getAlignY:function(){return this.alignY},getOffsetUnitX:function(){return this.offsetUnitX===g?this.parent?this.parent.getOffsetUnitX():_:this.offsetUnitX},getOffsetUnitY:function(){return this.offsetUnitY===g?this.parent?this.parent.getOffsetUnitY():_:this.offsetUnitY},getOffsetX:function(){return this.offsetX},getOffsetY:function(){return this.offsetY},getSizeUnitX:function(){return this.sizeUnitX===g?this.parent?this.parent.getSizeUnitX():_:this.sizeUnitX},getSizeUnitY:function(){return this.sizeUnitY===g?this.parent?this.parent.getSizeUnitY():_:this.sizeUnitY},getSizeX:function(){return this.sizeX},getSizeY:function(){return this.sizeY},getScaleModeX:function(){return this.parent?this.scaleModeX:this.scaleModeX===m?_:this.scaleModeX},getScaleModeY:function(){return this.parent?this.scaleModeY:this.scaleModeY===m?_:this.scaleModeY},transform:function(t,e){var i=this.parent=e.getParentLayout(),n=this.matrix,s=e.getViewpoint(),o=e.getNavigationInfo().getNearValue(),r=e.getViewVolume().getScissor(),a=s.getViewportSize(r,o),u=this.viewportPixel,h=this.pixelSize,l=i?i.getRectangleSize():a,c=this.rectangleSize,g=this.rectangleCenter;switch(u.set(r[2],r[3]),h.assign(a).divVec(u),this.getSizeUnitX()){case _:c.x=this.sizeX*l.x;break;case w:c.x=this.sizeX*h.x}switch(this.getSizeUnitY()){case _:c.y=this.sizeY*l.y;break;case w:c.y=this.sizeY*h.y}var z=this.translation.set(0,0,0);switch(this.getAlignX()){case d:z.x=-(l.x-c.x)/2;break;case y:this.getSizeUnitX()===w&&1&u.x&&(z.x=-h.x/2);break;case p:z.x=(l.x-c.x)/2}switch(this.getAlignY()){case x:z.y=-(l.y-c.y)/2;break;case y:this.getSizeUnitX===w&&1&u.y&&(z.y=-h.y/2);break;case f:z.y=(l.y-c.y)/2}var S=this.offset.set(0,0,0);switch(this.getOffsetUnitX()){case _:S.x=this.offsetX*l.x;break;case w:S.x=this.offsetX*a.x/u.x}switch(this.getOffsetUnitY()){case _:S.y=this.offsetY*l.y;break;case w:S.y=this.offsetY*a.y/u.y}var X=this.scale.set(1,1,1),N=this.currentTranslation,F=this.currentRotation,C=this.currentScale;switch(e.getModelViewMatrix().get().get(N,F,C),this.getScaleModeX()){case m:X.x=C.x;break;case _:X.x=c.x;break;case M:break;case w:X.x=a.x/u.x}switch(this.getScaleModeY()){case m:X.y=C.y;break;case _:X.y=c.y;break;case M:break;case w:X.y=a.y/u.y}return this.getScaleModeX()===M?this.getScaleModeY()===M?c.x>c.y?(X.x=c.x,X.y=X.x):(X.y=c.y,X.x=X.y):X.x=X.y:this.getScaleModeY()===M&&(X.y=X.x),g.assign(z).add(S),n.set(N,F),n.translate(z.add(S)),n.scale(X),n}}),l}),t("x_ite/Components/Layout/LayoutGroup",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Bits/X3DCast","x_ite/Bits/TraverseType","x_ite/Bits/X3DConstants","standard/Math/Numbers/Matrix4"],function(t,e,i,n,s,o,r,a){"use strict";function u(t){n.call(this,t),this.addType(r.LayoutGroup),this.viewportNode=null,this.layoutNode=null,this.modelViewMatrix=new a,this.screenMatrix=new a}return u.prototype=Object.assign(Object.create(n.prototype),{constructor:u,fieldDefinitions:new i([new e(r.inputOutput,"metadata",new t.SFNode),new e(r.inputOutput,"layout",new t.SFNode),new e(r.inputOutput,"viewport",new t.SFNode),new e(r.inputOutput,"visible",new t.SFBool(!0)),new e(r.inputOutput,"bboxDisplay",new t.SFBool),new e(r.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new e(r.initializeOnly,"bboxCenter",new t.SFVec3f),new e(r.inputOnly,"addChildren",new t.MFNode),new e(r.inputOnly,"removeChildren",new t.MFNode),new e(r.inputOutput,"children",new t.MFNode)]),getTypeName:function(){return"LayoutGroup"},getComponentName:function(){return"Layout"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.viewport_.addInterest("set_viewport__",this),this.layout_.addInterest("set_layout__",this),this.set_viewport__(),this.set_layout__()},set_viewport__:function(){this.viewportNode=s(r.X3DViewportNode,this.viewport_)},set_layout__:function(){this.layoutNode=s(r.X3DLayoutNode,this.layout_)},getBBox:function(t,e){return n.prototype.getBBox.call(this,t,e).multRight(this.getMatrix())},getMatrix:function(){try{this.layoutNode?this.matrix.assign(this.modelViewMatrix).inverse().multLeft(this.screenMatrix):this.matrix.identity()}catch(t){}return this.matrix},traverse:function(t,e){switch(t){case o.COLLISION:return;default:if(this.viewportNode&&this.viewportNode.push(),this.layoutNode){var i=e.getModelViewMatrix();this.modelViewMatrix.assign(i.get()),this.screenMatrix.assign(this.layoutNode.transform(t,e)),i.pushMatrix(this.screenMatrix),e.getLayouts().push(this.layoutNode),n.prototype.traverse.call(this,t,e),e.getLayouts().pop(),i.pop()}else n.prototype.traverse.call(this,t,e);return void(this.viewportNode&&this.viewportNode.pop())}}}),u}),t("x_ite/Components/Layout/LayoutLayer",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Layering/X3DLayerNode","x_ite/Components/Layout/LayoutGroup","x_ite/Components/Navigation/OrthoViewpoint","x_ite/Bits/X3DConstants"],function(t,e,i,n,s,o,r){"use strict";function a(t){n.call(this,t,new o(t),new s(t)),this.addType(r.LayoutLayer)}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,fieldDefinitions:new i([new e(r.inputOutput,"metadata",new t.SFNode),new e(r.inputOutput,"isPickable",new t.SFBool(!0)),new e(r.inputOutput,"layout",new t.SFNode),new e(r.inputOutput,"viewport",new t.SFNode),new e(r.inputOnly,"addChildren",new t.MFNode),new e(r.inputOnly,"removeChildren",new t.MFNode),new e(r.inputOutput,"children",new t.MFNode)]),getTypeName:function(){return"LayoutLayer"},getComponentName:function(){return"Layout"},getContainerField:function(){return"layers"},initialize:function(){n.prototype.initialize.call(this),this.layout_.addFieldInterest(this.getGroup().layout_),this.addChildren_.addFieldInterest(this.getGroup().addChildren_),this.removeChildren_.addFieldInterest(this.getGroup().removeChildren_),this.children_.addFieldInterest(this.getGroup().children_),this.getGroup().layout_=this.layout_,this.getGroup().children_=this.children_,this.getGroup().setPrivate(!0),this.getGroup().setup()}}),a}),t("x_ite/Browser/Layout/ScreenText",["jquery","x_ite/Browser/Text/X3DTextGeometry","x_ite/Browser/Text/TextAlignment","x_ite/Components/Texturing/PixelTexture","x_ite/Components/Rendering/X3DGeometryNode","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Box3","standard/Math/Geometry/ViewVolume","standard/Math/Algorithm"],function(t,e,i,n,s,o,r,a,u,h,l){"use strict";function c(i,o){e.call(this,i,o),i.setTransparent(!0),this.texCoordArray=s.createArray(),this.textureNode=new n(i.getExecutionContext()),this.canvas=t("<canvas></canvas>"),this.context=this.canvas[0].getContext("2d"),this.matrix=new a,this.textureNode.textureProperties_=o.getBrowser().getScreenTextureProperties(),this.textureNode.setup()}return c.prototype=Object.assign(Object.create(e.prototype),{constructor:c,modelViewMatrix:new a,getTransparent:function(){return!0},getMatrix:function(){return this.matrix},update:function(){var t=new o(0,0,0),n=new o(1,1,0);return function(){e.prototype.update.call(this);var s=this.getFontStyle(),o=this.getText();switch(o.textBounds_.x=Math.ceil(o.textBounds_.x)+1,o.textBounds_.y=Math.ceil(o.textBounds_.y)+1,this.getBBox().getExtents(t,n),t.x-=1,t.y-=1,s.getMajorAlignment()){case i.BEGIN:case i.FIRST:t.x=Math.floor(t.x),n.x=t.x+o.textBounds_.x;break;case i.MIDDLE:t.x=Math.round(t.x),n.x=t.x+o.textBounds_.x;break;case i.END:n.x=Math.ceil(n.x),t.x=n.x-o.textBounds_.x}switch(s.getMinorAlignment()){case i.BEGIN:case i.FIRST:n.y=Math.ceil(n.y),t.y=n.y-o.textBounds_.y;break;case i.MIDDLE:n.y=Math.round(n.y),t.y=n.y-o.textBounds_.y;break;case i.END:t.y=Math.floor(t.y),n.y=t.y+o.textBounds_.y}o.origin_.x=t.x,o.origin_.y=n.y,this.getBBox().setExtents(t,n)}}(),build:function(){var t=new o(0,0,0),e=new o(1,1,0);return function(){var i=this.getFontStyle(),n=i.getFont();if(n){var s=this.getText(),o=this.getGlyphs(),r=this.getMinorAlignment(),a=this.getTranslations(),u=this.getCharSpacings(),h=i.getScale(),c=h/n.unitsPerEm,d=this.texCoordArray,y=s.getNormals(),p=s.getVertices(),x=this.canvas[0],f=this.context;d.length=0,s.getMultiTexCoords().push(d),this.getBBox().getExtents(t,e),y.push(0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1),p.push(t.x,t.y,0,1,e.x,t.y,0,1,e.x,e.y,0,1,t.x,t.y,0,1,e.x,e.y,0,1,t.x,e.y,0,1);var g=s.textBounds_.x,_=s.textBounds_.y;x.width=l.nextPowerOfTwo(g),x.height=l.nextPowerOfTwo(_);var w=g/x.width,m=_/x.height,M=1-m;if(d.push(0,M,0,1,w,M,0,1,w,1,0,1,0,M,0,1,w,1,0,1,0,1,0,1),f.fillStyle="rgba(255,255,255,0)",f.fillRect(0,0,x.width,x.height),f.fillStyle="rgba(255,255,255,1)",i.horizontal_.getValue())for(var z=0,S=o.length;z<S;++z)for(var X=o[z],N=u[z],F=a[z],C=0,L=0,O=X.length;L<O;++L){var v=X[L],T=r.x+F.x+C+L*N-t.x,M=r.y+F.y-e.y;this.drawGlyph(f,n,v,T,M,h);var B=0;L+1<X.length&&(B=n.getKerningValue(v,X[L+1])),C+=(v.advanceWidth+B)*c}else for(var b=i.leftToRight_.getValue(),U=i.topToBottom_.getValue(),D=b?0:s.string_.length-1,Y=b?s.string_.length:-1,P=b?1:-1,z=D,V=0;z!==Y;z+=P)for(var X=o[z],I=X.length,G=U?0:I-1,E=U?I:-1,R=U?1:-1,L=G;L!==E;L+=R,++V){var F=a[V],T=r.x+F.x-t.x,M=r.y+F.y-e.y;this.drawGlyph(f,n,X[L],T,M,h)}var A=f.getImageData(0,0,x.width,x.height);A?this.textureNode.setTexture(x.width,x.height,!0,new Uint8Array(A.data),!0):this.textureNode.clear()}}}(),drawGlyph:function(t,e,i,n,s,o){var r=i.getPath(n,-s,o),a=r.commands;t.beginPath();for(var u=0,h=a.length;u<h;++u){var l=a[u];switch(l.type){case"M":t.moveTo(l.x,l.y);continue;case"Z":t.closePath();continue;case"L":t.lineTo(l.x,l.y);continue;case"Q":t.quadraticCurveTo(l.x1,l.y1,l.x,l.y);continue;case"C":t.bezierCurveTo(l.x1,l.y1,l.x2,l.y2,l.x,l.y);continue}}r.fill&&t.fill(),r.stroke&&(t.lineWidth=r.strokeWidth,t.stroke())},getGlyphExtents:function(t,e,i,n,s){var o=t.unitsPerEm;n.set((e.xMin||0)/o,(e.yMin||0)/o,0),s.set((e.xMax||0)/o,(e.yMax||0)/o,0)},transform:function(){var t=new r(0,0,0,0),e=new r(0,0,0,0),i=new r(0,0,0,0),n=new o(0,0,0),s=new a,l=new u;return function(r){var a=this.getText(),u=r.getModelViewMatrix().get(),c=r.getProjectionMatrix().get(),d=r.getViewVolume().getViewport(),y=r.getViewpoint().getScreenScale(u.origin,d);t.set(u[0],u[1],u[2],u[3]),e.set(u[4],u[5],u[6],u[7]),i.set(u[8],u[9],u[10],u[11]),t.normalize().multiply(y.x),e.normalize().multiply(y.y),i.normalize().multiply(y.z),s.set(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,i.x,i.y,i.z,i.w,u[12],u[13],u[14],u[15]),h.projectPoint(o.Zero,s,c,d,n),n.x=Math.round(n.x),n.y=Math.round(n.y),h.unProjectPoint(n.x,n.y,n.z,s,c,d,n),n.z=0,s.translate(n),this.matrix.assign(u).inverse().multLeft(s),l.assign(this.getBBox()).multRight(this.matrix),a.setBBox(l)}}(),traverse:function(t,e){this.transform(e)},display:function(t,e){a.prototype.multLeft.call(e.modelViewMatrix,this.matrix),e.textureNode=this.textureNode},transformLine:function(t){return t.multLineMatrix(a.inverse(this.matrix))},transformMatrix:function(t){return t.multLeft(this.matrix)}}),c}),t("x_ite/Components/Layout/ScreenFontStyle",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Text/X3DFontStyleNode","x_ite/Browser/Layout/ScreenText","x_ite/Bits/X3DConstants"],function(t,e,i,n,s,o){"use strict";function r(t){n.call(this,t),this.addType(o.ScreenFontStyle)}return r.prototype=Object.assign(Object.create(n.prototype),{constructor:r,fieldDefinitions:new i([new e(o.inputOutput,"metadata",new t.SFNode),new e(o.initializeOnly,"language",new t.SFString),new e(o.initializeOnly,"family",new t.MFString("SERIF")),new e(o.initializeOnly,"style",new t.SFString("PLAIN")),new e(o.initializeOnly,"pointSize",new t.SFFloat(12)),new e(o.initializeOnly,"spacing",new t.SFFloat(1)),new e(o.initializeOnly,"horizontal",new t.SFBool(!0)),new e(o.initializeOnly,"leftToRight",new t.SFBool(!0)),new e(o.initializeOnly,"topToBottom",new t.SFBool(!0)),new e(o.initializeOnly,"justify",new t.MFString("BEGIN"))]),getTypeName:function(){return"ScreenFontStyle"},getComponentName:function(){return"Layout"},getContainerField:function(){return"fontStyle"},getTextGeometry:function(t){return new s(t,this)},getScale:function(){return this.pointSize_.getValue()*this.getBrowser().getPointSize()}}),r}),t("x_ite/Components/Layout/ScreenGroup",["x_ite/Fields","x_ite/Basic/X3DFieldDefinition","x_ite/Basic/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Bits/X3DConstants","x_ite/Bits/TraverseType","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Numbers/Matrix4","standard/Math/Geometry/ViewVolume"],function(t,e,i,n,s,o,r,a,u,h){"use strict";function l(t){n.call(this,t),this.addType(s.ScreenGroup),this.matrix=new u}return l.prototype=Object.assign(Object.create(n.prototype),{constructor:l,fieldDefinitions:new i([new e(s.inputOutput,"metadata",new t.SFNode),new e(s.inputOutput,"visible",new t.SFBool(!0)),new e(s.inputOutput,"bboxDisplay",new t.SFBool),new e(s.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new e(s.initializeOnly,"bboxCenter",new t.SFVec3f),new e(s.inputOnly,"addChildren",new t.MFNode),new e(s.inputOnly,"removeChildren",new t.MFNode),new e(s.inputOutput,"children",new t.MFNode)]),getTypeName:function(){return"ScreenGroup"},getComponentName:function(){return"Layout"},getContainerField:function(){return"children"},getBBox:function(t,e){return n.prototype.getBBox.call(this,t,e).multRight(this.matrix)},getMatrix:function(){return this.matrix},scale:function(){var t=new a(0,0,0,0),e=new a(0,0,0,0),i=new a(0,0,0,0),n=new r(0,0,0),s=new u;return function(o){var a=o.getModelViewMatrix().get(),u=o.getProjectionMatrix().get(),l=o.getViewVolume().getViewport(),c=o.getViewpoint().getScreenScale(a.origin,l);t.set(a[0],a[1],a[2],a[3]),e.set(a[4],a[5],a[6],a[7]),i.set(a[8],a[9],a[10],a[11]),t.normalize().multiply(c.x),e.normalize().multiply(c.y),i.normalize().multiply(c.z),s.set(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,i.x,i.y,i.z,i.w,a[12],a[13],a[14],a[15]),h.projectPoint(r.Zero,s,u,l,n),n.x=Math.round(n.x),n.y=Math.round(n.y),h.unProjectPoint(n.x,n.y,n.z,s,u,l,n),n.z=0,s.translate(n),this.matrix.assign(a).inverse().multLeft(s)}}(),traverse:function(t,e){try{switch(t){case o.CAMERA:case o.PICKING:case o.SHADOW:break;default:this.scale(e)}var i=e.getModelViewMatrix();i.push(),i.multLeft(this.matrix),n.prototype.traverse.call(this,t,e),i.pop()}catch(t){}}}),l}),t(e.getComponentUrl("layout"),["x_ite/Components","x_ite/Browser/Layout/X3DLayoutContext","x_ite/Components/Layout/Layout","x_ite/Components/Layout/LayoutGroup","x_ite/Components/Layout/LayoutLayer","x_ite/Components/Layout/ScreenFontStyle","x_ite/Components/Layout/ScreenGroup","x_ite/Components/Layout/X3DLayoutNode"],function(t,e,i,n,s,o,r,a){"use strict";t.addComponent({name:"Layout",types:{Layout:i,LayoutGroup:n,LayoutLayer:s,ScreenFontStyle:o,ScreenGroup:r},abstractTypes:{X3DLayoutNode:a},browser:e})})}();
@@ -1,9 +1,11 @@
1
- (function () {
1
+ (function ()
2
+ {
3
+ // Undefine global variables.
4
+ var module = { }, exports, process;
2
5
 
3
- var
4
- define = X3D .define,
5
- require = X3D .require,
6
- module = { };
6
+ const
7
+ define = X3D .define,
8
+ require = X3D .require;
7
9
  /* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
8
10
  *******************************************************************************
9
11
  *
@@ -5314,7 +5316,7 @@ function (Fields,
5314
5316
  ******************************************************************************/
5315
5317
 
5316
5318
 
5317
- define ([
5319
+ define (require .getComponentUrl ("nurbs"), [
5318
5320
  "x_ite/Components",
5319
5321
  "x_ite/Components/NURBS/Contour2D",
5320
5322
  "x_ite/Components/NURBS/ContourPolyline2D",
@@ -5385,4 +5387,4 @@ function (Components,
5385
5387
 
5386
5388
 
5387
5389
 
5388
- }());
5390
+ })();