x_ite 10.4.1 → 10.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +4 -4
  2. package/dist/X3DUOM.xml +10 -0
  3. package/dist/assets/components/AnnotationComponent.js +2 -2
  4. package/dist/assets/components/AnnotationComponent.min.js +2 -2
  5. package/dist/assets/components/CADGeometryComponent.js +2 -2
  6. package/dist/assets/components/CADGeometryComponent.min.js +2 -2
  7. package/dist/assets/components/CubeMapTexturingComponent.js +7 -7
  8. package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
  9. package/dist/assets/components/DISComponent.js +2 -2
  10. package/dist/assets/components/DISComponent.min.js +2 -2
  11. package/dist/assets/components/EventUtilitiesComponent.js +2 -2
  12. package/dist/assets/components/EventUtilitiesComponent.min.js +2 -2
  13. package/dist/assets/components/Geometry2DComponent.js +19 -23
  14. package/dist/assets/components/Geometry2DComponent.min.js +2 -2
  15. package/dist/assets/components/GeospatialComponent.js +2 -2
  16. package/dist/assets/components/GeospatialComponent.min.js +2 -2
  17. package/dist/assets/components/HAnimComponent.js +2 -2
  18. package/dist/assets/components/HAnimComponent.min.js +2 -2
  19. package/dist/assets/components/KeyDeviceSensorComponent.js +2 -2
  20. package/dist/assets/components/KeyDeviceSensorComponent.min.js +2 -2
  21. package/dist/assets/components/LayoutComponent.js +3 -7
  22. package/dist/assets/components/LayoutComponent.min.js +2 -2
  23. package/dist/assets/components/NURBSComponent.js +859 -812
  24. package/dist/assets/components/NURBSComponent.min.js +2 -2
  25. package/dist/assets/components/ParticleSystemsComponent.js +10 -13
  26. package/dist/assets/components/ParticleSystemsComponent.min.js +2 -2
  27. package/dist/assets/components/PickingComponent.js +2 -2
  28. package/dist/assets/components/PickingComponent.min.js +2 -2
  29. package/dist/assets/components/RigidBodyPhysicsComponent.js +2 -2
  30. package/dist/assets/components/RigidBodyPhysicsComponent.min.js +2 -2
  31. package/dist/assets/components/ScriptingComponent.js +2 -2
  32. package/dist/assets/components/ScriptingComponent.min.js +2 -2
  33. package/dist/assets/components/TextComponent.js +9 -17
  34. package/dist/assets/components/TextComponent.min.js +2 -2
  35. package/dist/assets/components/TextureProjectionComponent.js +14 -8
  36. package/dist/assets/components/TextureProjectionComponent.min.js +2 -2
  37. package/dist/assets/components/Texturing3DComponent.js +16 -16
  38. package/dist/assets/components/Texturing3DComponent.min.js +2 -2
  39. package/dist/assets/components/VolumeRenderingComponent.js +2 -2
  40. package/dist/assets/components/VolumeRenderingComponent.min.js +2 -2
  41. package/dist/assets/components/X_ITEComponent.js +87 -54
  42. package/dist/assets/components/X_ITEComponent.min.js +2 -2
  43. package/dist/example.html +1 -1
  44. package/dist/x_ite.css +1 -1
  45. package/dist/x_ite.d.ts +12 -0
  46. package/dist/x_ite.js +1166 -1125
  47. package/dist/x_ite.min.js +2 -2
  48. package/dist/x_ite.min.mjs +2 -2
  49. package/dist/x_ite.mjs +1166 -1125
  50. package/dist/x_ite.zip +0 -0
  51. package/package.json +5 -5
