x_ite 11.5.6 → 11.5.8

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 (52) hide show
  1. package/README.md +23 -16
  2. package/dist/assets/components/AnnotationComponent.js +2 -2
  3. package/dist/assets/components/AnnotationComponent.min.js +2 -2
  4. package/dist/assets/components/CADGeometryComponent.js +5 -15
  5. package/dist/assets/components/CADGeometryComponent.min.js +2 -2
  6. package/dist/assets/components/CubeMapTexturingComponent.js +2 -2
  7. package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
  8. package/dist/assets/components/DISComponent.js +2 -2
  9. package/dist/assets/components/DISComponent.min.js +2 -2
  10. package/dist/assets/components/EventUtilitiesComponent.js +2 -2
  11. package/dist/assets/components/EventUtilitiesComponent.min.js +2 -2
  12. package/dist/assets/components/Geometry2DComponent.js +2 -2
  13. package/dist/assets/components/Geometry2DComponent.min.js +2 -2
  14. package/dist/assets/components/GeospatialComponent.js +90 -114
  15. package/dist/assets/components/GeospatialComponent.min.js +2 -2
  16. package/dist/assets/components/HAnimComponent.js +2 -2
  17. package/dist/assets/components/HAnimComponent.min.js +2 -2
  18. package/dist/assets/components/KeyDeviceSensorComponent.js +2 -2
  19. package/dist/assets/components/KeyDeviceSensorComponent.min.js +2 -2
  20. package/dist/assets/components/LayoutComponent.js +2 -2
  21. package/dist/assets/components/LayoutComponent.min.js +2 -2
  22. package/dist/assets/components/NURBSComponent.js +2 -2
  23. package/dist/assets/components/NURBSComponent.min.js +2 -2
  24. package/dist/assets/components/ParticleSystemsComponent.js +2 -2
  25. package/dist/assets/components/ParticleSystemsComponent.min.js +2 -2
  26. package/dist/assets/components/PickingComponent.js +76 -68
  27. package/dist/assets/components/PickingComponent.min.js +2 -2
  28. package/dist/assets/components/RigidBodyPhysicsComponent.js +5 -13
  29. package/dist/assets/components/RigidBodyPhysicsComponent.min.js +2 -2
  30. package/dist/assets/components/ScriptingComponent.js +2 -2
  31. package/dist/assets/components/ScriptingComponent.min.js +2 -2
  32. package/dist/assets/components/TextComponent.js +2 -2
  33. package/dist/assets/components/TextComponent.min.js +2 -2
  34. package/dist/assets/components/TextureProjectionComponent.js +2 -2
  35. package/dist/assets/components/TextureProjectionComponent.min.js +2 -2
  36. package/dist/assets/components/Texturing3DComponent.js +67 -67
  37. package/dist/assets/components/Texturing3DComponent.min.js +2 -2
  38. package/dist/assets/components/VolumeRenderingComponent.js +2 -2
  39. package/dist/assets/components/VolumeRenderingComponent.min.js +2 -2
  40. package/dist/assets/components/WebXRComponent.js +10 -2
  41. package/dist/assets/components/WebXRComponent.min.js +2 -2
  42. package/dist/assets/components/X_ITEComponent.js +2 -2
  43. package/dist/assets/components/X_ITEComponent.min.js +2 -2
  44. package/dist/example.html +1 -1
  45. package/dist/x_ite.css +1 -1
  46. package/dist/x_ite.d.ts +1 -1
  47. package/dist/x_ite.js +53955 -54251
  48. package/dist/x_ite.min.js +2 -2
  49. package/dist/x_ite.min.mjs +2 -2
  50. package/dist/x_ite.mjs +54525 -54821
  51. package/dist/x_ite.zip +0 -0
  52. package/package.json +3 -3
