x_ite 9.0.1 → 9.0.3
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.
- package/dist/assets/components/Annotation.js +33 -33
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +34 -34
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +113 -124
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +92 -47
- package/dist/assets/components/DIS.min.js +1 -1
- package/dist/assets/components/EventUtilities.js +34 -34
- package/dist/assets/components/EventUtilities.min.js +1 -1
- package/dist/assets/components/Geometry2D.js +45 -45
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +90 -76
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +171 -149
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +18 -16
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +44 -44
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +68 -173
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +112 -97
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +106 -102
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +214 -125
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +43 -43
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +34 -33
- package/dist/assets/components/Text.min.js +1 -1
- package/dist/assets/components/TextureProjection.js +48 -48
- package/dist/assets/components/TextureProjection.min.js +1 -1
- package/dist/assets/components/Texturing3D.js +60 -64
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +66 -66
- package/dist/assets/components/VolumeRendering.min.js +1 -1
- package/dist/assets/components/X_ITE.js +12 -12
- package/dist/assets/components/X_ITE.min.js +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +1129 -959
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.min.mjs +1 -1
- package/dist/x_ite.mjs +1129 -959
- package/dist/x_ite.zip +0 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
/* X_ITE v9.0.1 */(()=>{"use strict";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:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window[Symbol.for("X_ITE.X3D-9.0.1")].require("x_ite/Components");var i=e.n(t);const s=window[Symbol.for("X_ITE.X3D-9.0.1")].require("x_ite/Base/X3DBaseNode");var n=e.n(s);const o=window[Symbol.for("X_ITE.X3D-9.0.1")].require("x_ite/Base/X3DConstants");var r=e.n(o);const a=window[Symbol.for("X_ITE.X3D-9.0.1")].require("x_ite/Fields");var l=e.n(a);const c=window[Symbol.for("X_ITE.X3D-9.0.1")].require("x_ite/Namespace");var u=e.n(c);function h(e){n().call(this,e),this.addChildObjects(r().inputOutput,"dimension",new(l().SFInt32)(40))}Object.setPrototypeOf(h.prototype,n().prototype),Object.defineProperties(h,{typeName:{value:"Arc2DOptions",enumerable:!0}});const p=h;u().add("Arc2DOptions","x_ite/Browser/Geometry2D/Arc2DOptions",p);const d=p;function g(e){n().call(this,e),this.addChildObjects(r().inputOutput,"dimension",new(l().SFInt32)(40))}Object.setPrototypeOf(g.prototype,n().prototype),Object.defineProperties(g,{typeName:{value:"ArcClose2DOptions",enumerable:!0}});const m=g;u().add("ArcClose2DOptions","x_ite/Browser/Geometry2D/ArcClose2DOptions",m);const y=m,D=window[Symbol.for("X_ITE.X3D-9.0.1")].require("x_ite/Components/Rendering/X3DGeometryNode");var b=e.n(D);const f=window[Symbol.for("X_ITE.X3D-9.0.1")].require("standard/Math/Numbers/Complex");var w=e.n(f);function O(e){n().call(this,e),this.addChildObjects(r().inputOutput,"dimension",new(l().SFInt32)(40)),this.vertices=b().createArray()}Object.assign(Object.setPrototypeOf(O.prototype,n().prototype),{initialize(){this.addInterest("build",this),this.build()},getVertices(){return this.vertices},build(){const e=this._dimension.getValue(),t=2*Math.PI/e,i=this.vertices;i.length=0;for(let s=0;s<e;++s){const e=w().Polar(1,t*s),n=w().Polar(1,t*(s+1));i.push(e.real,e.imag,0,1),i.push(n.real,n.imag,0,1)}i.shrinkToFit()}}),Object.defineProperties(O,{typeName:{value:"Circle2DOptions",enumerable:!0}});const _=O;u().add("Circle2DOptions","x_ite/Browser/Geometry2D/Circle2DOptions",_);const v=_;function V(e){n().call(this,e),this.addChildObjects(r().inputOutput,"dimension",new(l().SFInt32)(40)),this.circleVertices=b().createArray(),this.diskTexCoords=b().createArray(),this.diskNormals=b().createArray(),this.diskVertices=b().createArray()}Object.assign(Object.setPrototypeOf(V.prototype,n().prototype),{initialize(){this.addInterest("build",this),this.build()},getCircleVertices(){return this.circleVertices},getDiskTexCoords(){return this.diskTexCoords},getDiskNormals(){return this.diskNormals},getDiskVertices(){return this.diskVertices},build:(()=>{const e=new(w())(.5,.5),t=new(w())(0,0),i=new(w())(0,0),s=new(w())(0,0),n=new(w())(0,0);return function(){const o=this._dimension.getValue(),r=2*Math.PI/o,a=this.circleVertices,l=this.diskTexCoords,c=this.diskNormals,u=this.diskVertices;a.length=0,l.length=0,c.length=0,u.length=0;for(let h=0;h<o;++h){const o=r*h,p=r*(h+1);t.setPolar(.5,o).add(e),i.setPolar(.5,p).add(e),s.setPolar(1,o),n.setPolar(1,p),a.push(s.real,s.imag,0,1),a.push(n.real,n.imag,0,1),l.push(.5,.5,0,1,t.real,t.imag,0,1,i.real,i.imag,0,1),c.push(0,0,1,0,0,1,0,0,1),u.push(0,0,0,1,s.real,s.imag,0,1,n.real,n.imag,0,1)}a.shrinkToFit(),l.shrinkToFit(),c.shrinkToFit(),u.shrinkToFit()}})()}),Object.defineProperties(V,{typeName:{value:"Disk2DOptions",enumerable:!0}});const S=V;u().add("Disk2DOptions","x_ite/Browser/Geometry2D/Disk2DOptions",S);const C=S,x=window[Symbol.for("X_ITE.X3D-9.0.1")].require("x_ite/Components/Geometry3D/IndexedFaceSet");var P=e.n(x);const M=window[Symbol.for("X_ITE.X3D-9.0.1")].require("x_ite/Components/Rendering/Coordinate");var T=e.n(M);const F=window[Symbol.for("X_ITE.X3D-9.0.1")].require("x_ite/Components/Texturing/TextureCoordinate");var I=e.n(F);function N(e){n().call(this,e)}Object.assign(Object.setPrototypeOf(N.prototype,n().prototype),{initialize(){n().prototype.initialize.call(this)},getGeometry(){if(this.geometry)return this.geometry;this.geometry=new(P())(this.getExecutionContext()),this.geometry._texCoord=new(I())(this.getExecutionContext()),this.geometry._coord=new(T())(this.getExecutionContext());const e=this.geometry,t=this.geometry._texCoord.getValue(),i=this.geometry._coord.getValue();return e._texCoordIndex=new(l().MFInt32)(0,1,2,3,-1),e._coordIndex=new(l().MFInt32)(0,1,2,3,-1),t._point=new(l().MFVec2f)(new(l().SFVec2f)(1,1),new(l().SFVec2f)(0,1),new(l().SFVec2f)(0,0),new(l().SFVec2f)(1,0)),i._point=new(l().MFVec3f)(new(l().SFVec3f)(1,1,0),new(l().SFVec3f)(-1,1,0),new(l().SFVec3f)(-1,-1,0),new(l().SFVec3f)(1,-1,0)),t.setup(),i.setup(),e.setup(),this.geometry}}),Object.defineProperties(N,{typeName:{value:"Rectangle2DOptions",enumerable:!0}});const j=N;u().add("Rectangle2DOptions","x_ite/Browser/Geometry2D/Rectangle2DOptions",j);const A=j,X=window[Symbol.for("X_ITE.X3D-9.0.1")].require("x_ite/Browser/Core/PrimitiveQuality");var G=e.n(X);function R(){}function k(e,t){const i=new t(this.getPrivateScene());return i.setup(),this[e]=function(){return i},Object.defineProperty(this,e,{enumerable:!1}),i}Object.assign(R.prototype,{initialize(){this.setPrimitiveQuality2D(this.getBrowserOptions().getPrimitiveQuality())},getArc2DOptions(){return k.call(this,"getArc2DOptions",d)},getArcClose2DOptions(){return k.call(this,"getArcClose2DOptions",y)},getCircle2DOptions(){return k.call(this,"getCircle2DOptions",v)},getDisk2DOptions(){return k.call(this,"getDisk2DOptions",C)},getRectangle2DOptions(){return k.call(this,"getRectangle2DOptions",A)},setPrimitiveQuality2D(e){const t=this.getArc2DOptions(),i=this.getArcClose2DOptions(),s=this.getCircle2DOptions(),n=this.getDisk2DOptions();switch(e){case G().LOW:t._dimension=20,i._dimension=20,s._dimension=20,n._dimension=20;break;case G().MEDIUM:t._dimension=40,i._dimension=40,s._dimension=40,n._dimension=40;break;case G().HIGH:t._dimension=80,i._dimension=80,s._dimension=80,n._dimension=80}}});const B=R;u().add("X3DGeometry2DContext","x_ite/Browser/Geometry2D/X3DGeometry2DContext",B);const z=B,q=window[Symbol.for("X_ITE.X3D-9.0.1")].require("x_ite/Base/X3DFieldDefinition");var E=e.n(q);const U=window[Symbol.for("X_ITE.X3D-9.0.1")].require("x_ite/Base/FieldDefinitionArray");var L=e.n(U);const Q=window[Symbol.for("X_ITE.X3D-9.0.1")].require("x_ite/Components/Rendering/X3DLineGeometryNode");var H=e.n(Q);const W=window[Symbol.for("X_ITE.X3D-9.0.1")].require("standard/Math/Algorithm");var J=e.n(W);function K(e){H().call(this,e),this.addType(r().Arc2D),this._startAngle.setUnit("angle"),this._endAngle.setUnit("angle"),this._radius.setUnit("length")}Object.assign(Object.setPrototypeOf(K.prototype,H().prototype),{set_live__(){H().prototype.set_live__.call(this),this.getLive().getValue()?this.getBrowser().getArc2DOptions().addInterest("requestRebuild",this):this.getBrowser().getArc2DOptions().removeInterest("requestRebuild",this)},getSweepAngle(){const e=J().interval(this._startAngle.getValue(),0,2*Math.PI),t=J().interval(this._endAngle.getValue(),0,2*Math.PI);if(e===t)return 2*Math.PI;const i=Math.abs(t-e);return e>t?2*Math.PI-i:isNaN(i)?0:i},build(){const e=this.getBrowser().getArc2DOptions()._dimension.getValue(),t=this._startAngle.getValue(),i=Math.abs(this._radius.getValue()),s=this.getSweepAngle(),n=Math.max(3,Math.floor(s*e/(2*Math.PI))),o=this.getVertices();for(let e=0;e<n;++e){const r=t+s*(e/n),a=w().Polar(i,r),l=t+s*((e+1)/n),c=w().Polar(i,l);o.push(a.real,a.imag,0,1),o.push(c.real,c.imag,0,1)}this.getMin().set(-i,-i,0),this.getMax().set(i,i,0)}}),Object.defineProperties(K,{typeName:{value:"Arc2D",enumerable:!0},componentName:{value:"Geometry2D",enumerable:!0},containerField:{value:"geometry",enumerable:!0},specificationRange:{value:Object.freeze(["3.0","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(L())([new(E())(r().inputOutput,"metadata",new(l().SFNode)),new(E())(r().initializeOnly,"startAngle",new(l().SFFloat)),new(E())(r().initializeOnly,"endAngle",new(l().SFFloat)(1.5708)),new(E())(r().initializeOnly,"radius",new(l().SFFloat)(1))]),enumerable:!0}});const Y=K;u().add("Arc2D","x_ite/Components/Geometry2D/Arc2D",Y);const Z=Y;function $(e){b().call(this,e),this.addType(r().ArcClose2D),this.setGeometryType(2),this._startAngle.setUnit("angle"),this._endAngle.setUnit("angle"),this._radius.setUnit("length")}Object.assign(Object.setPrototypeOf($.prototype,b().prototype),{set_live__(){b().prototype.set_live__.call(this),this.getLive().getValue()?this.getBrowser().getArcClose2DOptions().addInterest("requestRebuild",this):this.getBrowser().getArcClose2DOptions().removeInterest("requestRebuild",this)},getSweepAngle(){const e=J().interval(this._startAngle.getValue(),0,2*Math.PI),t=J().interval(this._endAngle.getValue(),0,2*Math.PI);if(e===t)return 2*Math.PI;const i=Math.abs(t-e);return e>t?2*Math.PI-i:isNaN(i)?0:i},build:(()=>{const e=new(w())(.5,.5);return function(){const t=this.getBrowser().getArcClose2DOptions(),i="CHORD"===this._closureType.getValue(),s=t._dimension.getValue(),n=this._startAngle.getValue(),o=Math.abs(this._radius.getValue()),r=this.getSweepAngle(),a=Math.max(4,Math.floor(r*s/(2*Math.PI))),l=this.getTexCoords(),c=this.getNormals(),u=this.getVertices(),h=[],p=[];this.getMultiTexCoords().push(l);const d=a-1;for(let t=0;t<a;++t){const i=n+r*(t/d);h.push(w().Polar(.5,i).add(e)),p.push(w().Polar(o,i))}if(i){const e=h[0],t=p[0];for(let i=1;i<d;++i){const s=h[i],n=h[i+1],o=p[i],r=p[i+1];l.push(e.real,e.imag,0,1,s.real,s.imag,0,1,n.real,n.imag,0,1),c.push(0,0,1,0,0,1,0,0,1),u.push(t.real,t.imag,0,1,o.real,o.imag,0,1,r.real,r.imag,0,1)}}else for(let e=0;e<d;++e){const t=h[e],i=h[e+1],s=p[e],n=p[e+1];l.push(.5,.5,0,1,t.real,t.imag,0,1,i.real,i.imag,0,1),c.push(0,0,1,0,0,1,0,0,1),u.push(0,0,0,1,s.real,s.imag,0,1,n.real,n.imag,0,1)}this.getMin().set(-o,-o,0),this.getMax().set(o,o,0),this.setSolid(this._solid.getValue())}})()}),Object.defineProperties($,{typeName:{value:"ArcClose2D",enumerable:!0},componentName:{value:"Geometry2D",enumerable:!0},containerField:{value:"geometry",enumerable:!0},specificationRange:{value:Object.freeze(["3.0","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(L())([new(E())(r().inputOutput,"metadata",new(l().SFNode)),new(E())(r().initializeOnly,"closureType",new(l().SFString)("PIE")),new(E())(r().initializeOnly,"startAngle",new(l().SFFloat)),new(E())(r().initializeOnly,"endAngle",new(l().SFFloat)(1.5708)),new(E())(r().initializeOnly,"radius",new(l().SFFloat)(1)),new(E())(r().initializeOnly,"solid",new(l().SFBool))]),enumerable:!0}});const ee=$;u().add("ArcClose2D","x_ite/Components/Geometry2D/ArcClose2D",ee);const te=ee;function ie(e){H().call(this,e),this.addType(r().Circle2D),this._radius.setUnit("length")}Object.assign(Object.setPrototypeOf(ie.prototype,H().prototype),{set_live__(){H().prototype.set_live__.call(this),this.getLive().getValue()?this.getBrowser().getCircle2DOptions().addInterest("requestRebuild",this):this.getBrowser().getCircle2DOptions().removeInterest("requestRebuild",this)},build(){const e=this.getBrowser().getCircle2DOptions(),t=this.getVertices(),i=this._radius.getValue();if(1===i)this.setVertices(e.getVertices());else{const s=e.getVertices().getValue();for(let e=0,n=s.length;e<n;e+=4)t.push(s[e]*i,s[e+1]*i,0,1)}this.getMin().set(-i,-i,0),this.getMax().set(i,i,0)}}),Object.defineProperties(ie,{typeName:{value:"Circle2D",enumerable:!0},componentName:{value:"Geometry2D",enumerable:!0},containerField:{value:"geometry",enumerable:!0},specificationRange:{value:Object.freeze(["3.0","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(L())([new(E())(r().inputOutput,"metadata",new(l().SFNode)),new(E())(r().initializeOnly,"radius",new(l().SFFloat)(1))]),enumerable:!0}});const se=ie;u().add("Circle2D","x_ite/Components/Geometry2D/Circle2D",se);const ne=se,oe=window[Symbol.for("X_ITE.X3D-9.0.1")].require("x_ite/Components/Rendering/X3DPointGeometryNode");var re=e.n(oe);function ae(e){H().call(this,e),this.addType(r().Disk2D),this._innerRadius.setUnit("length"),this._outerRadius.setUnit("length")}Object.assign(Object.setPrototypeOf(ae.prototype,b().prototype),{initialize(){b().prototype.initialize.call(this)},set_live__(){b().prototype.set_live__.call(this),this.getLive().getValue()?this.getBrowser().getDisk2DOptions().addInterest("requestRebuild",this):this.getBrowser().getDisk2DOptions().removeInterest("requestRebuild",this)},build(){const e=this.getBrowser(),t=e.getContext(),i=e.getDisk2DOptions(),s=Math.min(Math.abs(this._innerRadius.getValue()),Math.abs(this._outerRadius.getValue())),n=Math.max(Math.abs(this._innerRadius.getValue()),Math.abs(this._outerRadius.getValue()));if(s===n){const e=this.getVertices();if(0===n)return e.push(0,0,0,1),this.getMin().set(0,0,0),this.getMax().set(0,0,0),this.setGeometryType(0),this.setPrimitiveMode(t.POINTS),this.setTransparent(!0),void this.setBase(re());if(1===n)this.setVertices(i.getCircleVertices());else{const t=i.getCircleVertices().getValue();for(let i=0,s=t.length;i<s;i+=4)e.push(t[i]*n,t[i+1]*n,0,1)}return this.getMin().set(-n,-n,0),this.getMax().set(n,n,0),this.setGeometryType(1),this.setPrimitiveMode(t.LINES),this.setTransparent(!1),void this.setBase(H())}if(0===s){if(this.getMultiTexCoords().push(i.getDiskTexCoords()),this.setNormals(i.getDiskNormals()),1===n)this.setVertices(i.getDiskVertices());else{const e=i.getDiskVertices().getValue(),t=this.getVertices();for(let i=0,s=e.length;i<s;i+=4)t.push(e[i]*n,e[i+1]*n,0,1)}return this.getMin().set(-n,-n,0),this.getMax().set(n,n,0),this.setGeometryType(2),this.setPrimitiveMode(t.TRIANGLES),this.setTransparent(!1),this.setSolid(this._solid.getValue()),void this.setBase(b())}const o=s/n,r=(1-o)/2,a=i.getDiskTexCoords().getValue(),l=i.getDiskVertices().getValue(),c=this.getTexCoords(),u=this.getNormals(),h=this.getVertices();this.getMultiTexCoords().push(c);for(let e=0,t=l.length;e<t;e+=12)c.push(a[e+4]*o+r,a[e+5]*o+r,0,1,a[e+4],a[e+5],0,1,a[e+8],a[e+9],0,1,a[e+4]*o+r,a[e+5]*o+r,0,1,a[e+8],a[e+9],0,1,a[e+8]*o+r,a[e+9]*o+r,0,1),u.push(0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1),h.push(l[e+4]*s,l[e+5]*s,0,1,l[e+4]*n,l[e+5]*n,0,1,l[e+8]*n,l[e+9]*n,0,1,l[e+4]*s,l[e+5]*s,0,1,l[e+8]*n,l[e+9]*n,0,1,l[e+8]*s,l[e+9]*s,0,1);this.getMin().set(-n,-n,0),this.getMax().set(n,n,0),this.setGeometryType(2),this.setPrimitiveMode(t.TRIANGLES),this.setTransparent(!1),this.setSolid(this._solid.getValue()),this.setBase(b())},setBase(e){this.intersectsLine=e.prototype.intersectsLine,this.intersectsBox=e.prototype.intersectsBox,this.displaySimple=e.prototype.displaySimple,this.display=e.prototype.display,this.displaySimpleParticles=e.prototype.displaySimpleParticles,this.displayParticles=e.prototype.displayParticles},updateRenderFunctions(){}}),Object.defineProperties(ae,{typeName:{value:"Disk2D",enumerable:!0},componentName:{value:"Geometry2D",enumerable:!0},containerField:{value:"geometry",enumerable:!0},specificationRange:{value:Object.freeze(["3.0","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(L())([new(E())(r().inputOutput,"metadata",new(l().SFNode)),new(E())(r().initializeOnly,"innerRadius",new(l().SFFloat)),new(E())(r().initializeOnly,"outerRadius",new(l().SFFloat)(1)),new(E())(r().initializeOnly,"solid",new(l().SFBool))]),enumerable:!0}});const le=ae;u().add("Disk2D","x_ite/Components/Geometry2D/Disk2D",le);const ce=le;function ue(e){H().call(this,e),this.addType(r().Polyline2D),this._lineSegments.setUnit("length")}Object.assign(Object.setPrototypeOf(ue.prototype,H().prototype),{build(){const e=this._lineSegments.getValue(),t=this.getVertices();for(let i=0,s=2*(this._lineSegments.length-1);i<s;i+=2)t.push(e[i+0],e[i+1],0,1),t.push(e[i+2],e[i+3],0,1)}}),Object.defineProperties(ue,{typeName:{value:"Polyline2D",enumerable:!0},componentName:{value:"Geometry2D",enumerable:!0},containerField:{value:"geometry",enumerable:!0},specificationRange:{value:Object.freeze(["3.0","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(L())([new(E())(r().inputOutput,"metadata",new(l().SFNode)),new(E())(r().initializeOnly,"lineSegments",new(l().MFVec2f))]),enumerable:!0}});const he=ue;u().add("Polyline2D","x_ite/Components/Geometry2D/Polyline2D",he);const pe=he;function de(e){re().call(this,e),this.addType(r().Polypoint2D),this._point.setUnit("length")}Object.assign(Object.setPrototypeOf(de.prototype,re().prototype),{build(){const e=this._point.getValue(),t=this.getVertices();for(let i=0,s=2*this._point.length;i<s;i+=2)t.push(e[i],e[i+1],0,1)}}),Object.defineProperties(de,{typeName:{value:"Polypoint2D",enumerable:!0},componentName:{value:"Geometry2D",enumerable:!0},containerField:{value:"geometry",enumerable:!0},specificationRange:{value:Object.freeze(["3.0","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(L())([new(E())(r().inputOutput,"metadata",new(l().SFNode)),new(E())(r().inputOutput,"point",new(l().MFVec2f))]),enumerable:!0}});const ge=de;u().add("Polypoint2D","x_ite/Components/Geometry2D/Polypoint2D",ge);const me=ge,ye=window[Symbol.for("X_ITE.X3D-9.0.1")].require("standard/Math/Numbers/Vector2");var De=e.n(ye);window[Symbol.for("X_ITE.X3D-9.0.1")].require("standard/Math/Numbers/Vector3");function be(e){b().call(this,e),this.addType(r().Rectangle2D),this.setGeometryType(2),this._size.setUnit("length")}Object.assign(Object.setPrototypeOf(be.prototype,b().prototype),{build:(()=>{const e=new(De())(2,2);return function(){const t=this.getBrowser().getRectangle2DOptions().getGeometry(),i=this._size.getValue();if(this.setMultiTexCoords(t.getMultiTexCoords()),this.setNormals(t.getNormals()),i.equals(e))this.setVertices(t.getVertices()),this.getMin().assign(t.getMin()),this.getMax().assign(t.getMax());else{const e=Math.abs(i.x/2),s=Math.abs(i.y/2),n=t.getVertices().getValue(),o=this.getVertices();for(let t=0;t<n.length;t+=4)o.push(e*n[t],s*n[t+1],0,1);this.getMin().set(-e,-s,0),this.getMax().set(e,s,0)}this.setSolid(this._solid.getValue())}})()}),Object.defineProperties(be,{typeName:{value:"Rectangle2D",enumerable:!0},componentName:{value:"Geometry2D",enumerable:!0},containerField:{value:"geometry",enumerable:!0},specificationRange:{value:Object.freeze(["3.0","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(L())([new(E())(r().inputOutput,"metadata",new(l().SFNode)),new(E())(r().initializeOnly,"size",new(l().SFVec2f)(2,2)),new(E())(r().initializeOnly,"solid",new(l().SFBool))]),enumerable:!0}});const fe=be;u().add("Rectangle2D","x_ite/Components/Geometry2D/Rectangle2D",fe);const we=fe;function Oe(e){b().call(this,e),this.addType(r().TriangleSet2D),this.setGeometryType(2),this._vertices.setUnit("length")}Object.assign(Object.setPrototypeOf(Oe.prototype,b().prototype),{build(){const e=this._vertices.getValue(),t=this.getNormals(),i=this.getVertices();for(let s=0,n=2*this._vertices.length;s<n;s+=2)t.push(0,0,1),i.push(e[s],e[s+1],0,1);this.setSolid(this._solid.getValue())},buildTexCoords(){const e=this.getTexCoords();if(0===e.length){const t=this.getTexCoordParams(),i=t.min,s=t.Ssize,n=this.getVertices().getValue();for(let t=0,o=n.length;t<o;t+=4)e.push((n[t]-i[0])/s,(n[t+1]-i[1])/s,0,1);e.shrinkToFit()}this.getMultiTexCoords().push(e)}}),Object.defineProperties(Oe,{typeName:{value:"TriangleSet2D",enumerable:!0},componentName:{value:"Geometry2D",enumerable:!0},containerField:{value:"geometry",enumerable:!0},specificationRange:{value:Object.freeze(["3.0","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(L())([new(E())(r().inputOutput,"metadata",new(l().SFNode)),new(E())(r().inputOutput,"vertices",new(l().MFVec2f)),new(E())(r().initializeOnly,"solid",new(l().SFBool))]),enumerable:!0}});const _e=Oe;u().add("TriangleSet2D","x_ite/Components/Geometry2D/TriangleSet2D",_e);const ve=_e;i().add({name:"Geometry2D",concreteNodes:[Z,te,ne,ce,pe,me,we,ve],abstractNodes:[],browserContext:z});const Ve=void 0;u().add("Geometry2D","assets/components/Geometry2D",Ve)})();
|
|
1
|
+
/* X_ITE v9.0.3 */(()=>{"use strict";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:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Components");var i=e.n(t);const s=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Base/X3DBaseNode");var n=e.n(s);const o=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Base/X3DConstants");var r=e.n(o);const a=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Fields");var l=e.n(a);const c=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Namespace");var u=e.n(c);function h(e){n().call(this,e),this.addChildObjects(r().inputOutput,"dimension",new(l().SFInt32)(40))}Object.setPrototypeOf(h.prototype,n().prototype),Object.defineProperties(h,{typeName:{value:"Arc2DOptions",enumerable:!0}});const p=h;u().add("Arc2DOptions","x_ite/Browser/Geometry2D/Arc2DOptions",p);const d=p;function g(e){n().call(this,e),this.addChildObjects(r().inputOutput,"dimension",new(l().SFInt32)(40))}Object.setPrototypeOf(g.prototype,n().prototype),Object.defineProperties(g,{typeName:{value:"ArcClose2DOptions",enumerable:!0}});const m=g;u().add("ArcClose2DOptions","x_ite/Browser/Geometry2D/ArcClose2DOptions",m);const y=m,f=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Components/Rendering/X3DGeometryNode");var b=e.n(f);const D=window[Symbol.for("X_ITE.X3D-9.0.3")].require("standard/Math/Numbers/Complex");var w=e.n(D);function O(e){n().call(this,e),this.addChildObjects(r().inputOutput,"dimension",new(l().SFInt32)(40)),this.vertices=b().createArray()}Object.assign(Object.setPrototypeOf(O.prototype,n().prototype),{initialize(){this.addInterest("build",this),this.build()},getVertices(){return this.vertices},build(){const e=this._dimension.getValue(),t=2*Math.PI/e,i=this.vertices;i.length=0;for(let s=0;s<e;++s){const e=w().Polar(1,t*s),n=w().Polar(1,t*(s+1));i.push(e.real,e.imag,0,1),i.push(n.real,n.imag,0,1)}i.shrinkToFit()}}),Object.defineProperties(O,{typeName:{value:"Circle2DOptions",enumerable:!0}});const _=O;u().add("Circle2DOptions","x_ite/Browser/Geometry2D/Circle2DOptions",_);const v=_;function V(e){n().call(this,e),this.addChildObjects(r().inputOutput,"dimension",new(l().SFInt32)(40)),this.circleVertices=b().createArray(),this.diskTexCoords=b().createArray(),this.diskNormals=b().createArray(),this.diskVertices=b().createArray()}Object.assign(Object.setPrototypeOf(V.prototype,n().prototype),{initialize(){this.addInterest("build",this),this.build()},getCircleVertices(){return this.circleVertices},getDiskTexCoords(){return this.diskTexCoords},getDiskNormals(){return this.diskNormals},getDiskVertices(){return this.diskVertices},build:(()=>{const e=new(w())(.5,.5),t=new(w())(0,0),i=new(w())(0,0),s=new(w())(0,0),n=new(w())(0,0);return function(){const o=this._dimension.getValue(),r=2*Math.PI/o,a=this.circleVertices,l=this.diskTexCoords,c=this.diskNormals,u=this.diskVertices;a.length=0,l.length=0,c.length=0,u.length=0;for(let h=0;h<o;++h){const o=r*h,p=r*(h+1);t.setPolar(.5,o).add(e),i.setPolar(.5,p).add(e),s.setPolar(1,o),n.setPolar(1,p),a.push(s.real,s.imag,0,1),a.push(n.real,n.imag,0,1),l.push(.5,.5,0,1,t.real,t.imag,0,1,i.real,i.imag,0,1),c.push(0,0,1,0,0,1,0,0,1),u.push(0,0,0,1,s.real,s.imag,0,1,n.real,n.imag,0,1)}a.shrinkToFit(),l.shrinkToFit(),c.shrinkToFit(),u.shrinkToFit()}})()}),Object.defineProperties(V,{typeName:{value:"Disk2DOptions",enumerable:!0}});const S=V;u().add("Disk2DOptions","x_ite/Browser/Geometry2D/Disk2DOptions",S);const C=S,x=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Components/Geometry3D/IndexedFaceSet");var P=e.n(x);const I=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Components/Rendering/Coordinate");var M=e.n(I);const T=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Components/Texturing/TextureCoordinate");var F=e.n(T);function j(e){n().call(this,e)}Object.assign(Object.setPrototypeOf(j.prototype,n().prototype),{initialize(){n().prototype.initialize.call(this)},getGeometry(){if(this.geometry)return this.geometry;this.geometry=new(P())(this.getExecutionContext()),this.geometry._texCoord=new(F())(this.getExecutionContext()),this.geometry._coord=new(M())(this.getExecutionContext());const e=this.geometry,t=this.geometry._texCoord.getValue(),i=this.geometry._coord.getValue();return e._texCoordIndex=new(l().MFInt32)(0,1,2,3,-1),e._coordIndex=new(l().MFInt32)(0,1,2,3,-1),t._point=new(l().MFVec2f)(new(l().SFVec2f)(1,1),new(l().SFVec2f)(0,1),new(l().SFVec2f)(0,0),new(l().SFVec2f)(1,0)),i._point=new(l().MFVec3f)(new(l().SFVec3f)(1,1,0),new(l().SFVec3f)(-1,1,0),new(l().SFVec3f)(-1,-1,0),new(l().SFVec3f)(1,-1,0)),t.setup(),i.setup(),e.setup(),this.geometry}}),Object.defineProperties(j,{typeName:{value:"Rectangle2DOptions",enumerable:!0}});const A=j;u().add("Rectangle2DOptions","x_ite/Browser/Geometry2D/Rectangle2DOptions",A);const N=A,X=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Browser/Core/PrimitiveQuality");var z=e.n(X);function G(){}function R(e,t){const i=new t(this.getPrivateScene());return i.setup(),this[e]=function(){return i},Object.defineProperty(this,e,{enumerable:!1}),i}Object.assign(G.prototype,{initialize(){this.setPrimitiveQuality2D(this.getBrowserOptions().getPrimitiveQuality())},getArc2DOptions(){return R.call(this,"getArc2DOptions",d)},getArcClose2DOptions(){return R.call(this,"getArcClose2DOptions",y)},getCircle2DOptions(){return R.call(this,"getCircle2DOptions",v)},getDisk2DOptions(){return R.call(this,"getDisk2DOptions",C)},getRectangle2DOptions(){return R.call(this,"getRectangle2DOptions",N)},setPrimitiveQuality2D(e){const t=this.getArc2DOptions(),i=this.getArcClose2DOptions(),s=this.getCircle2DOptions(),n=this.getDisk2DOptions();switch(e){case z().LOW:t._dimension=20,i._dimension=20,s._dimension=20,n._dimension=20;break;case z().MEDIUM:t._dimension=40,i._dimension=40,s._dimension=40,n._dimension=40;break;case z().HIGH:t._dimension=80,i._dimension=80,s._dimension=80,n._dimension=80}}});const k=G;u().add("X3DGeometry2DContext","x_ite/Browser/Geometry2D/X3DGeometry2DContext",k);const B=k,q=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Base/X3DFieldDefinition");var E=e.n(q);const U=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Base/FieldDefinitionArray");var L=e.n(U);const Q=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Components/Rendering/X3DLineGeometryNode");var H=e.n(Q);const W=window[Symbol.for("X_ITE.X3D-9.0.3")].require("standard/Math/Algorithm");var J=e.n(W);function K(e){H().call(this,e),this.addType(r().Arc2D),this._startAngle.setUnit("angle"),this._endAngle.setUnit("angle"),this._radius.setUnit("length")}Object.assign(Object.setPrototypeOf(K.prototype,H().prototype),{set_live__(){H().prototype.set_live__.call(this),this.getLive().getValue()?this.getBrowser().getArc2DOptions().addInterest("requestRebuild",this):this.getBrowser().getArc2DOptions().removeInterest("requestRebuild",this)},getSweepAngle(){const e=J().interval(this._startAngle.getValue(),0,2*Math.PI),t=J().interval(this._endAngle.getValue(),0,2*Math.PI);if(e===t)return 2*Math.PI;const i=Math.abs(t-e);return e>t?2*Math.PI-i:isNaN(i)?0:i},build(){const e=this.getBrowser().getArc2DOptions()._dimension.getValue(),t=this._startAngle.getValue(),i=Math.abs(this._radius.getValue()),s=this.getSweepAngle(),n=Math.max(3,Math.floor(s*e/(2*Math.PI))),o=this.getVertices();for(let e=0;e<n;++e){const r=t+s*(e/n),a=w().Polar(i,r),l=t+s*((e+1)/n),c=w().Polar(i,l);o.push(a.real,a.imag,0,1),o.push(c.real,c.imag,0,1)}this.getMin().set(-i,-i,0),this.getMax().set(i,i,0)}}),Object.defineProperties(K,{typeName:{value:"Arc2D",enumerable:!0},componentInfo:{value:Object.freeze({name:"Geometry2D",level:2}),enumerable:!0},containerField:{value:"geometry",enumerable:!0},specificationRange:{value:Object.freeze({from:"3.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(L())([new(E())(r().inputOutput,"metadata",new(l().SFNode)),new(E())(r().initializeOnly,"startAngle",new(l().SFFloat)),new(E())(r().initializeOnly,"endAngle",new(l().SFFloat)(1.570796)),new(E())(r().initializeOnly,"radius",new(l().SFFloat)(1))]),enumerable:!0}});const Y=K;u().add("Arc2D","x_ite/Components/Geometry2D/Arc2D",Y);const Z=Y;function $(e){b().call(this,e),this.addType(r().ArcClose2D),this.setGeometryType(2),this._startAngle.setUnit("angle"),this._endAngle.setUnit("angle"),this._radius.setUnit("length")}Object.assign(Object.setPrototypeOf($.prototype,b().prototype),{set_live__(){b().prototype.set_live__.call(this),this.getLive().getValue()?this.getBrowser().getArcClose2DOptions().addInterest("requestRebuild",this):this.getBrowser().getArcClose2DOptions().removeInterest("requestRebuild",this)},getSweepAngle(){const e=J().interval(this._startAngle.getValue(),0,2*Math.PI),t=J().interval(this._endAngle.getValue(),0,2*Math.PI);if(e===t)return 2*Math.PI;const i=Math.abs(t-e);return e>t?2*Math.PI-i:isNaN(i)?0:i},build:(()=>{const e=new(w())(.5,.5);return function(){const t=this.getBrowser().getArcClose2DOptions(),i="CHORD"===this._closureType.getValue(),s=t._dimension.getValue(),n=this._startAngle.getValue(),o=Math.abs(this._radius.getValue()),r=this.getSweepAngle(),a=Math.max(4,Math.floor(r*s/(2*Math.PI))),l=this.getTexCoords(),c=this.getNormals(),u=this.getVertices(),h=[],p=[];this.getMultiTexCoords().push(l);const d=a-1;for(let t=0;t<a;++t){const i=n+r*(t/d);h.push(w().Polar(.5,i).add(e)),p.push(w().Polar(o,i))}if(i){const e=h[0],t=p[0];for(let i=1;i<d;++i){const s=h[i],n=h[i+1],o=p[i],r=p[i+1];l.push(e.real,e.imag,0,1,s.real,s.imag,0,1,n.real,n.imag,0,1),c.push(0,0,1,0,0,1,0,0,1),u.push(t.real,t.imag,0,1,o.real,o.imag,0,1,r.real,r.imag,0,1)}}else for(let e=0;e<d;++e){const t=h[e],i=h[e+1],s=p[e],n=p[e+1];l.push(.5,.5,0,1,t.real,t.imag,0,1,i.real,i.imag,0,1),c.push(0,0,1,0,0,1,0,0,1),u.push(0,0,0,1,s.real,s.imag,0,1,n.real,n.imag,0,1)}this.getMin().set(-o,-o,0),this.getMax().set(o,o,0),this.setSolid(this._solid.getValue())}})()}),Object.defineProperties($,{typeName:{value:"ArcClose2D",enumerable:!0},componentInfo:{value:Object.freeze({name:"Geometry2D",level:2}),enumerable:!0},containerField:{value:"geometry",enumerable:!0},specificationRange:{value:Object.freeze({from:"3.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(L())([new(E())(r().inputOutput,"metadata",new(l().SFNode)),new(E())(r().initializeOnly,"closureType",new(l().SFString)("PIE")),new(E())(r().initializeOnly,"startAngle",new(l().SFFloat)),new(E())(r().initializeOnly,"endAngle",new(l().SFFloat)(1.570796)),new(E())(r().initializeOnly,"radius",new(l().SFFloat)(1)),new(E())(r().initializeOnly,"solid",new(l().SFBool))]),enumerable:!0}});const ee=$;u().add("ArcClose2D","x_ite/Components/Geometry2D/ArcClose2D",ee);const te=ee;function ie(e){H().call(this,e),this.addType(r().Circle2D),this._radius.setUnit("length")}Object.assign(Object.setPrototypeOf(ie.prototype,H().prototype),{set_live__(){H().prototype.set_live__.call(this),this.getLive().getValue()?this.getBrowser().getCircle2DOptions().addInterest("requestRebuild",this):this.getBrowser().getCircle2DOptions().removeInterest("requestRebuild",this)},build(){const e=this.getBrowser().getCircle2DOptions(),t=this.getVertices(),i=this._radius.getValue();if(1===i)this.setVertices(e.getVertices());else{const s=e.getVertices().getValue();for(let e=0,n=s.length;e<n;e+=4)t.push(s[e]*i,s[e+1]*i,0,1)}this.getMin().set(-i,-i,0),this.getMax().set(i,i,0)}}),Object.defineProperties(ie,{typeName:{value:"Circle2D",enumerable:!0},componentInfo:{value:Object.freeze({name:"Geometry2D",level:2}),enumerable:!0},containerField:{value:"geometry",enumerable:!0},specificationRange:{value:Object.freeze({from:"3.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(L())([new(E())(r().inputOutput,"metadata",new(l().SFNode)),new(E())(r().initializeOnly,"radius",new(l().SFFloat)(1))]),enumerable:!0}});const se=ie;u().add("Circle2D","x_ite/Components/Geometry2D/Circle2D",se);const ne=se,oe=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Components/Rendering/X3DPointGeometryNode");var re=e.n(oe);function ae(e){H().call(this,e),this.addType(r().Disk2D),this._innerRadius.setUnit("length"),this._outerRadius.setUnit("length")}Object.assign(Object.setPrototypeOf(ae.prototype,b().prototype),{initialize(){b().prototype.initialize.call(this)},set_live__(){b().prototype.set_live__.call(this),this.getLive().getValue()?this.getBrowser().getDisk2DOptions().addInterest("requestRebuild",this):this.getBrowser().getDisk2DOptions().removeInterest("requestRebuild",this)},build(){const e=this.getBrowser(),t=e.getContext(),i=e.getDisk2DOptions(),s=Math.min(Math.abs(this._innerRadius.getValue()),Math.abs(this._outerRadius.getValue())),n=Math.max(Math.abs(this._innerRadius.getValue()),Math.abs(this._outerRadius.getValue()));if(s===n){const e=this.getVertices();if(0===n)return e.push(0,0,0,1),this.getMin().set(0,0,0),this.getMax().set(0,0,0),this.setGeometryType(0),this.setPrimitiveMode(t.POINTS),this.setTransparent(!0),void this.setBase(re());if(1===n)this.setVertices(i.getCircleVertices());else{const t=i.getCircleVertices().getValue();for(let i=0,s=t.length;i<s;i+=4)e.push(t[i]*n,t[i+1]*n,0,1)}return this.getMin().set(-n,-n,0),this.getMax().set(n,n,0),this.setGeometryType(1),this.setPrimitiveMode(t.LINES),this.setTransparent(!1),void this.setBase(H())}if(0===s){if(this.getMultiTexCoords().push(i.getDiskTexCoords()),this.setNormals(i.getDiskNormals()),1===n)this.setVertices(i.getDiskVertices());else{const e=i.getDiskVertices().getValue(),t=this.getVertices();for(let i=0,s=e.length;i<s;i+=4)t.push(e[i]*n,e[i+1]*n,0,1)}return this.getMin().set(-n,-n,0),this.getMax().set(n,n,0),this.setGeometryType(2),this.setPrimitiveMode(t.TRIANGLES),this.setTransparent(!1),this.setSolid(this._solid.getValue()),void this.setBase(b())}const o=s/n,r=(1-o)/2,a=i.getDiskTexCoords().getValue(),l=i.getDiskVertices().getValue(),c=this.getTexCoords(),u=this.getNormals(),h=this.getVertices();this.getMultiTexCoords().push(c);for(let e=0,t=l.length;e<t;e+=12)c.push(a[e+4]*o+r,a[e+5]*o+r,0,1,a[e+4],a[e+5],0,1,a[e+8],a[e+9],0,1,a[e+4]*o+r,a[e+5]*o+r,0,1,a[e+8],a[e+9],0,1,a[e+8]*o+r,a[e+9]*o+r,0,1),u.push(0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1),h.push(l[e+4]*s,l[e+5]*s,0,1,l[e+4]*n,l[e+5]*n,0,1,l[e+8]*n,l[e+9]*n,0,1,l[e+4]*s,l[e+5]*s,0,1,l[e+8]*n,l[e+9]*n,0,1,l[e+8]*s,l[e+9]*s,0,1);this.getMin().set(-n,-n,0),this.getMax().set(n,n,0),this.setGeometryType(2),this.setPrimitiveMode(t.TRIANGLES),this.setTransparent(!1),this.setSolid(this._solid.getValue()),this.setBase(b())},setBase(e){this.intersectsLine=e.prototype.intersectsLine,this.intersectsBox=e.prototype.intersectsBox,this.displaySimple=e.prototype.displaySimple,this.display=e.prototype.display,this.displaySimpleParticles=e.prototype.displaySimpleParticles,this.displayParticles=e.prototype.displayParticles},updateRenderFunctions(){}}),Object.defineProperties(ae,{typeName:{value:"Disk2D",enumerable:!0},componentInfo:{value:Object.freeze({name:"Geometry2D",level:2}),enumerable:!0},containerField:{value:"geometry",enumerable:!0},specificationRange:{value:Object.freeze({from:"3.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(L())([new(E())(r().inputOutput,"metadata",new(l().SFNode)),new(E())(r().initializeOnly,"innerRadius",new(l().SFFloat)),new(E())(r().initializeOnly,"outerRadius",new(l().SFFloat)(1)),new(E())(r().initializeOnly,"solid",new(l().SFBool))]),enumerable:!0}});const le=ae;u().add("Disk2D","x_ite/Components/Geometry2D/Disk2D",le);const ce=le;function ue(e){H().call(this,e),this.addType(r().Polyline2D),this._lineSegments.setUnit("length")}Object.assign(Object.setPrototypeOf(ue.prototype,H().prototype),{build(){const e=this._lineSegments.getValue(),t=this.getVertices();for(let i=0,s=2*(this._lineSegments.length-1);i<s;i+=2)t.push(e[i+0],e[i+1],0,1),t.push(e[i+2],e[i+3],0,1)}}),Object.defineProperties(ue,{typeName:{value:"Polyline2D",enumerable:!0},componentInfo:{value:Object.freeze({name:"Geometry2D",level:1}),enumerable:!0},containerField:{value:"geometry",enumerable:!0},specificationRange:{value:Object.freeze({from:"3.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(L())([new(E())(r().inputOutput,"metadata",new(l().SFNode)),new(E())(r().initializeOnly,"lineSegments",new(l().MFVec2f))]),enumerable:!0}});const he=ue;u().add("Polyline2D","x_ite/Components/Geometry2D/Polyline2D",he);const pe=he;function de(e){re().call(this,e),this.addType(r().Polypoint2D),this._point.setUnit("length")}Object.assign(Object.setPrototypeOf(de.prototype,re().prototype),{build(){const e=this._point.getValue(),t=this.getVertices();for(let i=0,s=2*this._point.length;i<s;i+=2)t.push(e[i],e[i+1],0,1)}}),Object.defineProperties(de,{typeName:{value:"Polypoint2D",enumerable:!0},componentInfo:{value:Object.freeze({name:"Geometry2D",level:1}),enumerable:!0},containerField:{value:"geometry",enumerable:!0},specificationRange:{value:Object.freeze({from:"3.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(L())([new(E())(r().inputOutput,"metadata",new(l().SFNode)),new(E())(r().inputOutput,"point",new(l().MFVec2f))]),enumerable:!0}});const ge=de;u().add("Polypoint2D","x_ite/Components/Geometry2D/Polypoint2D",ge);const me=ge,ye=window[Symbol.for("X_ITE.X3D-9.0.3")].require("standard/Math/Numbers/Vector2");var fe=e.n(ye);window[Symbol.for("X_ITE.X3D-9.0.3")].require("standard/Math/Numbers/Vector3");function be(e){b().call(this,e),this.addType(r().Rectangle2D),this.setGeometryType(2),this._size.setUnit("length")}Object.assign(Object.setPrototypeOf(be.prototype,b().prototype),{build:(()=>{const e=new(fe())(2,2);return function(){const t=this.getBrowser().getRectangle2DOptions().getGeometry(),i=this._size.getValue();if(this.setMultiTexCoords(t.getMultiTexCoords()),this.setNormals(t.getNormals()),i.equals(e))this.setVertices(t.getVertices()),this.getMin().assign(t.getMin()),this.getMax().assign(t.getMax());else{const e=Math.abs(i.x/2),s=Math.abs(i.y/2),n=t.getVertices().getValue(),o=this.getVertices();for(let t=0;t<n.length;t+=4)o.push(e*n[t],s*n[t+1],0,1);this.getMin().set(-e,-s,0),this.getMax().set(e,s,0)}this.setSolid(this._solid.getValue())}})()}),Object.defineProperties(be,{typeName:{value:"Rectangle2D",enumerable:!0},componentInfo:{value:Object.freeze({name:"Geometry2D",level:1}),enumerable:!0},containerField:{value:"geometry",enumerable:!0},specificationRange:{value:Object.freeze({from:"3.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(L())([new(E())(r().inputOutput,"metadata",new(l().SFNode)),new(E())(r().initializeOnly,"size",new(l().SFVec2f)(2,2)),new(E())(r().initializeOnly,"solid",new(l().SFBool))]),enumerable:!0}});const De=be;u().add("Rectangle2D","x_ite/Components/Geometry2D/Rectangle2D",De);const we=De;function Oe(e){b().call(this,e),this.addType(r().TriangleSet2D),this.setGeometryType(2),this._vertices.setUnit("length")}Object.assign(Object.setPrototypeOf(Oe.prototype,b().prototype),{build(){const e=this._vertices.getValue(),t=this.getNormals(),i=this.getVertices();for(let s=0,n=2*this._vertices.length;s<n;s+=2)t.push(0,0,1),i.push(e[s],e[s+1],0,1);this.setSolid(this._solid.getValue())},buildTexCoords(){const e=this.getTexCoords();if(0===e.length){const t=this.getTexCoordParams(),i=t.min,s=t.Ssize,n=this.getVertices().getValue();for(let t=0,o=n.length;t<o;t+=4)e.push((n[t]-i[0])/s,(n[t+1]-i[1])/s,0,1);e.shrinkToFit()}this.getMultiTexCoords().push(e)}}),Object.defineProperties(Oe,{typeName:{value:"TriangleSet2D",enumerable:!0},componentInfo:{value:Object.freeze({name:"Geometry2D",level:1}),enumerable:!0},containerField:{value:"geometry",enumerable:!0},specificationRange:{value:Object.freeze({from:"3.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(L())([new(E())(r().inputOutput,"metadata",new(l().SFNode)),new(E())(r().inputOutput,"vertices",new(l().MFVec2f)),new(E())(r().initializeOnly,"solid",new(l().SFBool))]),enumerable:!0}});const _e=Oe;u().add("TriangleSet2D","x_ite/Components/Geometry2D/TriangleSet2D",_e);const ve=_e;i().add({name:"Geometry2D",concreteNodes:[Z,te,ne,ce,pe,me,we,ve],abstractNodes:[],browserContext:B});const Ve=void 0;u().add("Geometry2D","assets/components/Geometry2D",Ve)})();
|