@@ -1,2 +1,2 @@
1
- /* X_ITE v10.4.1 */
2
- const t=window[Symbol.for("X_ITE.X3D-10.4.1")];(()=>{var e={254:e=>{e.exports=t.jquery}},i={};function s(t){var n=i[t];if(void 0!==n)return n.exports;var o=i[t]={exports:{}};return e[t](o,o.exports,s),o.exports}s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const n=t.Components;var o=s.n(n);const r=t.TextureProperties;var a=s.n(r);const h=t.Vector3;var l=s.n(h);const u=t.Matrix4;var c=s.n(u);const d=t.ViewVolume;var p=s.n(d);const g=t.Namespace;var y=s.n(g);const f=Symbol();function x(){}Object.assign(x.prototype,{getScreenTextureProperties(){return this[f]=new(a())(this.getPrivateScene()),this[f]._boundaryModeS="CLAMP_TO_EDGE",this[f]._boundaryModeT="CLAMP_TO_EDGE",this[f]._boundaryModeR="CLAMP_TO_EDGE",this[f]._minificationFilter="NEAREST_PIXEL",this[f]._magnificationFilter="NEAREST_PIXEL",this[f]._generateMipMaps=!1,this[f]._textureCompression="DEFAULT",this[f].setup(),this.getScreenTextureProperties=function(){return this[f]},Object.defineProperty(this,"getScreenTextureProperties",{enumerable:!1}),this[f]},getScreenScaleMatrix:(()=>{const t=new(l()),e=new(l()),i=new(c());return function(s,n,o,r){const a=s.getModelViewMatrix().get(),h=s.getProjectionMatrix().get(),u=s.getViewVolume().getViewport();s.getViewpoint().getScreenScale(a.origin,u,t);const c=a.xAxis.normalize().multiply(t.x*o),d=a.yAxis.normalize().multiply(t.y*o),g=a.zAxis.normalize().multiply(t.x*o);i.set(c.x,c.y,c.z,0,d.x,d.y,d.z,0,g.x,g.y,g.z,0,a[12],a[13],a[14],1),r&&(p().projectPoint(l().Zero,i,h,u,e),e.x=Math.round(e.x),e.y=Math.round(e.y),p().unProjectPoint(e.x,e.y,e.z,i,h,u,e),e.z=0,i.translate(e)),n.assign(a).inverse().multLeft(i)}})()});const w=x,_=y().add("X3DLayoutContext",w),S=t.Fields;var M=s.n(S);const O=t.X3DFieldDefinition;var z=s.n(O);const m=t.FieldDefinitionArray;var v=s.n(m);const X=t.X3DNode;var b=s.n(X);const N=t.X3DChildNode;var F=s.n(N);const U=t.X3DConstants;var T=s.n(U);function P(t){F().call(this,t),this.addType(T().X3DLayoutNode)}Object.setPrototypeOf(P.prototype,F().prototype),Object.defineProperties(P,b().getStaticProperties("X3DLayoutNode","Layout",1));const L=P,Y=y().add("X3DLayoutNode",L),B=t.Vector2;var C=s.n(B);const E=t.Rotation4;var D=s.n(E);let I=0;const R=I++,V=I++,A=I++,j=I++,k=I++,G=I++,W=I++,H=I++,q=I++,K=I++;function Z(t){Y.call(this,t),this.addType(T().Layout),this.alignX=V,this.alignY=V,this.offsetUnitX=G,this.offsetUnitY=G,this.offsetX=0,this.offsetY=0,this.sizeUnitX=G,this.sizeUnitY=G,this.sizeX=1,this.sizeY=1,this.scaleModeX=q,this.scaleModeY=q,this.parent=null,this.rectangleCenter=new(C()),this.rectangleSize=new(C()),this.matrix=new(c())}Object.assign(Object.setPrototypeOf(Z.prototype,Y.prototype),{viewportPixel:new(C()),pixelSize:new(C()),translation:new(l()),offset:new(l()),scale:new(l())(1,1,1),currentTranslation:new(l()),currentRotation:new(D()),currentScale:new(l()),modelViewMatrix:new(c()),initialize(){Y.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=R:"RIGHT"===this._align[0]?this.alignX=A:this.alignX=V:this.alignX=V,this._align.length>1?"BOTTOM"===this._align[1]?this.alignY=j:"TOP"===this._align[1]?this.alignY=k:this.alignY=V:this.alignY=V},set_offsetUnits__(){this._offsetUnits.length>0?("FRACTION"===this._offsetUnits[0]?this.offsetUnitX=W:"PIXEL"===this._offsetUnits[0]?this.offsetUnitX=H:this.offsetUnitX=G,this._offsetUnits.length>1?"FRACTION"===this._offsetUnits[1]?this.offsetUnitY=W:"PIXEL"===this._offsetUnits[1]?this.offsetUnitY=H:this.offsetUnitY=G:this.offsetUnitY=this.offsetUnitX):(this.offsetUnitX=G,this.offsetUnitY=G)},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=W:"PIXEL"===this._sizeUnits[0]?this.sizeUnitX=H:this.sizeUnitX=G,this._sizeUnits.length>1?"FRACTION"===this._sizeUnits[1]?this.sizeUnitY=W:"PIXEL"===this._sizeUnits[1]?this.sizeUnitY=H:this.sizeUnitY=G:this.sizeUnitY=this.sizeUnitX):(this.sizeUnitX=G,this.sizeUnitY=G)},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=W:"PIXEL"===this._scaleMode[0]?this.scaleModeX=H:"STRETCH"===this._scaleMode[0]?this.scaleModeX=K:this.scaleModeX=q,this._scaleMode.length>1?"FRACTION"===this._scaleMode[1]?this.scaleModeY=W:"PIXEL"===this._scaleMode[1]?this.scaleModeY=H:"STRETCH"===this._scaleMode[1]?this.scaleModeY=K:this.scaleModeY=q:this.scaleModeY=this.scaleModeX):(this.scaleModeX=q,this.scaleModeY=q)},getRectangleCenter(){return this.rectangleCenter},getRectangleSize(){return this.rectangleSize},getAlignX(){return this.alignX},getAlignY(){return this.alignY},getOffsetUnitX(){return this.offsetUnitX===G?this.parent?this.parent.getOffsetUnitX():W:this.offsetUnitX},getOffsetUnitY(){return this.offsetUnitY===G?this.parent?this.parent.getOffsetUnitY():W:this.offsetUnitY},getOffsetX(){return this.offsetX},getOffsetY(){return this.offsetY},getSizeUnitX(){return this.sizeUnitX===G?this.parent?this.parent.getSizeUnitX():W:this.sizeUnitX},getSizeUnitY(){return this.sizeUnitY===G?this.parent?this.parent.getSizeUnitY():W:this.sizeUnitY},getSizeX(){return this.sizeX},getSizeY(){return this.sizeY},getScaleModeX(){return this.parent?this.scaleModeX:this.scaleModeX===q?W:this.scaleModeX},getScaleModeY(){return this.parent?this.scaleModeY:this.scaleModeY===q?W:this.scaleModeY},transform(t,e){const i=this.parent=e.getParentLayout(),s=this.getBrowser().getRenderingProperty("ContentScale"),n=this.matrix,o=e.getViewpoint(),r=e.getNavigationInfo().getNearValue(),a=e.getViewVolume().getScissor(),h=o.getViewportSize(a,r),l=this.viewportPixel,u=this.pixelSize,c=i?i.getRectangleSize():h,d=this.rectangleSize,p=this.rectangleCenter;switch(l.set(a[2],a[3]).divide(s),u.assign(h).divVec(l),this.getSizeUnitX()){case W:d.x=this.sizeX*c.x;break;case H:d.x=this.sizeX*u.x}switch(this.getSizeUnitY()){case W:d.y=this.sizeY*c.y;break;case H:d.y=this.sizeY*u.y}const g=this.translation.set(0,0,0);switch(this.getAlignX()){case R:g.x=-(c.x-d.x)/2;break;case V:this.getSizeUnitX()===H&&1&l.x&&(g.x=-u.x/2);break;case A:g.x=(c.x-d.x)/2}switch(this.getAlignY()){case j:g.y=-(c.y-d.y)/2;break;case V:this.getSizeUnitX()===H&&1&l.y&&(g.y=-u.y/2);break;case k:g.y=(c.y-d.y)/2}const y=this.offset.set(0,0,0);switch(this.getOffsetUnitX()){case W:y.x=this.offsetX*c.x;break;case H:y.x=this.offsetX*h.x/l.x}switch(this.getOffsetUnitY()){case W:y.y=this.offsetY*c.y;break;case H:y.y=this.offsetY*h.y/l.y}const f=this.scale.set(1,1,1),x=this.currentTranslation,w=this.currentRotation,_=this.currentScale;switch(e.getModelViewMatrix().get().get(x,w,_),this.getScaleModeX()){case q:f.x=_.x;break;case W:f.x=d.x;break;case K:break;case H:f.x=h.x/l.x}switch(this.getScaleModeY()){case q:f.y=_.y;break;case W:f.y=d.y;break;case K:break;case H:f.y=h.y/l.y}return this.getScaleModeX()===K?this.getScaleModeY()===K?d.x>d.y?(f.x=d.x,f.y=f.x):(f.y=d.y,f.x=f.y):f.x=f.y:this.getScaleModeY()===K&&(f.y=f.x),p.assign(g.add(y)),n.set(x,w),n.translate(g),n.scale(f),n}}),Object.defineProperties(Z,{...b().getStaticProperties("Layout","Layout",1,"layout","3.2"),fieldDefinitions:{value:new(v())([new(z())(T().inputOutput,"metadata",new(M().SFNode)),new(z())(T().inputOutput,"align",new(M().MFString)("CENTER","CENTER")),new(z())(T().inputOutput,"offsetUnits",new(M().MFString)("WORLD","WORLD")),new(z())(T().inputOutput,"offset",new(M().MFFloat)(0,0)),new(z())(T().inputOutput,"sizeUnits",new(M().MFString)("WORLD","WORLD")),new(z())(T().inputOutput,"size",new(M().MFFloat)(1,1)),new(z())(T().inputOutput,"scaleMode",new(M().MFString)("NONE","NONE"))]),enumerable:!0}});const Q=Z,J=y().add("Layout",Q),$=t.X3DGroupingNode;var tt=s.n($);const et=t.X3DCast;var it=s.n(et);const st=t.TraverseType;var nt=s.n(st);function ot(t){tt().call(this,t),this.addType(T().LayoutGroup),this.viewportNode=null,this.layoutNode=null,this.matrix=new(c()),this.modelViewMatrix=new(c()),this.screenMatrix=new(c())}Object.assign(Object.setPrototypeOf(ot.prototype,tt().prototype),{initialize(){tt().prototype.initialize.call(this),this._viewport.addInterest("set_viewport__",this),this._layout.addInterest("set_layout__",this),this.set_viewport__(),this.set_layout__()},set_viewport__(){this.viewportNode=it()(T().X3DViewportNode,this._viewport)},set_layout__(){this.layoutNode=it()(T().X3DLayoutNode,this._layout)},getBBox(t,e){return tt().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()},getLayout(){return this.layoutNode},traverse(t,e){if(t!==nt().COLLISION){if(this.viewportNode&&this.viewportNode.push(),this.layoutNode){const i=e.getModelViewMatrix();this.modelViewMatrix.assign(i.get()),this.screenMatrix.assign(this.layoutNode.transform(t,e)),i.pushMatrix(this.screenMatrix),e.getLayouts().push(this.layoutNode),tt().prototype.traverse.call(this,t,e),e.getLayouts().pop(),i.pop()}else tt().prototype.traverse.call(this,t,e);this.viewportNode&&this.viewportNode.pop()}}}),Object.defineProperties(ot,{...b().getStaticProperties("LayoutGroup","Layout",1,"children","3.2"),fieldDefinitions:{value:new(v())([new(z())(T().inputOutput,"metadata",new(M().SFNode)),new(z())(T().inputOutput,"layout",new(M().SFNode)),new(z())(T().inputOutput,"viewport",new(M().SFNode)),new(z())(T().inputOutput,"visible",new(M().SFBool)(!0)),new(z())(T().inputOutput,"bboxDisplay",new(M().SFBool)),new(z())(T().initializeOnly,"bboxSize",new(M().SFVec3f)(-1,-1,-1)),new(z())(T().initializeOnly,"bboxCenter",new(M().SFVec3f)),new(z())(T().inputOnly,"addChildren",new(M().MFNode)),new(z())(T().inputOnly,"removeChildren",new(M().MFNode)),new(z())(T().inputOutput,"children",new(M().MFNode))]),enumerable:!0}});const rt=ot,at=y().add("LayoutGroup",rt),ht=t.X3DLayerNode;var lt=s.n(ht);const ut=t.OrthoViewpoint;var ct=s.n(ut);function dt(t){lt().call(this,t,new(ct())(t),new at(t)),this.addType(T().LayoutLayer)}Object.assign(Object.setPrototypeOf(dt.prototype,lt().prototype),{initialize(){lt().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(dt,{...b().getStaticProperties("LayoutLayer","Layout",1,"layers","3.2"),fieldDefinitions:{value:new(v())([new(z())(T().inputOutput,"metadata",new(M().SFNode)),new(z())(T().inputOutput,"pickable",new(M().SFBool)(!0)),new(z())(T().inputOutput,"objectType",new(M().MFString)("ALL")),new(z())(T().inputOutput,"visible",new(M().SFBool)(!0)),new(z())(T().inputOutput,"layout",new(M().SFNode)),new(z())(T().inputOutput,"viewport",new(M().SFNode)),new(z())(T().inputOnly,"addChildren",new(M().MFNode)),new(z())(T().inputOnly,"removeChildren",new(M().MFNode)),new(z())(T().inputOutput,"children",new(M().MFNode))]),enumerable:!0}});const pt=dt,gt=y().add("LayoutLayer",pt),yt=t.X3DFontStyleNode;var ft=s.n(yt);const xt=t.X3DTextGeometry;var wt=s.n(xt);const _t=t.TextAlignment;var St=s.n(_t);const Mt=t.PixelTexture;var Ot=s.n(Mt);const zt=t.Box3;var mt=s.n(zt);const vt=t.Algorithm;var Xt=s.n(vt),bt=s(254);function Nt(t,e){wt().call(this,t,e),t.setTransparent(!0),this.textureNode=new(Ot())(t.getExecutionContext()),this.canvas=bt("<canvas></canvas>"),this.context=this.canvas[0].getContext("2d",{willReadFrequently:!0}),this.matrix=new(c()),this.textureNode._textureProperties=e.getBrowser().getScreenTextureProperties(),this.textureNode.setup()}Object.assign(Object.setPrototypeOf(Nt.prototype,wt().prototype),{modelViewMatrix:new(c()),isTransparent:()=>!0,getMatrix(){return this.matrix},update:(()=>{const t=new(l()),e=new(l())(1,1,0);return function(){wt().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 St().BEGIN:case St().FIRST:t.x=Math.floor(t.x),e.x=t.x+s._textBounds.x;break;case St().MIDDLE:t.x=Math.round(t.x),e.x=t.x+s._textBounds.x;break;case St().END:e.x=Math.ceil(e.x),t.x=e.x-s._textBounds.x}switch(i.getMinorAlignment()){case St().BEGIN:case St().FIRST:e.y=Math.ceil(e.y),t.y=e.y-s._textBounds.y;break;case St().MIDDLE:e.y=Math.round(e.y),t.y=e.y-s._textBounds.y;break;case St().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(l()),e=new(l())(1,1,0);return function(){const i=this.getFontStyle(),s=i.getFont();if(!s)return;const n=this.getText(),o=this.getGlyphs(),r=this.getMinorAlignment(),a=this.getTranslations(),h=this.getCharSpacings(),l=this.getScales(),u=i.getScale(),c=u/s.unitsPerEm,d=n.getTexCoords(),p=n.getNormals(),g=n.getVertices(),y=this.canvas[0],f=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 x=n._textBounds.x,w=n._textBounds.y;y.width=Xt().nextPowerOfTwo(x),y.height=Xt().nextPowerOfTwo(w);const _=x/y.width,S=1-w/y.height;if(d.push(0,S,0,1,_,S,0,1,_,1,0,1,0,S,0,1,_,1,0,1,0,1,0,1),f.fillStyle="rgba(255,255,255,0)",f.fillRect(0,0,y.width,y.height),f.fillStyle="rgba(255,255,255,1)",f.save(),f.translate(0,y.height),f.scale(1,-1),i._horizontal.getValue())for(let i=0,n=o.length;i<n;++i){const n=o[i],d=a[i],p=h[i],g=l[i];let y=0;for(let i=0,o=n.length;i<o;++i){const o=n[i],a=r.x+d.x+y*g+i*p-t.x,h=r.y+d.y-e.y;f.save(),f.translate(a,-h),f.scale(g,1),this.drawGlyph(f,s,o,u),f.restore();let l=0;i+1<n.length&&(l=s.getKerningValue(o,n[i+1])),y+=(o.advanceWidth+l)*c}}else{const c=i._leftToRight.getValue(),d=i._topToBottom.getValue(),p=c?0:n._string.length-1,g=c?n._string.length:-1,y=c?1:-1;for(let i=p,n=0;i!==g;i+=y){const c=o[i],p=c.length,g=d?0:p-1,y=d?p:-1,x=d?1:-1,w=h[i],_=l[i];for(let i=g;i!==y;i+=x,++n){const o=a[n],h=r.x+o.x-t.x,l=r.y+o.y*_-i*w-e.y;f.save(),f.translate(h,-l),f.scale(1,_),this.drawGlyph(f,s,c[i],u),f.restore()}}}f.restore();const M=f.getImageData(0,0,y.width,y.height);M?this.textureNode.setTextureData(y.width,y.height,!0,!0,new Uint8Array(M.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),t.assign(this.getBBox()).multRight(this.matrix),this.getText().setBBox(t)}})(),display(t,e){c().prototype.multLeft.call(e.modelViewMatrix,this.matrix),e.textureNode=this.textureNode},transformLine:(()=>{const t=new(c());return function(e){return e.multLineMatrix(t.assign(this.matrix).inverse())}})(),transformMatrix(t){return t.multLeft(this.matrix)}});const Ft=Nt,Ut=y().add("ScreenText",Ft);function Tt(t){ft().call(this,t),this.addType(T().ScreenFontStyle)}Object.assign(Object.setPrototypeOf(Tt.prototype,ft().prototype),{initialize(){ft().prototype.initialize.call(this),this.getBrowser().getRenderingProperties()._ContentScale.addInterest("addNodeEvent",this)},getTextGeometry(t){return new Ut(t,this)},getScale(){return this._pointSize.getValue()*this.getBrowser().getPixelsPerPoint()}}),Object.defineProperties(Tt,{...b().getStaticProperties("ScreenFontStyle","Layout",2,"fontStyle","3.2"),fieldDefinitions:{value:new(v())([new(z())(T().inputOutput,"metadata",new(M().SFNode)),new(z())(T().inputOutput,"language",new(M().SFString)),new(z())(T().inputOutput,"family",new(M().MFString)("SERIF")),new(z())(T().inputOutput,"style",new(M().SFString)("PLAIN")),new(z())(T().inputOutput,"pointSize",new(M().SFFloat)(12)),new(z())(T().inputOutput,"spacing",new(M().SFFloat)(1)),new(z())(T().inputOutput,"horizontal",new(M().SFBool)(!0)),new(z())(T().inputOutput,"leftToRight",new(M().SFBool)(!0)),new(z())(T().inputOutput,"topToBottom",new(M().SFBool)(!0)),new(z())(T().inputOutput,"justify",new(M().MFString)("BEGIN"))]),enumerable:!0}});const Pt=Tt,Lt=y().add("ScreenFontStyle",Pt),Yt=t.X3DProtoDeclaration;var Bt=s.n(Yt);function Ct(t){tt().call(this,t),this.addType(T().ScreenGroup),t.getOuterNode()instanceof Bt()?this.matrix=new(c()):this.matrix=new(c())(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}Object.assign(Object.setPrototypeOf(Ct.prototype,tt().prototype),{getBBox(t,e){return this.getSubBBox(t,e).multRight(this.matrix)},getMatrix(){return this.matrix},traverse(t,e){switch(t){case nt().CAMERA:case nt().PICKING:case nt().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),tt().prototype.traverse.call(this,t,e),i.pop()}}),Object.defineProperties(Ct,{...b().getStaticProperties("ScreenGroup","Layout",2,"children","3.2"),fieldDefinitions:{value:new(v())([new(z())(T().inputOutput,"metadata",new(M().SFNode)),new(z())(T().inputOutput,"visible",new(M().SFBool)(!0)),new(z())(T().inputOutput,"bboxDisplay",new(M().SFBool)),new(z())(T().initializeOnly,"bboxSize",new(M().SFVec3f)(-1,-1,-1)),new(z())(T().initializeOnly,"bboxCenter",new(M().SFVec3f)),new(z())(T().inputOnly,"addChildren",new(M().MFNode)),new(z())(T().inputOnly,"removeChildren",new(M().MFNode)),new(z())(T().inputOutput,"children",new(M().MFNode))]),enumerable:!0}});const Et=Ct,Dt=y().add("ScreenGroup",Et);o().add({name:"Layout",concreteNodes:[J,at,gt,Lt,Dt],abstractNodes:[Y],browserContext:_});y().add("LayoutComponent",undefined)})();
1
+ /* X_ITE v10.5.0 */
2
+ const t=window[Symbol.for("X_ITE.X3D-10.5.0")];(()=>{var e={254:e=>{e.exports=t.jquery}},i={};function s(t){var n=i[t];if(void 0!==n)return n.exports;var o=i[t]={exports:{}};return e[t](o,o.exports,s),o.exports}s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const n=t.Components;var o=s.n(n);const r=t.TextureProperties;var a=s.n(r);const h=t.Vector3;var l=s.n(h);const u=t.Matrix4;var c=s.n(u);const d=t.ViewVolume;var p=s.n(d);const g=t.Namespace;var y=s.n(g);const f=Symbol();function x(){}Object.assign(x.prototype,{getScreenTextureProperties(){return this[f]=new(a())(this.getPrivateScene()),this[f]._boundaryModeS="CLAMP_TO_EDGE",this[f]._boundaryModeT="CLAMP_TO_EDGE",this[f]._boundaryModeR="CLAMP_TO_EDGE",this[f]._minificationFilter="NEAREST_PIXEL",this[f]._magnificationFilter="NEAREST_PIXEL",this[f]._generateMipMaps=!1,this[f]._textureCompression="DEFAULT",this[f].setup(),this.getScreenTextureProperties=function(){return this[f]},Object.defineProperty(this,"getScreenTextureProperties",{enumerable:!1}),this[f]},getScreenScaleMatrix:(()=>{const t=new(l()),e=new(l()),i=new(c());return function(s,n,o,r){const a=s.getModelViewMatrix().get(),h=s.getProjectionMatrix().get(),u=s.getViewVolume().getViewport();s.getViewpoint().getScreenScale(a.origin,u,t);const c=a.xAxis.normalize().multiply(t.x*o),d=a.yAxis.normalize().multiply(t.y*o),g=a.zAxis.normalize().multiply(t.x*o);i.set(c.x,c.y,c.z,0,d.x,d.y,d.z,0,g.x,g.y,g.z,0,a[12],a[13],a[14],1),r&&(p().projectPoint(l().Zero,i,h,u,e),e.x=Math.round(e.x),e.y=Math.round(e.y),p().unProjectPoint(e.x,e.y,e.z,i,h,u,e),e.z=0,i.translate(e)),n.assign(a).inverse().multLeft(i)}})()});const w=x,_=y().add("X3DLayoutContext",w),S=t.Fields;var M=s.n(S);const O=t.X3DFieldDefinition;var z=s.n(O);const m=t.FieldDefinitionArray;var v=s.n(m);const X=t.X3DNode;var b=s.n(X);const N=t.X3DChildNode;var F=s.n(N);const U=t.X3DConstants;var P=s.n(U);function T(t){F().call(this,t),this.addType(P().X3DLayoutNode)}Object.setPrototypeOf(T.prototype,F().prototype),Object.defineProperties(T,b().getStaticProperties("X3DLayoutNode","Layout",1));const L=T,Y=y().add("X3DLayoutNode",L),B=t.Vector2;var C=s.n(B);const E=t.Rotation4;var D=s.n(E);let I=0;const R=I++,V=I++,A=I++,j=I++,k=I++,G=I++,W=I++,H=I++,q=I++,K=I++;function Z(t){Y.call(this,t),this.addType(P().Layout),this.alignX=V,this.alignY=V,this.offsetUnitX=G,this.offsetUnitY=G,this.offsetX=0,this.offsetY=0,this.sizeUnitX=G,this.sizeUnitY=G,this.sizeX=1,this.sizeY=1,this.scaleModeX=q,this.scaleModeY=q,this.parent=null,this.rectangleCenter=new(C()),this.rectangleSize=new(C()),this.matrix=new(c())}Object.assign(Object.setPrototypeOf(Z.prototype,Y.prototype),{viewportPixel:new(C()),pixelSize:new(C()),translation:new(l()),offset:new(l()),scale:new(l())(1,1,1),currentTranslation:new(l()),currentRotation:new(D()),currentScale:new(l()),modelViewMatrix:new(c()),initialize(){Y.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=R:"RIGHT"===this._align[0]?this.alignX=A:this.alignX=V:this.alignX=V,this._align.length>1?"BOTTOM"===this._align[1]?this.alignY=j:"TOP"===this._align[1]?this.alignY=k:this.alignY=V:this.alignY=V},set_offsetUnits__(){this._offsetUnits.length>0?("FRACTION"===this._offsetUnits[0]?this.offsetUnitX=W:"PIXEL"===this._offsetUnits[0]?this.offsetUnitX=H:this.offsetUnitX=G,this._offsetUnits.length>1?"FRACTION"===this._offsetUnits[1]?this.offsetUnitY=W:"PIXEL"===this._offsetUnits[1]?this.offsetUnitY=H:this.offsetUnitY=G:this.offsetUnitY=this.offsetUnitX):(this.offsetUnitX=G,this.offsetUnitY=G)},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=W:"PIXEL"===this._sizeUnits[0]?this.sizeUnitX=H:this.sizeUnitX=G,this._sizeUnits.length>1?"FRACTION"===this._sizeUnits[1]?this.sizeUnitY=W:"PIXEL"===this._sizeUnits[1]?this.sizeUnitY=H:this.sizeUnitY=G:this.sizeUnitY=this.sizeUnitX):(this.sizeUnitX=G,this.sizeUnitY=G)},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=W:"PIXEL"===this._scaleMode[0]?this.scaleModeX=H:"STRETCH"===this._scaleMode[0]?this.scaleModeX=K:this.scaleModeX=q,this._scaleMode.length>1?"FRACTION"===this._scaleMode[1]?this.scaleModeY=W:"PIXEL"===this._scaleMode[1]?this.scaleModeY=H:"STRETCH"===this._scaleMode[1]?this.scaleModeY=K:this.scaleModeY=q:this.scaleModeY=this.scaleModeX):(this.scaleModeX=q,this.scaleModeY=q)},getRectangleCenter(){return this.rectangleCenter},getRectangleSize(){return this.rectangleSize},getAlignX(){return this.alignX},getAlignY(){return this.alignY},getOffsetUnitX(){return this.offsetUnitX===G?this.parent?this.parent.getOffsetUnitX():W:this.offsetUnitX},getOffsetUnitY(){return this.offsetUnitY===G?this.parent?this.parent.getOffsetUnitY():W:this.offsetUnitY},getOffsetX(){return this.offsetX},getOffsetY(){return this.offsetY},getSizeUnitX(){return this.sizeUnitX===G?this.parent?this.parent.getSizeUnitX():W:this.sizeUnitX},getSizeUnitY(){return this.sizeUnitY===G?this.parent?this.parent.getSizeUnitY():W:this.sizeUnitY},getSizeX(){return this.sizeX},getSizeY(){return this.sizeY},getScaleModeX(){return this.parent?this.scaleModeX:this.scaleModeX===q?W:this.scaleModeX},getScaleModeY(){return this.parent?this.scaleModeY:this.scaleModeY===q?W:this.scaleModeY},transform(t,e){const i=this.parent=e.getParentLayout(),s=this.getBrowser().getRenderingProperty("ContentScale"),n=this.matrix,o=e.getViewpoint(),r=e.getNavigationInfo().getNearValue(),a=e.getViewVolume().getScissor(),h=o.getViewportSize(a,r),l=this.viewportPixel,u=this.pixelSize,c=i?i.getRectangleSize():h,d=this.rectangleSize,p=this.rectangleCenter;switch(l.set(a[2],a[3]).divide(s),u.assign(h).divVec(l),this.getSizeUnitX()){case W:d.x=this.sizeX*c.x;break;case H:d.x=this.sizeX*u.x}switch(this.getSizeUnitY()){case W:d.y=this.sizeY*c.y;break;case H:d.y=this.sizeY*u.y}const g=this.translation.set(0,0,0);switch(this.getAlignX()){case R:g.x=-(c.x-d.x)/2;break;case V:this.getSizeUnitX()===H&&1&l.x&&(g.x=-u.x/2);break;case A:g.x=(c.x-d.x)/2}switch(this.getAlignY()){case j:g.y=-(c.y-d.y)/2;break;case V:this.getSizeUnitX()===H&&1&l.y&&(g.y=-u.y/2);break;case k:g.y=(c.y-d.y)/2}const y=this.offset.set(0,0,0);switch(this.getOffsetUnitX()){case W:y.x=this.offsetX*c.x;break;case H:y.x=this.offsetX*h.x/l.x}switch(this.getOffsetUnitY()){case W:y.y=this.offsetY*c.y;break;case H:y.y=this.offsetY*h.y/l.y}const f=this.scale.set(1,1,1),x=this.currentTranslation,w=this.currentRotation,_=this.currentScale;switch(e.getModelViewMatrix().get().get(x,w,_),this.getScaleModeX()){case q:f.x=_.x;break;case W:f.x=d.x;break;case K:break;case H:f.x=h.x/l.x}switch(this.getScaleModeY()){case q:f.y=_.y;break;case W:f.y=d.y;break;case K:break;case H:f.y=h.y/l.y}return this.getScaleModeX()===K?this.getScaleModeY()===K?d.x>d.y?(f.x=d.x,f.y=f.x):(f.y=d.y,f.x=f.y):f.x=f.y:this.getScaleModeY()===K&&(f.y=f.x),p.assign(g.add(y)),n.set(x,w),n.translate(g),n.scale(f),n}}),Object.defineProperties(Z,{...b().getStaticProperties("Layout","Layout",1,"layout","3.2"),fieldDefinitions:{value:new(v())([new(z())(P().inputOutput,"metadata",new(M().SFNode)),new(z())(P().inputOutput,"align",new(M().MFString)("CENTER","CENTER")),new(z())(P().inputOutput,"offsetUnits",new(M().MFString)("WORLD","WORLD")),new(z())(P().inputOutput,"offset",new(M().MFFloat)(0,0)),new(z())(P().inputOutput,"sizeUnits",new(M().MFString)("WORLD","WORLD")),new(z())(P().inputOutput,"size",new(M().MFFloat)(1,1)),new(z())(P().inputOutput,"scaleMode",new(M().MFString)("NONE","NONE"))]),enumerable:!0}});const Q=Z,J=y().add("Layout",Q),$=t.X3DGroupingNode;var tt=s.n($);const et=t.X3DCast;var it=s.n(et);const st=t.TraverseType;var nt=s.n(st);function ot(t){tt().call(this,t),this.addType(P().LayoutGroup),this.viewportNode=null,this.layoutNode=null,this.matrix=new(c()),this.modelViewMatrix=new(c()),this.screenMatrix=new(c())}Object.assign(Object.setPrototypeOf(ot.prototype,tt().prototype),{initialize(){tt().prototype.initialize.call(this),this._viewport.addInterest("set_viewport__",this),this._layout.addInterest("set_layout__",this),this.set_viewport__(),this.set_layout__()},set_viewport__(){this.viewportNode=it()(P().X3DViewportNode,this._viewport)},set_layout__(){this.layoutNode=it()(P().X3DLayoutNode,this._layout)},getBBox(t,e){return tt().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()},getLayout(){return this.layoutNode},traverse(t,e){if(t!==nt().COLLISION){if(this.viewportNode&&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),tt().prototype.traverse.call(this,t,e),e.getLayouts().pop(),i.pop()}else tt().prototype.traverse.call(this,t,e);this.viewportNode&&this.viewportNode.pop()}}}),Object.defineProperties(ot,{...b().getStaticProperties("LayoutGroup","Layout",1,"children","3.2"),fieldDefinitions:{value:new(v())([new(z())(P().inputOutput,"metadata",new(M().SFNode)),new(z())(P().inputOutput,"layout",new(M().SFNode)),new(z())(P().inputOutput,"viewport",new(M().SFNode)),new(z())(P().inputOutput,"visible",new(M().SFBool)(!0)),new(z())(P().inputOutput,"bboxDisplay",new(M().SFBool)),new(z())(P().initializeOnly,"bboxSize",new(M().SFVec3f)(-1,-1,-1)),new(z())(P().initializeOnly,"bboxCenter",new(M().SFVec3f)),new(z())(P().inputOnly,"addChildren",new(M().MFNode)),new(z())(P().inputOnly,"removeChildren",new(M().MFNode)),new(z())(P().inputOutput,"children",new(M().MFNode))]),enumerable:!0}});const rt=ot,at=y().add("LayoutGroup",rt),ht=t.X3DLayerNode;var lt=s.n(ht);const ut=t.OrthoViewpoint;var ct=s.n(ut);function dt(t){lt().call(this,t,new(ct())(t),new at(t)),this.addType(P().LayoutLayer)}Object.assign(Object.setPrototypeOf(dt.prototype,lt().prototype),{initialize(){lt().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(dt,{...b().getStaticProperties("LayoutLayer","Layout",1,"layers","3.2"),fieldDefinitions:{value:new(v())([new(z())(P().inputOutput,"metadata",new(M().SFNode)),new(z())(P().inputOutput,"pickable",new(M().SFBool)(!0)),new(z())(P().inputOutput,"objectType",new(M().MFString)("ALL")),new(z())(P().inputOutput,"visible",new(M().SFBool)(!0)),new(z())(P().inputOutput,"layout",new(M().SFNode)),new(z())(P().inputOutput,"viewport",new(M().SFNode)),new(z())(P().inputOnly,"addChildren",new(M().MFNode)),new(z())(P().inputOnly,"removeChildren",new(M().MFNode)),new(z())(P().inputOutput,"children",new(M().MFNode))]),enumerable:!0}});const pt=dt,gt=y().add("LayoutLayer",pt),yt=t.X3DFontStyleNode;var ft=s.n(yt);const xt=t.X3DTextGeometry;var wt=s.n(xt);const _t=t.TextAlignment;var St=s.n(_t);const Mt=t.PixelTexture;var Ot=s.n(Mt);const zt=t.Box3;var mt=s.n(zt);const vt=t.Algorithm;var Xt=s.n(vt),bt=s(254);function Nt(t,e){wt().call(this,t,e),t.setTransparent(!0),this.textureNode=new(Ot())(t.getExecutionContext()),this.canvas=bt("<canvas></canvas>"),this.context=this.canvas[0].getContext("2d",{willReadFrequently:!0}),this.matrix=new(c()),this.textureNode._textureProperties=e.getBrowser().getScreenTextureProperties(),this.textureNode.setup()}Object.assign(Object.setPrototypeOf(Nt.prototype,wt().prototype),{modelViewMatrix:new(c()),getMatrix(){return this.matrix},update:(()=>{const t=new(l()),e=new(l())(1,1,0);return function(){wt().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 St().BEGIN:case St().FIRST:t.x=Math.floor(t.x),e.x=t.x+s._textBounds.x;break;case St().MIDDLE:t.x=Math.round(t.x),e.x=t.x+s._textBounds.x;break;case St().END:e.x=Math.ceil(e.x),t.x=e.x-s._textBounds.x}switch(i.getMinorAlignment()){case St().BEGIN:case St().FIRST:e.y=Math.ceil(e.y),t.y=e.y-s._textBounds.y;break;case St().MIDDLE:e.y=Math.round(e.y),t.y=e.y-s._textBounds.y;break;case St().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(l()),e=new(l())(1,1,0);return function(){const i=this.getFontStyle(),s=i.getFont();if(!s)return;const n=this.getText(),o=this.getGlyphs(),r=this.getMinorAlignment(),a=this.getTranslations(),h=this.getCharSpacings(),l=this.getScales(),u=i.getScale(),c=u/s.unitsPerEm,d=n.getTexCoords(),p=n.getNormals(),g=n.getVertices(),y=this.canvas[0],f=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 x=n._textBounds.x,w=n._textBounds.y;y.width=Xt().nextPowerOfTwo(x),y.height=Xt().nextPowerOfTwo(w);const _=x/y.width,S=1-w/y.height;if(d.push(0,S,0,1,_,S,0,1,_,1,0,1,0,S,0,1,_,1,0,1,0,1,0,1),f.fillStyle="rgba(255,255,255,0)",f.fillRect(0,0,y.width,y.height),f.fillStyle="rgba(255,255,255,1)",f.save(),f.translate(0,y.height),f.scale(1,-1),i._horizontal.getValue())for(let i=0,n=o.length;i<n;++i){const n=o[i],d=a[i],p=h[i],g=l[i];let y=0;for(let i=0,o=n.length;i<o;++i){const o=n[i],a=r.x+d.x+y*g+i*p-t.x,h=r.y+d.y-e.y;f.save(),f.translate(a,-h),f.scale(g,1),this.drawGlyph(f,s,o,u),f.restore();let l=0;i+1<n.length&&(l=s.getKerningValue(o,n[i+1])),y+=(o.advanceWidth+l)*c}}else{const c=i._leftToRight.getValue(),d=i._topToBottom.getValue(),p=c?0:n._string.length-1,g=c?n._string.length:-1,y=c?1:-1;for(let i=p,n=0;i!==g;i+=y){const c=o[i],p=c.length,g=d?0:p-1,y=d?p:-1,x=d?1:-1,w=h[i],_=l[i];for(let i=g;i!==y;i+=x,++n){const o=a[n],h=r.x+o.x-t.x,l=r.y+o.y*_-i*w-e.y;f.save(),f.translate(h,-l),f.scale(1,_),this.drawGlyph(f,s,c[i],u),f.restore()}}}f.restore();const M=f.getImageData(0,0,y.width,y.height);M?this.textureNode.setTextureData(y.width,y.height,!0,!0,new Uint8Array(M.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),t.assign(this.getBBox()).multRight(this.matrix),this.getText().setBBox(t)}})(),display(t,e){c().prototype.multLeft.call(e.modelViewMatrix,this.matrix),e.textureNode=this.textureNode},transformLine:(()=>{const t=new(c());return function(e){return e.multLineMatrix(t.assign(this.matrix).inverse())}})(),transformMatrix(t){return t.multLeft(this.matrix)}});const Ft=Nt,Ut=y().add("ScreenText",Ft);function Pt(t){ft().call(this,t),this.addType(P().ScreenFontStyle)}Object.assign(Object.setPrototypeOf(Pt.prototype,ft().prototype),{initialize(){ft().prototype.initialize.call(this),this.getBrowser().getRenderingProperties()._ContentScale.addInterest("addNodeEvent",this)},getTextGeometry(t){return new Ut(t,this)},getScale(){return this._pointSize.getValue()*this.getBrowser().getPixelsPerPoint()}}),Object.defineProperties(Pt,{...b().getStaticProperties("ScreenFontStyle","Layout",2,"fontStyle","3.2"),fieldDefinitions:{value:new(v())([new(z())(P().inputOutput,"metadata",new(M().SFNode)),new(z())(P().inputOutput,"language",new(M().SFString)),new(z())(P().inputOutput,"family",new(M().MFString)("SERIF")),new(z())(P().inputOutput,"style",new(M().SFString)("PLAIN")),new(z())(P().inputOutput,"pointSize",new(M().SFFloat)(12)),new(z())(P().inputOutput,"spacing",new(M().SFFloat)(1)),new(z())(P().inputOutput,"horizontal",new(M().SFBool)(!0)),new(z())(P().inputOutput,"leftToRight",new(M().SFBool)(!0)),new(z())(P().inputOutput,"topToBottom",new(M().SFBool)(!0)),new(z())(P().inputOutput,"justify",new(M().MFString)("BEGIN"))]),enumerable:!0}});const Tt=Pt,Lt=y().add("ScreenFontStyle",Tt),Yt=t.X3DProtoDeclaration;var Bt=s.n(Yt);function Ct(t){tt().call(this,t),this.addType(P().ScreenGroup),t.getOuterNode()instanceof Bt()?this.matrix=new(c()):this.matrix=new(c())(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}Object.assign(Object.setPrototypeOf(Ct.prototype,tt().prototype),{getBBox(t,e){return this.getSubBBox(t,e).multRight(this.matrix)},getMatrix(){return this.matrix},traverse(t,e){switch(t){case nt().CAMERA:case nt().PICKING:case nt().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),tt().prototype.traverse.call(this,t,e),i.pop()}}),Object.defineProperties(Ct,{...b().getStaticProperties("ScreenGroup","Layout",2,"children","3.2"),fieldDefinitions:{value:new(v())([new(z())(P().inputOutput,"metadata",new(M().SFNode)),new(z())(P().inputOutput,"visible",new(M().SFBool)(!0)),new(z())(P().inputOutput,"bboxDisplay",new(M().SFBool)),new(z())(P().initializeOnly,"bboxSize",new(M().SFVec3f)(-1,-1,-1)),new(z())(P().initializeOnly,"bboxCenter",new(M().SFVec3f)),new(z())(P().inputOnly,"addChildren",new(M().MFNode)),new(z())(P().inputOnly,"removeChildren",new(M().MFNode)),new(z())(P().inputOutput,"children",new(M().MFNode))]),enumerable:!0}});const Et=Ct,Dt=y().add("ScreenGroup",Et);o().add({name:"Layout",concreteNodes:[J,at,gt,Lt,Dt],abstractNodes:[Y],browserContext:_});y().add("LayoutComponent",undefined)})();