@@ -1,2 +1,2 @@
1
- /* X_ITE v11.5.6 */
2
- const t=window[Symbol.for("X_ITE.X3D-11.5.6")];(()=>{var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const n=t.Components;var i=e.n(n);const s=t.Fields;var o=e.n(s);const r=t.X3DFieldDefinition;var a=e.n(r);const d=t.FieldDefinitionArray;var h=e.n(d);const u=t.X3DNode;var l=e.n(u);const c=t.X3DGeometricPropertyNode;var p=e.n(c);const _=t.X3DConstants;var m=e.n(_);const g=t.Namespace;var w=e.n(g);function T(t){p().call(this,t),this.addType(m().HAnimDisplacer),this._displacements.setUnit("length")}Object.setPrototypeOf(T.prototype,p().prototype),Object.defineProperties(T,{...l().getStaticProperties("HAnimDisplacer","HAnim",1,"displacers","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"weight",new(o().SFFloat)),new(a())(m().inputOutput,"coordIndex",new(o().MFInt32)),new(a())(m().inputOutput,"displacements",new(o().MFVec3f))]),enumerable:!0}});const x=T,f=w().add("HAnimDisplacer",x),F=t.X3DChildNode;var I=e.n(F);const v=t.Group;var E=e.n(v);const O=t.Transform;var S=e.n(O);const N=t.X3DBoundedObject;var b=e.n(N);const y=t.TraverseType;var M=e.n(y);const D=t.X3DCast;var A=e.n(D);const j=t.Matrix4;var R=e.n(j);const C=t.Algorithm;var k=e.n(C);function W(t){I().call(this,t),b().call(this,t),this.addType(m().HAnimHumanoid),this.addChildObjects(m().outputOnly,"jointTextures",new(o().SFTime),m().outputOnly,"displacementsTexture",new(o().SFTime),m().outputOnly,"displacementWeightsTexture",new(o().SFTime)),this._translation.setUnit("length"),this._center.setUnit("length"),this._bboxSize.setUnit("length"),this._bboxCenter.setUnit("length"),t.getSpecificationVersion()<=3.3&&(this._version=""),this.skeletonNode=new(E())(t),this.viewpointsNode=new(E())(t),this.skinNode=new V(t,this),this.transformNode=new(S())(t),this.motionNodes=[],this.jointNodes=[],this.jointBindingMatrices=[],this.displacementWeights=[],this.numJoints=0,this.numDisplacements=0,this.update=new B,this.skinning=Function.prototype}Object.assign(Object.setPrototypeOf(W.prototype,I().prototype),b().prototype,{initialize(){I().prototype.initialize.call(this),b().prototype.initialize.call(this),this.skeletonNode.addAllowedTypes(m().HAnimJoint,m().HAnimSite),this.viewpointsNode.addAllowedTypes(m().HAnimSite),this._skeleton.addFieldInterest(this.skeletonNode._children),this._viewpoints.addFieldInterest(this.viewpointsNode._children),this._skin.addFieldInterest(this.skinNode._children),this.skeletonNode._children=this._skeleton,this.viewpointsNode._children=this._viewpoints,this.skinNode._children=this._skin,this.skeletonNode.setPrivate(!0),this.viewpointsNode.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._bboxDisplay.addFieldInterest(this.transformNode._bboxDisplay),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._bboxDisplay=this._bboxDisplay,this.transformNode._bboxSize=this._bboxSize,this.transformNode._bboxCenter=this._bboxCenter,this.transformNode._children=[this.skeletonNode,this.viewpointsNode,this.skinNode],this.skeletonNode.setup(),this.viewpointsNode.setup(),this.skinNode.setup(),this.transformNode.setup(),this.connectChildNode(this.transformNode);const t=this.getBrowser().getContext();if(1!==t.getVersion()){this.jointsTexture=t.createTexture(),this.displacementsTexture=t.createTexture(),this.displacementWeightsTexture=t.createTexture(),this.jointMatricesTexture=t.createTexture();for(const e of[this.jointsTexture,this.displacementsTexture,this.displacementWeightsTexture,this.jointMatricesTexture])t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR);this._motionsEnabled.addInterest("set_motions__",this),this._motions.addInterest("set_motions__",this),this._jointBindingPositions.addInterest("set_joints__",this),this._jointBindingRotations.addInterest("set_joints__",this),this._jointBindingScales.addInterest("set_joints__",this),this._joints.addInterest("set_joints__",this),this._jointTextures.addInterest("set_jointTextures__",this),this._displacementsTexture.addInterest("set_displacementsTexture__",this),this._displacementWeightsTexture.addInterest("set_displacementWeightsTexture__",this),this._skinCoord.addInterest("set_skinCoord__",this),this.set_motions__(),this.set_joints__(),this.set_skinCoord__()}},getBBox(t,e){return this.transformNode.getBBox(t,e)},getSubBBox(t,e){return this.transformNode.getSubBBox(t,e)},getMatrix(){return this.transformNode.getMatrix()},getHAnimKey(){return this.humanoidKey},getNumJoints(){return this.numJoints},getNumDisplacements(){return this.numDisplacements},set_humanoidKey__(){this.humanoidKey=`[${this.numJoints}.${this.numDisplacements}]`},set_motions__(){const t=this._motionsEnabled,e=this.motionNodes;for(const t of e)t._joints.removeInterest("set_connectJoints__",this),t._channelsEnabled.removeInterest("set_connectJoints__",this),t._channels.removeInterest("set_connectJoints__",this),t._values.removeInterest("set_connectJoints__",this),t.disconnectJoints(this.jointNodes);e.length=0;for(const[n,i]of this._motions.entries()){if(n<t.length&&!t[n])continue;const s=A()(m().HAnimMotion,i);s&&e.push(s)}for(const t of e)t._joints.addInterest("set_connectJoints__",this,t),t._channelsEnabled.addInterest("set_connectJoints__",this,t),t._channels.addInterest("set_connectJoints__",this,t),t._values.addInterest("set_connectJoints__",this,t),t.connectJoints(this.jointNodes)},set_connectJoints__(t){t.disconnectJoints(this.jointNodes),t.connectJoints(this.jointNodes)},set_joints__(){const t=this.jointNodes,e=this.jointBindingMatrices,n=this._jointBindingPositions,i=this._jointBindingRotations,s=this._jointBindingScales,o=n.length,r=i.length,a=s.length;for(const e of this.motionNodes)e.disconnectJoints(t);for(const e of t)e.removeInterest("unlock",this.update),e._skinCoordIndex.removeInterest("addEvent",this._jointTextures),e._skinCoordWeight.removeInterest("addEvent",this._jointTextures),e._displacements.removeInterest("addEvent",this._displacementsTexture),e._displacementWeights.removeInterest("addEvent",this._displacementWeightsTexture);t.length=0,e.length=0;for(const[d,h]of this._joints.entries()){const u=A()(m().HAnimJoint,h);if(!u)continue;const l=o?n[Math.min(d,o-1)].getValue():null,c=r?i[Math.min(d,r-1)].getValue():null,p=a?s[Math.min(d,a-1)].getValue():null;t.push(u),e.push((new(R())).set(l,c,p))}for(const e of t)e.addInterest("unlock",this.update),e._skinCoordIndex.addInterest("addEvent",this._jointTextures),e._skinCoordWeight.addInterest("addEvent",this._jointTextures),e._displacements.addInterest("addEvent",this._displacementsTexture),e._displacementWeights.addInterest("addEvent",this._displacementWeightsTexture);for(const e of this.motionNodes)e.connectJoints(t);const d=Math.ceil(Math.sqrt(8*t.length));this.jointMatricesArray=new Float32Array(d*d*4),this._jointTextures.addEvent(),this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},set_jointTextures__(){const t=this.skinCoordNode?._point.length||1,e=Array.from({length:t},(()=>[])),n=Array.from({length:t},(()=>[]));for(const[t,i]of this.jointNodes.entries()){const s=i._skinCoordWeight.getValue();for(const[o,r]of i._skinCoordIndex.entries()){const i=s[o];0!==i&&(e[r]?.push(t),n[r]?.push(i))}}const i=k().roundToMultiple(e.reduce(((t,e)=>Math.max(t,e.length)),0),4),s=2*i,o=Math.ceil(Math.sqrt(t*s))||1,r=new Float32Array(o*o*4);for(let o=0;o<t;++o)r.set(e[o],o*s),r.set(n[o],o*s+i);this.numJoints=i;const a=this.getBrowser().getContext();a.bindTexture(a.TEXTURE_2D,this.jointsTexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA32F,o,o,0,a.RGBA,a.FLOAT,r),this.update.unlock(),this.set_humanoidKey__()},set_displacementsTexture__(){const t=this.skinCoordNode?._point.length||1,e=Array.from({length:t},(()=>[]));let n=0;this.displacementWeights.length=0;for(const[t,i]of this.jointNodes.entries())for(const{_weight:s,_coordIndex:o,_displacements:r}of i.getDisplacers())if(o.length){this.displacementWeights.push(s,0,0,0);for(const[i,s]of o.entries())e[s]?.push(...r[i],t,n,0,0,0);++n}const i=e.reduce(((t,e)=>Math.max(t,e.length)),0)/8,s=8*i,o=Math.ceil(Math.sqrt(t*i*2))||1,r=new Float32Array(o*o*4);for(let n=0;n<t;++n)r.set(e[n],n*s);this.numDisplacements=i;const a=this.getBrowser().getContext();a.bindTexture(a.TEXTURE_2D,this.displacementsTexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA32F,o,o,0,a.RGBA,a.FLOAT,r),this.displacementWeightsSize=Math.ceil(Math.sqrt(n)),this.displacementWeightsArray=new Float32Array(this.displacementWeightsSize*this.displacementWeightsSize*4),this.update.unlock(),this.set_humanoidKey__()},set_displacementWeightsTexture__(){const t=this.getBrowser().getContext(),e=this.displacementWeightsSize,n=this.displacementWeightsArray;n.set(this.displacementWeights),t.bindTexture(t.TEXTURE_2D,this.displacementWeightsTexture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA32F,e,e,0,t.RGBA,t.FLOAT,n)},set_skinCoord__(){this.skinCoordNode&&(this.skinCoordNode.removeInterest("addEvent",this._jointTextures),this.skinCoordNode.removeInterest("addEvent",this._displacementsTexture),this.skinCoordNode.removeInterest("addEvent",this._displacementWeightsTexture)),this.skinCoordNode=A()(m().Coordinate,this._skinCoord)??A()(m().CoordinateDouble,this._skinCoord),this.skinCoordNode?(delete this.skinning,this.skinCoordNode.addInterest("addEvent",this._jointTextures),this.skinCoordNode.addInterest("addEvent",this._displacementsTexture),this.skinCoordNode.addInterest("addEvent",this._displacementWeightsTexture)):this.skinning=Function.prototype,this._jointTextures.addEvent(),this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},traverse(t,e){const n=e.getInvHumanoidMatrix();n.push(this.transformNode.getMatrix()),n.multRight(e.getModelViewMatrix().get()),n.inverse(),this.transformNode.traverse(t,e),this.skinning(t,e),n.pop()},skinning(t,e){if(t!==M().DISPLAY||this.update.lock())return;const n=e.getInvHumanoidMatrix().get(),i=this.jointNodes,s=i.length,o=this.jointBindingMatrices,r=this.jointMatricesArray,a=Math.ceil(Math.sqrt(8*s));for(let t=0;t<s;++t){const e=i[t],s=o[t],a=e.getModelViewMatrix().multRight(n).multLeft(s),d=a.submatrix.transpose().inverse();r.set(a,32*t+0),r.set(d,32*t+16)}const d=this.getBrowser().getContext();d.bindTexture(d.TEXTURE_2D,this.jointMatricesTexture),d.texImage2D(d.TEXTURE_2D,0,d.RGBA32F,a,a,0,d.RGBA,d.FLOAT,r)},setShaderUniforms(t,e){const n=this.getBrowser(),i=n.getTexture2DUnit(),s=n.getTexture2DUnit(),o=n.getTexture2DUnit(),r=n.getTexture2DUnit();t.activeTexture(t.TEXTURE0+i),t.bindTexture(t.TEXTURE_2D,this.jointsTexture),t.uniform1i(e.x3d_JointsTexture,i),t.activeTexture(t.TEXTURE0+s),t.bindTexture(t.TEXTURE_2D,this.displacementsTexture),t.uniform1i(e.x3d_DisplacementsTexture,s),t.activeTexture(t.TEXTURE0+o),t.bindTexture(t.TEXTURE_2D,this.displacementWeightsTexture),t.uniform1i(e.x3d_DisplacementWeightsTexture,o),t.activeTexture(t.TEXTURE0+r),t.bindTexture(t.TEXTURE_2D,this.jointMatricesTexture),t.uniform1i(e.x3d_JointMatricesTexture,r)},dispose(){b().prototype.dispose.call(this),I().prototype.dispose.call(this)}}),Object.defineProperties(W,{...l().getStaticProperties("HAnimHumanoid","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"info",new(o().MFString)),new(a())(m().inputOutput,"version",new(o().SFString)("2.0")),new(a())(m().inputOutput,"skeletalConfiguration",new(o().SFString)("BASIC")),new(a())(m().inputOutput,"loa",new(o().SFInt32)(-1)),new(a())(m().inputOutput,"translation",new(o().SFVec3f)),new(a())(m().inputOutput,"rotation",new(o().SFRotation)),new(a())(m().inputOutput,"scale",new(o().SFVec3f)(1,1,1)),new(a())(m().inputOutput,"scaleOrientation",new(o().SFRotation)),new(a())(m().inputOutput,"center",new(o().SFVec3f)),new(a())(m().inputOutput,"visible",new(o().SFBool)(!0)),new(a())(m().inputOutput,"bboxDisplay",new(o().SFBool)),new(a())(m().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(a())(m().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(a())(m().inputOutput,"skeleton",new(o().MFNode)),new(a())(m().inputOutput,"jointBindingPositions",new(o().MFVec3f)),new(a())(m().inputOutput,"jointBindingRotations",new(o().MFRotation)),new(a())(m().inputOutput,"jointBindingScales",new(o().MFVec3f)),new(a())(m().inputOutput,"joints",new(o().MFNode)),new(a())(m().inputOutput,"segments",new(o().MFNode)),new(a())(m().inputOutput,"sites",new(o().MFNode)),new(a())(m().inputOutput,"viewpoints",new(o().MFNode)),new(a())(m().inputOutput,"motionsEnabled",new(o().MFBool)),new(a())(m().inputOutput,"motions",new(o().MFNode)),new(a())(m().inputOutput,"skinBindingNormals",new(o().SFNode)),new(a())(m().inputOutput,"skinBindingCoords",new(o().SFNode)),new(a())(m().inputOutput,"skinNormal",new(o().SFNode)),new(a())(m().inputOutput,"skinCoord",new(o().SFNode)),new(a())(m().inputOutput,"skin",new(o().MFNode))]),enumerable:!0}});class V extends(E()){#t;constructor(t,e){super(t),this.#t=e}traverse(t,e){e.getHAnimNode().push(this.#t),super.traverse(t,e),e.getHAnimNode().pop()}}class B{#e=!0;unlock(){this.#e=!1}lock(){const t=this.#e;return this.#e=!0,t}}const X=W,U=w().add("HAnimHumanoid",X),P=t.X3DTransformNode;var H=e.n(P);function J(t){H().call(this,t),this.addType(m().HAnimJoint),this.addChildObjects(m().outputOnly,"displacements",new(o().SFTime),m().outputOnly,"displacementWeights",new(o().SFTime)),this.setVisibleObject(!0),this.addAllowedTypes(m().HAnimJoint,m().HAnimSegment),t.getSpecificationVersion()<=3.3&&this.addAllowedTypes(m().HAnimSite),this.displacerNodes=[],this.modelViewMatrix=new(R())}Object.assign(Object.setPrototypeOf(J.prototype,H().prototype),{initialize(){H().prototype.initialize.call(this),this._displacers.addInterest("set_displacers__",this),this.set_displacers__()},getModelViewMatrix(){return this.modelViewMatrix},getDisplacers(){return this.displacerNodes},set_visibleObjects__(){},set_displacers__(){const t=this.displacerNodes;for(const e of t)e._coordIndex.removeInterest("addEvent",this._displacements),e._displacements.removeInterest("addEvent",this._displacements),e._coordIndex.removeInterest("addEvent",this._displacementWeights),e._weight.removeInterest("addEvent",this._displacementWeights);t.length=0;for(const e of this._displacers){const n=A()(m().HAnimDisplacer,e);n&&t.push(n)}for(const e of t)e._coordIndex.addInterest("addEvent",this._displacements),e._displacements.addInterest("addEvent",this._displacements),e._coordIndex.addInterest("addEvent",this._displacementWeights),e._weight.addInterest("addEvent",this._displacementWeights);this._displacements.addEvent(),this._displacementWeights.addEvent()},traverse(t,e){const n=e.getModelViewMatrix();n.push(),n.multLeft(this.getMatrix()),t===M().DISPLAY&&this.modelViewMatrix.assign(n.get()),H().prototype.groupTraverse.call(this,t,e),n.pop()},groupTraverse(t,e){t===M().DISPLAY&&this.modelViewMatrix.assign(e.getModelViewMatrix().get()),H().prototype.groupTraverse.call(this,t,e)}}),Object.defineProperties(J,{...l().getStaticProperties("HAnimJoint","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"translation",new(o().SFVec3f)),new(a())(m().inputOutput,"rotation",new(o().SFRotation)),new(a())(m().inputOutput,"scale",new(o().SFVec3f)(1,1,1)),new(a())(m().inputOutput,"scaleOrientation",new(o().SFRotation)),new(a())(m().inputOutput,"center",new(o().SFVec3f)),new(a())(m().inputOutput,"llimit",new(o().MFFloat)(0,0,0)),new(a())(m().inputOutput,"ulimit",new(o().MFFloat)(0,0,0)),new(a())(m().inputOutput,"limitOrientation",new(o().SFRotation)),new(a())(m().inputOutput,"stiffness",new(o().MFFloat)(0,0,0)),new(a())(m().inputOutput,"skinCoordIndex",new(o().MFInt32)),new(a())(m().inputOutput,"skinCoordWeight",new(o().MFFloat)),new(a())(m().inputOutput,"displacers",new(o().MFNode)),new(a())(m().inputOutput,"visible",new(o().SFBool)(!0)),new(a())(m().inputOutput,"bboxDisplay",new(o().SFBool)),new(a())(m().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(a())(m().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(a())(m().inputOnly,"addChildren",new(o().MFNode)),new(a())(m().inputOnly,"removeChildren",new(o().MFNode)),new(a())(m().inputOutput,"children",new(o().MFNode))]),enumerable:!0}});const z=J,L=w().add("HAnimJoint",z),G=t.TimeSensor;var K=e.n(G);const Y=t.PositionInterpolator;var q=e.n(Y);const Z=t.OrientationInterpolator;var $=e.n(Z);const Q=t.Vector3;var tt=e.n(Q);const et=t.Rotation4;var nt=e.n(et);function it(t){I().call(this,t),this.addType(m().HAnimMotion),this.timeSensor=new(K())(this.getExecutionContext()),this.interpolators=[]}Object.assign(Object.setPrototypeOf(it.prototype,I().prototype),{initialize(){I().prototype.initialize.call(this),this._loop.addFieldInterest(this.timeSensor._loop),this.timeSensor._cycleTime.addFieldInterest(this._cycleTime),this.timeSensor._elapsedTime.addFieldInterest(this._elapsedTime),this.timeSensor._enabled=!1,this.timeSensor._loop=this._loop,this.timeSensor._stopTime=1,this.timeSensor.setup(),this._enabled.addInterest("set_enabled__",this),this._joints.addInterest("set_joints__",this),this._channels.addInterest("set_interpolators__",this),this._values.addInterest("set_interpolators__",this),this._next.addInterest("set_next_or_previous__",this,1),this._previous.addInterest("set_next_or_previous__",this,-1),this._frameIndex.addInterest("set_frameIndex__",this),this._frameDuration.addInterest("set_frameDuration__",this),this._frameIncrement.addInterest("set_frameIncrement__",this),this._startFrame.addInterest("set_start_or_endFrame__",this),this._endFrame.addInterest("set_start_or_endFrame__",this),this.set_enabled__(),this.set_joints__(),this.set_frameIncrement__(),this.set_interpolators__()},connectJoints(t){const e=this._channelsEnabled,n=this.joints,i=this.getJointsIndex(t);for(const[t,{positionInterpolator:s,orientationInterpolator:o,scaleInterpolator:r}]of this.interpolators.entries()){if(t<e.length&&!e[t])continue;const a=i.get(n[t]);a&&(s?._value_changed.addFieldInterest(a._translation),o?._value_changed.addFieldInterest(a._rotation),r?._value_changed.addFieldInterest(a._scale))}},disconnectJoints(t){const e=this.joints,n=this.getJointsIndex(t);for(const[t,{positionInterpolator:i,orientationInterpolator:s,scaleInterpolator:o}]of this.interpolators.entries()){const r=n.get(e[t]);r&&(i?._value_changed.removeFieldInterest(r._translation),s?._value_changed.removeFieldInterest(r._rotation),o?._value_changed.removeFieldInterest(r._scale))}},getJointsIndex(t){const e=new Map(t.map((t=>[t._name.getValue().trim(),t])));return e.delete("IGNORED"),e.set("HumanoidRoot",e.get("humanoid_root")),e},set_enabled__(){this._enabled.getValue()?this.timeSensor._startTime=Date.now()/1e3:this.timeSensor._stopTime=Date.now()/1e3},set_joints__(){this.joints=this._joints.getValue().replace(/^[\s,]+|[\s,]+$/gs,"").split(/[\s,]+/s);for(const{positionInterpolator:t,orientationInterpolator:e,scaleInterpolator:n}of this.interpolators)t?._value_changed.getFieldInterests().forEach((e=>t._value_changed.removeFieldInterest(e))),e?._value_changed.getFieldInterests().forEach((t=>e._value_changed.removeFieldInterest(t))),n?._value_changed.getFieldInterests().forEach((t=>n._value_changed.removeFieldInterest(t)))},set_interpolators__(){const t=this.timeSensor;t._fraction_changed.getFieldInterests().forEach((e=>t._fraction_changed.removeFieldInterest(e)));const e=this._channels.getValue().replace(/^[\s,\d]+|[\s,\d]+$/gs,"").split(/[\s,]+\d+[\s,]+/s).map((t=>t.split(/[\s,]+/s))),n=this._values,i=e.reduce(((t,e)=>t+e.length),0),s=Math.floor(i?n.length/i:0),o=new Map,r=Array.from({length:e.length},(()=>({})));this.interpolators=r;for(let i=0,a=0;i<s;++i)for(const[d,h]of e.entries()){o.clear();for(const t of h)o.set(t,n[a++]);if(o.has("Xposition")||o.has("Yposition")||o.has("Zposition")){const e=r[d].positionInterpolator??this.createPositionInterpolator(r,d),n=i/(s-1),a=new(tt())(o.get("Xposition")??0,o.get("Yposition")??0,o.get("Zposition")??0);e._key.push(n),e._keyValue.push(a),t._fraction_changed.addFieldInterest(e._set_fraction)}if(o.has("Xrotation")||o.has("Yrotation")||o.has("Zrotation")){const e=r[d].orientationInterpolator??this.createOrientationInterpolator(r,d),n=i/(s-1),a=nt().fromEuler(k().radians(o.get("Xrotation")??0),k().radians(o.get("Yrotation")??0),k().radians(o.get("Zrotation")??0));e._key.push(n),e._keyValue.push(a),t._fraction_changed.addFieldInterest(e._set_fraction)}if(o.has("Xscale")||o.has("Yscale")||o.has("Zscale")){const e=r[d].scaleInterpolator??this.createScaleInterpolator(r,d),n=i/(s-1),a=new(tt())(o.get("Xscale")??1,o.get("Yscale")??1,o.get("Zscale")??1);e._key.push(n),e._keyValue.push(a),t._fraction_changed.addFieldInterest(e._set_fraction)}}for(const{positionInterpolator:t,orientationInterpolator:e,scaleInterpolator:n}of r)t?.setup(),e?.setup(),n?.setup();this._frameIndex=0,this._startFrame=0,this._endFrame=s-1,this._frameCount=s,this.set_frameDuration__()},set_next_or_previous__(t,e){if(!e.getValue())return;const n=this.getFraction(),i=this._frameCount.getValue(),s=this._frameIncrement.getValue(),o=(i>1?Math.floor(n*(i-1)):0)+s*t;if(o>this.endFrame){if(!this._loop.getValue())return;this._frameIndex=this.startFrame}else if(o<this.startFrame){if(!this._loop.getValue())return;this._frameIndex=this.endFrame}else this._frameIndex=o},set_frameIndex__(){const t=this._frameCount.getValue(),e=k().clamp(this._frameIndex.getValue(),0,t),n=t>1?e/(t-1):0;if(this.timeSensor._range[0]=n,!this.timeSensor._isActive.getValue())for(const t of this.timeSensor._fraction_changed.getFieldInterests())t.setValue(n)},set_frameDuration__(){const t=this._frameCount.getValue(),e=Math.max(this._frameDuration.getValue(),0);this.timeSensor._cycleInterval=t>1?(t-1)*e:0},set_frameIncrement__(){this.timeSensor._enabled=this._frameIncrement.getValue()},set_start_or_endFrame__(){const t=this._frameCount.getValue(),e=k().clamp(this._startFrame.getValue(),0,t),n=k().clamp(this._endFrame.getValue(),0,t);this.startFrame=Math.min(e,n),this.endFrame=Math.max(e,n),this.timeSensor._range[1]=t>1?this.startFrame/(t-1):0,this.timeSensor._range[2]=t>1?this.endFrame/(t-1):0},createPositionInterpolator(t,e){return t[e].positionInterpolator=new(q())(this.getExecutionContext())},createOrientationInterpolator(t,e){return t[e].orientationInterpolator=new($())(this.getExecutionContext())},createScaleInterpolator(t,e){return t[e].scaleInterpolator=new(q())(this.getExecutionContext())},getFraction(){for(const t of this.timeSensor._fraction_changed.getFieldInterests())return t.getValue();return 0}}),Object.defineProperties(it,{...l().getStaticProperties("HAnimMotion","HAnim",2,"motions","4.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"enabled",new(o().SFBool)(!0)),new(a())(m().inputOutput,"loa",new(o().SFInt32)(-1)),new(a())(m().inputOutput,"joints",new(o().SFString)),new(a())(m().inputOutput,"channelsEnabled",new(o().MFBool)),new(a())(m().inputOutput,"channels",new(o().SFString)),new(a())(m().inputOutput,"values",new(o().MFFloat)),new(a())(m().inputOutput,"loop",new(o().SFBool)),new(a())(m().inputOnly,"next",new(o().SFBool)),new(a())(m().inputOnly,"previous",new(o().SFBool)),new(a())(m().inputOutput,"frameIndex",new(o().SFInt32)),new(a())(m().inputOutput,"frameDuration",new(o().SFTime)(.1)),new(a())(m().inputOutput,"frameIncrement",new(o().SFInt32)(1)),new(a())(m().inputOutput,"startFrame",new(o().SFInt32)),new(a())(m().inputOutput,"endFrame",new(o().SFInt32)),new(a())(m().outputOnly,"cycleTime",new(o().SFTime)),new(a())(m().outputOnly,"elapsedTime",new(o().SFTime)),new(a())(m().outputOnly,"frameCount",new(o().SFInt32))]),enumerable:!0}});const st=it,ot=w().add("HAnimMotion",st),rt=t.X3DGroupingNode;var at=e.n(rt);function dt(t){at().call(this,t),this.addType(m().HAnimSegment),this.addChildObjects(m().outputOnly,"displacementsTexture",new(o().SFTime),m().outputOnly,"displacementWeightsTexture",new(o().SFTime)),this._mass.setUnit("mass");const e=Math.ceil(Math.sqrt(8));this.numJoints=0,this.numDisplacements=0,this.displacerNodes=[],this.displacementWeights=[],this.jointMatricesArray=new Float32Array(e*e*4)}Object.assign(Object.setPrototypeOf(dt.prototype,at().prototype),{initialize(){at().prototype.initialize.call(this);const t=this.getBrowser().getContext();if(1!==t.getVersion()){this.displacementsTexture=t.createTexture(),this.displacementWeightsTexture=t.createTexture(),this.jointMatricesTexture=t.createTexture();for(const e of[this.displacementsTexture,this.displacementWeightsTexture,this.jointMatricesTexture])t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR);this._displacers.addInterest("set_displacers__",this),this._coord.addInterest("set_coord__",this),this._displacementsTexture.addInterest("set_displacementsTexture__",this),this._displacementWeightsTexture.addInterest("set_displacementWeightsTexture__",this),this.set_displacers__(),this.set_coord__()}},getHAnimKey(){return this.humanoidKey},getNumJoints(){return this.numJoints},getNumDisplacements(){return this.numDisplacements},set_humanoidKey__(){this.humanoidKey=`[${this.numJoints}.${this.numDisplacements}]`},set_displacers__(){const t=this.displacerNodes;for(const e of t)e._coordIndex.removeInterest("addEvent",this._displacementsTexture),e._displacements.removeInterest("addEvent",this._displacementsTexture),e._coordIndex.removeInterest("addEvent",this._displacementWeightsTexture),e._weight.removeInterest("addEvent",this._displacementWeightsTexture);t.length=0;for(const e of this._displacers){const n=A()(m().HAnimDisplacer,e);n&&t.push(n)}for(const e of t)e._coordIndex.addInterest("addEvent",this._displacementsTexture),e._displacements.addInterest("addEvent",this._displacementsTexture),e._coordIndex.addInterest("addEvent",this._displacementWeightsTexture),e._weight.addInterest("addEvent",this._displacementWeightsTexture);this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},set_displacementsTexture__(){const t=this.coordNode?._point.length||1,e=Array.from({length:t},(()=>[]));let n=0;this.displacementWeights.length=0;for(const{_weight:t,_coordIndex:i,_displacements:s}of this.displacerNodes)if(i.length){this.displacementWeights.push(t,0,0,0);for(const[t,o]of i.entries())e[o]?.push(...s[t],0,n,0,0,0);++n}const i=e.reduce(((t,e)=>Math.max(t,e.length)),0)/8,s=8*i,o=Math.ceil(Math.sqrt(t*i*2))||1,r=new Float32Array(o*o*4);for(let n=0;n<t;++n)r.set(e[n],n*s);this.numDisplacements=i;const a=this.getBrowser().getContext();a.bindTexture(a.TEXTURE_2D,this.displacementsTexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA32F,o,o,0,a.RGBA,a.FLOAT,r),this.displacementWeightsSize=Math.ceil(Math.sqrt(n)),this.displacementWeightsArray=new Float32Array(this.displacementWeightsSize*this.displacementWeightsSize*4),this.set_humanoidKey__()},set_displacementWeightsTexture__(){const t=this.getBrowser().getContext(),e=this.displacementWeightsSize,n=this.displacementWeightsArray;n.set(this.displacementWeights),t.bindTexture(t.TEXTURE_2D,this.displacementWeightsTexture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA32F,e,e,0,t.RGBA,t.FLOAT,n)},set_coord__(){this.coordNode&&(this.coordNode.removeInterest("addEvent",this._displacementsTexture),this.coordNode.removeInterest("addEvent",this._displacementWeightsTexture)),this.coordNode=A()(m().Coordinate,this._coord)??A()(m().CoordinateDouble,this._coord),this.coordNode?(delete this.skinning,this.coordNode.addInterest("addEvent",this._displacementsTexture),this.coordNode.addInterest("addEvent",this._displacementWeightsTexture)):this.skinning=Function.prototype,this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},traverse(t,e){this.coordNode&&e.getHAnimNode().push(this),at().prototype.traverse.call(this,t,e),this.skinning(t,e),this.coordNode&&e.getHAnimNode().pop()},skinning:(()=>{const t=new(R());return function(e,n){if(e!==M().DISPLAY)return;const i=n.getInvHumanoidMatrix().get(),s=this.jointMatricesArray,o=Math.ceil(Math.sqrt(8)),r=t.assign(n.getModelViewMatrix().get()).multRight(i);s.set(r,0);const a=this.getBrowser().getContext();a.bindTexture(a.TEXTURE_2D,this.jointMatricesTexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA32F,o,o,0,a.RGBA,a.FLOAT,s)}})(),setShaderUniforms(t,e){const n=this.getBrowser(),i=n.getTexture2DUnit(),s=n.getTexture2DUnit(),o=n.getTexture2DUnit();t.activeTexture(t.TEXTURE0+i),t.bindTexture(t.TEXTURE_2D,this.displacementsTexture),t.uniform1i(e.x3d_DisplacementsTexture,i),t.activeTexture(t.TEXTURE0+s),t.bindTexture(t.TEXTURE_2D,this.displacementWeightsTexture),t.uniform1i(e.x3d_DisplacementWeightsTexture,s),t.activeTexture(t.TEXTURE0+o),t.bindTexture(t.TEXTURE_2D,this.jointMatricesTexture),t.uniform1i(e.x3d_JointMatricesTexture,o)}}),Object.defineProperties(dt,{...l().getStaticProperties("HAnimSegment","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"mass",new(o().SFFloat)),new(a())(m().inputOutput,"centerOfMass",new(o().SFVec3f)),new(a())(m().inputOutput,"momentsOfInertia",new(o().MFFloat)(0,0,0,0,0,0,0,0,0)),new(a())(m().inputOutput,"displacers",new(o().MFNode)),new(a())(m().inputOutput,"coord",new(o().SFNode)),new(a())(m().inputOutput,"visible",new(o().SFBool)(!0)),new(a())(m().inputOutput,"bboxDisplay",new(o().SFBool)),new(a())(m().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(a())(m().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(a())(m().inputOnly,"addChildren",new(o().MFNode)),new(a())(m().inputOnly,"removeChildren",new(o().MFNode)),new(a())(m().inputOutput,"children",new(o().MFNode))]),enumerable:!0}});const ht=dt,ut=w().add("HAnimSegment",ht);function lt(t){H().call(this,t),this.addType(m().HAnimSite)}Object.setPrototypeOf(lt.prototype,H().prototype),Object.defineProperties(lt,{...l().getStaticProperties("HAnimSite","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"translation",new(o().SFVec3f)),new(a())(m().inputOutput,"rotation",new(o().SFRotation)),new(a())(m().inputOutput,"scale",new(o().SFVec3f)(1,1,1)),new(a())(m().inputOutput,"scaleOrientation",new(o().SFRotation)),new(a())(m().inputOutput,"center",new(o().SFVec3f)),new(a())(m().inputOutput,"visible",new(o().SFBool)(!0)),new(a())(m().inputOutput,"bboxDisplay",new(o().SFBool)),new(a())(m().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(a())(m().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(a())(m().inputOnly,"addChildren",new(o().MFNode)),new(a())(m().inputOnly,"removeChildren",new(o().MFNode)),new(a())(m().inputOutput,"children",new(o().MFNode))]),enumerable:!0}});const ct=lt,pt=w().add("HAnimSite",ct);i().add({name:"HAnim",concreteNodes:[f,U,L,ot,ut,pt],abstractNodes:[]});w().add("HAnimComponent",undefined)})();
1
+ /* X_ITE v11.5.8 */
2
+ const t=window[Symbol.for("X_ITE.X3D-11.5.8")];(()=>{var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const n=t.Components;var i=e.n(n);const s=t.Fields;var o=e.n(s);const r=t.X3DFieldDefinition;var a=e.n(r);const d=t.FieldDefinitionArray;var h=e.n(d);const u=t.X3DNode;var l=e.n(u);const c=t.X3DGeometricPropertyNode;var p=e.n(c);const _=t.X3DConstants;var m=e.n(_);const g=t.Namespace;var w=e.n(g);function T(t){p().call(this,t),this.addType(m().HAnimDisplacer),this._displacements.setUnit("length")}Object.setPrototypeOf(T.prototype,p().prototype),Object.defineProperties(T,{...l().getStaticProperties("HAnimDisplacer","HAnim",1,"displacers","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"weight",new(o().SFFloat)),new(a())(m().inputOutput,"coordIndex",new(o().MFInt32)),new(a())(m().inputOutput,"displacements",new(o().MFVec3f))]),enumerable:!0}});const x=T,f=w().add("HAnimDisplacer",x),F=t.X3DChildNode;var I=e.n(F);const v=t.Group;var E=e.n(v);const O=t.Transform;var S=e.n(O);const N=t.X3DBoundedObject;var b=e.n(N);const y=t.TraverseType;var M=e.n(y);const D=t.X3DCast;var A=e.n(D);const j=t.Matrix4;var R=e.n(j);const C=t.Algorithm;var k=e.n(C);function W(t){I().call(this,t),b().call(this,t),this.addType(m().HAnimHumanoid),this.addChildObjects(m().outputOnly,"jointTextures",new(o().SFTime),m().outputOnly,"displacementsTexture",new(o().SFTime),m().outputOnly,"displacementWeightsTexture",new(o().SFTime)),this._translation.setUnit("length"),this._center.setUnit("length"),this._bboxSize.setUnit("length"),this._bboxCenter.setUnit("length"),t.getSpecificationVersion()<=3.3&&(this._version=""),this.skeletonNode=new(E())(t),this.viewpointsNode=new(E())(t),this.skinNode=new V(t,this),this.transformNode=new(S())(t),this.motionNodes=[],this.jointNodes=[],this.jointBindingMatrices=[],this.displacementWeights=[],this.numJoints=0,this.numDisplacements=0,this.update=new B,this.skinning=Function.prototype}Object.assign(Object.setPrototypeOf(W.prototype,I().prototype),b().prototype,{initialize(){I().prototype.initialize.call(this),b().prototype.initialize.call(this),this.skeletonNode.addAllowedTypes(m().HAnimJoint,m().HAnimSite),this.viewpointsNode.addAllowedTypes(m().HAnimSite),this._skeleton.addFieldInterest(this.skeletonNode._children),this._viewpoints.addFieldInterest(this.viewpointsNode._children),this._skin.addFieldInterest(this.skinNode._children),this.skeletonNode._children=this._skeleton,this.viewpointsNode._children=this._viewpoints,this.skinNode._children=this._skin,this.skeletonNode.setPrivate(!0),this.viewpointsNode.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._bboxDisplay.addFieldInterest(this.transformNode._bboxDisplay),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._bboxDisplay=this._bboxDisplay,this.transformNode._bboxSize=this._bboxSize,this.transformNode._bboxCenter=this._bboxCenter,this.transformNode._children=[this.skeletonNode,this.viewpointsNode,this.skinNode],this.skeletonNode.setup(),this.viewpointsNode.setup(),this.skinNode.setup(),this.transformNode.setup(),this.connectChildNode(this.transformNode);const t=this.getBrowser().getContext();if(1!==t.getVersion()){this.jointsTexture=t.createTexture(),this.displacementsTexture=t.createTexture(),this.displacementWeightsTexture=t.createTexture(),this.jointMatricesTexture=t.createTexture();for(const e of[this.jointsTexture,this.displacementsTexture,this.displacementWeightsTexture,this.jointMatricesTexture])t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR);this._motionsEnabled.addInterest("set_motions__",this),this._motions.addInterest("set_motions__",this),this._jointBindingPositions.addInterest("set_joints__",this),this._jointBindingRotations.addInterest("set_joints__",this),this._jointBindingScales.addInterest("set_joints__",this),this._joints.addInterest("set_joints__",this),this._jointTextures.addInterest("set_jointTextures__",this),this._displacementsTexture.addInterest("set_displacementsTexture__",this),this._displacementWeightsTexture.addInterest("set_displacementWeightsTexture__",this),this._skinCoord.addInterest("set_skinCoord__",this),this.set_motions__(),this.set_joints__(),this.set_skinCoord__()}},getBBox(t,e){return this.transformNode.getBBox(t,e)},getSubBBox(t,e){return this.transformNode.getSubBBox(t,e)},getMatrix(){return this.transformNode.getMatrix()},getHAnimKey(){return this.humanoidKey},getNumJoints(){return this.numJoints},getNumDisplacements(){return this.numDisplacements},set_humanoidKey__(){this.humanoidKey=`[${this.numJoints}.${this.numDisplacements}]`},set_motions__(){const t=this._motionsEnabled,e=this.motionNodes;for(const t of e)t._joints.removeInterest("set_connectJoints__",this),t._channelsEnabled.removeInterest("set_connectJoints__",this),t._channels.removeInterest("set_connectJoints__",this),t._values.removeInterest("set_connectJoints__",this),t.disconnectJoints(this.jointNodes);e.length=0;for(const[n,i]of this._motions.entries()){if(n<t.length&&!t[n])continue;const s=A()(m().HAnimMotion,i);s&&e.push(s)}for(const t of e)t._joints.addInterest("set_connectJoints__",this,t),t._channelsEnabled.addInterest("set_connectJoints__",this,t),t._channels.addInterest("set_connectJoints__",this,t),t._values.addInterest("set_connectJoints__",this,t),t.connectJoints(this.jointNodes)},set_connectJoints__(t){t.disconnectJoints(this.jointNodes),t.connectJoints(this.jointNodes)},set_joints__(){const t=this.jointNodes,e=this.jointBindingMatrices,n=this._jointBindingPositions,i=this._jointBindingRotations,s=this._jointBindingScales,o=n.length,r=i.length,a=s.length;for(const e of this.motionNodes)e.disconnectJoints(t);for(const e of t)e.removeInterest("unlock",this.update),e._skinCoordIndex.removeInterest("addEvent",this._jointTextures),e._skinCoordWeight.removeInterest("addEvent",this._jointTextures),e._displacements.removeInterest("addEvent",this._displacementsTexture),e._displacementWeights.removeInterest("addEvent",this._displacementWeightsTexture);t.length=0,e.length=0;for(const[d,h]of this._joints.entries()){const u=A()(m().HAnimJoint,h);if(!u)continue;const l=o?n[Math.min(d,o-1)].getValue():null,c=r?i[Math.min(d,r-1)].getValue():null,p=a?s[Math.min(d,a-1)].getValue():null;t.push(u),e.push((new(R())).set(l,c,p))}for(const e of t)e.addInterest("unlock",this.update),e._skinCoordIndex.addInterest("addEvent",this._jointTextures),e._skinCoordWeight.addInterest("addEvent",this._jointTextures),e._displacements.addInterest("addEvent",this._displacementsTexture),e._displacementWeights.addInterest("addEvent",this._displacementWeightsTexture);for(const e of this.motionNodes)e.connectJoints(t);const d=Math.ceil(Math.sqrt(8*t.length));this.jointMatricesArray=new Float32Array(d*d*4),this._jointTextures.addEvent(),this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},set_jointTextures__(){const t=this.skinCoordNode?._point.length||1,e=Array.from({length:t},(()=>[])),n=Array.from({length:t},(()=>[]));for(const[t,i]of this.jointNodes.entries()){const s=i._skinCoordWeight.getValue();for(const[o,r]of i._skinCoordIndex.entries()){const i=s[o];0!==i&&(e[r]?.push(t),n[r]?.push(i))}}const i=k().roundToMultiple(e.reduce(((t,e)=>Math.max(t,e.length)),0),4),s=2*i,o=Math.ceil(Math.sqrt(t*s))||1,r=new Float32Array(o*o*4);for(let o=0;o<t;++o)r.set(e[o],o*s),r.set(n[o],o*s+i);this.numJoints=i;const a=this.getBrowser().getContext();a.bindTexture(a.TEXTURE_2D,this.jointsTexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA32F,o,o,0,a.RGBA,a.FLOAT,r),this.update.unlock(),this.set_humanoidKey__()},set_displacementsTexture__(){const t=this.skinCoordNode?._point.length||1,e=Array.from({length:t},(()=>[]));let n=0;this.displacementWeights.length=0;for(const[t,i]of this.jointNodes.entries())for(const{_weight:s,_coordIndex:o,_displacements:r}of i.getDisplacers())if(o.length){this.displacementWeights.push(s,0,0,0);for(const[i,s]of o.entries())e[s]?.push(...r[i],t,n,0,0,0);++n}const i=e.reduce(((t,e)=>Math.max(t,e.length)),0)/8,s=8*i,o=Math.ceil(Math.sqrt(t*i*2))||1,r=new Float32Array(o*o*4);for(let n=0;n<t;++n)r.set(e[n],n*s);this.numDisplacements=i;const a=this.getBrowser().getContext();a.bindTexture(a.TEXTURE_2D,this.displacementsTexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA32F,o,o,0,a.RGBA,a.FLOAT,r),this.displacementWeightsSize=Math.ceil(Math.sqrt(n)),this.displacementWeightsArray=new Float32Array(this.displacementWeightsSize*this.displacementWeightsSize*4),this.update.unlock(),this.set_humanoidKey__()},set_displacementWeightsTexture__(){const t=this.getBrowser().getContext(),e=this.displacementWeightsSize,n=this.displacementWeightsArray;n.set(this.displacementWeights),t.bindTexture(t.TEXTURE_2D,this.displacementWeightsTexture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA32F,e,e,0,t.RGBA,t.FLOAT,n)},set_skinCoord__(){this.skinCoordNode&&(this.skinCoordNode.removeInterest("addEvent",this._jointTextures),this.skinCoordNode.removeInterest("addEvent",this._displacementsTexture),this.skinCoordNode.removeInterest("addEvent",this._displacementWeightsTexture)),this.skinCoordNode=A()(m().Coordinate,this._skinCoord)??A()(m().CoordinateDouble,this._skinCoord),this.skinCoordNode?(delete this.skinning,this.skinCoordNode.addInterest("addEvent",this._jointTextures),this.skinCoordNode.addInterest("addEvent",this._displacementsTexture),this.skinCoordNode.addInterest("addEvent",this._displacementWeightsTexture)):this.skinning=Function.prototype,this._jointTextures.addEvent(),this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},traverse(t,e){const n=e.getInvHumanoidMatrix();n.push(this.transformNode.getMatrix()),n.multRight(e.getModelViewMatrix().get()),n.inverse(),this.transformNode.traverse(t,e),this.skinning(t,e),n.pop()},skinning(t,e){if(t!==M().DISPLAY||this.update.lock())return;const n=e.getInvHumanoidMatrix().get(),i=this.jointNodes,s=i.length,o=this.jointBindingMatrices,r=this.jointMatricesArray,a=Math.ceil(Math.sqrt(8*s));for(let t=0;t<s;++t){const e=i[t],s=o[t],a=e.getModelViewMatrix().multRight(n).multLeft(s),d=a.submatrix.transpose().inverse();r.set(a,32*t+0),r.set(d,32*t+16)}const d=this.getBrowser().getContext();d.bindTexture(d.TEXTURE_2D,this.jointMatricesTexture),d.texImage2D(d.TEXTURE_2D,0,d.RGBA32F,a,a,0,d.RGBA,d.FLOAT,r)},setShaderUniforms(t,e){const n=this.getBrowser(),i=n.getTexture2DUnit(),s=n.getTexture2DUnit(),o=n.getTexture2DUnit(),r=n.getTexture2DUnit();t.activeTexture(t.TEXTURE0+i),t.bindTexture(t.TEXTURE_2D,this.jointsTexture),t.uniform1i(e.x3d_JointsTexture,i),t.activeTexture(t.TEXTURE0+s),t.bindTexture(t.TEXTURE_2D,this.displacementsTexture),t.uniform1i(e.x3d_DisplacementsTexture,s),t.activeTexture(t.TEXTURE0+o),t.bindTexture(t.TEXTURE_2D,this.displacementWeightsTexture),t.uniform1i(e.x3d_DisplacementWeightsTexture,o),t.activeTexture(t.TEXTURE0+r),t.bindTexture(t.TEXTURE_2D,this.jointMatricesTexture),t.uniform1i(e.x3d_JointMatricesTexture,r)},dispose(){b().prototype.dispose.call(this),I().prototype.dispose.call(this)}}),Object.defineProperties(W,{...l().getStaticProperties("HAnimHumanoid","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"info",new(o().MFString)),new(a())(m().inputOutput,"version",new(o().SFString)("2.0")),new(a())(m().inputOutput,"skeletalConfiguration",new(o().SFString)("BASIC")),new(a())(m().inputOutput,"loa",new(o().SFInt32)(-1)),new(a())(m().inputOutput,"translation",new(o().SFVec3f)),new(a())(m().inputOutput,"rotation",new(o().SFRotation)),new(a())(m().inputOutput,"scale",new(o().SFVec3f)(1,1,1)),new(a())(m().inputOutput,"scaleOrientation",new(o().SFRotation)),new(a())(m().inputOutput,"center",new(o().SFVec3f)),new(a())(m().inputOutput,"visible",new(o().SFBool)(!0)),new(a())(m().inputOutput,"bboxDisplay",new(o().SFBool)),new(a())(m().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(a())(m().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(a())(m().inputOutput,"skeleton",new(o().MFNode)),new(a())(m().inputOutput,"jointBindingPositions",new(o().MFVec3f)),new(a())(m().inputOutput,"jointBindingRotations",new(o().MFRotation)),new(a())(m().inputOutput,"jointBindingScales",new(o().MFVec3f)),new(a())(m().inputOutput,"joints",new(o().MFNode)),new(a())(m().inputOutput,"segments",new(o().MFNode)),new(a())(m().inputOutput,"sites",new(o().MFNode)),new(a())(m().inputOutput,"viewpoints",new(o().MFNode)),new(a())(m().inputOutput,"motionsEnabled",new(o().MFBool)),new(a())(m().inputOutput,"motions",new(o().MFNode)),new(a())(m().inputOutput,"skinBindingNormals",new(o().SFNode)),new(a())(m().inputOutput,"skinBindingCoords",new(o().SFNode)),new(a())(m().inputOutput,"skinNormal",new(o().SFNode)),new(a())(m().inputOutput,"skinCoord",new(o().SFNode)),new(a())(m().inputOutput,"skin",new(o().MFNode))]),enumerable:!0}});class V extends(E()){#t;constructor(t,e){super(t),this.#t=e}traverse(t,e){e.getHAnimNode().push(this.#t),super.traverse(t,e),e.getHAnimNode().pop()}}class B{#e=!0;unlock(){this.#e=!1}lock(){const t=this.#e;return this.#e=!0,t}}const X=W,U=w().add("HAnimHumanoid",X),P=t.X3DTransformNode;var H=e.n(P);function J(t){H().call(this,t),this.addType(m().HAnimJoint),this.addChildObjects(m().outputOnly,"displacements",new(o().SFTime),m().outputOnly,"displacementWeights",new(o().SFTime)),this.setVisibleObject(!0),this.addAllowedTypes(m().HAnimJoint,m().HAnimSegment),t.getSpecificationVersion()<=3.3&&this.addAllowedTypes(m().HAnimSite),this.displacerNodes=[],this.modelViewMatrix=new(R())}Object.assign(Object.setPrototypeOf(J.prototype,H().prototype),{initialize(){H().prototype.initialize.call(this),this._displacers.addInterest("set_displacers__",this),this.set_displacers__()},getModelViewMatrix(){return this.modelViewMatrix},getDisplacers(){return this.displacerNodes},set_visibleObjects__(){},set_displacers__(){const t=this.displacerNodes;for(const e of t)e._coordIndex.removeInterest("addEvent",this._displacements),e._displacements.removeInterest("addEvent",this._displacements),e._coordIndex.removeInterest("addEvent",this._displacementWeights),e._weight.removeInterest("addEvent",this._displacementWeights);t.length=0;for(const e of this._displacers){const n=A()(m().HAnimDisplacer,e);n&&t.push(n)}for(const e of t)e._coordIndex.addInterest("addEvent",this._displacements),e._displacements.addInterest("addEvent",this._displacements),e._coordIndex.addInterest("addEvent",this._displacementWeights),e._weight.addInterest("addEvent",this._displacementWeights);this._displacements.addEvent(),this._displacementWeights.addEvent()},traverse(t,e){const n=e.getModelViewMatrix();n.push(),n.multLeft(this.getMatrix()),t===M().DISPLAY&&this.modelViewMatrix.assign(n.get()),H().prototype.groupTraverse.call(this,t,e),n.pop()},groupTraverse(t,e){t===M().DISPLAY&&this.modelViewMatrix.assign(e.getModelViewMatrix().get()),H().prototype.groupTraverse.call(this,t,e)}}),Object.defineProperties(J,{...l().getStaticProperties("HAnimJoint","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"translation",new(o().SFVec3f)),new(a())(m().inputOutput,"rotation",new(o().SFRotation)),new(a())(m().inputOutput,"scale",new(o().SFVec3f)(1,1,1)),new(a())(m().inputOutput,"scaleOrientation",new(o().SFRotation)),new(a())(m().inputOutput,"center",new(o().SFVec3f)),new(a())(m().inputOutput,"llimit",new(o().MFFloat)(0,0,0)),new(a())(m().inputOutput,"ulimit",new(o().MFFloat)(0,0,0)),new(a())(m().inputOutput,"limitOrientation",new(o().SFRotation)),new(a())(m().inputOutput,"stiffness",new(o().MFFloat)(0,0,0)),new(a())(m().inputOutput,"skinCoordIndex",new(o().MFInt32)),new(a())(m().inputOutput,"skinCoordWeight",new(o().MFFloat)),new(a())(m().inputOutput,"displacers",new(o().MFNode)),new(a())(m().inputOutput,"visible",new(o().SFBool)(!0)),new(a())(m().inputOutput,"bboxDisplay",new(o().SFBool)),new(a())(m().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(a())(m().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(a())(m().inputOnly,"addChildren",new(o().MFNode)),new(a())(m().inputOnly,"removeChildren",new(o().MFNode)),new(a())(m().inputOutput,"children",new(o().MFNode))]),enumerable:!0}});const z=J,L=w().add("HAnimJoint",z),G=t.TimeSensor;var K=e.n(G);const Y=t.PositionInterpolator;var q=e.n(Y);const Z=t.OrientationInterpolator;var $=e.n(Z);const Q=t.Vector3;var tt=e.n(Q);const et=t.Rotation4;var nt=e.n(et);function it(t){I().call(this,t),this.addType(m().HAnimMotion),this.timeSensor=new(K())(this.getExecutionContext()),this.interpolators=[]}Object.assign(Object.setPrototypeOf(it.prototype,I().prototype),{initialize(){I().prototype.initialize.call(this),this._loop.addFieldInterest(this.timeSensor._loop),this.timeSensor._cycleTime.addFieldInterest(this._cycleTime),this.timeSensor._elapsedTime.addFieldInterest(this._elapsedTime),this.timeSensor._enabled=!1,this.timeSensor._loop=this._loop,this.timeSensor._stopTime=1,this.timeSensor.setup(),this._enabled.addInterest("set_enabled__",this),this._joints.addInterest("set_joints__",this),this._channels.addInterest("set_interpolators__",this),this._values.addInterest("set_interpolators__",this),this._next.addInterest("set_next_or_previous__",this,1),this._previous.addInterest("set_next_or_previous__",this,-1),this._frameIndex.addInterest("set_frameIndex__",this),this._frameDuration.addInterest("set_frameDuration__",this),this._frameIncrement.addInterest("set_frameIncrement__",this),this._startFrame.addInterest("set_start_or_endFrame__",this),this._endFrame.addInterest("set_start_or_endFrame__",this),this.set_enabled__(),this.set_joints__(),this.set_frameIncrement__(),this.set_interpolators__()},connectJoints(t){const e=this._channelsEnabled,n=this.joints,i=this.getJointsIndex(t);for(const[t,{positionInterpolator:s,orientationInterpolator:o,scaleInterpolator:r}]of this.interpolators.entries()){if(t<e.length&&!e[t])continue;const a=i.get(n[t]);a&&(s?._value_changed.addFieldInterest(a._translation),o?._value_changed.addFieldInterest(a._rotation),r?._value_changed.addFieldInterest(a._scale))}},disconnectJoints(t){const e=this.joints,n=this.getJointsIndex(t);for(const[t,{positionInterpolator:i,orientationInterpolator:s,scaleInterpolator:o}]of this.interpolators.entries()){const r=n.get(e[t]);r&&(i?._value_changed.removeFieldInterest(r._translation),s?._value_changed.removeFieldInterest(r._rotation),o?._value_changed.removeFieldInterest(r._scale))}},getJointsIndex(t){const e=new Map(t.map((t=>[t._name.getValue().trim(),t])));return e.delete("IGNORED"),e.set("HumanoidRoot",e.get("humanoid_root")),e},set_enabled__(){this._enabled.getValue()?this.timeSensor._startTime=Date.now()/1e3:this.timeSensor._stopTime=Date.now()/1e3},set_joints__(){this.joints=this._joints.getValue().replace(/^[\s,]+|[\s,]+$/gs,"").split(/[\s,]+/s);for(const{positionInterpolator:t,orientationInterpolator:e,scaleInterpolator:n}of this.interpolators)t?._value_changed.getFieldInterests().forEach((e=>t._value_changed.removeFieldInterest(e))),e?._value_changed.getFieldInterests().forEach((t=>e._value_changed.removeFieldInterest(t))),n?._value_changed.getFieldInterests().forEach((t=>n._value_changed.removeFieldInterest(t)))},set_interpolators__(){const t=this.timeSensor;t._fraction_changed.getFieldInterests().forEach((e=>t._fraction_changed.removeFieldInterest(e)));const e=this._channels.getValue().replace(/^[\s,\d]+|[\s,\d]+$/gs,"").split(/[\s,]+\d+[\s,]+/s).map((t=>t.split(/[\s,]+/s))),n=this._values,i=e.reduce(((t,e)=>t+e.length),0),s=Math.floor(i?n.length/i:0),o=new Map,r=Array.from({length:e.length},(()=>({})));this.interpolators=r;for(let i=0,a=0;i<s;++i)for(const[d,h]of e.entries()){o.clear();for(const t of h)o.set(t,n[a++]);if(o.has("Xposition")||o.has("Yposition")||o.has("Zposition")){const e=r[d].positionInterpolator??this.createPositionInterpolator(r,d),n=i/(s-1),a=new(tt())(o.get("Xposition")??0,o.get("Yposition")??0,o.get("Zposition")??0);e._key.push(n),e._keyValue.push(a),t._fraction_changed.addFieldInterest(e._set_fraction)}if(o.has("Xrotation")||o.has("Yrotation")||o.has("Zrotation")){const e=r[d].orientationInterpolator??this.createOrientationInterpolator(r,d),n=i/(s-1),a=nt().fromEuler(k().radians(o.get("Xrotation")??0),k().radians(o.get("Yrotation")??0),k().radians(o.get("Zrotation")??0));e._key.push(n),e._keyValue.push(a),t._fraction_changed.addFieldInterest(e._set_fraction)}if(o.has("Xscale")||o.has("Yscale")||o.has("Zscale")){const e=r[d].scaleInterpolator??this.createScaleInterpolator(r,d),n=i/(s-1),a=new(tt())(o.get("Xscale")??1,o.get("Yscale")??1,o.get("Zscale")??1);e._key.push(n),e._keyValue.push(a),t._fraction_changed.addFieldInterest(e._set_fraction)}}for(const{positionInterpolator:t,orientationInterpolator:e,scaleInterpolator:n}of r)t?.setup(),e?.setup(),n?.setup();this._frameIndex=0,this._startFrame=0,this._endFrame=s-1,this._frameCount=s,this.set_frameDuration__()},set_next_or_previous__(t,e){if(!e.getValue())return;const n=this.getFraction(),i=this._frameCount.getValue(),s=this._frameIncrement.getValue(),o=(i>1?Math.floor(n*(i-1)):0)+s*t;if(o>this.endFrame){if(!this._loop.getValue())return;this._frameIndex=this.startFrame}else if(o<this.startFrame){if(!this._loop.getValue())return;this._frameIndex=this.endFrame}else this._frameIndex=o},set_frameIndex__(){const t=this._frameCount.getValue(),e=k().clamp(this._frameIndex.getValue(),0,t),n=t>1?e/(t-1):0;if(this.timeSensor._range[0]=n,!this.timeSensor._isActive.getValue())for(const t of this.timeSensor._fraction_changed.getFieldInterests())t.setValue(n)},set_frameDuration__(){const t=this._frameCount.getValue(),e=Math.max(this._frameDuration.getValue(),0);this.timeSensor._cycleInterval=t>1?(t-1)*e:0},set_frameIncrement__(){this.timeSensor._enabled=this._frameIncrement.getValue()},set_start_or_endFrame__(){const t=this._frameCount.getValue(),e=k().clamp(this._startFrame.getValue(),0,t),n=k().clamp(this._endFrame.getValue(),0,t);this.startFrame=Math.min(e,n),this.endFrame=Math.max(e,n),this.timeSensor._range[1]=t>1?this.startFrame/(t-1):0,this.timeSensor._range[2]=t>1?this.endFrame/(t-1):0},createPositionInterpolator(t,e){return t[e].positionInterpolator=new(q())(this.getExecutionContext())},createOrientationInterpolator(t,e){return t[e].orientationInterpolator=new($())(this.getExecutionContext())},createScaleInterpolator(t,e){return t[e].scaleInterpolator=new(q())(this.getExecutionContext())},getFraction(){for(const t of this.timeSensor._fraction_changed.getFieldInterests())return t.getValue();return 0}}),Object.defineProperties(it,{...l().getStaticProperties("HAnimMotion","HAnim",2,"motions","4.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"enabled",new(o().SFBool)(!0)),new(a())(m().inputOutput,"loa",new(o().SFInt32)(-1)),new(a())(m().inputOutput,"joints",new(o().SFString)),new(a())(m().inputOutput,"channelsEnabled",new(o().MFBool)),new(a())(m().inputOutput,"channels",new(o().SFString)),new(a())(m().inputOutput,"values",new(o().MFFloat)),new(a())(m().inputOutput,"loop",new(o().SFBool)),new(a())(m().inputOnly,"next",new(o().SFBool)),new(a())(m().inputOnly,"previous",new(o().SFBool)),new(a())(m().inputOutput,"frameIndex",new(o().SFInt32)),new(a())(m().inputOutput,"frameDuration",new(o().SFTime)(.1)),new(a())(m().inputOutput,"frameIncrement",new(o().SFInt32)(1)),new(a())(m().inputOutput,"startFrame",new(o().SFInt32)),new(a())(m().inputOutput,"endFrame",new(o().SFInt32)),new(a())(m().outputOnly,"cycleTime",new(o().SFTime)),new(a())(m().outputOnly,"elapsedTime",new(o().SFTime)),new(a())(m().outputOnly,"frameCount",new(o().SFInt32))]),enumerable:!0}});const st=it,ot=w().add("HAnimMotion",st),rt=t.X3DGroupingNode;var at=e.n(rt);function dt(t){at().call(this,t),this.addType(m().HAnimSegment),this.addChildObjects(m().outputOnly,"displacementsTexture",new(o().SFTime),m().outputOnly,"displacementWeightsTexture",new(o().SFTime)),this._mass.setUnit("mass");const e=Math.ceil(Math.sqrt(8));this.numJoints=0,this.numDisplacements=0,this.displacerNodes=[],this.displacementWeights=[],this.jointMatricesArray=new Float32Array(e*e*4)}Object.assign(Object.setPrototypeOf(dt.prototype,at().prototype),{initialize(){at().prototype.initialize.call(this);const t=this.getBrowser().getContext();if(1!==t.getVersion()){this.displacementsTexture=t.createTexture(),this.displacementWeightsTexture=t.createTexture(),this.jointMatricesTexture=t.createTexture();for(const e of[this.displacementsTexture,this.displacementWeightsTexture,this.jointMatricesTexture])t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR);this._displacers.addInterest("set_displacers__",this),this._coord.addInterest("set_coord__",this),this._displacementsTexture.addInterest("set_displacementsTexture__",this),this._displacementWeightsTexture.addInterest("set_displacementWeightsTexture__",this),this.set_displacers__(),this.set_coord__()}},getHAnimKey(){return this.humanoidKey},getNumJoints(){return this.numJoints},getNumDisplacements(){return this.numDisplacements},set_humanoidKey__(){this.humanoidKey=`[${this.numJoints}.${this.numDisplacements}]`},set_displacers__(){const t=this.displacerNodes;for(const e of t)e._coordIndex.removeInterest("addEvent",this._displacementsTexture),e._displacements.removeInterest("addEvent",this._displacementsTexture),e._coordIndex.removeInterest("addEvent",this._displacementWeightsTexture),e._weight.removeInterest("addEvent",this._displacementWeightsTexture);t.length=0;for(const e of this._displacers){const n=A()(m().HAnimDisplacer,e);n&&t.push(n)}for(const e of t)e._coordIndex.addInterest("addEvent",this._displacementsTexture),e._displacements.addInterest("addEvent",this._displacementsTexture),e._coordIndex.addInterest("addEvent",this._displacementWeightsTexture),e._weight.addInterest("addEvent",this._displacementWeightsTexture);this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},set_displacementsTexture__(){const t=this.coordNode?._point.length||1,e=Array.from({length:t},(()=>[]));let n=0;this.displacementWeights.length=0;for(const{_weight:t,_coordIndex:i,_displacements:s}of this.displacerNodes)if(i.length){this.displacementWeights.push(t,0,0,0);for(const[t,o]of i.entries())e[o]?.push(...s[t],0,n,0,0,0);++n}const i=e.reduce(((t,e)=>Math.max(t,e.length)),0)/8,s=8*i,o=Math.ceil(Math.sqrt(t*i*2))||1,r=new Float32Array(o*o*4);for(let n=0;n<t;++n)r.set(e[n],n*s);this.numDisplacements=i;const a=this.getBrowser().getContext();a.bindTexture(a.TEXTURE_2D,this.displacementsTexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA32F,o,o,0,a.RGBA,a.FLOAT,r),this.displacementWeightsSize=Math.ceil(Math.sqrt(n)),this.displacementWeightsArray=new Float32Array(this.displacementWeightsSize*this.displacementWeightsSize*4),this.set_humanoidKey__()},set_displacementWeightsTexture__(){const t=this.getBrowser().getContext(),e=this.displacementWeightsSize,n=this.displacementWeightsArray;n.set(this.displacementWeights),t.bindTexture(t.TEXTURE_2D,this.displacementWeightsTexture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA32F,e,e,0,t.RGBA,t.FLOAT,n)},set_coord__(){this.coordNode&&(this.coordNode.removeInterest("addEvent",this._displacementsTexture),this.coordNode.removeInterest("addEvent",this._displacementWeightsTexture)),this.coordNode=A()(m().Coordinate,this._coord)??A()(m().CoordinateDouble,this._coord),this.coordNode?(delete this.skinning,this.coordNode.addInterest("addEvent",this._displacementsTexture),this.coordNode.addInterest("addEvent",this._displacementWeightsTexture)):this.skinning=Function.prototype,this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},traverse(t,e){this.coordNode&&e.getHAnimNode().push(this),at().prototype.traverse.call(this,t,e),this.skinning(t,e),this.coordNode&&e.getHAnimNode().pop()},skinning:(()=>{const t=new(R());return function(e,n){if(e!==M().DISPLAY)return;const i=n.getInvHumanoidMatrix().get(),s=this.jointMatricesArray,o=Math.ceil(Math.sqrt(8)),r=t.assign(n.getModelViewMatrix().get()).multRight(i);s.set(r,0);const a=this.getBrowser().getContext();a.bindTexture(a.TEXTURE_2D,this.jointMatricesTexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA32F,o,o,0,a.RGBA,a.FLOAT,s)}})(),setShaderUniforms(t,e){const n=this.getBrowser(),i=n.getTexture2DUnit(),s=n.getTexture2DUnit(),o=n.getTexture2DUnit();t.activeTexture(t.TEXTURE0+i),t.bindTexture(t.TEXTURE_2D,this.displacementsTexture),t.uniform1i(e.x3d_DisplacementsTexture,i),t.activeTexture(t.TEXTURE0+s),t.bindTexture(t.TEXTURE_2D,this.displacementWeightsTexture),t.uniform1i(e.x3d_DisplacementWeightsTexture,s),t.activeTexture(t.TEXTURE0+o),t.bindTexture(t.TEXTURE_2D,this.jointMatricesTexture),t.uniform1i(e.x3d_JointMatricesTexture,o)}}),Object.defineProperties(dt,{...l().getStaticProperties("HAnimSegment","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"mass",new(o().SFFloat)),new(a())(m().inputOutput,"centerOfMass",new(o().SFVec3f)),new(a())(m().inputOutput,"momentsOfInertia",new(o().MFFloat)(0,0,0,0,0,0,0,0,0)),new(a())(m().inputOutput,"displacers",new(o().MFNode)),new(a())(m().inputOutput,"coord",new(o().SFNode)),new(a())(m().inputOutput,"visible",new(o().SFBool)(!0)),new(a())(m().inputOutput,"bboxDisplay",new(o().SFBool)),new(a())(m().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(a())(m().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(a())(m().inputOnly,"addChildren",new(o().MFNode)),new(a())(m().inputOnly,"removeChildren",new(o().MFNode)),new(a())(m().inputOutput,"children",new(o().MFNode))]),enumerable:!0}});const ht=dt,ut=w().add("HAnimSegment",ht);function lt(t){H().call(this,t),this.addType(m().HAnimSite)}Object.setPrototypeOf(lt.prototype,H().prototype),Object.defineProperties(lt,{...l().getStaticProperties("HAnimSite","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"translation",new(o().SFVec3f)),new(a())(m().inputOutput,"rotation",new(o().SFRotation)),new(a())(m().inputOutput,"scale",new(o().SFVec3f)(1,1,1)),new(a())(m().inputOutput,"scaleOrientation",new(o().SFRotation)),new(a())(m().inputOutput,"center",new(o().SFVec3f)),new(a())(m().inputOutput,"visible",new(o().SFBool)(!0)),new(a())(m().inputOutput,"bboxDisplay",new(o().SFBool)),new(a())(m().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(a())(m().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(a())(m().inputOnly,"addChildren",new(o().MFNode)),new(a())(m().inputOnly,"removeChildren",new(o().MFNode)),new(a())(m().inputOutput,"children",new(o().MFNode))]),enumerable:!0}});const ct=lt,pt=w().add("HAnimSite",ct);i().add({name:"HAnim",concreteNodes:[f,U,L,ot,ut,pt],abstractNodes:[]});w().add("HAnimComponent",undefined)})();
@@ -1,5 +1,5 @@
1
- /* X_ITE v11.5.6 */
2
- const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.5.6")];
1
+ /* X_ITE v11.5.8 */
2
+ const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.5.8")];
3
3
  /******/ (() => { // webpackBootstrap
4
4
  /******/ "use strict";
5
5
  /******/ // The require scope
@@ -1,2 +1,2 @@
1
- /* X_ITE v11.5.6 */
2
- const e=window[Symbol.for("X_ITE.X3D-11.5.6")];(()=>{var t={n:e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},d:(e,s)=>{for(var a in s)t.o(s,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:s[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const s=e.Components;var a=t.n(s);const i=e.Namespace;var n=t.n(i);const r=Symbol(),o=Symbol(),c=Symbol();function h(){this[r]=new Set}Object.assign(h.prototype,{initialize(){const e=this.getElement();e.on("keydown.X3DKeyDeviceSensorContext",this[o].bind(this)),e.on("keyup.X3DKeyDeviceSensorContext",this[c].bind(this))},addKeyDeviceSensorNode(e){this[r].add(e)},removeKeyDeviceSensorNode(e){this[r].delete(e)},getKeyDeviceSensorNodes(){return this[r]},[o](e){for(const t of this[r])t.keydown(e)},[c](e){for(const t of this[r])t.keyup(e)},dispose(){this.getElement().off(".X3DKeyDeviceSensorContext")}});const l=h,y=n().add("X3DKeyDeviceSensorContext",l),d=e.Fields;var _=t.n(d);const b=e.X3DFieldDefinition;var k=t.n(b);const u=e.FieldDefinitionArray;var p=t.n(u);const K=e.X3DNode;var S=t.n(K);const w=e.X3DSensorNode;var v=t.n(w);const g=e.X3DConstants;var f=t.n(g);function P(e){v().call(this,e),this.addType(f().X3DKeyDeviceSensorNode)}Object.assign(Object.setPrototypeOf(P.prototype,v().prototype),{initialize(){v().prototype.initialize.call(this),this.getLive().addInterest("set_live__",this),this.set_live__()},set_live__(){this.getLive().getValue()?(this._enabled.addInterest("set_enabled__",this),this._enabled.getValue()&&this.enable()):(this._enabled.removeInterest("set_enabled__",this),this.disable())},set_enabled__(){this._enabled.getValue()?this.enable():this.disable()},enable(){this.getBrowser().addKeyDeviceSensorNode(this)},disable(){this.getBrowser().removeKeyDeviceSensorNode(this),this.release()},keydown(){},keyup(){},release(){}}),Object.defineProperties(P,S().getStaticProperties("X3DKeyDeviceSensorNode","KeyDeviceSensor",1));const D=P,O=n().add("X3DKeyDeviceSensorNode",D);function C(e){O.call(this,e),this.addType(f().KeySensor)}Object.assign(Object.setPrototypeOf(C.prototype,O.prototype),{keydown(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(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(){this._shiftKey.getValue()&&(this._shiftKey=!1),this._controlKey.getValue()&&(this._controlKey=!1),this._altKey.getValue()&&(this._altKey=!1)}}),Object.defineProperties(C,{...S().getStaticProperties("KeySensor","KeyDeviceSensor",1,"children","3.0"),fieldDefinitions:{value:new(p())([new(k())(f().inputOutput,"metadata",new(_().SFNode)),new(k())(f().inputOutput,"description",new(_().SFString)),new(k())(f().inputOutput,"enabled",new(_().SFBool)(!0)),new(k())(f().outputOnly,"controlKey",new(_().SFBool)),new(k())(f().outputOnly,"shiftKey",new(_().SFBool)),new(k())(f().outputOnly,"altKey",new(_().SFBool)),new(k())(f().outputOnly,"actionKeyPress",new(_().SFInt32)),new(k())(f().outputOnly,"actionKeyRelease",new(_().SFInt32)),new(k())(f().outputOnly,"keyPress",new(_().SFString)),new(k())(f().outputOnly,"keyRelease",new(_().SFString)),new(k())(f().outputOnly,"isActive",new(_().SFBool))]),enumerable:!0}});const R=C,m=n().add("KeySensor",R);function F(e){O.call(this,e),this.addType(f().StringSensor)}Object.assign(Object.setPrototypeOf(F.prototype,O.prototype),{keydown(e){switch(e.preventDefault(),e.key){case"Backspace":this._isActive.getValue()&&this._deletionAllowed.getValue()&&this._enteredText.length&&(this._enteredText=this._enteredText.getValue().substring(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)}}}),Object.defineProperties(F,{...S().getStaticProperties("StringSensor","KeyDeviceSensor",2,"children","3.0"),fieldDefinitions:{value:new(p())([new(k())(f().inputOutput,"metadata",new(_().SFNode)),new(k())(f().inputOutput,"description",new(_().SFString)),new(k())(f().inputOutput,"enabled",new(_().SFBool)(!0)),new(k())(f().inputOutput,"deletionAllowed",new(_().SFBool)(!0)),new(k())(f().outputOnly,"enteredText",new(_().SFString)),new(k())(f().outputOnly,"finalText",new(_().SFString)),new(k())(f().outputOnly,"isActive",new(_().SFBool))]),enumerable:!0}});const T=F,x=n().add("StringSensor",T);a().add({name:"KeyDeviceSensor",concreteNodes:[m,x],abstractNodes:[O],browserContext:y});n().add("KeyDeviceSensorComponent",undefined)})();
1
+ /* X_ITE v11.5.8 */
2
+ const e=window[Symbol.for("X_ITE.X3D-11.5.8")];(()=>{var t={n:e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},d:(e,s)=>{for(var a in s)t.o(s,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:s[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const s=e.Components;var a=t.n(s);const i=e.Namespace;var n=t.n(i);const r=Symbol(),o=Symbol(),c=Symbol();function h(){this[r]=new Set}Object.assign(h.prototype,{initialize(){const e=this.getElement();e.on("keydown.X3DKeyDeviceSensorContext",this[o].bind(this)),e.on("keyup.X3DKeyDeviceSensorContext",this[c].bind(this))},addKeyDeviceSensorNode(e){this[r].add(e)},removeKeyDeviceSensorNode(e){this[r].delete(e)},getKeyDeviceSensorNodes(){return this[r]},[o](e){for(const t of this[r])t.keydown(e)},[c](e){for(const t of this[r])t.keyup(e)},dispose(){this.getElement().off(".X3DKeyDeviceSensorContext")}});const l=h,y=n().add("X3DKeyDeviceSensorContext",l),d=e.Fields;var _=t.n(d);const b=e.X3DFieldDefinition;var k=t.n(b);const u=e.FieldDefinitionArray;var p=t.n(u);const K=e.X3DNode;var S=t.n(K);const w=e.X3DSensorNode;var v=t.n(w);const g=e.X3DConstants;var f=t.n(g);function P(e){v().call(this,e),this.addType(f().X3DKeyDeviceSensorNode)}Object.assign(Object.setPrototypeOf(P.prototype,v().prototype),{initialize(){v().prototype.initialize.call(this),this.getLive().addInterest("set_live__",this),this.set_live__()},set_live__(){this.getLive().getValue()?(this._enabled.addInterest("set_enabled__",this),this._enabled.getValue()&&this.enable()):(this._enabled.removeInterest("set_enabled__",this),this.disable())},set_enabled__(){this._enabled.getValue()?this.enable():this.disable()},enable(){this.getBrowser().addKeyDeviceSensorNode(this)},disable(){this.getBrowser().removeKeyDeviceSensorNode(this),this.release()},keydown(){},keyup(){},release(){}}),Object.defineProperties(P,S().getStaticProperties("X3DKeyDeviceSensorNode","KeyDeviceSensor",1));const D=P,O=n().add("X3DKeyDeviceSensorNode",D);function C(e){O.call(this,e),this.addType(f().KeySensor)}Object.assign(Object.setPrototypeOf(C.prototype,O.prototype),{keydown(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(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(){this._shiftKey.getValue()&&(this._shiftKey=!1),this._controlKey.getValue()&&(this._controlKey=!1),this._altKey.getValue()&&(this._altKey=!1)}}),Object.defineProperties(C,{...S().getStaticProperties("KeySensor","KeyDeviceSensor",1,"children","3.0"),fieldDefinitions:{value:new(p())([new(k())(f().inputOutput,"metadata",new(_().SFNode)),new(k())(f().inputOutput,"description",new(_().SFString)),new(k())(f().inputOutput,"enabled",new(_().SFBool)(!0)),new(k())(f().outputOnly,"controlKey",new(_().SFBool)),new(k())(f().outputOnly,"shiftKey",new(_().SFBool)),new(k())(f().outputOnly,"altKey",new(_().SFBool)),new(k())(f().outputOnly,"actionKeyPress",new(_().SFInt32)),new(k())(f().outputOnly,"actionKeyRelease",new(_().SFInt32)),new(k())(f().outputOnly,"keyPress",new(_().SFString)),new(k())(f().outputOnly,"keyRelease",new(_().SFString)),new(k())(f().outputOnly,"isActive",new(_().SFBool))]),enumerable:!0}});const R=C,m=n().add("KeySensor",R);function F(e){O.call(this,e),this.addType(f().StringSensor)}Object.assign(Object.setPrototypeOf(F.prototype,O.prototype),{keydown(e){switch(e.preventDefault(),e.key){case"Backspace":this._isActive.getValue()&&this._deletionAllowed.getValue()&&this._enteredText.length&&(this._enteredText=this._enteredText.getValue().substring(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)}}}),Object.defineProperties(F,{...S().getStaticProperties("StringSensor","KeyDeviceSensor",2,"children","3.0"),fieldDefinitions:{value:new(p())([new(k())(f().inputOutput,"metadata",new(_().SFNode)),new(k())(f().inputOutput,"description",new(_().SFString)),new(k())(f().inputOutput,"enabled",new(_().SFBool)(!0)),new(k())(f().inputOutput,"deletionAllowed",new(_().SFBool)(!0)),new(k())(f().outputOnly,"enteredText",new(_().SFString)),new(k())(f().outputOnly,"finalText",new(_().SFString)),new(k())(f().outputOnly,"isActive",new(_().SFBool))]),enumerable:!0}});const T=F,x=n().add("StringSensor",T);a().add({name:"KeyDeviceSensor",concreteNodes:[m,x],abstractNodes:[O],browserContext:y});n().add("KeyDeviceSensorComponent",undefined)})();
@@ -1,5 +1,5 @@
1
- /* X_ITE v11.5.6 */
2
- const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.5.6")];
1
+ /* X_ITE v11.5.8 */
2
+ const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.5.8")];
3
3
  /******/ (() => { // webpackBootstrap
4
4
  /******/ "use strict";
5
5
  /******/ // The require scope
@@ -1,2 +1,2 @@
1
- /* X_ITE v11.5.6 */
2
- const t=window[Symbol.for("X_ITE.X3D-11.5.6")];(()=>{var e={n:t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return e.d(i,{a:i}),i},d:(t,i)=>{for(var s in i)e.o(i,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const i=t.Components;var s=e.n(i);const n=t.TextureProperties;var o=e.n(n);const a=t.Vector3;var r=e.n(a);const h=t.Matrix4;var l=e.n(h);const c=t.ViewVolume;var u=e.n(c);const d=t.Namespace;var p=e.n(d);const g=Symbol();function y(){}Object.assign(y.prototype,{getScreenTextureProperties(){return this[g]??=(()=>{const t=new(o())(this.getPrivateScene());return t._boundaryModeS="CLAMP_TO_EDGE",t._boundaryModeT="CLAMP_TO_EDGE",t._boundaryModeR="CLAMP_TO_EDGE",t._minificationFilter="NEAREST_PIXEL",t._magnificationFilter="NEAREST_PIXEL",t._generateMipMaps=!1,t._textureCompression="DEFAULT",t.setup(),t})()},getScreenScaleMatrix:(()=>{const t=new(r()),e=new(r()),i=new(l());return function(s,n,o,a){const h=s.getModelViewMatrix().get(),l=s.getProjectionMatrix().get(),c=s.getViewVolume().getViewport();s.getViewpoint().getScreenScale(h.origin,c,t);const d=h.xAxis.normalize().multiply(t.x*o),p=h.yAxis.normalize().multiply(t.y*o),g=h.zAxis.normalize().multiply(t.x*o);i.set(d.x,d.y,d.z,0,p.x,p.y,p.z,0,g.x,g.y,g.z,0,h[12],h[13],h[14],1),a&&(u().projectPoint(r().Zero,i,l,c,e),e.x=Math.round(e.x),e.y=Math.round(e.y),u().unProjectPoint(e.x,e.y,e.z,i,l,c,e),e.z=0,i.translate(e)),n.assign(h).inverse().multLeft(i)}})()});const x=y,f=p().add("X3DLayoutContext",x),w=t.Fields;var _=e.n(w);const M=t.X3DFieldDefinition;var S=e.n(M);const O=t.FieldDefinitionArray;var b=e.n(O);const z=t.X3DNode;var m=e.n(z);const v=t.X3DChildNode;var X=e.n(v);const F=t.X3DConstants;var N=e.n(F);function U(t){X().call(this,t),this.addType(N().X3DLayoutNode)}Object.setPrototypeOf(U.prototype,X().prototype),Object.defineProperties(U,m().getStaticProperties("X3DLayoutNode","Layout",1));const P=U,T=p().add("X3DLayoutNode",P),Y=t.Vector2;var L=e.n(Y);const B=t.Rotation4;var C=e.n(B);let E=0;const D=E++,V=E++,I=E++,j=E++,R=E++,A=E++,k=E++,G=E++,W=E++,H=E++;function q(t){T.call(this,t),this.addType(N().Layout),this.alignX=V,this.alignY=V,this.offsetUnitX=A,this.offsetUnitY=A,this.offsetX=0,this.offsetY=0,this.sizeUnitX=A,this.sizeUnitY=A,this.sizeX=1,this.sizeY=1,this.scaleModeX=W,this.scaleModeY=W,this.parent=null,this.rectangleCenter=new(L()),this.rectangleSize=new(L()),this.matrix=new(l())}Object.assign(Object.setPrototypeOf(q.prototype,T.prototype),{viewportPixel:new(L()),pixelSize:new(L()),translation:new(r()),offset:new(r()),scale:new(r())(1,1,1),currentTranslation:new(r()),currentRotation:new(C()),currentScale:new(r()),modelViewMatrix:new(l()),initialize(){T.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__(){this._align.length>0?"LEFT"===this._align[0]?this.alignX=D:"RIGHT"===this._align[0]?this.alignX=I:this.alignX=V:this.alignX=V,this._align.length>1?"BOTTOM"===this._align[1]?this.alignY=j:"TOP"===this._align[1]?this.alignY=R:this.alignY=V:this.alignY=V},set_offsetUnits__(){this._offsetUnits.length>0?("FRACTION"===this._offsetUnits[0]?this.offsetUnitX=k:"PIXEL"===this._offsetUnits[0]?this.offsetUnitX=G:this.offsetUnitX=A,this._offsetUnits.length>1?"FRACTION"===this._offsetUnits[1]?this.offsetUnitY=k:"PIXEL"===this._offsetUnits[1]?this.offsetUnitY=G:this.offsetUnitY=A:this.offsetUnitY=this.offsetUnitX):(this.offsetUnitX=A,this.offsetUnitY=A)},set_offset__(){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__(){this._sizeUnits.length>0?("FRACTION"===this._sizeUnits[0]?this.sizeUnitX=k:"PIXEL"===this._sizeUnits[0]?this.sizeUnitX=G:this.sizeUnitX=A,this._sizeUnits.length>1?"FRACTION"===this._sizeUnits[1]?this.sizeUnitY=k:"PIXEL"===this._sizeUnits[1]?this.sizeUnitY=G:this.sizeUnitY=A:this.sizeUnitY=this.sizeUnitX):(this.sizeUnitX=A,this.sizeUnitY=A)},set_size__(){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__(){this._scaleMode.length>0?("FRACTION"===this._scaleMode[0]?this.scaleModeX=k:"PIXEL"===this._scaleMode[0]?this.scaleModeX=G:"STRETCH"===this._scaleMode[0]?this.scaleModeX=H:this.scaleModeX=W,this._scaleMode.length>1?"FRACTION"===this._scaleMode[1]?this.scaleModeY=k:"PIXEL"===this._scaleMode[1]?this.scaleModeY=G:"STRETCH"===this._scaleMode[1]?this.scaleModeY=H:this.scaleModeY=W:this.scaleModeY=this.scaleModeX):(this.scaleModeX=W,this.scaleModeY=W)},getRectangleCenter(){return this.rectangleCenter},getRectangleSize(){return this.rectangleSize},getAlignX(){return this.alignX},getAlignY(){return this.alignY},getOffsetUnitX(){return this.offsetUnitX===A?this.parent?this.parent.getOffsetUnitX():k:this.offsetUnitX},getOffsetUnitY(){return this.offsetUnitY===A?this.parent?this.parent.getOffsetUnitY():k:this.offsetUnitY},getOffsetX(){return this.offsetX},getOffsetY(){return this.offsetY},getSizeUnitX(){return this.sizeUnitX===A?this.parent?this.parent.getSizeUnitX():k:this.sizeUnitX},getSizeUnitY(){return this.sizeUnitY===A?this.parent?this.parent.getSizeUnitY():k:this.sizeUnitY},getSizeX(){return this.sizeX},getSizeY(){return this.sizeY},getScaleModeX(){return this.parent?this.scaleModeX:this.scaleModeX===W?k:this.scaleModeX},getScaleModeY(){return this.parent?this.scaleModeY:this.scaleModeY===W?k:this.scaleModeY},transform(t,e){const i=this.parent=e.getParentLayout(),s=this.getBrowser().getRenderingProperty("ContentScale"),n=this.matrix,o=e.getNavigationInfo(),a=e.getViewpoint(),r=a.getNearDistance(o),h=e.getViewVolume().getViewport(),l=a.getViewportSize(h,r),c=this.viewportPixel,u=this.pixelSize,d=i?i.getRectangleSize():l,p=this.rectangleSize,g=this.rectangleCenter;switch(c.set(h[2],h[3]).divide(s),u.assign(l).divVec(c),this.getSizeUnitX()){case k:p.x=this.sizeX*d.x;break;case G:p.x=this.sizeX*u.x}switch(this.getSizeUnitY()){case k:p.y=this.sizeY*d.y;break;case G:p.y=this.sizeY*u.y}const y=this.translation.set(0,0,0);switch(this.getAlignX()){case D:y.x=-(d.x-p.x)/2;break;case V:this.getSizeUnitX()===G&&1&c.x&&(y.x=-u.x/2);break;case I:y.x=(d.x-p.x)/2}switch(this.getAlignY()){case j:y.y=-(d.y-p.y)/2;break;case V:this.getSizeUnitX()===G&&1&c.y&&(y.y=-u.y/2);break;case R:y.y=(d.y-p.y)/2}const x=this.offset.set(0,0,0);switch(this.getOffsetUnitX()){case k:x.x=this.offsetX*d.x;break;case G:x.x=this.offsetX*l.x/c.x}switch(this.getOffsetUnitY()){case k:x.y=this.offsetY*d.y;break;case G:x.y=this.offsetY*l.y/c.y}const f=this.scale.set(1,1,1),w=this.currentTranslation,_=this.currentRotation,M=this.currentScale;switch(e.getModelViewMatrix().get().get(w,_,M),this.getScaleModeX()){case W:f.x=M.x;break;case k:f.x=p.x;break;case H:break;case G:f.x=l.x/c.x}switch(this.getScaleModeY()){case W:f.y=M.y;break;case k:f.y=p.y;break;case H:break;case G:f.y=l.y/c.y}return this.getScaleModeX()===H?this.getScaleModeY()===H?p.x>p.y?(f.x=p.x,f.y=f.x):(f.y=p.y,f.x=f.y):f.x=f.y:this.getScaleModeY()===H&&(f.y=f.x),g.assign(y.add(x)),n.set(w,_),n.translate(y),n.scale(f),n}}),Object.defineProperties(q,{...m().getStaticProperties("Layout","Layout",1,"layout","3.2"),fieldDefinitions:{value:new(b())([new(S())(N().inputOutput,"metadata",new(_().SFNode)),new(S())(N().inputOutput,"align",new(_().MFString)("CENTER","CENTER")),new(S())(N().inputOutput,"offsetUnits",new(_().MFString)("WORLD","WORLD")),new(S())(N().inputOutput,"offset",new(_().MFFloat)(0,0)),new(S())(N().inputOutput,"sizeUnits",new(_().MFString)("WORLD","WORLD")),new(S())(N().inputOutput,"size",new(_().MFFloat)(1,1)),new(S())(N().inputOutput,"scaleMode",new(_().MFString)("NONE","NONE"))]),enumerable:!0}});const K=q,Z=p().add("Layout",K),Q=t.X3DGroupingNode;var J=e.n(Q);const $=t.X3DCast;var tt=e.n($);function et(t){J().call(this,t),this.addType(N().LayoutGroup),this.setCollisionObject(!1),this.matrix=new(l()),this.modelViewMatrix=new(l()),this.screenMatrix=new(l())}Object.assign(Object.setPrototypeOf(et.prototype,J().prototype),{initialize(){J().prototype.initialize.call(this),this._viewport.addInterest("set_viewport__",this),this._layout.addInterest("set_layout__",this),this._bboxSize.addInterest("set_visibleObjects__",this),this.set_viewport__(),this.set_layout__()},set_viewport__(){this.viewportNode=tt()(N().X3DViewportNode,this._viewport)},set_layout__(){this.layoutNode=tt()(N().X3DLayoutNode,this._layout)},set_collisionObjects__(){},set_visibleObjects__(){this.setVisibleObject(this.visibleObjects.size||this.bboxObjects.size||this.boundedObjects.size||!this.isDefaultBBoxSize())},getBBox(t,e){return J().prototype.getBBox.call(this,t,e).multRight(this.getMatrix())},getMatrix(){return this.layoutNode?this.matrix.assign(this.modelViewMatrix).inverse().multLeft(this.screenMatrix):this.matrix.identity()},traverse(t,e){if(this.viewportNode?.push(),this.layoutNode){const i=e.getModelViewMatrix();this.modelViewMatrix.assign(i.get()),this.screenMatrix.assign(this.layoutNode.transform(t,e)),i.push(this.screenMatrix),e.getLayouts().push(this.layoutNode),J().prototype.traverse.call(this,t,e),e.getLayouts().pop(),i.pop()}else J().prototype.traverse.call(this,t,e);this.viewportNode?.pop()}}),Object.defineProperties(et,{...m().getStaticProperties("LayoutGroup","Layout",1,"children","3.2"),fieldDefinitions:{value:new(b())([new(S())(N().inputOutput,"metadata",new(_().SFNode)),new(S())(N().inputOutput,"layout",new(_().SFNode)),new(S())(N().inputOutput,"viewport",new(_().SFNode)),new(S())(N().inputOutput,"visible",new(_().SFBool)(!0)),new(S())(N().inputOutput,"bboxDisplay",new(_().SFBool)),new(S())(N().initializeOnly,"bboxSize",new(_().SFVec3f)(-1,-1,-1)),new(S())(N().initializeOnly,"bboxCenter",new(_().SFVec3f)),new(S())(N().inputOnly,"addChildren",new(_().MFNode)),new(S())(N().inputOnly,"removeChildren",new(_().MFNode)),new(S())(N().inputOutput,"children",new(_().MFNode))]),enumerable:!0}});const it=et,st=p().add("LayoutGroup",it),nt=t.X3DLayerNode;var ot=e.n(nt);const at=t.OrthoViewpoint;var rt=e.n(at);function ht(t){ot().call(this,t,new(rt())(t),new st(t)),this.addType(N().LayoutLayer)}Object.assign(Object.setPrototypeOf(ht.prototype,ot().prototype),{initialize(){ot().prototype.initialize.call(this);const t=this.getGroups()._children[0].getValue();this._layout.addFieldInterest(t._layout),this._addChildren.addFieldInterest(t._addChildren),this._removeChildren.addFieldInterest(t._removeChildren),this._children.addFieldInterest(t._children),t._layout=this._layout,t._children=this._children,t.setPrivate(!0),t.setup(),this.getGroups().setup()}}),Object.defineProperties(ht,{...m().getStaticProperties("LayoutLayer","Layout",1,"layers","3.2"),fieldDefinitions:{value:new(b())([new(S())(N().inputOutput,"metadata",new(_().SFNode)),new(S())(N().inputOutput,"pickable",new(_().SFBool)(!0)),new(S())(N().inputOutput,"objectType",new(_().MFString)("ALL")),new(S())(N().inputOutput,"pointerEvents",new(_().SFBool)(!0)),new(S())(N().inputOutput,"visible",new(_().SFBool)(!0)),new(S())(N().inputOutput,"layout",new(_().SFNode)),new(S())(N().inputOutput,"viewport",new(_().SFNode)),new(S())(N().inputOnly,"addChildren",new(_().MFNode)),new(S())(N().inputOnly,"removeChildren",new(_().MFNode)),new(S())(N().inputOutput,"children",new(_().MFNode))]),enumerable:!0}});const lt=ht,ct=p().add("LayoutLayer",lt),ut=t.X3DFontStyleNode;var dt=e.n(ut);const pt=t.X3DTextGeometry;var gt=e.n(pt);const yt=t.TextAlignment;var xt=e.n(yt);const ft=t.PixelTexture;var wt=e.n(ft);const _t=t.Box3;var Mt=e.n(_t);const St=t.Algorithm;var Ot=e.n(St);function bt(t,e){gt().call(this,t,e),t.setTransparent(!0),this.textureNode=new(wt())(t.getExecutionContext()),this.context=document.createElement("canvas").getContext("2d",{willReadFrequently:!0}),this.modelViewMatrix=new(l()),this.matrix=new(l()),this.textureNode._textureProperties=e.getBrowser().getScreenTextureProperties(),this.textureNode.setup()}Object.assign(Object.setPrototypeOf(bt.prototype,gt().prototype),{modelViewMatrix:new(l()),getMatrix(){return this.matrix},update:(()=>{const t=new(r()),e=new(r())(1,1,0);return function(){gt().prototype.update.call(this);const i=this.getFontStyle(),s=this.getText();switch(s._textBounds.x=Math.ceil(s._textBounds.x)+1,s._textBounds.y=Math.ceil(s._textBounds.y)+1,this.getBBox().getExtents(t,e),t.x-=1,t.y-=1,i.getMajorAlignment()){case xt().BEGIN:case xt().FIRST:t.x=Math.floor(t.x),e.x=t.x+s._textBounds.x;break;case xt().MIDDLE:t.x=Math.round(t.x),e.x=t.x+s._textBounds.x;break;case xt().END:e.x=Math.ceil(e.x),t.x=e.x-s._textBounds.x}switch(i.getMinorAlignment()){case xt().BEGIN:case xt().FIRST:e.y=Math.ceil(e.y),t.y=e.y-s._textBounds.y;break;case xt().MIDDLE:e.y=Math.round(e.y),t.y=e.y-s._textBounds.y;break;case xt().END:t.y=Math.floor(t.y),e.y=t.y+s._textBounds.y}s._origin.x=t.x,s._origin.y=e.y,this.getBBox().setExtents(t,e)}})(),build:(()=>{const t=new(r()),e=new(r())(1,1,0);return function(){const i=this.getFontStyle(),s=i.getFont();if(!s)return;const n=this.getText(),o=this.getGlyphs(),a=this.getMinorAlignment(),r=this.getTranslations(),h=this.getCharSpacings(),l=this.getScales(),c=i.getScale(),u=c/s.unitsPerEm,d=n.getTexCoords(),p=n.getNormals(),g=n.getVertices(),y=this.context.canvas,x=this.context;n.getMultiTexCoords().push(d),this.getBBox().getExtents(t,e),p.push(0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1),g.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);const f=n._textBounds.x,w=n._textBounds.y;y.width=Ot().nextPowerOfTwo(f),y.height=Ot().nextPowerOfTwo(w);const _=f/y.width,M=1-w/y.height;if(d.push(0,M,0,1,_,M,0,1,_,1,0,1,0,M,0,1,_,1,0,1,0,1,0,1),x.fillStyle="rgba(255,255,255,0)",x.fillRect(0,0,y.width,y.height),x.fillStyle="rgba(255,255,255,1)",x.save(),x.translate(0,y.height),x.scale(1,-1),i._horizontal.getValue())for(let i=0,n=o.length;i<n;++i){const n=o[i],d=r[i],p=h[i],g=l[i];let y=0;for(let i=0,o=n.length;i<o;++i){const o=n[i],r=a.x+d.x+y*g+i*p-t.x,h=a.y+d.y-e.y;x.save(),x.translate(r,-h),x.scale(g,1),this.drawGlyph(x,s,o,c),x.restore();let l=0;i+1<n.length&&(l=s.getKerningValue(o,n[i+1])),y+=(o.advanceWidth+l)*u}}else{const u=i._leftToRight.getValue(),d=i._topToBottom.getValue(),p=u?0:n._string.length-1,g=u?n._string.length:-1,y=u?1:-1;for(let i=p,n=0;i!==g;i+=y){const u=o[i],p=u.length,g=d?0:p-1,y=d?p:-1,f=d?1:-1,w=h[i],_=l[i];for(let i=g;i!==y;i+=f,++n){const o=r[n],h=a.x+o.x-t.x,l=a.y+o.y*_-i*w-e.y;x.save(),x.translate(h,-l),x.scale(1,_),this.drawGlyph(x,s,u[i],c),x.restore()}}}x.restore();const S=x.getImageData(0,0,y.width,y.height);S?this.textureNode.setTextureData(y.width,y.height,!0,!0,new Uint8Array(S.data.buffer)):this.textureNode.clear()}})(),drawGlyph(t,e,i,s){const n=i.getPath(0,0,s),o=n.commands;t.beginPath();for(let e=0,i=o.length;e<i;++e){const i=o[e];switch(i.type){case"M":t.moveTo(i.x,i.y);continue;case"Z":t.closePath();continue;case"L":t.lineTo(i.x,i.y);continue;case"Q":t.quadraticCurveTo(i.x1,i.y1,i.x,i.y);continue;case"C":t.bezierCurveTo(i.x1,i.y1,i.x2,i.y2,i.x,i.y);continue}}n.fill&&t.fill(),n.stroke&&(t.lineWidth=n.strokeWidth,t.stroke())},getGlyphExtents(t,e,i,s,n){const o=t.unitsPerEm;s.set((e.xMin||0)/o,(e.yMin||0)/o,0),n.set((e.xMax||0)/o,(e.yMax||0)/o,0)},traverse:(()=>{const t=new(Mt());return function(e,i){this.getBrowser().getScreenScaleMatrix(i,this.matrix,1,!0),this.modelViewMatrix.assign(i.getModelViewMatrix().get()).multLeft(this.matrix),t.assign(this.getBBox()).multRight(this.matrix),this.getText().setBBox(t)}})(),displaySimple(t,e,i){e.modelViewMatrix.set(this.modelViewMatrix),t.uniformMatrix4fv(i.x3d_ModelViewMatrix,!1,e.modelViewMatrix)},display(t,e){e.modelViewMatrix.set(this.modelViewMatrix),e.textureNode=this.textureNode},transformLine:(()=>{const t=new(l());return function(e){return e.multLineMatrix(t.assign(this.matrix).inverse())}})(),transformMatrix(t){return t.multLeft(this.matrix)}});const zt=bt,mt=p().add("ScreenText",zt);function vt(t){dt().call(this,t),this.addType(N().ScreenFontStyle)}Object.assign(Object.setPrototypeOf(vt.prototype,dt().prototype),{initialize(){dt().prototype.initialize.call(this),this.getBrowser().getRenderingProperties()._ContentScale.addInterest("addNodeEvent",this)},getTextGeometry(t){return new mt(t,this)},getScale(){return this._pointSize.getValue()*this.getBrowser().getRenderingProperty("PixelsPerPoint")},getContentScale(){return this.getBrowser().getRenderingProperty("ContentScale")}}),Object.defineProperties(vt,{...m().getStaticProperties("ScreenFontStyle","Layout",2,"fontStyle","3.2"),fieldDefinitions:{value:new(b())([new(S())(N().inputOutput,"metadata",new(_().SFNode)),new(S())(N().inputOutput,"language",new(_().SFString)),new(S())(N().inputOutput,"family",new(_().MFString)("SERIF")),new(S())(N().inputOutput,"style",new(_().SFString)("PLAIN")),new(S())(N().inputOutput,"pointSize",new(_().SFFloat)(12)),new(S())(N().inputOutput,"spacing",new(_().SFFloat)(1)),new(S())(N().inputOutput,"horizontal",new(_().SFBool)(!0)),new(S())(N().inputOutput,"leftToRight",new(_().SFBool)(!0)),new(S())(N().inputOutput,"topToBottom",new(_().SFBool)(!0)),new(S())(N().inputOutput,"justify",new(_().MFString)("BEGIN"))]),enumerable:!0}});const Xt=vt,Ft=p().add("ScreenFontStyle",Xt),Nt=t.TraverseType;var Ut=e.n(Nt);const Pt=t.X3DProtoDeclaration;var Tt=e.n(Pt);function Yt(t){J().call(this,t),this.addType(N().ScreenGroup),t.getOuterNode()instanceof Tt()?this.matrix=new(l()):this.matrix=new(l())(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}Object.assign(Object.setPrototypeOf(Yt.prototype,J().prototype),{initialize(){J().prototype.initialize.call(this),this._bboxSize.addInterest("set_visibleObjects__",this)},set_visibleObjects__(){this.setVisibleObject(this.visibleObjects.size||this.bboxObjects.size||this.boundedObjects.size||!this.isDefaultBBoxSize())},getBBox(t,e){return this.getSubBBox(t,e).multRight(this.matrix)},getMatrix(){return this.matrix},traverse(t,e){switch(t){case Ut().CAMERA:case Ut().PICKING:case Ut().SHADOW:break;default:{const t=this.getBrowser();t.getScreenScaleMatrix(e,this.matrix,t.getRenderingProperty("ContentScale"),!1);break}}const i=e.getModelViewMatrix();i.push(),i.multLeft(this.matrix),J().prototype.traverse.call(this,t,e),i.pop()}}),Object.defineProperties(Yt,{...m().getStaticProperties("ScreenGroup","Layout",2,"children","3.2"),fieldDefinitions:{value:new(b())([new(S())(N().inputOutput,"metadata",new(_().SFNode)),new(S())(N().inputOutput,"visible",new(_().SFBool)(!0)),new(S())(N().inputOutput,"bboxDisplay",new(_().SFBool)),new(S())(N().initializeOnly,"bboxSize",new(_().SFVec3f)(-1,-1,-1)),new(S())(N().initializeOnly,"bboxCenter",new(_().SFVec3f)),new(S())(N().inputOnly,"addChildren",new(_().MFNode)),new(S())(N().inputOnly,"removeChildren",new(_().MFNode)),new(S())(N().inputOutput,"children",new(_().MFNode))]),enumerable:!0}});const Lt=Yt,Bt=p().add("ScreenGroup",Lt);s().add({name:"Layout",concreteNodes:[Z,st,ct,Ft,Bt],abstractNodes:[T],browserContext:f});p().add("LayoutComponent",undefined)})();
1
+ /* X_ITE v11.5.8 */
2
+ const t=window[Symbol.for("X_ITE.X3D-11.5.8")];(()=>{var e={n:t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return e.d(i,{a:i}),i},d:(t,i)=>{for(var s in i)e.o(i,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const i=t.Components;var s=e.n(i);const n=t.TextureProperties;var o=e.n(n);const a=t.Vector3;var r=e.n(a);const h=t.Matrix4;var l=e.n(h);const c=t.ViewVolume;var u=e.n(c);const d=t.Namespace;var p=e.n(d);const g=Symbol();function y(){}Object.assign(y.prototype,{getScreenTextureProperties(){return this[g]??=(()=>{const t=new(o())(this.getPrivateScene());return t._boundaryModeS="CLAMP_TO_EDGE",t._boundaryModeT="CLAMP_TO_EDGE",t._boundaryModeR="CLAMP_TO_EDGE",t._minificationFilter="NEAREST_PIXEL",t._magnificationFilter="NEAREST_PIXEL",t._generateMipMaps=!1,t._textureCompression="DEFAULT",t.setup(),t})()},getScreenScaleMatrix:(()=>{const t=new(r()),e=new(r()),i=new(l());return function(s,n,o,a){const h=s.getModelViewMatrix().get(),l=s.getProjectionMatrix().get(),c=s.getViewVolume().getViewport();s.getViewpoint().getScreenScale(h.origin,c,t);const d=h.xAxis.normalize().multiply(t.x*o),p=h.yAxis.normalize().multiply(t.y*o),g=h.zAxis.normalize().multiply(t.x*o);i.set(d.x,d.y,d.z,0,p.x,p.y,p.z,0,g.x,g.y,g.z,0,h[12],h[13],h[14],1),a&&(u().projectPoint(r().Zero,i,l,c,e),e.x=Math.round(e.x),e.y=Math.round(e.y),u().unProjectPoint(e.x,e.y,e.z,i,l,c,e),e.z=0,i.translate(e)),n.assign(h).inverse().multLeft(i)}})()});const x=y,f=p().add("X3DLayoutContext",x),w=t.Fields;var _=e.n(w);const M=t.X3DFieldDefinition;var S=e.n(M);const O=t.FieldDefinitionArray;var b=e.n(O);const z=t.X3DNode;var m=e.n(z);const v=t.X3DChildNode;var X=e.n(v);const F=t.X3DConstants;var N=e.n(F);function U(t){X().call(this,t),this.addType(N().X3DLayoutNode)}Object.setPrototypeOf(U.prototype,X().prototype),Object.defineProperties(U,m().getStaticProperties("X3DLayoutNode","Layout",1));const P=U,T=p().add("X3DLayoutNode",P),Y=t.Vector2;var L=e.n(Y);const B=t.Rotation4;var C=e.n(B);let E=0;const D=E++,V=E++,I=E++,j=E++,R=E++,A=E++,k=E++,G=E++,W=E++,H=E++;function q(t){T.call(this,t),this.addType(N().Layout),this.alignX=V,this.alignY=V,this.offsetUnitX=A,this.offsetUnitY=A,this.offsetX=0,this.offsetY=0,this.sizeUnitX=A,this.sizeUnitY=A,this.sizeX=1,this.sizeY=1,this.scaleModeX=W,this.scaleModeY=W,this.parent=null,this.rectangleCenter=new(L()),this.rectangleSize=new(L()),this.matrix=new(l())}Object.assign(Object.setPrototypeOf(q.prototype,T.prototype),{viewportPixel:new(L()),pixelSize:new(L()),translation:new(r()),offset:new(r()),scale:new(r())(1,1,1),currentTranslation:new(r()),currentRotation:new(C()),currentScale:new(r()),modelViewMatrix:new(l()),initialize(){T.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__(){this._align.length>0?"LEFT"===this._align[0]?this.alignX=D:"RIGHT"===this._align[0]?this.alignX=I:this.alignX=V:this.alignX=V,this._align.length>1?"BOTTOM"===this._align[1]?this.alignY=j:"TOP"===this._align[1]?this.alignY=R:this.alignY=V:this.alignY=V},set_offsetUnits__(){this._offsetUnits.length>0?("FRACTION"===this._offsetUnits[0]?this.offsetUnitX=k:"PIXEL"===this._offsetUnits[0]?this.offsetUnitX=G:this.offsetUnitX=A,this._offsetUnits.length>1?"FRACTION"===this._offsetUnits[1]?this.offsetUnitY=k:"PIXEL"===this._offsetUnits[1]?this.offsetUnitY=G:this.offsetUnitY=A:this.offsetUnitY=this.offsetUnitX):(this.offsetUnitX=A,this.offsetUnitY=A)},set_offset__(){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__(){this._sizeUnits.length>0?("FRACTION"===this._sizeUnits[0]?this.sizeUnitX=k:"PIXEL"===this._sizeUnits[0]?this.sizeUnitX=G:this.sizeUnitX=A,this._sizeUnits.length>1?"FRACTION"===this._sizeUnits[1]?this.sizeUnitY=k:"PIXEL"===this._sizeUnits[1]?this.sizeUnitY=G:this.sizeUnitY=A:this.sizeUnitY=this.sizeUnitX):(this.sizeUnitX=A,this.sizeUnitY=A)},set_size__(){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__(){this._scaleMode.length>0?("FRACTION"===this._scaleMode[0]?this.scaleModeX=k:"PIXEL"===this._scaleMode[0]?this.scaleModeX=G:"STRETCH"===this._scaleMode[0]?this.scaleModeX=H:this.scaleModeX=W,this._scaleMode.length>1?"FRACTION"===this._scaleMode[1]?this.scaleModeY=k:"PIXEL"===this._scaleMode[1]?this.scaleModeY=G:"STRETCH"===this._scaleMode[1]?this.scaleModeY=H:this.scaleModeY=W:this.scaleModeY=this.scaleModeX):(this.scaleModeX=W,this.scaleModeY=W)},getRectangleCenter(){return this.rectangleCenter},getRectangleSize(){return this.rectangleSize},getAlignX(){return this.alignX},getAlignY(){return this.alignY},getOffsetUnitX(){return this.offsetUnitX===A?this.parent?this.parent.getOffsetUnitX():k:this.offsetUnitX},getOffsetUnitY(){return this.offsetUnitY===A?this.parent?this.parent.getOffsetUnitY():k:this.offsetUnitY},getOffsetX(){return this.offsetX},getOffsetY(){return this.offsetY},getSizeUnitX(){return this.sizeUnitX===A?this.parent?this.parent.getSizeUnitX():k:this.sizeUnitX},getSizeUnitY(){return this.sizeUnitY===A?this.parent?this.parent.getSizeUnitY():k:this.sizeUnitY},getSizeX(){return this.sizeX},getSizeY(){return this.sizeY},getScaleModeX(){return this.parent?this.scaleModeX:this.scaleModeX===W?k:this.scaleModeX},getScaleModeY(){return this.parent?this.scaleModeY:this.scaleModeY===W?k:this.scaleModeY},transform(t,e){const i=this.parent=e.getParentLayout(),s=this.getBrowser().getRenderingProperty("ContentScale"),n=this.matrix,o=e.getNavigationInfo(),a=e.getViewpoint(),r=a.getNearDistance(o),h=e.getViewVolume().getViewport(),l=a.getViewportSize(h,r),c=this.viewportPixel,u=this.pixelSize,d=i?i.getRectangleSize():l,p=this.rectangleSize,g=this.rectangleCenter;switch(c.set(h[2],h[3]).divide(s),u.assign(l).divVec(c),this.getSizeUnitX()){case k:p.x=this.sizeX*d.x;break;case G:p.x=this.sizeX*u.x}switch(this.getSizeUnitY()){case k:p.y=this.sizeY*d.y;break;case G:p.y=this.sizeY*u.y}const y=this.translation.set(0,0,0);switch(this.getAlignX()){case D:y.x=-(d.x-p.x)/2;break;case V:this.getSizeUnitX()===G&&1&c.x&&(y.x=-u.x/2);break;case I:y.x=(d.x-p.x)/2}switch(this.getAlignY()){case j:y.y=-(d.y-p.y)/2;break;case V:this.getSizeUnitX()===G&&1&c.y&&(y.y=-u.y/2);break;case R:y.y=(d.y-p.y)/2}const x=this.offset.set(0,0,0);switch(this.getOffsetUnitX()){case k:x.x=this.offsetX*d.x;break;case G:x.x=this.offsetX*l.x/c.x}switch(this.getOffsetUnitY()){case k:x.y=this.offsetY*d.y;break;case G:x.y=this.offsetY*l.y/c.y}const f=this.scale.set(1,1,1),w=this.currentTranslation,_=this.currentRotation,M=this.currentScale;switch(e.getModelViewMatrix().get().get(w,_,M),this.getScaleModeX()){case W:f.x=M.x;break;case k:f.x=p.x;break;case H:break;case G:f.x=l.x/c.x}switch(this.getScaleModeY()){case W:f.y=M.y;break;case k:f.y=p.y;break;case H:break;case G:f.y=l.y/c.y}return this.getScaleModeX()===H?this.getScaleModeY()===H?p.x>p.y?(f.x=p.x,f.y=f.x):(f.y=p.y,f.x=f.y):f.x=f.y:this.getScaleModeY()===H&&(f.y=f.x),g.assign(y.add(x)),n.set(w,_),n.translate(y),n.scale(f),n}}),Object.defineProperties(q,{...m().getStaticProperties("Layout","Layout",1,"layout","3.2"),fieldDefinitions:{value:new(b())([new(S())(N().inputOutput,"metadata",new(_().SFNode)),new(S())(N().inputOutput,"align",new(_().MFString)("CENTER","CENTER")),new(S())(N().inputOutput,"offsetUnits",new(_().MFString)("WORLD","WORLD")),new(S())(N().inputOutput,"offset",new(_().MFFloat)(0,0)),new(S())(N().inputOutput,"sizeUnits",new(_().MFString)("WORLD","WORLD")),new(S())(N().inputOutput,"size",new(_().MFFloat)(1,1)),new(S())(N().inputOutput,"scaleMode",new(_().MFString)("NONE","NONE"))]),enumerable:!0}});const K=q,Z=p().add("Layout",K),Q=t.X3DGroupingNode;var J=e.n(Q);const $=t.X3DCast;var tt=e.n($);function et(t){J().call(this,t),this.addType(N().LayoutGroup),this.setCollisionObject(!1),this.matrix=new(l()),this.modelViewMatrix=new(l()),this.screenMatrix=new(l())}Object.assign(Object.setPrototypeOf(et.prototype,J().prototype),{initialize(){J().prototype.initialize.call(this),this._viewport.addInterest("set_viewport__",this),this._layout.addInterest("set_layout__",this),this._bboxSize.addInterest("set_visibleObjects__",this),this.set_viewport__(),this.set_layout__()},set_viewport__(){this.viewportNode=tt()(N().X3DViewportNode,this._viewport)},set_layout__(){this.layoutNode=tt()(N().X3DLayoutNode,this._layout)},set_collisionObjects__(){},set_visibleObjects__(){this.setVisibleObject(this.visibleObjects.size||this.bboxObjects.size||this.boundedObjects.size||!this.isDefaultBBoxSize())},getBBox(t,e){return J().prototype.getBBox.call(this,t,e).multRight(this.getMatrix())},getMatrix(){return this.layoutNode?this.matrix.assign(this.modelViewMatrix).inverse().multLeft(this.screenMatrix):this.matrix.identity()},traverse(t,e){if(this.viewportNode?.push(),this.layoutNode){const i=e.getModelViewMatrix();this.modelViewMatrix.assign(i.get()),this.screenMatrix.assign(this.layoutNode.transform(t,e)),i.push(this.screenMatrix),e.getLayouts().push(this.layoutNode),J().prototype.traverse.call(this,t,e),e.getLayouts().pop(),i.pop()}else J().prototype.traverse.call(this,t,e);this.viewportNode?.pop()}}),Object.defineProperties(et,{...m().getStaticProperties("LayoutGroup","Layout",1,"children","3.2"),fieldDefinitions:{value:new(b())([new(S())(N().inputOutput,"metadata",new(_().SFNode)),new(S())(N().inputOutput,"layout",new(_().SFNode)),new(S())(N().inputOutput,"viewport",new(_().SFNode)),new(S())(N().inputOutput,"visible",new(_().SFBool)(!0)),new(S())(N().inputOutput,"bboxDisplay",new(_().SFBool)),new(S())(N().initializeOnly,"bboxSize",new(_().SFVec3f)(-1,-1,-1)),new(S())(N().initializeOnly,"bboxCenter",new(_().SFVec3f)),new(S())(N().inputOnly,"addChildren",new(_().MFNode)),new(S())(N().inputOnly,"removeChildren",new(_().MFNode)),new(S())(N().inputOutput,"children",new(_().MFNode))]),enumerable:!0}});const it=et,st=p().add("LayoutGroup",it),nt=t.X3DLayerNode;var ot=e.n(nt);const at=t.OrthoViewpoint;var rt=e.n(at);function ht(t){ot().call(this,t,new(rt())(t),new st(t)),this.addType(N().LayoutLayer)}Object.assign(Object.setPrototypeOf(ht.prototype,ot().prototype),{initialize(){ot().prototype.initialize.call(this);const t=this.getGroups()._children[0].getValue();this._layout.addFieldInterest(t._layout),this._addChildren.addFieldInterest(t._addChildren),this._removeChildren.addFieldInterest(t._removeChildren),this._children.addFieldInterest(t._children),t._layout=this._layout,t._children=this._children,t.setPrivate(!0),t.setup(),this.getGroups().setup()}}),Object.defineProperties(ht,{...m().getStaticProperties("LayoutLayer","Layout",1,"layers","3.2"),fieldDefinitions:{value:new(b())([new(S())(N().inputOutput,"metadata",new(_().SFNode)),new(S())(N().inputOutput,"pickable",new(_().SFBool)(!0)),new(S())(N().inputOutput,"objectType",new(_().MFString)("ALL")),new(S())(N().inputOutput,"pointerEvents",new(_().SFBool)(!0)),new(S())(N().inputOutput,"visible",new(_().SFBool)(!0)),new(S())(N().inputOutput,"layout",new(_().SFNode)),new(S())(N().inputOutput,"viewport",new(_().SFNode)),new(S())(N().inputOnly,"addChildren",new(_().MFNode)),new(S())(N().inputOnly,"removeChildren",new(_().MFNode)),new(S())(N().inputOutput,"children",new(_().MFNode))]),enumerable:!0}});const lt=ht,ct=p().add("LayoutLayer",lt),ut=t.X3DFontStyleNode;var dt=e.n(ut);const pt=t.X3DTextGeometry;var gt=e.n(pt);const yt=t.TextAlignment;var xt=e.n(yt);const ft=t.PixelTexture;var wt=e.n(ft);const _t=t.Box3;var Mt=e.n(_t);const St=t.Algorithm;var Ot=e.n(St);function bt(t,e){gt().call(this,t,e),t.setTransparent(!0),this.textureNode=new(wt())(t.getExecutionContext()),this.context=document.createElement("canvas").getContext("2d",{willReadFrequently:!0}),this.modelViewMatrix=new(l()),this.matrix=new(l()),this.textureNode._textureProperties=e.getBrowser().getScreenTextureProperties(),this.textureNode.setup()}Object.assign(Object.setPrototypeOf(bt.prototype,gt().prototype),{modelViewMatrix:new(l()),getMatrix(){return this.matrix},update:(()=>{const t=new(r()),e=new(r())(1,1,0);return function(){gt().prototype.update.call(this);const i=this.getFontStyle(),s=this.getText();switch(s._textBounds.x=Math.ceil(s._textBounds.x)+1,s._textBounds.y=Math.ceil(s._textBounds.y)+1,this.getBBox().getExtents(t,e),t.x-=1,t.y-=1,i.getMajorAlignment()){case xt().BEGIN:case xt().FIRST:t.x=Math.floor(t.x),e.x=t.x+s._textBounds.x;break;case xt().MIDDLE:t.x=Math.round(t.x),e.x=t.x+s._textBounds.x;break;case xt().END:e.x=Math.ceil(e.x),t.x=e.x-s._textBounds.x}switch(i.getMinorAlignment()){case xt().BEGIN:case xt().FIRST:e.y=Math.ceil(e.y),t.y=e.y-s._textBounds.y;break;case xt().MIDDLE:e.y=Math.round(e.y),t.y=e.y-s._textBounds.y;break;case xt().END:t.y=Math.floor(t.y),e.y=t.y+s._textBounds.y}s._origin.x=t.x,s._origin.y=e.y,this.getBBox().setExtents(t,e)}})(),build:(()=>{const t=new(r()),e=new(r())(1,1,0);return function(){const i=this.getFontStyle(),s=i.getFont();if(!s)return;const n=this.getText(),o=this.getGlyphs(),a=this.getMinorAlignment(),r=this.getTranslations(),h=this.getCharSpacings(),l=this.getScales(),c=i.getScale(),u=c/s.unitsPerEm,d=n.getTexCoords(),p=n.getNormals(),g=n.getVertices(),y=this.context.canvas,x=this.context;n.getMultiTexCoords().push(d),this.getBBox().getExtents(t,e),p.push(0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1),g.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);const f=n._textBounds.x,w=n._textBounds.y;y.width=Ot().nextPowerOfTwo(f),y.height=Ot().nextPowerOfTwo(w);const _=f/y.width,M=1-w/y.height;if(d.push(0,M,0,1,_,M,0,1,_,1,0,1,0,M,0,1,_,1,0,1,0,1,0,1),x.fillStyle="rgba(255,255,255,0)",x.fillRect(0,0,y.width,y.height),x.fillStyle="rgba(255,255,255,1)",x.save(),x.translate(0,y.height),x.scale(1,-1),i._horizontal.getValue())for(let i=0,n=o.length;i<n;++i){const n=o[i],d=r[i],p=h[i],g=l[i];let y=0;for(let i=0,o=n.length;i<o;++i){const o=n[i],r=a.x+d.x+y*g+i*p-t.x,h=a.y+d.y-e.y;x.save(),x.translate(r,-h),x.scale(g,1),this.drawGlyph(x,s,o,c),x.restore();let l=0;i+1<n.length&&(l=s.getKerningValue(o,n[i+1])),y+=(o.advanceWidth+l)*u}}else{const u=i._leftToRight.getValue(),d=i._topToBottom.getValue(),p=u?0:n._string.length-1,g=u?n._string.length:-1,y=u?1:-1;for(let i=p,n=0;i!==g;i+=y){const u=o[i],p=u.length,g=d?0:p-1,y=d?p:-1,f=d?1:-1,w=h[i],_=l[i];for(let i=g;i!==y;i+=f,++n){const o=r[n],h=a.x+o.x-t.x,l=a.y+o.y*_-i*w-e.y;x.save(),x.translate(h,-l),x.scale(1,_),this.drawGlyph(x,s,u[i],c),x.restore()}}}x.restore();const S=x.getImageData(0,0,y.width,y.height);S?this.textureNode.setTextureData(y.width,y.height,!0,!0,new Uint8Array(S.data.buffer)):this.textureNode.clear()}})(),drawGlyph(t,e,i,s){const n=i.getPath(0,0,s),o=n.commands;t.beginPath();for(let e=0,i=o.length;e<i;++e){const i=o[e];switch(i.type){case"M":t.moveTo(i.x,i.y);continue;case"Z":t.closePath();continue;case"L":t.lineTo(i.x,i.y);continue;case"Q":t.quadraticCurveTo(i.x1,i.y1,i.x,i.y);continue;case"C":t.bezierCurveTo(i.x1,i.y1,i.x2,i.y2,i.x,i.y);continue}}n.fill&&t.fill(),n.stroke&&(t.lineWidth=n.strokeWidth,t.stroke())},getGlyphExtents(t,e,i,s,n){const o=t.unitsPerEm;s.set((e.xMin||0)/o,(e.yMin||0)/o,0),n.set((e.xMax||0)/o,(e.yMax||0)/o,0)},traverse:(()=>{const t=new(Mt());return function(e,i){this.getBrowser().getScreenScaleMatrix(i,this.matrix,1,!0),this.modelViewMatrix.assign(i.getModelViewMatrix().get()).multLeft(this.matrix),t.assign(this.getBBox()).multRight(this.matrix),this.getText().setBBox(t)}})(),displaySimple(t,e,i){e.modelViewMatrix.set(this.modelViewMatrix),t.uniformMatrix4fv(i.x3d_ModelViewMatrix,!1,e.modelViewMatrix)},display(t,e){e.modelViewMatrix.set(this.modelViewMatrix),e.textureNode=this.textureNode},transformLine:(()=>{const t=new(l());return function(e){return e.multLineMatrix(t.assign(this.matrix).inverse())}})(),transformMatrix(t){return t.multLeft(this.matrix)}});const zt=bt,mt=p().add("ScreenText",zt);function vt(t){dt().call(this,t),this.addType(N().ScreenFontStyle)}Object.assign(Object.setPrototypeOf(vt.prototype,dt().prototype),{initialize(){dt().prototype.initialize.call(this),this.getBrowser().getRenderingProperties()._ContentScale.addInterest("addNodeEvent",this)},getTextGeometry(t){return new mt(t,this)},getScale(){return this._pointSize.getValue()*this.getBrowser().getRenderingProperty("PixelsPerPoint")},getContentScale(){return this.getBrowser().getRenderingProperty("ContentScale")}}),Object.defineProperties(vt,{...m().getStaticProperties("ScreenFontStyle","Layout",2,"fontStyle","3.2"),fieldDefinitions:{value:new(b())([new(S())(N().inputOutput,"metadata",new(_().SFNode)),new(S())(N().inputOutput,"language",new(_().SFString)),new(S())(N().inputOutput,"family",new(_().MFString)("SERIF")),new(S())(N().inputOutput,"style",new(_().SFString)("PLAIN")),new(S())(N().inputOutput,"pointSize",new(_().SFFloat)(12)),new(S())(N().inputOutput,"spacing",new(_().SFFloat)(1)),new(S())(N().inputOutput,"horizontal",new(_().SFBool)(!0)),new(S())(N().inputOutput,"leftToRight",new(_().SFBool)(!0)),new(S())(N().inputOutput,"topToBottom",new(_().SFBool)(!0)),new(S())(N().inputOutput,"justify",new(_().MFString)("BEGIN"))]),enumerable:!0}});const Xt=vt,Ft=p().add("ScreenFontStyle",Xt),Nt=t.TraverseType;var Ut=e.n(Nt);const Pt=t.X3DProtoDeclaration;var Tt=e.n(Pt);function Yt(t){J().call(this,t),this.addType(N().ScreenGroup),t.getOuterNode()instanceof Tt()?this.matrix=new(l()):this.matrix=new(l())(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}Object.assign(Object.setPrototypeOf(Yt.prototype,J().prototype),{initialize(){J().prototype.initialize.call(this),this._bboxSize.addInterest("set_visibleObjects__",this)},set_visibleObjects__(){this.setVisibleObject(this.visibleObjects.size||this.bboxObjects.size||this.boundedObjects.size||!this.isDefaultBBoxSize())},getBBox(t,e){return this.getSubBBox(t,e).multRight(this.matrix)},getMatrix(){return this.matrix},traverse(t,e){switch(t){case Ut().CAMERA:case Ut().PICKING:case Ut().SHADOW:break;default:{const t=this.getBrowser();t.getScreenScaleMatrix(e,this.matrix,t.getRenderingProperty("ContentScale"),!1);break}}const i=e.getModelViewMatrix();i.push(),i.multLeft(this.matrix),J().prototype.traverse.call(this,t,e),i.pop()}}),Object.defineProperties(Yt,{...m().getStaticProperties("ScreenGroup","Layout",2,"children","3.2"),fieldDefinitions:{value:new(b())([new(S())(N().inputOutput,"metadata",new(_().SFNode)),new(S())(N().inputOutput,"visible",new(_().SFBool)(!0)),new(S())(N().inputOutput,"bboxDisplay",new(_().SFBool)),new(S())(N().initializeOnly,"bboxSize",new(_().SFVec3f)(-1,-1,-1)),new(S())(N().initializeOnly,"bboxCenter",new(_().SFVec3f)),new(S())(N().inputOnly,"addChildren",new(_().MFNode)),new(S())(N().inputOnly,"removeChildren",new(_().MFNode)),new(S())(N().inputOutput,"children",new(_().MFNode))]),enumerable:!0}});const Lt=Yt,Bt=p().add("ScreenGroup",Lt);s().add({name:"Layout",concreteNodes:[Z,st,ct,Ft,Bt],abstractNodes:[T],browserContext:f});p().add("LayoutComponent",undefined)})();
@@ -1,5 +1,5 @@
1
- /* X_ITE v11.5.6 */
2
- const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.5.6")];
1
+ /* X_ITE v11.5.8 */
2
+ const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.5.8")];
3
3
  /******/ (() => { // webpackBootstrap
4
4
  /******/ "use strict";
5
5
  /******/ // The require scope