x_ite 12.2.3 → 12.2.4

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 +4 -4
  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 +2 -2
  5. package/dist/assets/components/CADGeometryComponent.min.js +2 -2
  6. package/dist/assets/components/CubeMapTexturingComponent.js +5 -5
  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 +2 -2
  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 +5 -5
  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 +2 -2
  27. package/dist/assets/components/PickingComponent.min.js +2 -2
  28. package/dist/assets/components/RigidBodyPhysicsComponent.js +8 -8
  29. package/dist/assets/components/RigidBodyPhysicsComponent.min.js +2 -2
  30. package/dist/assets/components/ScriptingComponent.js +5 -5
  31. package/dist/assets/components/ScriptingComponent.min.js +2 -2
  32. package/dist/assets/components/TextComponent.js +5 -5
  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 +104 -104
  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 +8 -8
  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 +51409 -51406
  48. package/dist/x_ite.min.js +2 -2
  49. package/dist/x_ite.min.mjs +2 -2
  50. package/dist/x_ite.mjs +51239 -51236
  51. package/dist/x_ite.zip +0 -0
  52. package/package.json +3 -3
@@ -1,2 +1,2 @@
1
- /* X_ITE v12.2.3 */
2
- const e=window[Symbol.for("X_ITE.X3D-12.2.3")];(()=>{var t={n:e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return t.d(i,{a:i}),i},d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const i=e.Components;var n=t.n(i);const o=e.Fields;var s=t.n(o);const r=e.X3DFieldDefinition;var a=t.n(r);const h=e.FieldDefinitionArray;var l=t.n(h);const d=e.X3DNode;var c=t.n(d);const p=e.X3DCoordinateNode;var u=t.n(p);const g=e.X3DConstants;var _=t.n(g);const w=e.Namespace;var O=t.n(w);function y(e=1,t=1,i=!1){this.set(e,t,i)}Object.assign(y.prototype,{copy(){const e=Object.create(y.prototype);return e.semiMajorAxis=this.semiMajorAxis,e.semiMinorAxis=this.semiMinorAxis,e},assign(e){return this.semiMajorAxis=e.semiMajorAxis,this.semiMinorAxis=e.semiMinorAxis,this},equals(e){return this.semiMajorAxis===e.semiMajorAxis&&this.semiMinorAxis===e.semiMinorAxis},set(e=1,t=1,i=!1){if(i){const i=t;this.semiMajorAxis=e,this.semiMinorAxis=e*(1-1/i)}else this.semiMajorAxis=e,this.semiMinorAxis=t;return this},toString(){return`${this.semiMajorAxis} ${this.semiMinorAxis}`}});const S=y,f=O().add("Spheroid3",S),m=new Map([["AA",new f(6377563.396,299.3249646,!0)],["AM",new f(6377340.189,299.3249646,!0)],["AN",new f(6378160,298.25,!0)],["BN",new f(6377483.865,299.1528128,!0)],["BR",new f(6377397.155,299.1528128,!0)],["CC",new f(6378206.4,294.9786982,!0)],["CD",new f(6378249.145,293.465,!0)],["EA",new f(6377276.345,300.8017,!0)],["EB",new f(6377298.556,300.8017,!0)],["EC",new f(6377301.243,300.8017,!0)],["ED",new f(6377295.664,300.8017,!0)],["EE",new f(6377304.063,300.8017,!0)],["EF",new f(6377309.613,300.8017,!0)],["FA",new f(6378155,298.3,!0)],["HE",new f(6378200,298.3,!0)],["HO",new f(6378270,297,!0)],["ID",new f(6378160,298.247,!0)],["IN",new f(6378388,297,!0)],["KA",new f(6378245,298.3,!0)],["RF",new f(6378137,298.257222101,!0)],["SA",new f(6378160,298.25,!0)],["WD",new f(6378135,298.26,!0)],["WE",new f(6378137,298.257223563,!0)],["SUN",new f(696342e3,1/9e-6,!0)],["MERCURY",new f(2439700,2439700)],["VENUS",new f(6051800,6051800)],["MOON",new f(1738140,1735970)],["MARS",new f(3395428,3377678)],["JUPITER",new f(71492e3,66854e3)],["SATURN",new f(60268e3,54364e3)],["URANUS",new f(2555e3,24973e3)],["NEPTUNE",new f(24764e3,24341e3)],["PLUTO",new f(1153e3,1153e3)]]),F=O().add("ReferenceEllipsoids",m);function N(e,t,i){this.longitudeFirst=!t,this.degrees=!i,this.a=e.semiMajorAxis,this.c=e.semiMinorAxis,this.c2a2=(e.semiMinorAxis/this.a)**2,this.ecc2=1-this.c2a2}Object.assign(N.prototype,{convert(e,t){const i=e.z;let n,o;return this.longitudeFirst?(n=e.y,o=e.x):(n=e.x,o=e.y),this.degrees&&(n*=Math.PI/180,o*=Math.PI/180),this.convertRadians(n,o,i,t)},convertRadians(e,t,i,n){const o=Math.sin(e),s=o**2,r=Math.cos(e),a=this.a/Math.sqrt(1-this.ecc2*s),h=(a+i)*r;return n.set(h*Math.cos(t),h*Math.sin(t),(a*this.c2a2+i)*o)},apply(e,t){if(this.applyRadians(e,t),this.degrees&&(t.x*=180/Math.PI,t.y*=180/Math.PI),this.longitudeFirst){const e=t.x;t.x=t.y,t.y=e}return t},applyRadians(e,t){const i=e.x,n=e.y,o=e.z,s=Math.sqrt(i*i+n*n);if(0==s)return t.set(Math.PI,0,o-this.c);let r=0,a=Math.atan2(n,i),h=0,l=this.a,d=l,c=this.ecc2;for(let e=0;e<30;++e){const e=h,t=r;r=Math.atan(o/s/(1-c*d/(d+h)));const i=Math.sin(r);if(d=l/Math.sqrt(1-c*i*i),h=s/Math.cos(r)-d,Math.abs(h-e)<.001&&Math.abs(r-t)<1e-10)break}return t.set(r,a,h)},normal(e,t){const i=this.applyRadians(e,t),n=i.x,o=i.y,s=Math.cos(n),r=Math.cos(o)*s,a=Math.sin(o)*s,h=Math.sin(n);return t.set(r,a,h)}});const b=N,v=O().add("Geodetic",b),x=e.Algorithm;var M=t.n(x);const I=1e7,V=5e5,z=.9996;function C(e,t,i,n){const o=e.semiMajorAxis,s=1-(e.semiMinorAxis/o)**2,r=s/(1-s),a=(1-Math.sqrt(1-s))/(1+Math.sqrt(1-s));this.southernHemisphere=!i,this.eastingFirst=!n,this.a=o,this.ecc2=s,this.EE=r,this.E8=8*r,this.E9=9*r,this.E252=252*r,this.e1=a,this.A=z*(o*(1-s/4-3*s*s/64-5*s*s*s/256)),this.B=3*a/2-7*a*a*a/32,this.C=21*a*a/16-55*a*a*a*a/32,this.D=151*a*a*a/96,this.E=o*(1-s),this.W=1-s/4-3*s*s/64-5*s*s*s/256,this.X=3*s/8+3*s*s/32+45*s*s*s/1024,this.Y=15*s*s/256+45*s*s*s/1024,this.Z=35*s*s*s/3072,this.longitude0=M().radians(6*t-183),this.geodeticConverter=new v(e,!0,!0)}Object.assign(C.prototype,{convert(e,t){let i,n;this.eastingFirst?(i=e.y,n=e.x):(i=e.x,n=e.y);let o=this.southernHemisphere;i<0&&(o=!this.southernHemisphere,i=-i),o&&(i-=I),n-=V;const s=i/this.A,r=s+this.B*Math.sin(2*s)+this.C*Math.sin(4*s)+this.D*Math.sin(6*s),a=Math.sin(r)**2,h=Math.cos(r),l=Math.tan(r),d=this.a/Math.sqrt(1-this.ecc2*a),c=l**2,p=l**8,u=this.EE*c,g=u*u,_=this.E/(1-this.ecc2*a)**1.5,w=n/(d*z),O=(5+3*c+10*u-4*g-this.E9)*w**4/24,y=(61+90*c+298*u+45*p-this.E252-3*g)*w**6/720,S=(5-2*u+28*c-3*g+this.E8+24*p)*w**5/120,f=r-d*l/_*(w*w/2-O+y),m=this.longitude0+(w-(1+2*c+u)*w**3/6+S)/h;return this.geodeticConverter.convertRadians(f,m,e.z,t)},apply(e,t){const i=this.geodeticConverter.applyRadians(e,t),n=i.x,o=i.y,s=Math.tan(n),r=Math.cos(n),a=this.EE,h=this.a/Math.sqrt(1-this.ecc2*Math.sin(n)**2),l=s*s,d=l*l*l,c=a*r*r,p=r*(o-this.longitude0),u=this.a*(this.W*n-this.X*Math.sin(2*n)+this.Y*Math.sin(4*n)-this.Z*Math.sin(6*n)),g=z*h*(p+(1-l+c)*p**3/6+(5-18*d+72*c-58*a)*p**5/120)+V;let _=z*(u+h*s*(p*p/2+(5-l+9*c+4*c*c)*p**4/24+(61-58*d+600*c-330*a)*p**6/720));return n<0?(_+=I,this.southernHemisphere||(_=-_)):this.southernHemisphere&&(_=-_),this.eastingFirst?t.set(g,_,i.z):t.set(_,g,i.z)}});const j=C,P=O().add("UniversalTransverseMercator",j);function G(){}Object.assign(G.prototype,{convert:(e,t)=>t.assign(e),apply:(e,t)=>t.assign(e),slerp(e,t,i){const n=e.norm(),o=t.norm();return e.normalize(),t.normalize(),M().simpleSlerp(e,t,i).multiply(M().lerp(n,o,i))}});const D=G,E=O().add("Geocentric",D);let T=0;const A=T++,L=T++,U=T++,B=new Map([["GD",A],["GDC",A],["UTM",L],["GC",U],["GCC",U],["GS",U]]),R=/^Z(\d+)$/,k={GD:A,UTM:L,GC:U,getReferenceFrame(e,t){switch(this.getCoordinateSystem(e)){case A:return new v(this.getEllipsoid(e),this.getLatitudeFirst(e),t);case L:return new P(this.getEllipsoid(e),this.getZone(e),this.getNorthernHemisphere(e),this.getNorthingFirst(e));case U:return new E}return new v(F.get("WE"),!0,t)},getElevationFrame(e,t){return new v(this.getEllipsoid(e),!0,t)},getCoordinateSystem(e){for(const t of e){const e=B.get(t);if(void 0!==e)return e}return A},getEllipsoid(e){for(const t of e){const e=F.get(t);if(void 0!==e)return e}return F.get("WE")},isStandardOrder(e){switch(this.getCoordinateSystem(e)){case A:return this.getLatitudeFirst(e);case L:return this.getNorthingFirst(e);case U:return!0}return this.getLatitudeFirst(e)},getLatitudeFirst(e){for(const t of e)if("longitude_first"===t)return!1;return!0},getNorthingFirst(e){for(const t of e)if("easting_first"===t)return!1;return!0},getZone(e){for(const t of e){const e=t.match(R);if(e)return parseInt(e[1])}return 1},getNorthernHemisphere(e){for(const t of e)if("S"===t)return!1;return!0}},X=O().add("GeospatialObject",k),W=e.X3DCast;var Y=t.n(W);const q=e.Vector3;var H=t.n(q);const Z=e.Matrix4;var $=t.n(Z);const J=new(H()),K=new(H()),Q=new(H()),ee=new(H()),te=new(H()),ie=new(H());function ne(e){this.addType(_().X3DGeospatialObject),this.radians=!1,this.origin=new(H()),this.originMatrix=new($()),this.invOriginMatrix=new($())}function oe(e,t){return this.invOriginMatrix.multVecMatrix(this.referenceFrame.convert(e,t))}function se(e,t){return this.referenceFrame.apply(this.originMatrix.multVecMatrix(J.assign(e)),t)}function re(e,t){return this.invOriginMatrix.multDirMatrix(this.elevationFrame.normal(this.originMatrix.multVecMatrix(J.assign(e)),t))}function ae(e,t){return he.call(this,e,t).multRight(this.invOriginMatrix)}function he(e,t){return this.referenceFrame.convert(e,Q),this.elevationFrame.normal(Q,te),ee.set(0,0,1).cross(te),ee.equals(H().ZERO)&&ee.set(1,0,0),ie.assign(ee).cross(te),ee.normalize(),ie.normalize(),t.set(ee.x,ee.y,ee.z,0,te.x,te.y,te.z,0,ie.x,ie.y,ie.z,0,Q.x,Q.y,Q.z,1)}Object.assign(ne.prototype,{initialize(){this._geoSystem.addInterest("set_geoSystem__",this),this._geoOrigin.addInterest("set_geoOrigin__",this),this.set_geoSystem__(),this.set_geoOrigin__()},set_geoSystem__(){this.coordinateSystem=X.getCoordinateSystem(this._geoSystem),this.referenceFrame=X.getReferenceFrame(this._geoSystem,this.radians),this.elevationFrame=X.getElevationFrame(this._geoSystem,this.radians),this.standardOrder=X.isStandardOrder(this._geoSystem)},set_geoOrigin__(){this.geoOriginNode&&(this.geoOriginNode.removeInterest("set_origin__",this),this.geoOriginNode.removeInterest("set_rotateYUp__",this),this.geoOriginNode.removeInterest("addNodeEvent",this)),this.geoOriginNode=Y()(_().GeoOrigin,this._geoOrigin),this.geoOriginNode&&(this.geoOriginNode.addInterest("set_origin__",this),this.geoOriginNode.addInterest("set_rotateYUp__",this),this.geoOriginNode.addInterest("addNodeEvent",this)),this.set_origin__(),this.set_rotateYUp__()},set_origin__(){this.geoOriginNode?this.geoOriginNode.getOrigin(this.origin):this.origin.set(0),this.set_originMatrix__()},set_originMatrix__(){if(this.geoOriginNode){const e=this.origin;this.elevationFrame.normal(e,te),ee.set(0,0,1).cross(te),ee.equals(H().ZERO)&&ee.set(1,0,0),ie.assign(ee).cross(te),ee.normalize(),ie.normalize(),this.originMatrix.set(ee.x,ee.y,ee.z,0,te.x,te.y,te.z,0,ie.x,ie.y,ie.z,0,e.x,e.y,e.z,1),this.invOriginMatrix.assign(this.originMatrix).inverse()}},set_rotateYUp__(){this.geoOriginNode&&this.geoOriginNode._rotateYUp.getValue()?(this.getCoord=oe,this.getGeoCoord=se,this.getGeoUpVector=re,this.getLocationMatrix=ae):(delete this.getCoord,delete this.getGeoCoord,delete this.getGeoUpVector,delete this.getLocationMatrix)},getReferenceFrame(){return this.referenceFrame},getStandardOrder(){return this.standardOrder},getCoord(e,t){return this.referenceFrame.convert(e,t).subtract(this.origin)},getGeoCoord(e,t){return this.referenceFrame.apply(J.assign(e).add(this.origin),t)},getGeoElevation(e){return this.getGeoCoord(e,K).z},getGeoUpVector(e,t){return this.elevationFrame.normal(J.assign(e).add(this.origin),t)},getLocationMatrix(e,t){const i=this.origin,n=he.call(this,e,t);return n[12]-=i.x,n[13]-=i.y,n[14]-=i.z,n},dispose(){}}),Object.defineProperties(ne,c().getStaticProperties("X3DGeospatialObject","Geospatial",1));const le=ne,de=O().add("X3DGeospatialObject",le),ce=e.Triangle3;var pe=t.n(ce);function ue(e){u().call(this,e),de.call(this,e),this.addType(_().GeoCoordinate)}Object.assign(Object.setPrototypeOf(ue.prototype,u().prototype),de.prototype,{initialize(){u().prototype.initialize.call(this),de.prototype.initialize.call(this)},set1Point:(()=>{const e=new(H());return function(t,i){this._point[t]=this.getGeoCoord(i,e)}})(),get1Point:(()=>{const e=new(H());return function(t,i){if(t<this.length){const n=this.point;return t*=3,this.getCoord(e.set(n[t],n[t+1],n[t+2]),i)}return i.set(0)}})(),addPoint:(()=>{const e=new(H()),t=new(H());return function(i,n){if(i<this.length){const o=this.point;i*=3,this.getCoord(e.set(o[i],o[i+1],o[i+2]),t),n.push(t[0],t[1],t[2],1)}else n.push(0,0,0,1)}})(),addPoints:(()=>{const e=new(H()),t=new(H());return function(i,n=this.length){const o=this.point,s=3*this.length;for(let n=0;n<s;n+=3)this.getCoord(e.set(o[n],o[n+1],o[n+2]),t),i.push(t[0],t[1],t[2],1);if(n*=3,s)for(let e=s;e<n;e+=3)i.push(t[0],t[1],t[2],1);else for(let e=s;e<n;e+=3)i.push(0,0,0,1);return i}})(),getNormal:(()=>{const e=new(H()),t=new(H()),i=new(H());return function(n,o,s){const r=this.length;return n<r&&o<r&&s<r?pe().normal(this.get1Point(n,e),this.get1Point(o,t),this.get1Point(s,i),new(H())):new(H())}})(),getQuadNormal:(()=>{const e=new(H()),t=new(H()),i=new(H()),n=new(H());return function(o,s,r,a){const h=this.length;return o<h&&s<h&&r<h&&a<h?pe().quadNormal(this.get1Point(o,e),this.get1Point(s,t),this.get1Point(r,i),this.get1Point(a,n),new(H())):new(H())}})(),dispose(){de.prototype.dispose.call(this),u().prototype.dispose.call(this)}}),Object.defineProperties(ue,{...c().getStaticProperties("GeoCoordinate","Geospatial",1,"coord","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().initializeOnly,"geoOrigin",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().inputOutput,"point",new(s().MFVec3d))]),enumerable:!0}});const ge=ue,_e=O().add("GeoCoordinate",ge),we=e.X3DGeometryNode;var Oe=t.n(we);const ye=e.Vector2;var Se=t.n(ye);function fe(e){Oe().call(this,e),de.call(this,e),this.addType(_().GeoElevationGrid),this._set_height.setUnit("length"),this._creaseAngle.setUnit("angle"),this._height.setUnit("length")}Object.assign(Object.setPrototypeOf(fe.prototype,Oe().prototype),de.prototype,{initialize(){Oe().prototype.initialize.call(this),de.prototype.initialize.call(this),this._set_height.addFieldInterest(this._height),this._color.addInterest("set_color__",this),this._texCoord.addInterest("set_texCoord__",this),this._tangent.addInterest("set_tangent__",this),this._normal.addInterest("set_normal__",this),this.set_color__(),this.set_texCoord__(),this.set_tangent__(),this.set_normal__()},getHeight(e){return e<this._height.length?this._height[e]*this._yScale.getValue():0},createTexCoords(){const e=[],t=this._xDimension.getValue(),i=this._zDimension.getValue(),n=t-1,o=i-1;for(let s=0;s<i;++s)for(let i=0;i<t;++i)e.push(new(Se())(i/n,s/o));return e},createNormals(e,t,i){const n=t.length,o=!this._ccw.getValue(),s=new Map,r=[];for(let t=0;t<e.length;++t)s.set(t,[]);for(let i=0;i<n;i+=3){const n=t[i],a=t[i+1],h=t[i+2];s.get(n).push(r.length),s.get(a).push(r.length+1),s.get(h).push(r.length+2);const l=pe().normal(e[n],e[a],e[h],new(H()));o&&l.negate(),r.push(l),r.push(l),r.push(l)}return this._normalPerVertex.getValue()?this.refineNormals(s,r,i??this._creaseAngle.getValue()):r},createCoordIndex(){const e=[],t=this._xDimension.getValue(),i=t-1,n=this._zDimension.getValue()-1;for(let o=0;o<n;++o)for(let n=0;n<i;++n){const i=o*t+n,s=(o+1)*t+n,r=(o+1)*t+(n+1),a=o*t+(n+1);e.push(i),e.push(r),e.push(s),e.push(i),e.push(a),e.push(r)}return e},createPoints(){const e=[],t=this._xDimension.getValue(),i=this._zDimension.getValue(),n=this._xSpacing.getValue(),o=this._zSpacing.getValue();if(this.getStandardOrder())for(let s=0;s<i;++s)for(let i=0;i<t;++i){const r=new(H())(o*s,n*i,this.getHeight(i+s*t));r.add(this._geoGridOrigin.getValue()),e.push(this.getCoord(r,r))}else for(let s=0;s<i;++s)for(let i=0;i<t;++i){const r=new(H())(n*i,o*s,this.getHeight(i+s*t));r.add(this._geoGridOrigin.getValue()),e.push(this.getCoord(r,r))}return e},build(){if(this._xDimension.getValue()<2||this._zDimension.getValue()<2)return;const e=this._colorPerVertex.getValue(),t=this._normalPerVertex.getValue(),i=this.createCoordIndex(),n=this.getColor(),o=this.getTexCoord(),s=this.getTangent(),r=this.getNormal(),a=this.createPoints(),h=this.getColors(),l=this.getMultiTexCoords(),d=this.getTangents(),c=this.getNormals(),p=this.getVertices(),u=i.length;let g,_;o?o.init(l):(g=this.createTexCoords(),_=this.getTexCoords(),l.push(_));let w=0;for(let O=0;O<u;++w)for(let u=0;u<6;++u,++O){const u=i[O],{x:y,y:S,z:f}=a[u];if(n?.addColor(e?u:w,h),o)o.addPoint(u,l);else{const{x:e,y:t}=g[u];_.push(e,t,0,1)}s?.addVector(t?u:w,d),r?.addVector(t?u:w,c),p.push(y,S,f,1)}if(!r){const e=this.createNormals(a,i);for(const{x:t,y:i,z:n}of e)c.push(t,i,n)}this.setSolid(this._solid.getValue()),this.setCCW(this._ccw.getValue())},dispose(){de.prototype.dispose.call(this),Oe().prototype.dispose.call(this)}}),Object.defineProperties(fe,{...c().getStaticProperties("GeoElevationGrid","Geospatial",1,"geometry","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().initializeOnly,"geoOrigin",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().inputOnly,"set_height",new(s().MFDouble)),new(a())(_().initializeOnly,"geoGridOrigin",new(s().SFVec3d)),new(a())(_().initializeOnly,"xDimension",new(s().SFInt32)),new(a())(_().initializeOnly,"zDimension",new(s().SFInt32)),new(a())(_().initializeOnly,"xSpacing",new(s().SFDouble)(1)),new(a())(_().initializeOnly,"zSpacing",new(s().SFDouble)(1)),new(a())(_().inputOutput,"yScale",new(s().SFFloat)(1)),new(a())(_().initializeOnly,"solid",new(s().SFBool)(!0)),new(a())(_().initializeOnly,"ccw",new(s().SFBool)(!0)),new(a())(_().initializeOnly,"creaseAngle",new(s().SFDouble)),new(a())(_().initializeOnly,"colorPerVertex",new(s().SFBool)(!0)),new(a())(_().initializeOnly,"normalPerVertex",new(s().SFBool)(!0)),new(a())(_().inputOutput,"color",new(s().SFNode)),new(a())(_().inputOutput,"texCoord",new(s().SFNode)),new(a())(_().inputOutput,"tangent",new(s().SFNode)),new(a())(_().inputOutput,"normal",new(s().SFNode)),new(a())(_().initializeOnly,"height",new(s().MFDouble)(0,0))]),enumerable:!0}});const me=fe,Fe=O().add("GeoElevationGrid",me),Ne=e.X3DChildNode;var be=t.n(Ne);const ve=e.X3DBoundedObject;var xe=t.n(ve);const Me=e.TraverseType;var Ie=t.n(Me);const Ve=e.Group;var ze=t.n(Ve);const Ce=e.Inline;var je=t.n(Ce);function Pe(e){be().call(this,e),xe().call(this,e),de.call(this,e),this.addType(_().GeoLOD),this.setVisibleObject(!0),this._range.setUnit("length"),this.unload=!1,this.rootGroupNode=new(ze())(this.getBrowser().getPrivateScene()),this.rootInlineNode=new(je())(e),this.child1InlineNode=new(je())(e),this.child2InlineNode=new(je())(e),this.child3InlineNode=new(je())(e),this.child4InlineNode=new(je())(e),this.childInlineNodes=[this.child1InlineNode,this.child2InlineNode,this.child3InlineNode,this.child4InlineNode],this.childrenLoaded=!1,this.keepCurrentLevel=!1}Object.assign(Object.setPrototypeOf(Pe.prototype,be().prototype),xe().prototype,de.prototype,{initialize(){be().prototype.initialize.call(this),xe().prototype.initialize.call(this),de.prototype.initialize.call(this),this._rootNode.addFieldInterest(this.rootGroupNode._children),this.rootGroupNode._children=this._rootNode,this.rootGroupNode.setPrivate(!0),this.rootInlineNode._loadState.addInterest("set_rootLoadState__",this);for(const e of this.childInlineNodes)e._loadState.addInterest("set_childLoadState__",this);this._rootUrl.addFieldInterest(this.rootInlineNode._url),this._child1Url.addFieldInterest(this.child1InlineNode._url),this._child2Url.addFieldInterest(this.child2InlineNode._url),this._child3Url.addFieldInterest(this.child3InlineNode._url),this._child4Url.addFieldInterest(this.child4InlineNode._url),this.rootInlineNode._load=!0;for(const e of this.childInlineNodes)e._load=!1;this.rootInlineNode._url=this._rootUrl,this.child1InlineNode._url=this._child1Url,this.child2InlineNode._url=this._child2Url,this.child3InlineNode._url=this._child3Url,this.child4InlineNode._url=this._child4Url,this.rootInlineNode.setup();for(const e of this.childInlineNodes)e.setup()},getBBox(e,t){if(this.isDefaultBBoxSize())switch(this.childrenLoaded?this._level_changed.getValue():0){case 0:return this._rootNode.length?this.rootGroupNode.getBBox(e,t):this.rootInlineNode.getBBox(e,t);case 1:return xe().prototype.getBBox.call(this,this.childInlineNodes,e,t)}return e.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},getShapes(e,t){switch(this.childrenLoaded?this._level_changed.getValue():0){case 0:return this._rootNode.length?this.rootGroupNode.getShapes(e,t):this.rootInlineNode.getShapes(e,t);case 1:for(const i of this.childInlineNodes)i.getShapes(e,t);return e}},set_rootLoadState__(){0===this._level_changed.getValue()&&(this._rootNode.length||this.rootInlineNode.checkLoadState()===_().COMPLETE_STATE&&(this.childrenLoaded=!1,this._children=this.rootInlineNode.getInternalScene().getRootNodes()))},set_childLoadState__(){if(1!==this._level_changed.getValue())return;4===this.childInlineNodes.reduce((e,t)=>e+(t.checkLoadState()===_().COMPLETE_STATE||t.checkLoadState()===_().FAILED_STATE),0)&&(this.childrenLoaded=!0,this._children=this.childInlineNodes.flatMap(e=>Array.from(e.getInternalScene().getRootNodes())))},set_childBoundedObject__(){this.setBoundedObject(this.childInlineNodes.some(e=>e.isBoundedObject()))},set_childPointingObject__(){this.setPointingObject(this.childInlineNodes.some(e=>e.isPointingObject()))},set_childCameraObject__(){this.setCameraObject(this.childInlineNodes.some(e=>e.isCameraObject()))},set_childPickableObject__(){this.setPickableObject(this.childInlineNodes.some(e=>e.isPickableObject()))},set_childCollisionObject__(){this.setCollisionObject(this.childInlineNodes.some(e=>e.isCollisionObject()))},set_childShadowObject__(){this.setShadowObject(this.childInlineNodes.some(e=>e.isShadowObject()))},getLevel:(()=>{const e=new(H());return function(t){t.translate(this.getCoord(this._center.getValue(),e));return t.origin.norm()<this._range.getValue()?1:0}})(),changeLevel:(()=>{const e=new($());return function(t){const i=this.getLevel(e.assign(t.getModelViewMatrix().get()));if(i!==this._level_changed.getValue())switch(this._level_changed=i,i){case 0:for(const e of this.childInlineNodes)e._isBoundedObject.removeInterest("set_childBoundedObject__",this),e._isPointingObject.removeInterest("set_childPointingObject__",this),e._isCameraObject.removeInterest("set_childCameraObject__",this),e._isPickableObject.removeInterest("set_childPickableObject__",this),e._isCollisionObject.removeInterest("set_childCollisionObject__",this),e._isShadowObject.removeInterest("set_childShadowObject__",this);if(this._rootNode.length?(this.connectChildNode(this.rootGroupNode,[Ie().DISPLAY]),this._children=this._rootNode,this.childrenLoaded=!1):this.rootInlineNode.checkLoadState()==_().COMPLETE_STATE&&(this.connectChildNode(this.rootInlineNode,[Ie().DISPLAY]),this._children=this.rootInlineNode.getInternalScene().getRootNodes(),this.childrenLoaded=!1),this.unload)for(const e of this.childInlineNodes)e._load=!1;break;case 1:this._rootNode.length?this.disconnectChildNode(this.rootGroupNode):this.disconnectChildNode(this.rootInlineNode);for(const e of this.childInlineNodes)e._isBoundedObject.addInterest("set_childBoundedObject__",this),e._isPointingObject.addInterest("set_childPointingObject__",this),e._isCameraObject.addInterest("set_childCameraObject__",this),e._isPickableObject.addInterest("set_childPickableObject__",this),e._isCollisionObject.addInterest("set_childCollisionObject__",this),e._isShadowObject.addInterest("set_childShadowObject__",this);if(this.set_childBoundedObject__(),this.set_childPointingObject__(),this.set_childCameraObject__(),this.set_childPickableObject__(),this.set_childCollisionObject__(),this.set_childShadowObject__(),this.child1InlineNode._load.getValue())this.set_childLoadState__();else for(const e of this.childInlineNodes)e._load=!0}}})(),traverse(e,t){switch(e===Ie().DISPLAY&&this.changeLevel(t),this.childrenLoaded?this._level_changed.getValue():0){case 0:this._rootNode.length?this.rootGroupNode.traverse(e,t):this.rootInlineNode.traverse(e,t);break;case 1:for(const i of this.childInlineNodes)i.traverse(e,t)}},dispose(){de.prototype.dispose.call(this),xe().prototype.dispose.call(this),be().prototype.dispose.call(this)}}),Object.defineProperties(Pe,{...c().getStaticProperties("GeoLOD","Geospatial",1,"children","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().initializeOnly,"geoOrigin",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().initializeOnly,"rootUrl",new(s().MFString)),new(a())(_().initializeOnly,"child1Url",new(s().MFString)),new(a())(_().initializeOnly,"child2Url",new(s().MFString)),new(a())(_().initializeOnly,"child3Url",new(s().MFString)),new(a())(_().initializeOnly,"child4Url",new(s().MFString)),new(a())(_().initializeOnly,"center",new(s().SFVec3d)),new(a())(_().initializeOnly,"range",new(s().SFFloat)(10)),new(a())(_().outputOnly,"level_changed",new(s().SFInt32)(-1)),new(a())(_().inputOutput,"visible",new(s().SFBool)(!0)),new(a())(_().inputOutput,"bboxDisplay",new(s().SFBool)),new(a())(_().initializeOnly,"bboxSize",new(s().SFVec3f)(-1,-1,-1)),new(a())(_().initializeOnly,"bboxCenter",new(s().SFVec3f)),new(a())(_().initializeOnly,"rootNode",new(s().MFNode)),new(a())(_().outputOnly,"children",new(s().MFNode))]),enumerable:!0}});const Ge=Pe,De=O().add("GeoLOD",Ge),Ee=e.X3DTransformMatrix3DNode;var Te=t.n(Ee);function Ae(e){Te().call(this,e),de.call(this,e),this.addType(_().GeoLocation)}Object.assign(Object.setPrototypeOf(Ae.prototype,Te().prototype),de.prototype,{initialize(){Te().prototype.initialize.call(this),de.prototype.initialize.call(this),this.addInterest("eventsProcessed",this),this.eventsProcessed()},eventsProcessed:(()=>{const e=new($());return function(){this.setMatrix(this.getLocationMatrix(this._geoCoords.getValue(),e))}})(),dispose(){de.prototype.dispose.call(this),Te().prototype.dispose.call(this)}}),Object.defineProperties(Ae,{...c().getStaticProperties("GeoLocation","Geospatial",1,"children","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().initializeOnly,"geoOrigin",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().inputOutput,"geoCoords",new(s().SFVec3d)),new(a())(_().inputOutput,"visible",new(s().SFBool)(!0)),new(a())(_().inputOutput,"bboxDisplay",new(s().SFBool)),new(a())(_().initializeOnly,"bboxSize",new(s().SFVec3f)(-1,-1,-1)),new(a())(_().initializeOnly,"bboxCenter",new(s().SFVec3f)),new(a())(_().inputOnly,"addChildren",new(s().MFNode)),new(a())(_().inputOnly,"removeChildren",new(s().MFNode)),new(a())(_().inputOutput,"children",new(s().MFNode))]),enumerable:!0}});const Le=Ae,Ue=O().add("GeoLocation",Le),Be=e.X3DInfoNode;var Re=t.n(Be);const ke=e.X3DUrlObject;var Xe=t.n(ke);function We(e){Re().call(this,e),Xe().call(this,e),this.addType(_().GeoMetadata)}Object.assign(Object.setPrototypeOf(We.prototype,Re().prototype),Xe().prototype,{initialize(){Re().prototype.initialize.call(this),Xe().prototype.initialize.call(this)},async requestImmediateLoad(e=!0){},dispose(){Xe().prototype.dispose.call(this),Re().prototype.dispose.call(this)}}),Object.defineProperties(We,{...c().getStaticProperties("GeoMetadata","Geospatial",1,"children","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().inputOutput,"description",new(s().SFString)),new(a())(_().inputOutput,"load",new(s().SFBool)(!0)),new(a())(_().inputOutput,"url",new(s().MFString)),new(a())(_().inputOutput,"autoRefresh",new(s().SFTime)(0)),new(a())(_().inputOutput,"autoRefreshTimeLimit",new(s().SFTime)(3600)),new(a())(_().inputOutput,"summary",new(s().MFString)),new(a())(_().inputOutput,"data",new(s().MFNode))]),enumerable:!0}});const Ye=We,qe=O().add("GeoMetadata",Ye);function He(e){c().call(this,e),this.addType(_().GeoOrigin),this.radians=!1}Object.assign(Object.setPrototypeOf(He.prototype,c().prototype),{initialize(){c().prototype.initialize.call(this),this._geoSystem.addInterest("set_geoSystem__",this),this.set_geoSystem__()},set_geoSystem__(){this.referenceFrame=X.getReferenceFrame(this._geoSystem,this.radians)},getOrigin(e){return this.referenceFrame.convert(this._geoCoords.getValue(),e)}}),Object.defineProperties(He,{...c().getStaticProperties("GeoOrigin","Geospatial",1,"geoOrigin","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().inputOutput,"geoCoords",new(s().SFVec3d)),new(a())(_().initializeOnly,"rotateYUp",new(s().SFBool))]),enumerable:!0}});const Ze=He,$e=O().add("GeoOrigin",Ze),Je=e.X3DInterpolatorNode;var Ke=t.n(Je);function Qe(e){Ke().call(this,e),de.call(this,e),this.addType(_().GeoPositionInterpolator),this._value_changed.setUnit("length"),this.geocentric=new E}Object.assign(Object.setPrototypeOf(Qe.prototype,Ke().prototype),de.prototype,{setup(){de.prototype.initialize.call(this),Ke().prototype.setup.call(this)},initialize(){Ke().prototype.initialize.call(this),this._keyValue.addInterest("set_keyValue__",this)},set_keyValue__(){const e=this._key,t=this._keyValue;t.length<e.length&&t.resize(e.length,t.length?t[t.length-1]:new(s().SFVec3f))},interpolate:(()=>{const e=new(H()),t=new(H()),i=new(H());return function(n,o,s){this.getCoord(this._keyValue[n].getValue(),e),this.getCoord(this._keyValue[o].getValue(),t);const r=this.geocentric.slerp(e,t,s);this._geovalue_changed=this.getGeoCoord(r,i),this._value_changed=r}})(),dispose(){de.prototype.dispose.call(this),Ke().prototype.dispose.call(this)}}),Object.defineProperties(Qe,{...c().getStaticProperties("GeoPositionInterpolator","Geospatial",1,"children","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().initializeOnly,"geoOrigin",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().inputOnly,"set_fraction",new(s().SFFloat)),new(a())(_().inputOutput,"key",new(s().MFFloat)),new(a())(_().inputOutput,"keyValue",new(s().MFVec3d)),new(a())(_().outputOnly,"value_changed",new(s().SFVec3f)),new(a())(_().outputOnly,"geovalue_changed",new(s().SFVec3d))]),enumerable:!0}});const et=Qe,tt=O().add("GeoPositionInterpolator",et),it=e.X3DEnvironmentalSensorNode;var nt=t.n(it);const ot=e.ProximitySensor;var st=t.n(ot);function rt(e){nt().call(this,e),de.call(this,e),this.addType(_().GeoProximitySensor),this._position_changed.setUnit("length"),this._centerOfRotation_changed.setUnit("length"),this.proximitySensor=new(st())(e)}Object.assign(Object.setPrototypeOf(rt.prototype,nt().prototype),de.prototype,{initialize(){nt().prototype.initialize.call(this),de.prototype.initialize.call(this),this._enabled.addFieldInterest(this.proximitySensor._enabled),this._size.addFieldInterest(this.proximitySensor._size),this._center.addFieldInterest(this.proximitySensor._center),this._geoCenter.addFieldInterest(this._center),this.proximitySensor._isActive.addFieldInterest(this._isActive),this.proximitySensor._enterTime.addFieldInterest(this._enterTime),this.proximitySensor._exitTime.addFieldInterest(this._exitTime),this.proximitySensor._position_changed.addFieldInterest(this._position_changed),this.proximitySensor._orientation_changed.addFieldInterest(this._orientation_changed),this.proximitySensor._centerOfRotation_changed.addFieldInterest(this._centerOfRotation_changed),this.proximitySensor._position_changed.addInterest("set_position__",this),this.proximitySensor._enabled=this._enabled,this.proximitySensor._size=this._size,this.proximitySensor._center=this._center,this.proximitySensor.setup(),this.connectChildNode(this.proximitySensor)},set_position__:(()=>{const e=new(H());return function(){this._geoCoord_changed=this.getGeoCoord(this.proximitySensor._position_changed.getValue(),e)}})(),traverse(e,t){this.proximitySensor.traverse(e,t)},dispose(){de.prototype.dispose.call(this),nt().prototype.dispose.call(this)}}),Object.defineProperties(rt,{...c().getStaticProperties("GeoProximitySensor","Geospatial",2,"children","3.2"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().inputOutput,"description",new(s().SFString)),new(a())(_().initializeOnly,"geoOrigin",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().inputOutput,"enabled",new(s().SFBool)(!0)),new(a())(_().inputOutput,"size",new(s().SFVec3f)),new(a())(_().inputOutput,"center",new(s().SFVec3d)),new(a())(_().inputOutput,"geoCenter",new(s().SFVec3d)),new(a())(_().outputOnly,"isActive",new(s().SFBool)),new(a())(_().outputOnly,"enterTime",new(s().SFTime)),new(a())(_().outputOnly,"exitTime",new(s().SFTime)),new(a())(_().outputOnly,"geoCoord_changed",new(s().SFVec3d)),new(a())(_().outputOnly,"position_changed",new(s().SFVec3f)),new(a())(_().outputOnly,"orientation_changed",new(s().SFRotation)),new(a())(_().outputOnly,"centerOfRotation_changed",new(s().SFVec3f))]),enumerable:!0}});const at=rt,ht=O().add("GeoProximitySensor",at),lt=e.X3DTouchSensorNode;var dt=t.n(lt);function ct(e){dt().call(this,e),de.call(this,e),this.addType(_().GeoTouchSensor),this._hitPoint_changed.setUnit("length")}Object.assign(Object.setPrototypeOf(ct.prototype,dt().prototype),de.prototype,{initialize(){dt().prototype.initialize.call(this),de.prototype.initialize.call(this)},set_over__:(()=>{const e=new(H());return function(t,i,n,o,s){dt().prototype.set_over__.call(this,t,i,n,o,s),this._isOver.getValue()&&(this._hitGeoCoord_changed=this.getGeoCoord(this._hitPoint_changed.getValue(),e))}})(),dispose(){de.prototype.dispose.call(this),dt().prototype.dispose.call(this)}}),Object.defineProperties(ct,{...c().getStaticProperties("GeoTouchSensor","Geospatial",1,"children","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().inputOutput,"description",new(s().SFString)),new(a())(_().initializeOnly,"geoOrigin",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().inputOutput,"enabled",new(s().SFBool)(!0)),new(a())(_().outputOnly,"hitTexCoord_changed",new(s().SFVec2f)),new(a())(_().outputOnly,"hitNormal_changed",new(s().SFVec3f)),new(a())(_().outputOnly,"hitPoint_changed",new(s().SFVec3f)),new(a())(_().outputOnly,"hitGeoCoord_changed",new(s().SFVec3d)),new(a())(_().outputOnly,"isOver",new(s().SFBool)),new(a())(_().outputOnly,"isActive",new(s().SFBool)),new(a())(_().outputOnly,"touchTime",new(s().SFTime))]),enumerable:!0}});const pt=ct,ut=O().add("GeoTouchSensor",pt);function gt(e){Te().call(this,e),de.call(this,e),this.addType(_().GeoTransform),this._translation.setUnit("length")}Object.assign(Object.setPrototypeOf(gt.prototype,Te().prototype),de.prototype,{initialize(){Te().prototype.initialize.call(this),de.prototype.initialize.call(this),this.addInterest("eventsProcessed",this),this.eventsProcessed()},eventsProcessed:(()=>{const e=new($()),t=new($());return function(){this.getLocationMatrix(this._geoCenter.getValue(),t),e.set(this._translation.getValue(),this._rotation.getValue(),this._scale.getValue(),this._scaleOrientation.getValue()),this.setMatrix(e.multRight(t).multLeft(t.inverse()))}})(),dispose(){de.prototype.dispose.call(this),Te().prototype.dispose.call(this)}}),Object.defineProperties(gt,{...c().getStaticProperties("GeoTransform","Geospatial",2,"children","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().inputOutput,"translation",new(s().SFVec3f)),new(a())(_().inputOutput,"rotation",new(s().SFRotation)),new(a())(_().inputOutput,"scale",new(s().SFVec3f)(1,1,1)),new(a())(_().inputOutput,"scaleOrientation",new(s().SFRotation)),new(a())(_().initializeOnly,"geoOrigin",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().inputOutput,"geoCenter",new(s().SFVec3d)),new(a())(_().inputOutput,"visible",new(s().SFBool)(!0)),new(a())(_().inputOutput,"bboxDisplay",new(s().SFBool)),new(a())(_().initializeOnly,"bboxSize",new(s().SFVec3f)(-1,-1,-1)),new(a())(_().initializeOnly,"bboxCenter",new(s().SFVec3f)),new(a())(_().inputOnly,"addChildren",new(s().MFNode)),new(a())(_().inputOnly,"removeChildren",new(s().MFNode)),new(a())(_().inputOutput,"children",new(s().MFNode))]),enumerable:!0}});const _t=gt,wt=O().add("GeoTransform",_t),Ot=e.X3DViewpointNode;var yt=t.n(Ot);const St=e.Viewpoint;var ft=t.n(St);const mt=e.NavigationInfo;var Ft=t.n(mt);const Nt=e.Rotation4;var bt=t.n(Nt);function vt(e){yt().call(this,e),de.call(this,e),this.addType(_().GeoViewpoint),this.addChildObjects(_().inputOutput,"navType",new(s().MFString)("EXAMINE","ANY"),_().inputOutput,"headlight",new(s().SFBool)(!0)),this._centerOfRotation.setUnit("length"),this._fieldOfView.setUnit("angle"),e.getSpecificationVersion()<=3.2&&(this.addAlias("navType",this._navType),this.addAlias("headlight",this._headlight),this.traverse=xt),this.geoNavigationInfoNode=new(Ft())(e),this.projectionMatrix=new($()),this.elevation=0}function xt(e,t){yt().prototype.traverse.call(this,e,t),this.geoNavigationInfoNode.traverse(e,t)}Object.assign(Object.setPrototypeOf(vt.prototype,yt().prototype),de.prototype,{initialize(){yt().prototype.initialize.call(this),de.prototype.initialize.call(this),this._position.addInterest("set_position__",this),this._positionOffset.addInterest("set_position__",this),this._navType.addFieldInterest(this.geoNavigationInfoNode._type),this._headlight.addFieldInterest(this.geoNavigationInfoNode._headlight),this.geoNavigationInfoNode._type=this._navType,this.geoNavigationInfoNode._headlight=this._headlight,this.geoNavigationInfoNode.setup(),this.getExecutionContext().getSpecificationVersion()<=3.2&&(this._navigationInfo=this.geoNavigationInfoNode),this.set_position__()},getRelativeTransformation:ft().prototype.getRelativeTransformation,setInterpolators:ft().prototype.setInterpolators,getFieldOfView:ft().prototype.getFieldOfView,setFieldOfView:ft().prototype.setFieldOfView,getUserFieldOfView:ft().prototype.getUserFieldOfView,getScreenScale:ft().prototype.getScreenScale,getViewportSize:ft().prototype.getViewportSize,getLookAtDistance:ft().prototype.getLookAtDistance,getProjectionMatrixWithLimits:ft().prototype.getProjectionMatrixWithLimits,getLogarithmicDepthBuffer:()=>!0,getPosition:(()=>{const e=new(H());return function(){return this.getCoord(this._position.getValue(),e)}})(),setPosition:(()=>{const e=new(H());return function(t){this._position.setValue(this.getGeoCoord(t,e))}})(),set_position__:(()=>{const e=new(H());return function(){this.getCoord(this._position.getValue(),e),this.elevation=this.getGeoElevation(e.add(this._positionOffset.getValue()))}})(),getOrientation:(()=>{const e=new($()),t=new(bt());return function(){const i=this.getLocationMatrix(this._position.getValue(),e).submatrix;return t.setMatrix(i),t.multLeft(this._orientation.getValue())}})(),setOrientation:(()=>{const e=new($()),t=new(bt());return function(i){const n=this.getLocationMatrix(this._position.getValue(),e).submatrix;t.setMatrix(n),this._orientation.setValue(t.inverse().multLeft(i))}})(),getCenterOfRotation:(()=>{const e=new(H());return function(){return this.getCoord(this._centerOfRotation.getValue(),e)}})(),setCenterOfRotation:(()=>{const e=new(H());return function(t){this._centerOfRotation.setValue(this.getGeoCoord(t,e))}})(),getMaxFarValue:()=>1e9,getUpVector:(()=>{const e=new(H()),t=new(H());return function(i=!1){return!i||this.getUserPosition().norm()<65e5?(this.getCoord(this._position.getValue(),e),this.getGeoUpVector(e.add(this._positionOffset.getValue()),t)):t.assign(H().Z_AXIS)}})(),getSpeedFactor(){return(Math.max(this.elevation,0)+10)/10*this._speedFactor.getValue()},dispose(){de.prototype.dispose.call(this),yt().prototype.dispose.call(this)}}),Object.defineProperties(vt,{...c().getStaticProperties("GeoViewpoint","Geospatial",1,"children","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().initializeOnly,"geoOrigin",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().inputOnly,"set_bind",new(s().SFBool)),new(a())(_().inputOutput,"description",new(s().SFString)),new(a())(_().inputOutput,"position",new(s().SFVec3d)(0,0,1e5)),new(a())(_().inputOutput,"orientation",new(s().SFRotation)),new(a())(_().inputOutput,"centerOfRotation",new(s().SFVec3d)),new(a())(_().inputOutput,"fieldOfView",new(s().SFFloat)(.785398)),new(a())(_().inputOutput,"nearDistance",new(s().SFFloat)(-1)),new(a())(_().inputOutput,"farDistance",new(s().SFFloat)(-1)),new(a())(_().inputOutput,"viewAll",new(s().SFBool)),new(a())(_().inputOutput,"jump",new(s().SFBool)(!0)),new(a())(_().inputOutput,"retainUserOffsets",new(s().SFBool)),new(a())(_().initializeOnly,"speedFactor",new(s().SFFloat)(1)),new(a())(_().outputOnly,"isBound",new(s().SFBool)),new(a())(_().outputOnly,"bindTime",new(s().SFTime)),new(a())(_().inputOutput,"navigationInfo",new(s().SFNode))]),enumerable:!0}});const Mt=vt,It=O().add("GeoViewpoint",Mt);n().add({name:"Geospatial",concreteNodes:[_e,Fe,De,Ue,qe,$e,tt,ht,ut,wt,It],abstractNodes:[de]});O().add("GeospatialComponent",undefined)})();
1
+ /* X_ITE v12.2.4 */
2
+ const e=window[Symbol.for("X_ITE.X3D-12.2.4")];(()=>{var t={n:e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return t.d(i,{a:i}),i},d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const i=e.Components;var n=t.n(i);const o=e.Fields;var s=t.n(o);const r=e.X3DFieldDefinition;var a=t.n(r);const h=e.FieldDefinitionArray;var l=t.n(h);const d=e.X3DNode;var c=t.n(d);const p=e.X3DCoordinateNode;var u=t.n(p);const g=e.X3DConstants;var _=t.n(g);const w=e.Namespace;var O=t.n(w);function y(e=1,t=1,i=!1){this.set(e,t,i)}Object.assign(y.prototype,{copy(){const e=Object.create(y.prototype);return e.semiMajorAxis=this.semiMajorAxis,e.semiMinorAxis=this.semiMinorAxis,e},assign(e){return this.semiMajorAxis=e.semiMajorAxis,this.semiMinorAxis=e.semiMinorAxis,this},equals(e){return this.semiMajorAxis===e.semiMajorAxis&&this.semiMinorAxis===e.semiMinorAxis},set(e=1,t=1,i=!1){if(i){const i=t;this.semiMajorAxis=e,this.semiMinorAxis=e*(1-1/i)}else this.semiMajorAxis=e,this.semiMinorAxis=t;return this},toString(){return`${this.semiMajorAxis} ${this.semiMinorAxis}`}});const S=y,f=O().add("Spheroid3",S),m=new Map([["AA",new f(6377563.396,299.3249646,!0)],["AM",new f(6377340.189,299.3249646,!0)],["AN",new f(6378160,298.25,!0)],["BN",new f(6377483.865,299.1528128,!0)],["BR",new f(6377397.155,299.1528128,!0)],["CC",new f(6378206.4,294.9786982,!0)],["CD",new f(6378249.145,293.465,!0)],["EA",new f(6377276.345,300.8017,!0)],["EB",new f(6377298.556,300.8017,!0)],["EC",new f(6377301.243,300.8017,!0)],["ED",new f(6377295.664,300.8017,!0)],["EE",new f(6377304.063,300.8017,!0)],["EF",new f(6377309.613,300.8017,!0)],["FA",new f(6378155,298.3,!0)],["HE",new f(6378200,298.3,!0)],["HO",new f(6378270,297,!0)],["ID",new f(6378160,298.247,!0)],["IN",new f(6378388,297,!0)],["KA",new f(6378245,298.3,!0)],["RF",new f(6378137,298.257222101,!0)],["SA",new f(6378160,298.25,!0)],["WD",new f(6378135,298.26,!0)],["WE",new f(6378137,298.257223563,!0)],["SUN",new f(696342e3,1/9e-6,!0)],["MERCURY",new f(2439700,2439700)],["VENUS",new f(6051800,6051800)],["MOON",new f(1738140,1735970)],["MARS",new f(3395428,3377678)],["JUPITER",new f(71492e3,66854e3)],["SATURN",new f(60268e3,54364e3)],["URANUS",new f(2555e3,24973e3)],["NEPTUNE",new f(24764e3,24341e3)],["PLUTO",new f(1153e3,1153e3)]]),F=O().add("ReferenceEllipsoids",m);function N(e,t,i){this.longitudeFirst=!t,this.degrees=!i,this.a=e.semiMajorAxis,this.c=e.semiMinorAxis,this.c2a2=(e.semiMinorAxis/this.a)**2,this.ecc2=1-this.c2a2}Object.assign(N.prototype,{convert(e,t){const i=e.z;let n,o;return this.longitudeFirst?(n=e.y,o=e.x):(n=e.x,o=e.y),this.degrees&&(n*=Math.PI/180,o*=Math.PI/180),this.convertRadians(n,o,i,t)},convertRadians(e,t,i,n){const o=Math.sin(e),s=o**2,r=Math.cos(e),a=this.a/Math.sqrt(1-this.ecc2*s),h=(a+i)*r;return n.set(h*Math.cos(t),h*Math.sin(t),(a*this.c2a2+i)*o)},apply(e,t){if(this.applyRadians(e,t),this.degrees&&(t.x*=180/Math.PI,t.y*=180/Math.PI),this.longitudeFirst){const e=t.x;t.x=t.y,t.y=e}return t},applyRadians(e,t){const i=e.x,n=e.y,o=e.z,s=Math.sqrt(i*i+n*n);if(0==s)return t.set(Math.PI,0,o-this.c);let r=0,a=Math.atan2(n,i),h=0,l=this.a,d=l,c=this.ecc2;for(let e=0;e<30;++e){const e=h,t=r;r=Math.atan(o/s/(1-c*d/(d+h)));const i=Math.sin(r);if(d=l/Math.sqrt(1-c*i*i),h=s/Math.cos(r)-d,Math.abs(h-e)<.001&&Math.abs(r-t)<1e-10)break}return t.set(r,a,h)},normal(e,t){const i=this.applyRadians(e,t),n=i.x,o=i.y,s=Math.cos(n),r=Math.cos(o)*s,a=Math.sin(o)*s,h=Math.sin(n);return t.set(r,a,h)}});const b=N,v=O().add("Geodetic",b),x=e.Algorithm;var M=t.n(x);const I=1e7,V=5e5,z=.9996;function C(e,t,i,n){const o=e.semiMajorAxis,s=1-(e.semiMinorAxis/o)**2,r=s/(1-s),a=(1-Math.sqrt(1-s))/(1+Math.sqrt(1-s));this.southernHemisphere=!i,this.eastingFirst=!n,this.a=o,this.ecc2=s,this.EE=r,this.E8=8*r,this.E9=9*r,this.E252=252*r,this.e1=a,this.A=z*(o*(1-s/4-3*s*s/64-5*s*s*s/256)),this.B=3*a/2-7*a*a*a/32,this.C=21*a*a/16-55*a*a*a*a/32,this.D=151*a*a*a/96,this.E=o*(1-s),this.W=1-s/4-3*s*s/64-5*s*s*s/256,this.X=3*s/8+3*s*s/32+45*s*s*s/1024,this.Y=15*s*s/256+45*s*s*s/1024,this.Z=35*s*s*s/3072,this.longitude0=M().radians(6*t-183),this.geodeticConverter=new v(e,!0,!0)}Object.assign(C.prototype,{convert(e,t){let i,n;this.eastingFirst?(i=e.y,n=e.x):(i=e.x,n=e.y);let o=this.southernHemisphere;i<0&&(o=!this.southernHemisphere,i=-i),o&&(i-=I),n-=V;const s=i/this.A,r=s+this.B*Math.sin(2*s)+this.C*Math.sin(4*s)+this.D*Math.sin(6*s),a=Math.sin(r)**2,h=Math.cos(r),l=Math.tan(r),d=this.a/Math.sqrt(1-this.ecc2*a),c=l**2,p=l**8,u=this.EE*c,g=u*u,_=this.E/(1-this.ecc2*a)**1.5,w=n/(d*z),O=(5+3*c+10*u-4*g-this.E9)*w**4/24,y=(61+90*c+298*u+45*p-this.E252-3*g)*w**6/720,S=(5-2*u+28*c-3*g+this.E8+24*p)*w**5/120,f=r-d*l/_*(w*w/2-O+y),m=this.longitude0+(w-(1+2*c+u)*w**3/6+S)/h;return this.geodeticConverter.convertRadians(f,m,e.z,t)},apply(e,t){const i=this.geodeticConverter.applyRadians(e,t),n=i.x,o=i.y,s=Math.tan(n),r=Math.cos(n),a=this.EE,h=this.a/Math.sqrt(1-this.ecc2*Math.sin(n)**2),l=s*s,d=l*l*l,c=a*r*r,p=r*(o-this.longitude0),u=this.a*(this.W*n-this.X*Math.sin(2*n)+this.Y*Math.sin(4*n)-this.Z*Math.sin(6*n)),g=z*h*(p+(1-l+c)*p**3/6+(5-18*d+72*c-58*a)*p**5/120)+V;let _=z*(u+h*s*(p*p/2+(5-l+9*c+4*c*c)*p**4/24+(61-58*d+600*c-330*a)*p**6/720));return n<0?(_+=I,this.southernHemisphere||(_=-_)):this.southernHemisphere&&(_=-_),this.eastingFirst?t.set(g,_,i.z):t.set(_,g,i.z)}});const j=C,P=O().add("UniversalTransverseMercator",j);function G(){}Object.assign(G.prototype,{convert:(e,t)=>t.assign(e),apply:(e,t)=>t.assign(e),slerp(e,t,i){const n=e.norm(),o=t.norm();return e.normalize(),t.normalize(),M().simpleSlerp(e,t,i).multiply(M().lerp(n,o,i))}});const D=G,E=O().add("Geocentric",D);let T=0;const A=T++,L=T++,U=T++,B=new Map([["GD",A],["GDC",A],["UTM",L],["GC",U],["GCC",U],["GS",U]]),R=/^Z(\d+)$/,k={GD:A,UTM:L,GC:U,getReferenceFrame(e,t){switch(this.getCoordinateSystem(e)){case A:return new v(this.getEllipsoid(e),this.getLatitudeFirst(e),t);case L:return new P(this.getEllipsoid(e),this.getZone(e),this.getNorthernHemisphere(e),this.getNorthingFirst(e));case U:return new E}return new v(F.get("WE"),!0,t)},getElevationFrame(e,t){return new v(this.getEllipsoid(e),!0,t)},getCoordinateSystem(e){for(const t of e){const e=B.get(t);if(void 0!==e)return e}return A},getEllipsoid(e){for(const t of e){const e=F.get(t);if(void 0!==e)return e}return F.get("WE")},isStandardOrder(e){switch(this.getCoordinateSystem(e)){case A:return this.getLatitudeFirst(e);case L:return this.getNorthingFirst(e);case U:return!0}return this.getLatitudeFirst(e)},getLatitudeFirst(e){for(const t of e)if("longitude_first"===t)return!1;return!0},getNorthingFirst(e){for(const t of e)if("easting_first"===t)return!1;return!0},getZone(e){for(const t of e){const e=t.match(R);if(e)return parseInt(e[1])}return 1},getNorthernHemisphere(e){for(const t of e)if("S"===t)return!1;return!0}},X=O().add("GeospatialObject",k),W=e.X3DCast;var Y=t.n(W);const q=e.Vector3;var H=t.n(q);const Z=e.Matrix4;var $=t.n(Z);const J=new(H()),K=new(H()),Q=new(H()),ee=new(H()),te=new(H()),ie=new(H());function ne(e){this.addType(_().X3DGeospatialObject),this.radians=!1,this.origin=new(H()),this.originMatrix=new($()),this.invOriginMatrix=new($())}function oe(e,t){return this.invOriginMatrix.multVecMatrix(this.referenceFrame.convert(e,t))}function se(e,t){return this.referenceFrame.apply(this.originMatrix.multVecMatrix(J.assign(e)),t)}function re(e,t){return this.invOriginMatrix.multDirMatrix(this.elevationFrame.normal(this.originMatrix.multVecMatrix(J.assign(e)),t))}function ae(e,t){return he.call(this,e,t).multRight(this.invOriginMatrix)}function he(e,t){return this.referenceFrame.convert(e,Q),this.elevationFrame.normal(Q,te),ee.set(0,0,1).cross(te),ee.equals(H().ZERO)&&ee.set(1,0,0),ie.assign(ee).cross(te),ee.normalize(),ie.normalize(),t.set(ee.x,ee.y,ee.z,0,te.x,te.y,te.z,0,ie.x,ie.y,ie.z,0,Q.x,Q.y,Q.z,1)}Object.assign(ne.prototype,{initialize(){this._geoSystem.addInterest("set_geoSystem__",this),this._geoOrigin.addInterest("set_geoOrigin__",this),this.set_geoSystem__(),this.set_geoOrigin__()},set_geoSystem__(){this.coordinateSystem=X.getCoordinateSystem(this._geoSystem),this.referenceFrame=X.getReferenceFrame(this._geoSystem,this.radians),this.elevationFrame=X.getElevationFrame(this._geoSystem,this.radians),this.standardOrder=X.isStandardOrder(this._geoSystem)},set_geoOrigin__(){this.geoOriginNode&&(this.geoOriginNode.removeInterest("set_origin__",this),this.geoOriginNode.removeInterest("set_rotateYUp__",this),this.geoOriginNode.removeInterest("addNodeEvent",this)),this.geoOriginNode=Y()(_().GeoOrigin,this._geoOrigin),this.geoOriginNode&&(this.geoOriginNode.addInterest("set_origin__",this),this.geoOriginNode.addInterest("set_rotateYUp__",this),this.geoOriginNode.addInterest("addNodeEvent",this)),this.set_origin__(),this.set_rotateYUp__()},set_origin__(){this.geoOriginNode?this.geoOriginNode.getOrigin(this.origin):this.origin.set(0),this.set_originMatrix__()},set_originMatrix__(){if(this.geoOriginNode){const e=this.origin;this.elevationFrame.normal(e,te),ee.set(0,0,1).cross(te),ee.equals(H().ZERO)&&ee.set(1,0,0),ie.assign(ee).cross(te),ee.normalize(),ie.normalize(),this.originMatrix.set(ee.x,ee.y,ee.z,0,te.x,te.y,te.z,0,ie.x,ie.y,ie.z,0,e.x,e.y,e.z,1),this.invOriginMatrix.assign(this.originMatrix).inverse()}},set_rotateYUp__(){this.geoOriginNode&&this.geoOriginNode._rotateYUp.getValue()?(this.getCoord=oe,this.getGeoCoord=se,this.getGeoUpVector=re,this.getLocationMatrix=ae):(delete this.getCoord,delete this.getGeoCoord,delete this.getGeoUpVector,delete this.getLocationMatrix)},getReferenceFrame(){return this.referenceFrame},getStandardOrder(){return this.standardOrder},getCoord(e,t){return this.referenceFrame.convert(e,t).subtract(this.origin)},getGeoCoord(e,t){return this.referenceFrame.apply(J.assign(e).add(this.origin),t)},getGeoElevation(e){return this.getGeoCoord(e,K).z},getGeoUpVector(e,t){return this.elevationFrame.normal(J.assign(e).add(this.origin),t)},getLocationMatrix(e,t){const i=this.origin,n=he.call(this,e,t);return n[12]-=i.x,n[13]-=i.y,n[14]-=i.z,n},dispose(){}}),Object.defineProperties(ne,c().getStaticProperties("X3DGeospatialObject","Geospatial",1));const le=ne,de=O().add("X3DGeospatialObject",le),ce=e.Triangle3;var pe=t.n(ce);function ue(e){u().call(this,e),de.call(this,e),this.addType(_().GeoCoordinate)}Object.assign(Object.setPrototypeOf(ue.prototype,u().prototype),de.prototype,{initialize(){u().prototype.initialize.call(this),de.prototype.initialize.call(this)},set1Point:(()=>{const e=new(H());return function(t,i){this._point[t]=this.getGeoCoord(i,e)}})(),get1Point:(()=>{const e=new(H());return function(t,i){if(t<this.length){const n=this.point;return t*=3,this.getCoord(e.set(n[t],n[t+1],n[t+2]),i)}return i.set(0)}})(),addPoint:(()=>{const e=new(H()),t=new(H());return function(i,n){if(i<this.length){const o=this.point;i*=3,this.getCoord(e.set(o[i],o[i+1],o[i+2]),t),n.push(t[0],t[1],t[2],1)}else n.push(0,0,0,1)}})(),addPoints:(()=>{const e=new(H()),t=new(H());return function(i,n=this.length){const o=this.point,s=3*this.length;for(let n=0;n<s;n+=3)this.getCoord(e.set(o[n],o[n+1],o[n+2]),t),i.push(t[0],t[1],t[2],1);if(n*=3,s)for(let e=s;e<n;e+=3)i.push(t[0],t[1],t[2],1);else for(let e=s;e<n;e+=3)i.push(0,0,0,1);return i}})(),getNormal:(()=>{const e=new(H()),t=new(H()),i=new(H());return function(n,o,s){const r=this.length;return n<r&&o<r&&s<r?pe().normal(this.get1Point(n,e),this.get1Point(o,t),this.get1Point(s,i),new(H())):new(H())}})(),getQuadNormal:(()=>{const e=new(H()),t=new(H()),i=new(H()),n=new(H());return function(o,s,r,a){const h=this.length;return o<h&&s<h&&r<h&&a<h?pe().quadNormal(this.get1Point(o,e),this.get1Point(s,t),this.get1Point(r,i),this.get1Point(a,n),new(H())):new(H())}})(),dispose(){de.prototype.dispose.call(this),u().prototype.dispose.call(this)}}),Object.defineProperties(ue,{...c().getStaticProperties("GeoCoordinate","Geospatial",1,"coord","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().initializeOnly,"geoOrigin",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().inputOutput,"point",new(s().MFVec3d))]),enumerable:!0}});const ge=ue,_e=O().add("GeoCoordinate",ge),we=e.X3DGeometryNode;var Oe=t.n(we);const ye=e.Vector2;var Se=t.n(ye);function fe(e){Oe().call(this,e),de.call(this,e),this.addType(_().GeoElevationGrid),this._set_height.setUnit("length"),this._creaseAngle.setUnit("angle"),this._height.setUnit("length")}Object.assign(Object.setPrototypeOf(fe.prototype,Oe().prototype),de.prototype,{initialize(){Oe().prototype.initialize.call(this),de.prototype.initialize.call(this),this._set_height.addFieldInterest(this._height),this._color.addInterest("set_color__",this),this._texCoord.addInterest("set_texCoord__",this),this._tangent.addInterest("set_tangent__",this),this._normal.addInterest("set_normal__",this),this.set_color__(),this.set_texCoord__(),this.set_tangent__(),this.set_normal__()},getHeight(e){return e<this._height.length?this._height[e]*this._yScale.getValue():0},createTexCoords(){const e=[],t=this._xDimension.getValue(),i=this._zDimension.getValue(),n=t-1,o=i-1;for(let s=0;s<i;++s)for(let i=0;i<t;++i)e.push(new(Se())(i/n,s/o));return e},createNormals(e,t,i){const n=t.length,o=!this._ccw.getValue(),s=new Map,r=[];for(let t=0;t<e.length;++t)s.set(t,[]);for(let i=0;i<n;i+=3){const n=t[i],a=t[i+1],h=t[i+2];s.get(n).push(r.length),s.get(a).push(r.length+1),s.get(h).push(r.length+2);const l=pe().normal(e[n],e[a],e[h],new(H()));o&&l.negate(),r.push(l),r.push(l),r.push(l)}return this._normalPerVertex.getValue()?this.refineNormals(s,r,i??this._creaseAngle.getValue()):r},createCoordIndex(){const e=[],t=this._xDimension.getValue(),i=t-1,n=this._zDimension.getValue()-1;for(let o=0;o<n;++o)for(let n=0;n<i;++n){const i=o*t+n,s=(o+1)*t+n,r=(o+1)*t+(n+1),a=o*t+(n+1);e.push(i),e.push(r),e.push(s),e.push(i),e.push(a),e.push(r)}return e},createPoints(){const e=[],t=this._xDimension.getValue(),i=this._zDimension.getValue(),n=this._xSpacing.getValue(),o=this._zSpacing.getValue();if(this.getStandardOrder())for(let s=0;s<i;++s)for(let i=0;i<t;++i){const r=new(H())(o*s,n*i,this.getHeight(i+s*t));r.add(this._geoGridOrigin.getValue()),e.push(this.getCoord(r,r))}else for(let s=0;s<i;++s)for(let i=0;i<t;++i){const r=new(H())(n*i,o*s,this.getHeight(i+s*t));r.add(this._geoGridOrigin.getValue()),e.push(this.getCoord(r,r))}return e},build(){if(this._xDimension.getValue()<2||this._zDimension.getValue()<2)return;const e=this._colorPerVertex.getValue(),t=this._normalPerVertex.getValue(),i=this.createCoordIndex(),n=this.getColor(),o=this.getTexCoord(),s=this.getTangent(),r=this.getNormal(),a=this.createPoints(),h=this.getColors(),l=this.getMultiTexCoords(),d=this.getTangents(),c=this.getNormals(),p=this.getVertices(),u=i.length;let g,_;o?o.init(l):(g=this.createTexCoords(),_=this.getTexCoords(),l.push(_));let w=0;for(let O=0;O<u;++w)for(let u=0;u<6;++u,++O){const u=i[O],{x:y,y:S,z:f}=a[u];if(n?.addColor(e?u:w,h),o)o.addPoint(u,l);else{const{x:e,y:t}=g[u];_.push(e,t,0,1)}s?.addVector(t?u:w,d),r?.addVector(t?u:w,c),p.push(y,S,f,1)}if(!r){const e=this.createNormals(a,i);for(const{x:t,y:i,z:n}of e)c.push(t,i,n)}this.setSolid(this._solid.getValue()),this.setCCW(this._ccw.getValue())},dispose(){de.prototype.dispose.call(this),Oe().prototype.dispose.call(this)}}),Object.defineProperties(fe,{...c().getStaticProperties("GeoElevationGrid","Geospatial",1,"geometry","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().initializeOnly,"geoOrigin",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().inputOnly,"set_height",new(s().MFDouble)),new(a())(_().initializeOnly,"geoGridOrigin",new(s().SFVec3d)),new(a())(_().initializeOnly,"xDimension",new(s().SFInt32)),new(a())(_().initializeOnly,"zDimension",new(s().SFInt32)),new(a())(_().initializeOnly,"xSpacing",new(s().SFDouble)(1)),new(a())(_().initializeOnly,"zSpacing",new(s().SFDouble)(1)),new(a())(_().inputOutput,"yScale",new(s().SFFloat)(1)),new(a())(_().initializeOnly,"solid",new(s().SFBool)(!0)),new(a())(_().initializeOnly,"ccw",new(s().SFBool)(!0)),new(a())(_().initializeOnly,"creaseAngle",new(s().SFDouble)),new(a())(_().initializeOnly,"colorPerVertex",new(s().SFBool)(!0)),new(a())(_().initializeOnly,"normalPerVertex",new(s().SFBool)(!0)),new(a())(_().inputOutput,"color",new(s().SFNode)),new(a())(_().inputOutput,"texCoord",new(s().SFNode)),new(a())(_().inputOutput,"tangent",new(s().SFNode)),new(a())(_().inputOutput,"normal",new(s().SFNode)),new(a())(_().initializeOnly,"height",new(s().MFDouble)(0,0))]),enumerable:!0}});const me=fe,Fe=O().add("GeoElevationGrid",me),Ne=e.X3DChildNode;var be=t.n(Ne);const ve=e.X3DBoundedObject;var xe=t.n(ve);const Me=e.TraverseType;var Ie=t.n(Me);const Ve=e.Group;var ze=t.n(Ve);const Ce=e.Inline;var je=t.n(Ce);function Pe(e){be().call(this,e),xe().call(this,e),de.call(this,e),this.addType(_().GeoLOD),this.setVisibleObject(!0),this._range.setUnit("length"),this.unload=!1,this.rootGroupNode=new(ze())(this.getBrowser().getPrivateScene()),this.rootInlineNode=new(je())(e),this.child1InlineNode=new(je())(e),this.child2InlineNode=new(je())(e),this.child3InlineNode=new(je())(e),this.child4InlineNode=new(je())(e),this.childInlineNodes=[this.child1InlineNode,this.child2InlineNode,this.child3InlineNode,this.child4InlineNode],this.childrenLoaded=!1,this.keepCurrentLevel=!1}Object.assign(Object.setPrototypeOf(Pe.prototype,be().prototype),xe().prototype,de.prototype,{initialize(){be().prototype.initialize.call(this),xe().prototype.initialize.call(this),de.prototype.initialize.call(this),this._rootNode.addFieldInterest(this.rootGroupNode._children),this.rootGroupNode._children=this._rootNode,this.rootGroupNode.setPrivate(!0),this.rootInlineNode._loadState.addInterest("set_rootLoadState__",this);for(const e of this.childInlineNodes)e._loadState.addInterest("set_childLoadState__",this);this._rootUrl.addFieldInterest(this.rootInlineNode._url),this._child1Url.addFieldInterest(this.child1InlineNode._url),this._child2Url.addFieldInterest(this.child2InlineNode._url),this._child3Url.addFieldInterest(this.child3InlineNode._url),this._child4Url.addFieldInterest(this.child4InlineNode._url),this.rootInlineNode._load=!0;for(const e of this.childInlineNodes)e._load=!1;this.rootInlineNode._url=this._rootUrl,this.child1InlineNode._url=this._child1Url,this.child2InlineNode._url=this._child2Url,this.child3InlineNode._url=this._child3Url,this.child4InlineNode._url=this._child4Url,this.rootInlineNode.setup();for(const e of this.childInlineNodes)e.setup()},getBBox(e,t){if(this.isDefaultBBoxSize())switch(this.childrenLoaded?this._level_changed.getValue():0){case 0:return this._rootNode.length?this.rootGroupNode.getBBox(e,t):this.rootInlineNode.getBBox(e,t);case 1:return xe().prototype.getBBox.call(this,this.childInlineNodes,e,t)}return e.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},getShapes(e,t){switch(this.childrenLoaded?this._level_changed.getValue():0){case 0:return this._rootNode.length?this.rootGroupNode.getShapes(e,t):this.rootInlineNode.getShapes(e,t);case 1:for(const i of this.childInlineNodes)i.getShapes(e,t);return e}},set_rootLoadState__(){0===this._level_changed.getValue()&&(this._rootNode.length||this.rootInlineNode.checkLoadState()===_().COMPLETE_STATE&&(this.childrenLoaded=!1,this._children=this.rootInlineNode.getInternalScene().getRootNodes()))},set_childLoadState__(){if(1!==this._level_changed.getValue())return;4===this.childInlineNodes.reduce((e,t)=>e+(t.checkLoadState()===_().COMPLETE_STATE||t.checkLoadState()===_().FAILED_STATE),0)&&(this.childrenLoaded=!0,this._children=this.childInlineNodes.flatMap(e=>Array.from(e.getInternalScene().getRootNodes())))},set_childBoundedObject__(){this.setBoundedObject(this.childInlineNodes.some(e=>e.isBoundedObject()))},set_childPointingObject__(){this.setPointingObject(this.childInlineNodes.some(e=>e.isPointingObject()))},set_childCameraObject__(){this.setCameraObject(this.childInlineNodes.some(e=>e.isCameraObject()))},set_childPickableObject__(){this.setPickableObject(this.childInlineNodes.some(e=>e.isPickableObject()))},set_childCollisionObject__(){this.setCollisionObject(this.childInlineNodes.some(e=>e.isCollisionObject()))},set_childShadowObject__(){this.setShadowObject(this.childInlineNodes.some(e=>e.isShadowObject()))},getLevel:(()=>{const e=new(H());return function(t){t.translate(this.getCoord(this._center.getValue(),e));return t.origin.norm()<this._range.getValue()?1:0}})(),changeLevel:(()=>{const e=new($());return function(t){const i=this.getLevel(e.assign(t.getModelViewMatrix().get()));if(i!==this._level_changed.getValue())switch(this._level_changed=i,i){case 0:for(const e of this.childInlineNodes)e._isBoundedObject.removeInterest("set_childBoundedObject__",this),e._isPointingObject.removeInterest("set_childPointingObject__",this),e._isCameraObject.removeInterest("set_childCameraObject__",this),e._isPickableObject.removeInterest("set_childPickableObject__",this),e._isCollisionObject.removeInterest("set_childCollisionObject__",this),e._isShadowObject.removeInterest("set_childShadowObject__",this);if(this._rootNode.length?(this.connectChildNode(this.rootGroupNode,[Ie().DISPLAY]),this._children=this._rootNode,this.childrenLoaded=!1):this.rootInlineNode.checkLoadState()==_().COMPLETE_STATE&&(this.connectChildNode(this.rootInlineNode,[Ie().DISPLAY]),this._children=this.rootInlineNode.getInternalScene().getRootNodes(),this.childrenLoaded=!1),this.unload)for(const e of this.childInlineNodes)e._load=!1;break;case 1:this._rootNode.length?this.disconnectChildNode(this.rootGroupNode):this.disconnectChildNode(this.rootInlineNode);for(const e of this.childInlineNodes)e._isBoundedObject.addInterest("set_childBoundedObject__",this),e._isPointingObject.addInterest("set_childPointingObject__",this),e._isCameraObject.addInterest("set_childCameraObject__",this),e._isPickableObject.addInterest("set_childPickableObject__",this),e._isCollisionObject.addInterest("set_childCollisionObject__",this),e._isShadowObject.addInterest("set_childShadowObject__",this);if(this.set_childBoundedObject__(),this.set_childPointingObject__(),this.set_childCameraObject__(),this.set_childPickableObject__(),this.set_childCollisionObject__(),this.set_childShadowObject__(),this.child1InlineNode._load.getValue())this.set_childLoadState__();else for(const e of this.childInlineNodes)e._load=!0}}})(),traverse(e,t){switch(e===Ie().DISPLAY&&this.changeLevel(t),this.childrenLoaded?this._level_changed.getValue():0){case 0:this._rootNode.length?this.rootGroupNode.traverse(e,t):this.rootInlineNode.traverse(e,t);break;case 1:for(const i of this.childInlineNodes)i.traverse(e,t)}},dispose(){de.prototype.dispose.call(this),xe().prototype.dispose.call(this),be().prototype.dispose.call(this)}}),Object.defineProperties(Pe,{...c().getStaticProperties("GeoLOD","Geospatial",1,"children","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().initializeOnly,"geoOrigin",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().initializeOnly,"rootUrl",new(s().MFString)),new(a())(_().initializeOnly,"child1Url",new(s().MFString)),new(a())(_().initializeOnly,"child2Url",new(s().MFString)),new(a())(_().initializeOnly,"child3Url",new(s().MFString)),new(a())(_().initializeOnly,"child4Url",new(s().MFString)),new(a())(_().initializeOnly,"center",new(s().SFVec3d)),new(a())(_().initializeOnly,"range",new(s().SFFloat)(10)),new(a())(_().outputOnly,"level_changed",new(s().SFInt32)(-1)),new(a())(_().inputOutput,"visible",new(s().SFBool)(!0)),new(a())(_().inputOutput,"bboxDisplay",new(s().SFBool)),new(a())(_().initializeOnly,"bboxSize",new(s().SFVec3f)(-1,-1,-1)),new(a())(_().initializeOnly,"bboxCenter",new(s().SFVec3f)),new(a())(_().initializeOnly,"rootNode",new(s().MFNode)),new(a())(_().outputOnly,"children",new(s().MFNode))]),enumerable:!0}});const Ge=Pe,De=O().add("GeoLOD",Ge),Ee=e.X3DTransformMatrix3DNode;var Te=t.n(Ee);function Ae(e){Te().call(this,e),de.call(this,e),this.addType(_().GeoLocation)}Object.assign(Object.setPrototypeOf(Ae.prototype,Te().prototype),de.prototype,{initialize(){Te().prototype.initialize.call(this),de.prototype.initialize.call(this),this.addInterest("eventsProcessed",this),this.eventsProcessed()},eventsProcessed:(()=>{const e=new($());return function(){this.setMatrix(this.getLocationMatrix(this._geoCoords.getValue(),e))}})(),dispose(){de.prototype.dispose.call(this),Te().prototype.dispose.call(this)}}),Object.defineProperties(Ae,{...c().getStaticProperties("GeoLocation","Geospatial",1,"children","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().initializeOnly,"geoOrigin",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().inputOutput,"geoCoords",new(s().SFVec3d)),new(a())(_().inputOutput,"visible",new(s().SFBool)(!0)),new(a())(_().inputOutput,"bboxDisplay",new(s().SFBool)),new(a())(_().initializeOnly,"bboxSize",new(s().SFVec3f)(-1,-1,-1)),new(a())(_().initializeOnly,"bboxCenter",new(s().SFVec3f)),new(a())(_().inputOnly,"addChildren",new(s().MFNode)),new(a())(_().inputOnly,"removeChildren",new(s().MFNode)),new(a())(_().inputOutput,"children",new(s().MFNode))]),enumerable:!0}});const Le=Ae,Ue=O().add("GeoLocation",Le),Be=e.X3DInfoNode;var Re=t.n(Be);const ke=e.X3DUrlObject;var Xe=t.n(ke);function We(e){Re().call(this,e),Xe().call(this,e),this.addType(_().GeoMetadata)}Object.assign(Object.setPrototypeOf(We.prototype,Re().prototype),Xe().prototype,{initialize(){Re().prototype.initialize.call(this),Xe().prototype.initialize.call(this)},async requestImmediateLoad(e=!0){},dispose(){Xe().prototype.dispose.call(this),Re().prototype.dispose.call(this)}}),Object.defineProperties(We,{...c().getStaticProperties("GeoMetadata","Geospatial",1,"children","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().inputOutput,"description",new(s().SFString)),new(a())(_().inputOutput,"load",new(s().SFBool)(!0)),new(a())(_().inputOutput,"url",new(s().MFString)),new(a())(_().inputOutput,"autoRefresh",new(s().SFTime)(0)),new(a())(_().inputOutput,"autoRefreshTimeLimit",new(s().SFTime)(3600)),new(a())(_().inputOutput,"summary",new(s().MFString)),new(a())(_().inputOutput,"data",new(s().MFNode))]),enumerable:!0}});const Ye=We,qe=O().add("GeoMetadata",Ye);function He(e){c().call(this,e),this.addType(_().GeoOrigin),this.radians=!1}Object.assign(Object.setPrototypeOf(He.prototype,c().prototype),{initialize(){c().prototype.initialize.call(this),this._geoSystem.addInterest("set_geoSystem__",this),this.set_geoSystem__()},set_geoSystem__(){this.referenceFrame=X.getReferenceFrame(this._geoSystem,this.radians)},getOrigin(e){return this.referenceFrame.convert(this._geoCoords.getValue(),e)}}),Object.defineProperties(He,{...c().getStaticProperties("GeoOrigin","Geospatial",1,"geoOrigin","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().inputOutput,"geoCoords",new(s().SFVec3d)),new(a())(_().initializeOnly,"rotateYUp",new(s().SFBool))]),enumerable:!0}});const Ze=He,$e=O().add("GeoOrigin",Ze),Je=e.X3DInterpolatorNode;var Ke=t.n(Je);function Qe(e){Ke().call(this,e),de.call(this,e),this.addType(_().GeoPositionInterpolator),this._value_changed.setUnit("length"),this.geocentric=new E}Object.assign(Object.setPrototypeOf(Qe.prototype,Ke().prototype),de.prototype,{setup(){de.prototype.initialize.call(this),Ke().prototype.setup.call(this)},initialize(){Ke().prototype.initialize.call(this),this._keyValue.addInterest("set_keyValue__",this)},set_keyValue__(){const e=this._key,t=this._keyValue;t.length<e.length&&t.resize(e.length,t.length?t[t.length-1]:new(s().SFVec3f))},interpolate:(()=>{const e=new(H()),t=new(H()),i=new(H());return function(n,o,s){this.getCoord(this._keyValue[n].getValue(),e),this.getCoord(this._keyValue[o].getValue(),t);const r=this.geocentric.slerp(e,t,s);this._geovalue_changed=this.getGeoCoord(r,i),this._value_changed=r}})(),dispose(){de.prototype.dispose.call(this),Ke().prototype.dispose.call(this)}}),Object.defineProperties(Qe,{...c().getStaticProperties("GeoPositionInterpolator","Geospatial",1,"children","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().initializeOnly,"geoOrigin",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().inputOnly,"set_fraction",new(s().SFFloat)),new(a())(_().inputOutput,"key",new(s().MFFloat)),new(a())(_().inputOutput,"keyValue",new(s().MFVec3d)),new(a())(_().outputOnly,"value_changed",new(s().SFVec3f)),new(a())(_().outputOnly,"geovalue_changed",new(s().SFVec3d))]),enumerable:!0}});const et=Qe,tt=O().add("GeoPositionInterpolator",et),it=e.X3DEnvironmentalSensorNode;var nt=t.n(it);const ot=e.ProximitySensor;var st=t.n(ot);function rt(e){nt().call(this,e),de.call(this,e),this.addType(_().GeoProximitySensor),this._position_changed.setUnit("length"),this._centerOfRotation_changed.setUnit("length"),this.proximitySensor=new(st())(e)}Object.assign(Object.setPrototypeOf(rt.prototype,nt().prototype),de.prototype,{initialize(){nt().prototype.initialize.call(this),de.prototype.initialize.call(this),this._enabled.addFieldInterest(this.proximitySensor._enabled),this._size.addFieldInterest(this.proximitySensor._size),this._center.addFieldInterest(this.proximitySensor._center),this._geoCenter.addFieldInterest(this._center),this.proximitySensor._isActive.addFieldInterest(this._isActive),this.proximitySensor._enterTime.addFieldInterest(this._enterTime),this.proximitySensor._exitTime.addFieldInterest(this._exitTime),this.proximitySensor._position_changed.addFieldInterest(this._position_changed),this.proximitySensor._orientation_changed.addFieldInterest(this._orientation_changed),this.proximitySensor._centerOfRotation_changed.addFieldInterest(this._centerOfRotation_changed),this.proximitySensor._position_changed.addInterest("set_position__",this),this.proximitySensor._enabled=this._enabled,this.proximitySensor._size=this._size,this.proximitySensor._center=this._center,this.proximitySensor.setup(),this.connectChildNode(this.proximitySensor)},set_position__:(()=>{const e=new(H());return function(){this._geoCoord_changed=this.getGeoCoord(this.proximitySensor._position_changed.getValue(),e)}})(),traverse(e,t){this.proximitySensor.traverse(e,t)},dispose(){de.prototype.dispose.call(this),nt().prototype.dispose.call(this)}}),Object.defineProperties(rt,{...c().getStaticProperties("GeoProximitySensor","Geospatial",2,"children","3.2"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().inputOutput,"description",new(s().SFString)),new(a())(_().initializeOnly,"geoOrigin",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().inputOutput,"enabled",new(s().SFBool)(!0)),new(a())(_().inputOutput,"size",new(s().SFVec3f)),new(a())(_().inputOutput,"center",new(s().SFVec3d)),new(a())(_().inputOutput,"geoCenter",new(s().SFVec3d)),new(a())(_().outputOnly,"isActive",new(s().SFBool)),new(a())(_().outputOnly,"enterTime",new(s().SFTime)),new(a())(_().outputOnly,"exitTime",new(s().SFTime)),new(a())(_().outputOnly,"geoCoord_changed",new(s().SFVec3d)),new(a())(_().outputOnly,"position_changed",new(s().SFVec3f)),new(a())(_().outputOnly,"orientation_changed",new(s().SFRotation)),new(a())(_().outputOnly,"centerOfRotation_changed",new(s().SFVec3f))]),enumerable:!0}});const at=rt,ht=O().add("GeoProximitySensor",at),lt=e.X3DTouchSensorNode;var dt=t.n(lt);function ct(e){dt().call(this,e),de.call(this,e),this.addType(_().GeoTouchSensor),this._hitPoint_changed.setUnit("length")}Object.assign(Object.setPrototypeOf(ct.prototype,dt().prototype),de.prototype,{initialize(){dt().prototype.initialize.call(this),de.prototype.initialize.call(this)},set_over__:(()=>{const e=new(H());return function(t,i,n,o,s){dt().prototype.set_over__.call(this,t,i,n,o,s),this._isOver.getValue()&&(this._hitGeoCoord_changed=this.getGeoCoord(this._hitPoint_changed.getValue(),e))}})(),dispose(){de.prototype.dispose.call(this),dt().prototype.dispose.call(this)}}),Object.defineProperties(ct,{...c().getStaticProperties("GeoTouchSensor","Geospatial",1,"children","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().inputOutput,"description",new(s().SFString)),new(a())(_().initializeOnly,"geoOrigin",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().inputOutput,"enabled",new(s().SFBool)(!0)),new(a())(_().outputOnly,"hitTexCoord_changed",new(s().SFVec2f)),new(a())(_().outputOnly,"hitNormal_changed",new(s().SFVec3f)),new(a())(_().outputOnly,"hitPoint_changed",new(s().SFVec3f)),new(a())(_().outputOnly,"hitGeoCoord_changed",new(s().SFVec3d)),new(a())(_().outputOnly,"isOver",new(s().SFBool)),new(a())(_().outputOnly,"isActive",new(s().SFBool)),new(a())(_().outputOnly,"touchTime",new(s().SFTime))]),enumerable:!0}});const pt=ct,ut=O().add("GeoTouchSensor",pt);function gt(e){Te().call(this,e),de.call(this,e),this.addType(_().GeoTransform),this._translation.setUnit("length")}Object.assign(Object.setPrototypeOf(gt.prototype,Te().prototype),de.prototype,{initialize(){Te().prototype.initialize.call(this),de.prototype.initialize.call(this),this.addInterest("eventsProcessed",this),this.eventsProcessed()},eventsProcessed:(()=>{const e=new($()),t=new($());return function(){this.getLocationMatrix(this._geoCenter.getValue(),t),e.set(this._translation.getValue(),this._rotation.getValue(),this._scale.getValue(),this._scaleOrientation.getValue()),this.setMatrix(e.multRight(t).multLeft(t.inverse()))}})(),dispose(){de.prototype.dispose.call(this),Te().prototype.dispose.call(this)}}),Object.defineProperties(gt,{...c().getStaticProperties("GeoTransform","Geospatial",2,"children","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().inputOutput,"translation",new(s().SFVec3f)),new(a())(_().inputOutput,"rotation",new(s().SFRotation)),new(a())(_().inputOutput,"scale",new(s().SFVec3f)(1,1,1)),new(a())(_().inputOutput,"scaleOrientation",new(s().SFRotation)),new(a())(_().initializeOnly,"geoOrigin",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().inputOutput,"geoCenter",new(s().SFVec3d)),new(a())(_().inputOutput,"visible",new(s().SFBool)(!0)),new(a())(_().inputOutput,"bboxDisplay",new(s().SFBool)),new(a())(_().initializeOnly,"bboxSize",new(s().SFVec3f)(-1,-1,-1)),new(a())(_().initializeOnly,"bboxCenter",new(s().SFVec3f)),new(a())(_().inputOnly,"addChildren",new(s().MFNode)),new(a())(_().inputOnly,"removeChildren",new(s().MFNode)),new(a())(_().inputOutput,"children",new(s().MFNode))]),enumerable:!0}});const _t=gt,wt=O().add("GeoTransform",_t),Ot=e.X3DViewpointNode;var yt=t.n(Ot);const St=e.Viewpoint;var ft=t.n(St);const mt=e.NavigationInfo;var Ft=t.n(mt);const Nt=e.Rotation4;var bt=t.n(Nt);function vt(e){yt().call(this,e),de.call(this,e),this.addType(_().GeoViewpoint),this.addChildObjects(_().inputOutput,"navType",new(s().MFString)("EXAMINE","ANY"),_().inputOutput,"headlight",new(s().SFBool)(!0)),this._centerOfRotation.setUnit("length"),this._fieldOfView.setUnit("angle"),e.getSpecificationVersion()<=3.2&&(this.addAlias("navType",this._navType),this.addAlias("headlight",this._headlight),this.traverse=xt),this.geoNavigationInfoNode=new(Ft())(e),this.projectionMatrix=new($()),this.elevation=0}function xt(e,t){yt().prototype.traverse.call(this,e,t),this.geoNavigationInfoNode.traverse(e,t)}Object.assign(Object.setPrototypeOf(vt.prototype,yt().prototype),de.prototype,{initialize(){yt().prototype.initialize.call(this),de.prototype.initialize.call(this),this._position.addInterest("set_position__",this),this._positionOffset.addInterest("set_position__",this),this._navType.addFieldInterest(this.geoNavigationInfoNode._type),this._headlight.addFieldInterest(this.geoNavigationInfoNode._headlight),this.geoNavigationInfoNode._type=this._navType,this.geoNavigationInfoNode._headlight=this._headlight,this.geoNavigationInfoNode.setup(),this.getExecutionContext().getSpecificationVersion()<=3.2&&(this._navigationInfo=this.geoNavigationInfoNode),this.set_position__()},getRelativeTransformation:ft().prototype.getRelativeTransformation,setInterpolators:ft().prototype.setInterpolators,getFieldOfView:ft().prototype.getFieldOfView,setFieldOfView:ft().prototype.setFieldOfView,getUserFieldOfView:ft().prototype.getUserFieldOfView,getScreenScale:ft().prototype.getScreenScale,getViewportSize:ft().prototype.getViewportSize,getLookAtDistance:ft().prototype.getLookAtDistance,getProjectionMatrixWithLimits:ft().prototype.getProjectionMatrixWithLimits,getLogarithmicDepthBuffer:()=>!0,getPosition:(()=>{const e=new(H());return function(){return this.getCoord(this._position.getValue(),e)}})(),setPosition:(()=>{const e=new(H());return function(t){this._position.setValue(this.getGeoCoord(t,e))}})(),set_position__:(()=>{const e=new(H());return function(){this.getCoord(this._position.getValue(),e),this.elevation=this.getGeoElevation(e.add(this._positionOffset.getValue()))}})(),getOrientation:(()=>{const e=new($()),t=new(bt());return function(){const i=this.getLocationMatrix(this._position.getValue(),e).submatrix;return t.setMatrix(i),t.multLeft(this._orientation.getValue())}})(),setOrientation:(()=>{const e=new($()),t=new(bt());return function(i){const n=this.getLocationMatrix(this._position.getValue(),e).submatrix;t.setMatrix(n),this._orientation.setValue(t.inverse().multLeft(i))}})(),getCenterOfRotation:(()=>{const e=new(H());return function(){return this.getCoord(this._centerOfRotation.getValue(),e)}})(),setCenterOfRotation:(()=>{const e=new(H());return function(t){this._centerOfRotation.setValue(this.getGeoCoord(t,e))}})(),getMaxFarValue:()=>1e9,getUpVector:(()=>{const e=new(H()),t=new(H());return function(i=!1){return!i||this.getUserPosition().norm()<65e5?(this.getCoord(this._position.getValue(),e),this.getGeoUpVector(e.add(this._positionOffset.getValue()),t)):t.assign(H().Z_AXIS)}})(),getSpeedFactor(){return(Math.max(this.elevation,0)+10)/10*this._speedFactor.getValue()},dispose(){de.prototype.dispose.call(this),yt().prototype.dispose.call(this)}}),Object.defineProperties(vt,{...c().getStaticProperties("GeoViewpoint","Geospatial",1,"children","3.0"),fieldDefinitions:{value:new(l())([new(a())(_().inputOutput,"metadata",new(s().SFNode)),new(a())(_().initializeOnly,"geoOrigin",new(s().SFNode)),new(a())(_().initializeOnly,"geoSystem",new(s().MFString)("GD","WE")),new(a())(_().inputOnly,"set_bind",new(s().SFBool)),new(a())(_().inputOutput,"description",new(s().SFString)),new(a())(_().inputOutput,"position",new(s().SFVec3d)(0,0,1e5)),new(a())(_().inputOutput,"orientation",new(s().SFRotation)),new(a())(_().inputOutput,"centerOfRotation",new(s().SFVec3d)),new(a())(_().inputOutput,"fieldOfView",new(s().SFFloat)(.785398)),new(a())(_().inputOutput,"nearDistance",new(s().SFFloat)(-1)),new(a())(_().inputOutput,"farDistance",new(s().SFFloat)(-1)),new(a())(_().inputOutput,"viewAll",new(s().SFBool)),new(a())(_().inputOutput,"jump",new(s().SFBool)(!0)),new(a())(_().inputOutput,"retainUserOffsets",new(s().SFBool)),new(a())(_().initializeOnly,"speedFactor",new(s().SFFloat)(1)),new(a())(_().outputOnly,"isBound",new(s().SFBool)),new(a())(_().outputOnly,"bindTime",new(s().SFTime)),new(a())(_().inputOutput,"navigationInfo",new(s().SFNode))]),enumerable:!0}});const Mt=vt,It=O().add("GeoViewpoint",Mt);n().add({name:"Geospatial",concreteNodes:[_e,Fe,De,Ue,qe,$e,tt,ht,ut,wt,It],abstractNodes:[de]});O().add("GeospatialComponent",undefined)})();
@@ -1,5 +1,5 @@
1
- /* X_ITE v12.2.3 */
2
- const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-12.2.3")];
1
+ /* X_ITE v12.2.4 */
2
+ const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-12.2.4")];
3
3
  /******/ (() => { // webpackBootstrap
4
4
  /******/ "use strict";
5
5
  /******/ // The require scope
@@ -1,2 +1,2 @@
1
- /* X_ITE v12.2.3 */
2
- const e=window[Symbol.for("X_ITE.X3D-12.2.3")];(()=>{var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const n=e.Components;var i=t.n(n);const s=e.Fields;var o=t.n(s);const r=e.X3DFieldDefinition;var a=t.n(r);const d=e.FieldDefinitionArray;var h=t.n(d);const c=e.X3DNode;var u=t.n(c);const l=e.X3DGeometricPropertyNode;var _=t.n(l);const p=e.X3DConstants;var m=t.n(p);const x=e.Namespace;var T=t.n(x);function g(e){_().call(this,e),this.addType(m().HAnimDisplacer),this._displacements.setUnit("length")}Object.setPrototypeOf(g.prototype,_().prototype),Object.defineProperties(g,{...u().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 w=g,f=T().add("HAnimDisplacer",w),S=e.X3DChildNode;var F=t.n(S);const N=e.Group;var E=t.n(N);const I=e.Transform;var v=t.n(I);const O=e.X3DBoundedObject;var M=t.n(O);const D=e.TraverseType;var b=t.n(D);const y=e.X3DCast;var A=t.n(y);const j=e.Matrix4;var k=t.n(j);const R=e.Algorithm;var C=t.n(R);const X=e.ShaderRegistry;var U=t.n(X);const J=T().add("Skin2.glsl",()=>"\n#if defined(X3D_SKINNING)\nin float x3d_CoordIndex;\n#if X3D_NUM_JOINT_SETS>0\nuniform sampler2D x3d_JointsTexture;\n#endif\n#if X3D_NUM_DISPLACEMENTS>0\nuniform sampler2D x3d_DisplacementsTexture;uniform sampler2D x3d_DisplacementWeightsTexture;\n#endif\n#if X3D_NUM_JOINT_SETS>0||X3D_NUM_DISPLACEMENTS>0\nuniform sampler2D x3d_JointMatricesTexture;\n#endif\n#if X3D_NUM_JOINT_SETS>0\nmat4 getJointMatrix(const in int joint){vec4 a=texelFetch(x3d_JointMatricesTexture,joint*8,0);vec4 b=texelFetch(x3d_JointMatricesTexture,joint*8+1,0);vec4 c=texelFetch(x3d_JointMatricesTexture,joint*8+2,0);vec4 d=texelFetch(x3d_JointMatricesTexture,joint*8+3,0);return mat4(a,b,c,d);}\n#if defined(X3D_NORMALS)\nmat3 getJointNormalMatrix(const in int joint){vec4 a=texelFetch(x3d_JointMatricesTexture,joint*8+4,0);vec4 b=texelFetch(x3d_JointMatricesTexture,joint*8+5,0);vec4 c=texelFetch(x3d_JointMatricesTexture,joint*8+6,0);return mat3(a.xyz,vec3(a.w,b.xy),vec3(b.zw,c.x));}\n#endif\n#endif\n#if X3D_NUM_DISPLACEMENTS>0\nmat3 getDisplacementJointMatrix(const in int joint){vec4 a=texelFetch(x3d_JointMatricesTexture,joint*8,0);vec4 b=texelFetch(x3d_JointMatricesTexture,joint*8+1,0);vec4 c=texelFetch(x3d_JointMatricesTexture,joint*8+2,0);return mat3(a.xyz,b.xyz,c.xyz);}\n#endif\n#if defined(X3D_NORMALS)\nvec3 skinNormal=vec3(0);\n#if defined(X3D_TANGENTS)\nvec3 skinTangent=vec3(0);\n#endif\n#define getSkinNormal(normal)(skinNormal)\n#if defined(X3D_TANGENTS)\n#define getSkinTangent(tangent)(skinTangent)\n#endif\n#else\n#define getSkinNormal(normal)(normal)\n#define getSkinTangent(tangent)(tangent)\n#endif\nvec4 getSkinVertex(const in vec4 vertex,const in vec3 normal,const in vec3 tangent){int coordIndex=int(x3d_CoordIndex);vec4 skin=vertex;\n#if defined(X3D_NORMALS)\nskinNormal=normal;\n#if defined(X3D_TANGENTS)\nskinTangent=tangent;\n#endif\n#endif\n#if X3D_NUM_DISPLACEMENTS>0\n{int coordIndexD=coordIndex*(X3D_NUM_DISPLACEMENTS*2);for(int i=0;i<X3D_NUM_DISPLACEMENTS;++i){int index=coordIndexD+i*2;vec4 displacement=texelFetch(x3d_DisplacementsTexture,index,0);int weightIndex=int(texelFetch(x3d_DisplacementsTexture,index+1,0).x);float weight=texelFetch(x3d_DisplacementWeightsTexture,weightIndex,0).x;skin.xyz+=getDisplacementJointMatrix(int(displacement.w))*(displacement.xyz*weight);}}\n#endif\n#if X3D_NUM_JOINT_SETS>0\n{int coordIndexJ=coordIndex*(X3D_NUM_JOINT_SETS*2);for(int i=0;i<X3D_NUM_JOINT_SETS;++i){int index=coordIndexJ+i;ivec4 joints=ivec4(texelFetch(x3d_JointsTexture,index,0));vec4 weights=texelFetch(x3d_JointsTexture,index+X3D_NUM_JOINT_SETS,0);for(int i=0;i<4;++i){int joint=joints[i];float weight=weights[i];skin+=(getJointMatrix(joint)*vertex-vertex)*weight;\n#if defined(X3D_NORMALS)\nmat3 jointNormalMatrix=getJointNormalMatrix(joint);skinNormal+=(jointNormalMatrix*normal-normal)*weight;\n#if defined(X3D_TANGENTS)\nskinTangent+=(jointNormalMatrix*tangent-tangent)*weight;\n#endif\n#endif\n}}}\n#endif\nreturn skin;}\n#endif\n");function W(e){F().call(this,e),M().call(this,e),this.addType(m().HAnimHumanoid),this.addChildObjects(m().outputOnly,"jointName",new(o().SFTime),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"),e.getSpecificationVersion()<=3.3&&(this._version=""),this.skeletonNode=new(E())(e),this.viewpointsNode=new(E())(e),this.skinNode=new B(e,this),this.transformNode=new(v())(e),this.motionNodes=[],this.jointNodes=[],this.jointBindingMatrices=[],this.displacementWeights=[],this.numJoints=0,this.numDisplacements=0,this.update=new V,this.skinning=Function.prototype}U().addInclude("Skin",J),Object.assign(Object.setPrototypeOf(W.prototype,F().prototype),M().prototype,{initialize(){F().prototype.initialize.call(this),M().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._bboxSize.addFieldInterest(this.transformNode._bboxSize),this._bboxCenter.addFieldInterest(this.transformNode._bboxCenter),this.transformNode._translation=this._translation,this.transformNode._rotation=this._rotation,this.transformNode._scale=this._scale,this.transformNode._scaleOrientation=this._scaleOrientation,this.transformNode._center=this._center,this.transformNode._bboxSize=this._bboxSize,this.transformNode._bboxCenter=this._bboxCenter,this.transformNode._children=[this.skeletonNode,this.viewpointsNode,this.skinNode],this.skeletonNode.setup(),this.viewpointsNode.setup(),this.skinNode.setup(),this.transformNode.setup(),this.connectChildNode(this.transformNode);const e=this.getBrowser().getContext();this.jointsTexture=e.createTexture(),this.displacementsTexture=e.createTexture(),this.displacementWeightsTexture=e.createTexture(),this.jointMatricesTexture=e.createTexture();for(const t of[this.jointsTexture,this.displacementsTexture,this.displacementWeightsTexture,this.jointMatricesTexture])e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST);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._jointName.addInterest("set_connectAllJoints__",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(e,t){return this.transformNode.getBBox(e,t)},getSubBBox(e,t){return this.transformNode.getSubBBox(e,t)},getShapes(e,t){return this.transformNode.getShapes(e,t)},getMatrix(){return this.transformNode.getMatrix()},getHAnimKey(){return this.humanoidKey},set_humanoidKey__(){this.humanoidKey=`[${this.numJoints}.${this.numDisplacements}]`},set_motions__(){const e=this._motionsEnabled,t=this.motionNodes;for(const e of t)e._joints.removeInterest("set_connectJoints__",this),e._channelsEnabled.removeInterest("set_connectJoints__",this),e._channels.removeInterest("set_connectJoints__",this),e._values.removeInterest("set_connectJoints__",this),e.disconnectJoints();t.length=0;for(const[n,i]of this._motions.entries()){if(n<e.length&&!e[n])continue;const s=A()(m().HAnimMotion,i);s&&t.push(s)}for(const e of t)e._joints.addInterest("set_connectJoints__",this,e),e._channelsEnabled.addInterest("set_connectJoints__",this,e),e._channels.addInterest("set_connectJoints__",this,e),e._values.addInterest("set_connectJoints__",this,e),e.connectJoints(this.jointNodes)},set_connectAllJoints__(){for(const e of this.motionNodes)this.set_connectJoints__(e)},set_connectJoints__(e){e.disconnectJoints(),e.connectJoints(this.jointNodes)},set_joints__(){const e=this.jointNodes,t=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();for(const t of e)t.removeInterest("unlock",this.update),t._name.removeInterest("addEvent",this._jointName),t._skinCoordIndex.removeInterest("addEvent",this._jointTextures),t._skinCoordWeight.removeInterest("addEvent",this._jointTextures),t._displacements.removeInterest("addEvent",this._displacementsTexture),t._displacementWeights.removeInterest("addEvent",this._displacementWeightsTexture);e.length=0,t.length=0;for(const[d,h]of this._joints.entries()){const c=A()(m().HAnimJoint,h);if(!c)continue;const u=d<o?n[d].getValue():null,l=d<r?i[d].getValue():null,_=d<a?s[d].getValue():null;e.push(c),t.push((new(k())).set(u,l,_))}for(const t of e)t.addInterest("unlock",this.update),t._name.addInterest("addEvent",this._jointName),t._skinCoordIndex.addInterest("addEvent",this._jointTextures),t._skinCoordWeight.addInterest("addEvent",this._jointTextures),t._displacements.addInterest("addEvent",this._displacementsTexture),t._displacementWeights.addInterest("addEvent",this._displacementWeightsTexture);for(const t of this.motionNodes)t.connectJoints(e);const d=Math.ceil(Math.sqrt(8*e.length));this.jointMatricesArray=new Float32Array(d*d*4),this._jointTextures.addEvent(),this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},set_jointTextures__(){const e=this.skinCoordNode?._point.length||1,t=Array.from({length:e},()=>[]),n=Array.from({length:e},()=>[]);for(const[e,i]of this.jointNodes.entries()){const s=i._skinCoordWeight.getValue();for(const[o,r]of i._skinCoordIndex.entries()){const i=s[o];0!==i&&(t[r]?.push(e),n[r]?.push(i))}}const i=C().roundToMultiple(t.reduce((e,t)=>Math.max(e,t.length),0),4),s=2*i,o=Math.ceil(Math.sqrt(e*s))||1,r=new Float32Array(o*o*4);for(let o=0;o<e;++o)r.set(t[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 e=this.skinCoordNode?._point.length||1,t=Array.from({length:e},()=>[]);let n=0;this.displacementWeights.length=0;for(const[e,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())t[s]?.push(...r[i],e,n,0,0,0);++n}const i=t.reduce((e,t)=>Math.max(e,t.length),0)/8,s=8*i,o=Math.ceil(Math.sqrt(e*i*2))||1,r=new Float32Array(o*o*4);for(let n=0;n<e;++n)r.set(t[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 e=this.getBrowser().getContext(),t=this.displacementWeightsSize,n=this.displacementWeightsArray;n.set(this.displacementWeights),e.bindTexture(e.TEXTURE_2D,this.displacementWeightsTexture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA32F,t,t,0,e.RGBA,e.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(e,t){const n=t.getInvHumanoidMatrix();n.push(this.transformNode.getMatrix()),n.multRight(t.getModelViewMatrix().get()),n.inverse(),this.transformNode.traverse(e,t),this.skinning(e,t),n.pop()},skinning(e,t){if(e!==b().DISPLAY||this.update.lock())return;const n=t.getInvHumanoidMatrix().get(),i=this.jointNodes,s=i.length,o=this.jointBindingMatrices,r=this.jointMatricesArray,a=Math.ceil(Math.sqrt(8*s));for(let e=0;e<s;++e){const t=i[e],s=o[e],a=t.getModelViewMatrix().multRight(n).multLeft(s),d=a.submatrix.transpose().inverse();r.set(a,32*e+0),r.set(d,32*e+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)},getShaderOptions(e){e.push("X3D_SKINNING"),e.push("X3D_NUM_JOINT_SETS "+this.numJoints/4),e.push(`X3D_NUM_DISPLACEMENTS ${this.numDisplacements}`)},setShaderUniforms(e,t){const n=this.getBrowser(),i=n.popTextureUnit(),s=n.popTextureUnit();if(e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,this.jointsTexture),e.uniform1i(t.x3d_JointsTexture,i),e.activeTexture(e.TEXTURE0+s),e.bindTexture(e.TEXTURE_2D,this.jointMatricesTexture),e.uniform1i(t.x3d_JointMatricesTexture,s),!this.numDisplacements)return;const o=n.popTextureUnit(),r=n.popTextureUnit();e.activeTexture(e.TEXTURE0+o),e.bindTexture(e.TEXTURE_2D,this.displacementsTexture),e.uniform1i(t.x3d_DisplacementsTexture,o),e.activeTexture(e.TEXTURE0+r),e.bindTexture(e.TEXTURE_2D,this.displacementWeightsTexture),e.uniform1i(t.x3d_DisplacementWeightsTexture,r)},dispose(){M().prototype.dispose.call(this),F().prototype.dispose.call(this)}}),Object.defineProperties(W,{...u().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 B extends(E()){#e;constructor(e,t){super(e),this.#e=t}traverse(e,t){t.getHAnimNode().push(this.#e),super.traverse(e,t),t.getHAnimNode().pop()}}class V{#t=!0;unlock(){this.#t=!1}lock(){const e=this.#t;return this.#t=!0,e}}const P=W,H=T().add("HAnimHumanoid",P),z=e.X3DTransformNode;var L=t.n(z);function G(e){L().call(this,e),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),e.getSpecificationVersion()<=3.3&&this.addAllowedTypes(m().HAnimSite),this.displacerNodes=[],this.modelViewMatrix=new(k())}Object.assign(Object.setPrototypeOf(G.prototype,L().prototype),{initialize(){L().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 e=this.displacerNodes;for(const t of e)t._coordIndex.removeInterest("addEvent",this._displacements),t._displacements.removeInterest("addEvent",this._displacements),t._coordIndex.removeInterest("addEvent",this._displacementWeights),t._weight.removeInterest("addEvent",this._displacementWeights);e.length=0;for(const t of this._displacers){const n=A()(m().HAnimDisplacer,t);n&&e.push(n)}for(const t of e)t._coordIndex.addInterest("addEvent",this._displacements),t._displacements.addInterest("addEvent",this._displacements),t._coordIndex.addInterest("addEvent",this._displacementWeights),t._weight.addInterest("addEvent",this._displacementWeights);this._displacements.addEvent(),this._displacementWeights.addEvent()},traverse(e,t){const n=t.getModelViewMatrix();n.push(),n.multLeft(this.getMatrix()),e===b().DISPLAY&&this.modelViewMatrix.assign(n.get()),L().prototype.groupTraverse.call(this,e,t),n.pop()},groupTraverse(e,t){e===b().DISPLAY&&this.modelViewMatrix.assign(t.getModelViewMatrix().get()),L().prototype.groupTraverse.call(this,e,t)}}),Object.defineProperties(G,{...u().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 K=G,q=T().add("HAnimJoint",K),Y=e.TimeSensor;var $=t.n(Y);const Z=e.PositionInterpolator;var Q=t.n(Z);const ee=e.OrientationInterpolator;var te=t.n(ee);const ne=e.Vector3;var ie=t.n(ne);const se=e.Rotation4;var oe=t.n(se);function re(e){F().call(this,e),this.addType(m().HAnimMotion),this.timeSensor=new($())(this.getExecutionContext()),this.interpolators=[]}Object.assign(Object.setPrototypeOf(re.prototype,F().prototype),{initialize(){F().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(e){const t=this._channelsEnabled,n=this.joints,i=this.getJointsIndex(e);for(const[e,s]of this.interpolators.entries()){if(e<t.length&&!t[e])continue;const o=i.get(n[e]);if(o)for(const[e,t]of Object.entries(s))t._value_changed.addFieldInterest(o.getField(e))}},disconnectJoints(){for(const e of this.interpolators)for(const t of Object.values(e))Array.from(t._value_changed.getFieldInterests()).forEach(e=>t._value_changed.removeFieldInterest(e))},getJointsIndex(e){const t=new Map(e.map(e=>[e._name.getValue().trim(),e]));return t.delete("IGNORED"),t.set("HumanoidRoot",t.get("humanoid_root")),t},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),this.disconnectJoints()},set_interpolators__:(()=>{const e=["X","Y","Z"];return function(){const t=this.timeSensor;Array.from(t._fraction_changed.getFieldInterests()).forEach(e=>t._fraction_changed.removeFieldInterest(e));const n=this._channels.getValue().replace(/^[\s,\d]+|[\s,\d]+$/gs,"").split(/[\s,]+\d+[\s,]+/s).map(e=>e.split(/[\s,]+/s)),i=this._values,s=n.reduce((e,t)=>e+t.length,0),o=Math.floor(s?i.length/s:0),r=Array.from({length:n.length},()=>({})),a=new(ie()),d=new(oe()),h=new(ie());this.interpolators=r;for(let s=0,c=0;s<o;++s){const u=s/(o-1);for(const[s,o]of n.entries()){let n,l,_=0,p=0,m=0,x=0,T=0,g=0,w="",f=1,S=1,F=1;for(const e of o)switch(e){case"Xposition":n=!0,_=i[c++];break;case"Yposition":n=!0,p=i[c++];break;case"Zposition":n=!0,m=i[c++];break;case"Xrotation":w+="X",x=C().radians(i[c++]);break;case"Yrotation":w+="Y",T=C().radians(i[c++]);break;case"Zrotation":w+="Z",g=C().radians(i[c++]);break;case"Xscale":l=!0,f=i[c++];break;case"Yscale":l=!0,S=i[c++];break;case"Zscale":l=!0,F=i[c++];break;default:c++}if(n){const e=r[s].translation??=(()=>{const e=new(Q())(this.getExecutionContext());return t._fraction_changed.addFieldInterest(e._set_fraction),e})();e._key.push(u),e._keyValue.push(a.set(_,p,m))}if(w.length){const n=r[s].rotation??=(()=>{const e=new(te())(this.getExecutionContext());return t._fraction_changed.addFieldInterest(e._set_fraction),e})();if(3!==w.length)if(w.length<3)for(const t of e)w.includes(t)||(w+=t);else w=w.slice(0,3);n._key.push(u),n._keyValue.push(d.setEuler(x,T,g,w))}if(l){const e=r[s].scale??=(()=>{const e=new(Q())(this.getExecutionContext());return t._fraction_changed.addFieldInterest(e._set_fraction),e})();e._key.push(u),e._keyValue.push(h.set(f,S,F))}}}for(const e of r)for(const t of Object.values(e))t.setup();this._frameIndex=0,this._startFrame=0,this._endFrame=o-1,this._frameCount=o,this.set_frameDuration__()}})(),set_next_or_previous__(e,t){if(!t.getValue())return;const n=this.getFraction(),i=this._frameCount.getValue(),s=this._frameIncrement.getValue(),o=(i>1?Math.floor(n*(i-1)):0)+s*e;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 e=this._frameCount.getValue(),t=C().clamp(this._frameIndex.getValue(),0,e),n=e>1?t/(e-1):0;if(this.timeSensor._range[0]=n,!this.timeSensor._isActive.getValue())for(const e of this.timeSensor._fraction_changed.getFieldInterests())e.setValue(n)},set_frameDuration__(){const e=this._frameCount.getValue(),t=Math.max(this._frameDuration.getValue(),0);this.timeSensor._cycleInterval=e>1?(e-1)*t:0},set_frameIncrement__(){this.timeSensor._enabled=this._frameIncrement.getValue()},set_start_or_endFrame__(){const e=this._frameCount.getValue(),t=C().clamp(this._startFrame.getValue(),0,e),n=C().clamp(this._endFrame.getValue(),0,e);this.startFrame=Math.min(t,n),this.endFrame=Math.max(t,n),this.timeSensor._range[1]=e>1?this.startFrame/(e-1):0,this.timeSensor._range[2]=e>1?this.endFrame/(e-1):0},getFraction(){for(const e of this.timeSensor._fraction_changed.getFieldInterests())return e.getValue();return 0}}),Object.defineProperties(re,{...u().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,"loa",new(o().SFInt32)(-1)),new(a())(m().inputOutput,"enabled",new(o().SFBool)(!0)),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 ae=re,de=T().add("HAnimMotion",ae),he=e.X3DGroupingNode;var ce=t.n(he);function ue(e){ce().call(this,e),this.addType(m().HAnimSegment),this.addChildObjects(m().outputOnly,"displacementsTexture",new(o().SFTime),m().outputOnly,"displacementWeightsTexture",new(o().SFTime)),this._mass.setUnit("mass");const t=Math.ceil(Math.sqrt(8));this.numJoints=0,this.numDisplacements=0,this.displacerNodes=[],this.displacementWeights=[],this.jointMatricesArray=new Float32Array(t*t*4)}Object.assign(Object.setPrototypeOf(ue.prototype,ce().prototype),{initialize(){ce().prototype.initialize.call(this);const e=this.getBrowser().getContext();this.displacementsTexture=e.createTexture(),this.displacementWeightsTexture=e.createTexture(),this.jointMatricesTexture=e.createTexture();for(const t of[this.displacementsTexture,this.displacementWeightsTexture,this.jointMatricesTexture])e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST);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},set_humanoidKey__(){this.humanoidKey=`[${this.numJoints}.${this.numDisplacements}]`},set_displacers__(){const e=this.displacerNodes;for(const t of e)t._coordIndex.removeInterest("addEvent",this._displacementsTexture),t._displacements.removeInterest("addEvent",this._displacementsTexture),t._coordIndex.removeInterest("addEvent",this._displacementWeightsTexture),t._weight.removeInterest("addEvent",this._displacementWeightsTexture);e.length=0;for(const t of this._displacers){const n=A()(m().HAnimDisplacer,t);n&&e.push(n)}for(const t of e)t._coordIndex.addInterest("addEvent",this._displacementsTexture),t._displacements.addInterest("addEvent",this._displacementsTexture),t._coordIndex.addInterest("addEvent",this._displacementWeightsTexture),t._weight.addInterest("addEvent",this._displacementWeightsTexture);this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},set_displacementsTexture__(){const e=this.coordNode?._point.length||1,t=Array.from({length:e},()=>[]);let n=0;this.displacementWeights.length=0;for(const{_weight:e,_coordIndex:i,_displacements:s}of this.displacerNodes)if(i.length){this.displacementWeights.push(e,0,0,0);for(const[e,o]of i.entries())t[o]?.push(...s[e],0,n,0,0,0);++n}const i=t.reduce((e,t)=>Math.max(e,t.length),0)/8,s=8*i,o=Math.ceil(Math.sqrt(e*i*2))||1,r=new Float32Array(o*o*4);for(let n=0;n<e;++n)r.set(t[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 e=this.getBrowser().getContext(),t=this.displacementWeightsSize,n=this.displacementWeightsArray;n.set(this.displacementWeights),e.bindTexture(e.TEXTURE_2D,this.displacementWeightsTexture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA32F,t,t,0,e.RGBA,e.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(e,t){this.coordNode&&this.numDisplacements?(t.getHAnimNode().push(this),ce().prototype.traverse.call(this,e,t),this.skinning(e,t),t.getHAnimNode().pop()):ce().prototype.traverse.call(this,e,t)},skinning:(()=>{const e=new(k());return function(t,n){if(t!==b().DISPLAY)return;const i=n.getInvHumanoidMatrix().get(),s=this.jointMatricesArray,o=Math.ceil(Math.sqrt(8)),r=e.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)}})(),getShaderOptions(e){e.push("X3D_SKINNING"),e.push("X3D_NUM_JOINT_SETS "+this.numJoints/4),e.push(`X3D_NUM_DISPLACEMENTS ${this.numDisplacements}`)},setShaderUniforms(e,t){const n=this.getBrowser(),i=n.popTextureUnit(),s=n.popTextureUnit(),o=n.popTextureUnit();e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,this.jointMatricesTexture),e.uniform1i(t.x3d_JointMatricesTexture,i),e.activeTexture(e.TEXTURE0+s),e.bindTexture(e.TEXTURE_2D,this.displacementsTexture),e.uniform1i(t.x3d_DisplacementsTexture,s),e.activeTexture(e.TEXTURE0+o),e.bindTexture(e.TEXTURE_2D,this.displacementWeightsTexture),e.uniform1i(t.x3d_DisplacementWeightsTexture,o)}}),Object.defineProperties(ue,{...u().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 le=ue,_e=T().add("HAnimSegment",le);function pe(e){L().call(this,e),this.addType(m().HAnimSite)}Object.setPrototypeOf(pe.prototype,L().prototype),Object.defineProperties(pe,{...u().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 me=pe,xe=T().add("HAnimSite",me);i().add({name:"HAnim",concreteNodes:[f,H,q,de,_e,xe],abstractNodes:[]});T().add("HAnimComponent",undefined)})();
1
+ /* X_ITE v12.2.4 */
2
+ const e=window[Symbol.for("X_ITE.X3D-12.2.4")];(()=>{var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const n=e.Components;var i=t.n(n);const s=e.Fields;var o=t.n(s);const r=e.X3DFieldDefinition;var a=t.n(r);const d=e.FieldDefinitionArray;var h=t.n(d);const c=e.X3DNode;var u=t.n(c);const l=e.X3DGeometricPropertyNode;var _=t.n(l);const p=e.X3DConstants;var m=t.n(p);const x=e.Namespace;var T=t.n(x);function g(e){_().call(this,e),this.addType(m().HAnimDisplacer),this._displacements.setUnit("length")}Object.setPrototypeOf(g.prototype,_().prototype),Object.defineProperties(g,{...u().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 w=g,f=T().add("HAnimDisplacer",w),S=e.X3DChildNode;var F=t.n(S);const N=e.Group;var E=t.n(N);const I=e.Transform;var v=t.n(I);const O=e.X3DBoundedObject;var M=t.n(O);const D=e.TraverseType;var b=t.n(D);const y=e.X3DCast;var A=t.n(y);const j=e.Matrix4;var k=t.n(j);const R=e.Algorithm;var C=t.n(R);const X=e.ShaderRegistry;var U=t.n(X);const J=T().add("Skin2.glsl",()=>"\n#if defined(X3D_SKINNING)\nin float x3d_CoordIndex;\n#if X3D_NUM_JOINT_SETS>0\nuniform sampler2D x3d_JointsTexture;\n#endif\n#if X3D_NUM_DISPLACEMENTS>0\nuniform sampler2D x3d_DisplacementsTexture;uniform sampler2D x3d_DisplacementWeightsTexture;\n#endif\n#if X3D_NUM_JOINT_SETS>0||X3D_NUM_DISPLACEMENTS>0\nuniform sampler2D x3d_JointMatricesTexture;\n#endif\n#if X3D_NUM_JOINT_SETS>0\nmat4 getJointMatrix(const in int joint){vec4 a=texelFetch(x3d_JointMatricesTexture,joint*8,0);vec4 b=texelFetch(x3d_JointMatricesTexture,joint*8+1,0);vec4 c=texelFetch(x3d_JointMatricesTexture,joint*8+2,0);vec4 d=texelFetch(x3d_JointMatricesTexture,joint*8+3,0);return mat4(a,b,c,d);}\n#if defined(X3D_NORMALS)\nmat3 getJointNormalMatrix(const in int joint){vec4 a=texelFetch(x3d_JointMatricesTexture,joint*8+4,0);vec4 b=texelFetch(x3d_JointMatricesTexture,joint*8+5,0);vec4 c=texelFetch(x3d_JointMatricesTexture,joint*8+6,0);return mat3(a.xyz,vec3(a.w,b.xy),vec3(b.zw,c.x));}\n#endif\n#endif\n#if X3D_NUM_DISPLACEMENTS>0\nmat3 getDisplacementJointMatrix(const in int joint){vec4 a=texelFetch(x3d_JointMatricesTexture,joint*8,0);vec4 b=texelFetch(x3d_JointMatricesTexture,joint*8+1,0);vec4 c=texelFetch(x3d_JointMatricesTexture,joint*8+2,0);return mat3(a.xyz,b.xyz,c.xyz);}\n#endif\n#if defined(X3D_NORMALS)\nvec3 skinNormal=vec3(0);\n#if defined(X3D_TANGENTS)\nvec3 skinTangent=vec3(0);\n#endif\n#define getSkinNormal(normal)(skinNormal)\n#if defined(X3D_TANGENTS)\n#define getSkinTangent(tangent)(skinTangent)\n#endif\n#else\n#define getSkinNormal(normal)(normal)\n#define getSkinTangent(tangent)(tangent)\n#endif\nvec4 getSkinVertex(const in vec4 vertex,const in vec3 normal,const in vec3 tangent){int coordIndex=int(x3d_CoordIndex);vec4 skin=vertex;\n#if defined(X3D_NORMALS)\nskinNormal=normal;\n#if defined(X3D_TANGENTS)\nskinTangent=tangent;\n#endif\n#endif\n#if X3D_NUM_DISPLACEMENTS>0\n{int coordIndexD=coordIndex*(X3D_NUM_DISPLACEMENTS*2);for(int i=0;i<X3D_NUM_DISPLACEMENTS;++i){int index=coordIndexD+i*2;vec4 displacement=texelFetch(x3d_DisplacementsTexture,index,0);int weightIndex=int(texelFetch(x3d_DisplacementsTexture,index+1,0).x);float weight=texelFetch(x3d_DisplacementWeightsTexture,weightIndex,0).x;skin.xyz+=getDisplacementJointMatrix(int(displacement.w))*(displacement.xyz*weight);}}\n#endif\n#if X3D_NUM_JOINT_SETS>0\n{int coordIndexJ=coordIndex*(X3D_NUM_JOINT_SETS*2);for(int i=0;i<X3D_NUM_JOINT_SETS;++i){int index=coordIndexJ+i;ivec4 joints=ivec4(texelFetch(x3d_JointsTexture,index,0));vec4 weights=texelFetch(x3d_JointsTexture,index+X3D_NUM_JOINT_SETS,0);for(int i=0;i<4;++i){int joint=joints[i];float weight=weights[i];skin+=(getJointMatrix(joint)*vertex-vertex)*weight;\n#if defined(X3D_NORMALS)\nmat3 jointNormalMatrix=getJointNormalMatrix(joint);skinNormal+=(jointNormalMatrix*normal-normal)*weight;\n#if defined(X3D_TANGENTS)\nskinTangent+=(jointNormalMatrix*tangent-tangent)*weight;\n#endif\n#endif\n}}}\n#endif\nreturn skin;}\n#endif\n");function W(e){F().call(this,e),M().call(this,e),this.addType(m().HAnimHumanoid),this.addChildObjects(m().outputOnly,"jointName",new(o().SFTime),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"),e.getSpecificationVersion()<=3.3&&(this._version=""),this.skeletonNode=new(E())(e),this.viewpointsNode=new(E())(e),this.skinNode=new B(e,this),this.transformNode=new(v())(e),this.motionNodes=[],this.jointNodes=[],this.jointBindingMatrices=[],this.displacementWeights=[],this.numJoints=0,this.numDisplacements=0,this.update=new V,this.skinning=Function.prototype}U().addInclude("Skin",J),Object.assign(Object.setPrototypeOf(W.prototype,F().prototype),M().prototype,{initialize(){F().prototype.initialize.call(this),M().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._bboxSize.addFieldInterest(this.transformNode._bboxSize),this._bboxCenter.addFieldInterest(this.transformNode._bboxCenter),this.transformNode._translation=this._translation,this.transformNode._rotation=this._rotation,this.transformNode._scale=this._scale,this.transformNode._scaleOrientation=this._scaleOrientation,this.transformNode._center=this._center,this.transformNode._bboxSize=this._bboxSize,this.transformNode._bboxCenter=this._bboxCenter,this.transformNode._children=[this.skeletonNode,this.viewpointsNode,this.skinNode],this.skeletonNode.setup(),this.viewpointsNode.setup(),this.skinNode.setup(),this.transformNode.setup(),this.connectChildNode(this.transformNode);const e=this.getBrowser().getContext();this.jointsTexture=e.createTexture(),this.displacementsTexture=e.createTexture(),this.displacementWeightsTexture=e.createTexture(),this.jointMatricesTexture=e.createTexture();for(const t of[this.jointsTexture,this.displacementsTexture,this.displacementWeightsTexture,this.jointMatricesTexture])e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST);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._jointName.addInterest("set_connectAllJoints__",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(e,t){return this.transformNode.getBBox(e,t)},getSubBBox(e,t){return this.transformNode.getSubBBox(e,t)},getShapes(e,t){return this.transformNode.getShapes(e,t)},getMatrix(){return this.transformNode.getMatrix()},getHAnimKey(){return this.humanoidKey},set_humanoidKey__(){this.humanoidKey=`[${this.numJoints}.${this.numDisplacements}]`},set_motions__(){const e=this._motionsEnabled,t=this.motionNodes;for(const e of t)e._joints.removeInterest("set_connectJoints__",this),e._channelsEnabled.removeInterest("set_connectJoints__",this),e._channels.removeInterest("set_connectJoints__",this),e._values.removeInterest("set_connectJoints__",this),e.disconnectJoints();t.length=0;for(const[n,i]of this._motions.entries()){if(n<e.length&&!e[n])continue;const s=A()(m().HAnimMotion,i);s&&t.push(s)}for(const e of t)e._joints.addInterest("set_connectJoints__",this,e),e._channelsEnabled.addInterest("set_connectJoints__",this,e),e._channels.addInterest("set_connectJoints__",this,e),e._values.addInterest("set_connectJoints__",this,e),e.connectJoints(this.jointNodes)},set_connectAllJoints__(){for(const e of this.motionNodes)this.set_connectJoints__(e)},set_connectJoints__(e){e.disconnectJoints(),e.connectJoints(this.jointNodes)},set_joints__(){const e=this.jointNodes,t=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();for(const t of e)t.removeInterest("unlock",this.update),t._name.removeInterest("addEvent",this._jointName),t._skinCoordIndex.removeInterest("addEvent",this._jointTextures),t._skinCoordWeight.removeInterest("addEvent",this._jointTextures),t._displacements.removeInterest("addEvent",this._displacementsTexture),t._displacementWeights.removeInterest("addEvent",this._displacementWeightsTexture);e.length=0,t.length=0;for(const[d,h]of this._joints.entries()){const c=A()(m().HAnimJoint,h);if(!c)continue;const u=d<o?n[d].getValue():null,l=d<r?i[d].getValue():null,_=d<a?s[d].getValue():null;e.push(c),t.push((new(k())).set(u,l,_))}for(const t of e)t.addInterest("unlock",this.update),t._name.addInterest("addEvent",this._jointName),t._skinCoordIndex.addInterest("addEvent",this._jointTextures),t._skinCoordWeight.addInterest("addEvent",this._jointTextures),t._displacements.addInterest("addEvent",this._displacementsTexture),t._displacementWeights.addInterest("addEvent",this._displacementWeightsTexture);for(const t of this.motionNodes)t.connectJoints(e);const d=Math.ceil(Math.sqrt(8*e.length));this.jointMatricesArray=new Float32Array(d*d*4),this._jointTextures.addEvent(),this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},set_jointTextures__(){const e=this.skinCoordNode?._point.length||1,t=Array.from({length:e},()=>[]),n=Array.from({length:e},()=>[]);for(const[e,i]of this.jointNodes.entries()){const s=i._skinCoordWeight.getValue();for(const[o,r]of i._skinCoordIndex.entries()){const i=s[o];0!==i&&(t[r]?.push(e),n[r]?.push(i))}}const i=C().roundToMultiple(t.reduce((e,t)=>Math.max(e,t.length),0),4),s=2*i,o=Math.ceil(Math.sqrt(e*s))||1,r=new Float32Array(o*o*4);for(let o=0;o<e;++o)r.set(t[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 e=this.skinCoordNode?._point.length||1,t=Array.from({length:e},()=>[]);let n=0;this.displacementWeights.length=0;for(const[e,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())t[s]?.push(...r[i],e,n,0,0,0);++n}const i=t.reduce((e,t)=>Math.max(e,t.length),0)/8,s=8*i,o=Math.ceil(Math.sqrt(e*i*2))||1,r=new Float32Array(o*o*4);for(let n=0;n<e;++n)r.set(t[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 e=this.getBrowser().getContext(),t=this.displacementWeightsSize,n=this.displacementWeightsArray;n.set(this.displacementWeights),e.bindTexture(e.TEXTURE_2D,this.displacementWeightsTexture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA32F,t,t,0,e.RGBA,e.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(e,t){const n=t.getInvHumanoidMatrix();n.push(this.transformNode.getMatrix()),n.multRight(t.getModelViewMatrix().get()),n.inverse(),this.transformNode.traverse(e,t),this.skinning(e,t),n.pop()},skinning(e,t){if(e!==b().DISPLAY||this.update.lock())return;const n=t.getInvHumanoidMatrix().get(),i=this.jointNodes,s=i.length,o=this.jointBindingMatrices,r=this.jointMatricesArray,a=Math.ceil(Math.sqrt(8*s));for(let e=0;e<s;++e){const t=i[e],s=o[e],a=t.getModelViewMatrix().multRight(n).multLeft(s),d=a.submatrix.transpose().inverse();r.set(a,32*e+0),r.set(d,32*e+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)},getShaderOptions(e){e.push("X3D_SKINNING"),e.push("X3D_NUM_JOINT_SETS "+this.numJoints/4),e.push(`X3D_NUM_DISPLACEMENTS ${this.numDisplacements}`)},setShaderUniforms(e,t){const n=this.getBrowser(),i=n.popTextureUnit(),s=n.popTextureUnit();if(e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,this.jointsTexture),e.uniform1i(t.x3d_JointsTexture,i),e.activeTexture(e.TEXTURE0+s),e.bindTexture(e.TEXTURE_2D,this.jointMatricesTexture),e.uniform1i(t.x3d_JointMatricesTexture,s),!this.numDisplacements)return;const o=n.popTextureUnit(),r=n.popTextureUnit();e.activeTexture(e.TEXTURE0+o),e.bindTexture(e.TEXTURE_2D,this.displacementsTexture),e.uniform1i(t.x3d_DisplacementsTexture,o),e.activeTexture(e.TEXTURE0+r),e.bindTexture(e.TEXTURE_2D,this.displacementWeightsTexture),e.uniform1i(t.x3d_DisplacementWeightsTexture,r)},dispose(){M().prototype.dispose.call(this),F().prototype.dispose.call(this)}}),Object.defineProperties(W,{...u().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 B extends(E()){#e;constructor(e,t){super(e),this.#e=t}traverse(e,t){t.getHAnimNode().push(this.#e),super.traverse(e,t),t.getHAnimNode().pop()}}class V{#t=!0;unlock(){this.#t=!1}lock(){const e=this.#t;return this.#t=!0,e}}const P=W,H=T().add("HAnimHumanoid",P),z=e.X3DTransformNode;var L=t.n(z);function G(e){L().call(this,e),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),e.getSpecificationVersion()<=3.3&&this.addAllowedTypes(m().HAnimSite),this.displacerNodes=[],this.modelViewMatrix=new(k())}Object.assign(Object.setPrototypeOf(G.prototype,L().prototype),{initialize(){L().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 e=this.displacerNodes;for(const t of e)t._coordIndex.removeInterest("addEvent",this._displacements),t._displacements.removeInterest("addEvent",this._displacements),t._coordIndex.removeInterest("addEvent",this._displacementWeights),t._weight.removeInterest("addEvent",this._displacementWeights);e.length=0;for(const t of this._displacers){const n=A()(m().HAnimDisplacer,t);n&&e.push(n)}for(const t of e)t._coordIndex.addInterest("addEvent",this._displacements),t._displacements.addInterest("addEvent",this._displacements),t._coordIndex.addInterest("addEvent",this._displacementWeights),t._weight.addInterest("addEvent",this._displacementWeights);this._displacements.addEvent(),this._displacementWeights.addEvent()},traverse(e,t){const n=t.getModelViewMatrix();n.push(),n.multLeft(this.getMatrix()),e===b().DISPLAY&&this.modelViewMatrix.assign(n.get()),L().prototype.groupTraverse.call(this,e,t),n.pop()},groupTraverse(e,t){e===b().DISPLAY&&this.modelViewMatrix.assign(t.getModelViewMatrix().get()),L().prototype.groupTraverse.call(this,e,t)}}),Object.defineProperties(G,{...u().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 K=G,q=T().add("HAnimJoint",K),Y=e.TimeSensor;var $=t.n(Y);const Z=e.PositionInterpolator;var Q=t.n(Z);const ee=e.OrientationInterpolator;var te=t.n(ee);const ne=e.Vector3;var ie=t.n(ne);const se=e.Rotation4;var oe=t.n(se);function re(e){F().call(this,e),this.addType(m().HAnimMotion),this.timeSensor=new($())(this.getExecutionContext()),this.interpolators=[]}Object.assign(Object.setPrototypeOf(re.prototype,F().prototype),{initialize(){F().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(e){const t=this._channelsEnabled,n=this.joints,i=this.getJointsIndex(e);for(const[e,s]of this.interpolators.entries()){if(e<t.length&&!t[e])continue;const o=i.get(n[e]);if(o)for(const[e,t]of Object.entries(s))t._value_changed.addFieldInterest(o.getField(e))}},disconnectJoints(){for(const e of this.interpolators)for(const t of Object.values(e))Array.from(t._value_changed.getFieldInterests()).forEach(e=>t._value_changed.removeFieldInterest(e))},getJointsIndex(e){const t=new Map(e.map(e=>[e._name.getValue().trim(),e]));return t.delete("IGNORED"),t.set("HumanoidRoot",t.get("humanoid_root")),t},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),this.disconnectJoints()},set_interpolators__:(()=>{const e=["X","Y","Z"];return function(){const t=this.timeSensor;Array.from(t._fraction_changed.getFieldInterests()).forEach(e=>t._fraction_changed.removeFieldInterest(e));const n=this._channels.getValue().replace(/^[\s,\d]+|[\s,\d]+$/gs,"").split(/[\s,]+\d+[\s,]+/s).map(e=>e.split(/[\s,]+/s)),i=this._values,s=n.reduce((e,t)=>e+t.length,0),o=Math.floor(s?i.length/s:0),r=Array.from({length:n.length},()=>({})),a=new(ie()),d=new(oe()),h=new(ie());this.interpolators=r;for(let s=0,c=0;s<o;++s){const u=s/(o-1);for(const[s,o]of n.entries()){let n,l,_=0,p=0,m=0,x=0,T=0,g=0,w="",f=1,S=1,F=1;for(const e of o)switch(e){case"Xposition":n=!0,_=i[c++];break;case"Yposition":n=!0,p=i[c++];break;case"Zposition":n=!0,m=i[c++];break;case"Xrotation":w+="X",x=C().radians(i[c++]);break;case"Yrotation":w+="Y",T=C().radians(i[c++]);break;case"Zrotation":w+="Z",g=C().radians(i[c++]);break;case"Xscale":l=!0,f=i[c++];break;case"Yscale":l=!0,S=i[c++];break;case"Zscale":l=!0,F=i[c++];break;default:c++}if(n){const e=r[s].translation??=(()=>{const e=new(Q())(this.getExecutionContext());return t._fraction_changed.addFieldInterest(e._set_fraction),e})();e._key.push(u),e._keyValue.push(a.set(_,p,m))}if(w.length){const n=r[s].rotation??=(()=>{const e=new(te())(this.getExecutionContext());return t._fraction_changed.addFieldInterest(e._set_fraction),e})();if(3!==w.length)if(w.length<3)for(const t of e)w.includes(t)||(w+=t);else w=w.slice(0,3);n._key.push(u),n._keyValue.push(d.setEuler(x,T,g,w))}if(l){const e=r[s].scale??=(()=>{const e=new(Q())(this.getExecutionContext());return t._fraction_changed.addFieldInterest(e._set_fraction),e})();e._key.push(u),e._keyValue.push(h.set(f,S,F))}}}for(const e of r)for(const t of Object.values(e))t.setup();this._frameIndex=0,this._startFrame=0,this._endFrame=o-1,this._frameCount=o,this.set_frameDuration__()}})(),set_next_or_previous__(e,t){if(!t.getValue())return;const n=this.getFraction(),i=this._frameCount.getValue(),s=this._frameIncrement.getValue(),o=(i>1?Math.floor(n*(i-1)):0)+s*e;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 e=this._frameCount.getValue(),t=C().clamp(this._frameIndex.getValue(),0,e),n=e>1?t/(e-1):0;if(this.timeSensor._range[0]=n,!this.timeSensor._isActive.getValue())for(const e of this.timeSensor._fraction_changed.getFieldInterests())e.setValue(n)},set_frameDuration__(){const e=this._frameCount.getValue(),t=Math.max(this._frameDuration.getValue(),0);this.timeSensor._cycleInterval=e>1?(e-1)*t:0},set_frameIncrement__(){this.timeSensor._enabled=this._frameIncrement.getValue()},set_start_or_endFrame__(){const e=this._frameCount.getValue(),t=C().clamp(this._startFrame.getValue(),0,e),n=C().clamp(this._endFrame.getValue(),0,e);this.startFrame=Math.min(t,n),this.endFrame=Math.max(t,n),this.timeSensor._range[1]=e>1?this.startFrame/(e-1):0,this.timeSensor._range[2]=e>1?this.endFrame/(e-1):0},getFraction(){for(const e of this.timeSensor._fraction_changed.getFieldInterests())return e.getValue();return 0}}),Object.defineProperties(re,{...u().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,"loa",new(o().SFInt32)(-1)),new(a())(m().inputOutput,"enabled",new(o().SFBool)(!0)),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 ae=re,de=T().add("HAnimMotion",ae),he=e.X3DGroupingNode;var ce=t.n(he);function ue(e){ce().call(this,e),this.addType(m().HAnimSegment),this.addChildObjects(m().outputOnly,"displacementsTexture",new(o().SFTime),m().outputOnly,"displacementWeightsTexture",new(o().SFTime)),this._mass.setUnit("mass");const t=Math.ceil(Math.sqrt(8));this.numJoints=0,this.numDisplacements=0,this.displacerNodes=[],this.displacementWeights=[],this.jointMatricesArray=new Float32Array(t*t*4)}Object.assign(Object.setPrototypeOf(ue.prototype,ce().prototype),{initialize(){ce().prototype.initialize.call(this);const e=this.getBrowser().getContext();this.displacementsTexture=e.createTexture(),this.displacementWeightsTexture=e.createTexture(),this.jointMatricesTexture=e.createTexture();for(const t of[this.displacementsTexture,this.displacementWeightsTexture,this.jointMatricesTexture])e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST);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},set_humanoidKey__(){this.humanoidKey=`[${this.numJoints}.${this.numDisplacements}]`},set_displacers__(){const e=this.displacerNodes;for(const t of e)t._coordIndex.removeInterest("addEvent",this._displacementsTexture),t._displacements.removeInterest("addEvent",this._displacementsTexture),t._coordIndex.removeInterest("addEvent",this._displacementWeightsTexture),t._weight.removeInterest("addEvent",this._displacementWeightsTexture);e.length=0;for(const t of this._displacers){const n=A()(m().HAnimDisplacer,t);n&&e.push(n)}for(const t of e)t._coordIndex.addInterest("addEvent",this._displacementsTexture),t._displacements.addInterest("addEvent",this._displacementsTexture),t._coordIndex.addInterest("addEvent",this._displacementWeightsTexture),t._weight.addInterest("addEvent",this._displacementWeightsTexture);this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},set_displacementsTexture__(){const e=this.coordNode?._point.length||1,t=Array.from({length:e},()=>[]);let n=0;this.displacementWeights.length=0;for(const{_weight:e,_coordIndex:i,_displacements:s}of this.displacerNodes)if(i.length){this.displacementWeights.push(e,0,0,0);for(const[e,o]of i.entries())t[o]?.push(...s[e],0,n,0,0,0);++n}const i=t.reduce((e,t)=>Math.max(e,t.length),0)/8,s=8*i,o=Math.ceil(Math.sqrt(e*i*2))||1,r=new Float32Array(o*o*4);for(let n=0;n<e;++n)r.set(t[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 e=this.getBrowser().getContext(),t=this.displacementWeightsSize,n=this.displacementWeightsArray;n.set(this.displacementWeights),e.bindTexture(e.TEXTURE_2D,this.displacementWeightsTexture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA32F,t,t,0,e.RGBA,e.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(e,t){this.coordNode&&this.numDisplacements?(t.getHAnimNode().push(this),ce().prototype.traverse.call(this,e,t),this.skinning(e,t),t.getHAnimNode().pop()):ce().prototype.traverse.call(this,e,t)},skinning:(()=>{const e=new(k());return function(t,n){if(t!==b().DISPLAY)return;const i=n.getInvHumanoidMatrix().get(),s=this.jointMatricesArray,o=Math.ceil(Math.sqrt(8)),r=e.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)}})(),getShaderOptions(e){e.push("X3D_SKINNING"),e.push("X3D_NUM_JOINT_SETS "+this.numJoints/4),e.push(`X3D_NUM_DISPLACEMENTS ${this.numDisplacements}`)},setShaderUniforms(e,t){const n=this.getBrowser(),i=n.popTextureUnit(),s=n.popTextureUnit(),o=n.popTextureUnit();e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,this.jointMatricesTexture),e.uniform1i(t.x3d_JointMatricesTexture,i),e.activeTexture(e.TEXTURE0+s),e.bindTexture(e.TEXTURE_2D,this.displacementsTexture),e.uniform1i(t.x3d_DisplacementsTexture,s),e.activeTexture(e.TEXTURE0+o),e.bindTexture(e.TEXTURE_2D,this.displacementWeightsTexture),e.uniform1i(t.x3d_DisplacementWeightsTexture,o)}}),Object.defineProperties(ue,{...u().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 le=ue,_e=T().add("HAnimSegment",le);function pe(e){L().call(this,e),this.addType(m().HAnimSite)}Object.setPrototypeOf(pe.prototype,L().prototype),Object.defineProperties(pe,{...u().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 me=pe,xe=T().add("HAnimSite",me);i().add({name:"HAnim",concreteNodes:[f,H,q,de,_e,xe],abstractNodes:[]});T().add("HAnimComponent",undefined)})();
@@ -1,5 +1,5 @@
1
- /* X_ITE v12.2.3 */
2
- const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-12.2.3")];
1
+ /* X_ITE v12.2.4 */
2
+ const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-12.2.4")];
3
3
  /******/ (() => { // webpackBootstrap
4
4
  /******/ "use strict";
5
5
  /******/ // The require scope
@@ -1,2 +1,2 @@
1
- /* X_ITE v12.2.3 */
2
- const e=window[Symbol.for("X_ITE.X3D-12.2.3")];(()=>{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 D(e){v().call(this,e),this.addType(f().X3DKeyDeviceSensorNode)}Object.assign(Object.setPrototypeOf(D.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);for(const e of this.getBrowser().getKeyDeviceSensorNodes())e!==this&&e._enabled.getValue()&&(e._enabled=!1)},disable(){this.getBrowser().removeKeyDeviceSensorNode(this),this.release()},keydown(){},keyup(){},release(){}}),Object.defineProperties(D,S().getStaticProperties("X3DKeyDeviceSensorNode","KeyDeviceSensor",1));const P=D,O=n().add("X3DKeyDeviceSensorNode",P);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),this._isActive.getValue()&&(this._isActive=!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 A=F,T=n().add("StringSensor",A);a().add({name:"KeyDeviceSensor",concreteNodes:[m,T],abstractNodes:[O],browserContext:y});n().add("KeyDeviceSensorComponent",undefined)})();
1
+ /* X_ITE v12.2.4 */
2
+ const e=window[Symbol.for("X_ITE.X3D-12.2.4")];(()=>{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 D(e){v().call(this,e),this.addType(f().X3DKeyDeviceSensorNode)}Object.assign(Object.setPrototypeOf(D.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);for(const e of this.getBrowser().getKeyDeviceSensorNodes())e!==this&&e._enabled.getValue()&&(e._enabled=!1)},disable(){this.getBrowser().removeKeyDeviceSensorNode(this),this.release()},keydown(){},keyup(){},release(){}}),Object.defineProperties(D,S().getStaticProperties("X3DKeyDeviceSensorNode","KeyDeviceSensor",1));const P=D,O=n().add("X3DKeyDeviceSensorNode",P);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),this._isActive.getValue()&&(this._isActive=!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 A=F,T=n().add("StringSensor",A);a().add({name:"KeyDeviceSensor",concreteNodes:[m,T],abstractNodes:[O],browserContext:y});n().add("KeyDeviceSensorComponent",undefined)})();
@@ -1,5 +1,5 @@
1
- /* X_ITE v12.2.3 */
2
- const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-12.2.3")];
1
+ /* X_ITE v12.2.4 */
2
+ const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-12.2.4")];
3
3
  /******/ (() => { // webpackBootstrap
4
4
  /******/ "use strict";
5
5
  /******/ // The require scope
@@ -110,9 +110,9 @@ Object .assign (X3DLayoutContext .prototype,
110
110
  renderObject .getViewpoint () .getScreenScale (modelViewMatrix .origin, viewport, screenScale); // in meter/pixel
111
111
 
112
112
  const
113
- x = modelViewMatrix .X_AXIS .normalize () .multiply (screenScale .x * contentScale),
114
- y = modelViewMatrix .Y_AXIS .normalize () .multiply (screenScale .y * contentScale),
115
- z = modelViewMatrix .Z_AXIS .normalize () .multiply (screenScale .x * contentScale);
113
+ x = modelViewMatrix .xAxis .normalize () .multiply (screenScale .x * contentScale),
114
+ y = modelViewMatrix .yAxis .normalize () .multiply (screenScale .y * contentScale),
115
+ z = modelViewMatrix .zAxis .normalize () .multiply (screenScale .x * contentScale);
116
116
 
117
117
  screenMatrix .set (... x, 0,
118
118
  ... y, 0,
@@ -1,2 +1,2 @@
1
- /* X_ITE v12.2.3 */
2
- const t=window[Symbol.for("X_ITE.X3D-12.2.3")];(()=>{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 u=t.ViewVolume;var c=e.n(u);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(),u=s.getViewVolume().getViewport();s.getViewpoint().getScreenScale(h.origin,u,t);const d=h.X_AXIS.normalize().multiply(t.x*o),p=h.Y_AXIS.normalize().multiply(t.y*o),g=h.Z_AXIS.normalize().multiply(t.x*o);i.set(...d,0,...p,0,...g,0,h[12],h[13],h[14],1),a&&(c().projectPoint(r().ZERO,i,l,u,e),e.x=Math.round(e.x),e.y=Math.round(e.y),c().unProjectPoint(e.x,e.y,e.z,i,l,u,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 m=e.n(O);const z=t.X3DNode;var X=e.n(z);const b=t.X3DChildNode;var v=e.n(b);const F=t.X3DConstants;var N=e.n(F);function U(t){v().call(this,t),this.addType(N().X3DLayoutNode)}Object.setPrototypeOf(U.prototype,v().prototype),Object.defineProperties(U,X().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 V=E++,D=E++,I=E++,R=E++,A=E++,j=E++,k=E++,G=E++,W=E++,H=E++;function Z(t){T.call(this,t),this.addType(N().Layout),this.alignX=D,this.alignY=D,this.offsetUnitX=j,this.offsetUnitY=j,this.offsetX=0,this.offsetY=0,this.sizeUnitX=j,this.sizeUnitY=j,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(Z.prototype,T.prototype),{viewportPixel:new(L()),pixelSize:new(L()),translation:new(r()),offset:new(r()),scale:new(r())(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=V:"RIGHT"===this._align[0]?this.alignX=I:this.alignX=D:this.alignX=D,this._align.length>1?"BOTTOM"===this._align[1]?this.alignY=R:"TOP"===this._align[1]?this.alignY=A:this.alignY=D:this.alignY=D},set_offsetUnits__(){this._offsetUnits.length>0?("FRACTION"===this._offsetUnits[0]?this.offsetUnitX=k:"PIXEL"===this._offsetUnits[0]?this.offsetUnitX=G:this.offsetUnitX=j,this._offsetUnits.length>1?"FRACTION"===this._offsetUnits[1]?this.offsetUnitY=k:"PIXEL"===this._offsetUnits[1]?this.offsetUnitY=G:this.offsetUnitY=j:this.offsetUnitY=this.offsetUnitX):(this.offsetUnitX=j,this.offsetUnitY=j)},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=j,this._sizeUnits.length>1?"FRACTION"===this._sizeUnits[1]?this.sizeUnitY=k:"PIXEL"===this._sizeUnits[1]?this.sizeUnitY=G:this.sizeUnitY=j:this.sizeUnitY=this.sizeUnitX):(this.sizeUnitX=j,this.sizeUnitY=j)},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===j?this.parent?this.parent.getOffsetUnitX():k:this.offsetUnitX},getOffsetUnitY(){return this.offsetUnitY===j?this.parent?this.parent.getOffsetUnitY():k:this.offsetUnitY},getOffsetX(){return this.offsetX},getOffsetY(){return this.offsetY},getSizeUnitX(){return this.sizeUnitX===j?this.parent?this.parent.getSizeUnitX():k:this.sizeUnitX},getSizeUnitY(){return this.sizeUnitY===j?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),u=this.viewportPixel,c=this.pixelSize,d=i?i.getRectangleSize():l,p=this.rectangleSize,g=this.rectangleCenter;switch(u.set(h[2],h[3]).divide(s),c.assign(l).divVec(u),this.getSizeUnitX()){case k:p.x=this.sizeX*d.x;break;case G:p.x=this.sizeX*c.x}switch(this.getSizeUnitY()){case k:p.y=this.sizeY*d.y;break;case G:p.y=this.sizeY*c.y}const y=this.translation.set(0);switch(this.getAlignX()){case V:y.x=-(d.x-p.x)/2;break;case D:this.getSizeUnitX()===G&&1&u.x&&(y.x=-c.x/2);break;case I:y.x=(d.x-p.x)/2}switch(this.getAlignY()){case R:y.y=-(d.y-p.y)/2;break;case D:this.getSizeUnitX()===G&&1&u.y&&(y.y=-c.y/2);break;case A:y.y=(d.y-p.y)/2}const x=this.offset.set(0);switch(this.getOffsetUnitX()){case k:x.x=this.offsetX*d.x;break;case G:x.x=this.offsetX*l.x/u.x}switch(this.getOffsetUnitY()){case k:x.y=this.offsetY*d.y;break;case G:x.y=this.offsetY*l.y/u.y}const f=this.scale.set(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/u.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/u.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(Z,{...X().getStaticProperties("Layout","Layout",1,"layout","3.2"),fieldDefinitions:{value:new(m())([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 q=Z,K=p().add("Layout",q),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.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__(){},getBBox(t,e){return this.isDefaultBBoxSize()?this.getSubBBox(t,e).multRight(this.getMatrix()):t.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},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,{...X().getStaticProperties("LayoutGroup","Layout",1,"children","3.2"),fieldDefinitions:{value:new(m())([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,{...X().getStaticProperties("LayoutLayer","Layout",1,"layers","3.2"),fieldDefinitions:{value:new(m())([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,ut=p().add("LayoutLayer",lt),ct=t.X3DFontStyleNode;var dt=e.n(ct);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 mt(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(mt.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(),u=i.getScale(),c=u/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,u),x.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,f=d?1:-1,w=h[i],_=l[i];for(let i=g;i!==y;i+=f,++n){const o=r[n],h=d?i:p-i-1,l=a.x+o.x-t.x,g=a.y+o.y*_-h*w-e.y;x.save(),x.translate(l,-g),x.scale(1,_),this.drawGlyph(x,s,c[i],u),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=mt,Xt=p().add("ScreenText",zt);function bt(t){dt().call(this,t),this.addType(N().ScreenFontStyle)}Object.assign(Object.setPrototypeOf(bt.prototype,dt().prototype),{initialize(){dt().prototype.initialize.call(this),this.getBrowser().getRenderingProperties()._ContentScale.addInterest("addNodeEvent",this)},getTextGeometry(t){return new Xt(t,this)},getScale(){return this._pointSize.getValue()*this.getBrowser().getRenderingProperty("PixelsPerPoint")},getContentScale(){return this.getBrowser().getRenderingProperty("ContentScale")}}),Object.defineProperties(bt,{...X().getStaticProperties("ScreenFontStyle","Layout",2,"fontStyle","3.2"),fieldDefinitions:{value:new(m())([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 vt=bt,Ft=p().add("ScreenFontStyle",vt),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),{getBBox(t,e){return this.isDefaultBBoxSize()?this.getSubBBox(t,e).multRight(this.matrix):t.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},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,{...X().getStaticProperties("ScreenGroup","Layout",2,"children","3.2"),fieldDefinitions:{value:new(m())([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:[K,st,ut,Ft,Bt],abstractNodes:[T],browserContext:f});p().add("LayoutComponent",undefined)})();
1
+ /* X_ITE v12.2.4 */
2
+ const t=window[Symbol.for("X_ITE.X3D-12.2.4")];(()=>{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 u=t.ViewVolume;var c=e.n(u);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(),u=s.getViewVolume().getViewport();s.getViewpoint().getScreenScale(h.origin,u,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,0,...p,0,...g,0,h[12],h[13],h[14],1),a&&(c().projectPoint(r().ZERO,i,l,u,e),e.x=Math.round(e.x),e.y=Math.round(e.y),c().unProjectPoint(e.x,e.y,e.z,i,l,u,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 m=e.n(O);const z=t.X3DNode;var b=e.n(z);const X=t.X3DChildNode;var v=e.n(X);const F=t.X3DConstants;var N=e.n(F);function U(t){v().call(this,t),this.addType(N().X3DLayoutNode)}Object.setPrototypeOf(U.prototype,v().prototype),Object.defineProperties(U,b().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 V=E++,D=E++,I=E++,R=E++,A=E++,j=E++,k=E++,G=E++,W=E++,H=E++;function q(t){T.call(this,t),this.addType(N().Layout),this.alignX=D,this.alignY=D,this.offsetUnitX=j,this.offsetUnitY=j,this.offsetX=0,this.offsetY=0,this.sizeUnitX=j,this.sizeUnitY=j,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),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=V:"RIGHT"===this._align[0]?this.alignX=I:this.alignX=D:this.alignX=D,this._align.length>1?"BOTTOM"===this._align[1]?this.alignY=R:"TOP"===this._align[1]?this.alignY=A:this.alignY=D:this.alignY=D},set_offsetUnits__(){this._offsetUnits.length>0?("FRACTION"===this._offsetUnits[0]?this.offsetUnitX=k:"PIXEL"===this._offsetUnits[0]?this.offsetUnitX=G:this.offsetUnitX=j,this._offsetUnits.length>1?"FRACTION"===this._offsetUnits[1]?this.offsetUnitY=k:"PIXEL"===this._offsetUnits[1]?this.offsetUnitY=G:this.offsetUnitY=j:this.offsetUnitY=this.offsetUnitX):(this.offsetUnitX=j,this.offsetUnitY=j)},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=j,this._sizeUnits.length>1?"FRACTION"===this._sizeUnits[1]?this.sizeUnitY=k:"PIXEL"===this._sizeUnits[1]?this.sizeUnitY=G:this.sizeUnitY=j:this.sizeUnitY=this.sizeUnitX):(this.sizeUnitX=j,this.sizeUnitY=j)},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===j?this.parent?this.parent.getOffsetUnitX():k:this.offsetUnitX},getOffsetUnitY(){return this.offsetUnitY===j?this.parent?this.parent.getOffsetUnitY():k:this.offsetUnitY},getOffsetX(){return this.offsetX},getOffsetY(){return this.offsetY},getSizeUnitX(){return this.sizeUnitX===j?this.parent?this.parent.getSizeUnitX():k:this.sizeUnitX},getSizeUnitY(){return this.sizeUnitY===j?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),u=this.viewportPixel,c=this.pixelSize,d=i?i.getRectangleSize():l,p=this.rectangleSize,g=this.rectangleCenter;switch(u.set(h[2],h[3]).divide(s),c.assign(l).divVec(u),this.getSizeUnitX()){case k:p.x=this.sizeX*d.x;break;case G:p.x=this.sizeX*c.x}switch(this.getSizeUnitY()){case k:p.y=this.sizeY*d.y;break;case G:p.y=this.sizeY*c.y}const y=this.translation.set(0);switch(this.getAlignX()){case V:y.x=-(d.x-p.x)/2;break;case D:this.getSizeUnitX()===G&&1&u.x&&(y.x=-c.x/2);break;case I:y.x=(d.x-p.x)/2}switch(this.getAlignY()){case R:y.y=-(d.y-p.y)/2;break;case D:this.getSizeUnitX()===G&&1&u.y&&(y.y=-c.y/2);break;case A:y.y=(d.y-p.y)/2}const x=this.offset.set(0);switch(this.getOffsetUnitX()){case k:x.x=this.offsetX*d.x;break;case G:x.x=this.offsetX*l.x/u.x}switch(this.getOffsetUnitY()){case k:x.y=this.offsetY*d.y;break;case G:x.y=this.offsetY*l.y/u.y}const f=this.scale.set(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/u.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/u.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,{...b().getStaticProperties("Layout","Layout",1,"layout","3.2"),fieldDefinitions:{value:new(m())([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.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__(){},getBBox(t,e){return this.isDefaultBBoxSize()?this.getSubBBox(t,e).multRight(this.getMatrix()):t.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},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,{...b().getStaticProperties("LayoutGroup","Layout",1,"children","3.2"),fieldDefinitions:{value:new(m())([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,{...b().getStaticProperties("LayoutLayer","Layout",1,"layers","3.2"),fieldDefinitions:{value:new(m())([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,ut=p().add("LayoutLayer",lt),ct=t.X3DFontStyleNode;var dt=e.n(ct);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 mt(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(mt.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(),u=i.getScale(),c=u/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,u),x.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,f=d?1:-1,w=h[i],_=l[i];for(let i=g;i!==y;i+=f,++n){const o=r[n],h=d?i:p-i-1,l=a.x+o.x-t.x,g=a.y+o.y*_-h*w-e.y;x.save(),x.translate(l,-g),x.scale(1,_),this.drawGlyph(x,s,c[i],u),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=mt,bt=p().add("ScreenText",zt);function Xt(t){dt().call(this,t),this.addType(N().ScreenFontStyle)}Object.assign(Object.setPrototypeOf(Xt.prototype,dt().prototype),{initialize(){dt().prototype.initialize.call(this),this.getBrowser().getRenderingProperties()._ContentScale.addInterest("addNodeEvent",this)},getTextGeometry(t){return new bt(t,this)},getScale(){return this._pointSize.getValue()*this.getBrowser().getRenderingProperty("PixelsPerPoint")},getContentScale(){return this.getBrowser().getRenderingProperty("ContentScale")}}),Object.defineProperties(Xt,{...b().getStaticProperties("ScreenFontStyle","Layout",2,"fontStyle","3.2"),fieldDefinitions:{value:new(m())([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 vt=Xt,Ft=p().add("ScreenFontStyle",vt),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),{getBBox(t,e){return this.isDefaultBBoxSize()?this.getSubBBox(t,e).multRight(this.matrix):t.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},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,{...b().getStaticProperties("ScreenGroup","Layout",2,"children","3.2"),fieldDefinitions:{value:new(m())([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,ut,Ft,Bt],abstractNodes:[T],browserContext:f});p().add("LayoutComponent",undefined)})();
@@ -1,5 +1,5 @@
1
- /* X_ITE v12.2.3 */
2
- const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-12.2.3")];
1
+ /* X_ITE v12.2.4 */
2
+ const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-12.2.4")];
3
3
  /******/ (() => { // webpackBootstrap
4
4
  /******/ "use strict";
5
5
  /******/ // The require scope