x_ite 11.3.1 → 11.3.2
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/README.md +4 -4
- package/dist/assets/components/AnnotationComponent.js +2 -2
- package/dist/assets/components/AnnotationComponent.min.js +2 -2
- package/dist/assets/components/CADGeometryComponent.js +30 -23
- package/dist/assets/components/CADGeometryComponent.min.js +2 -2
- package/dist/assets/components/CubeMapTexturingComponent.js +4 -7
- package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
- package/dist/assets/components/DISComponent.js +2 -2
- package/dist/assets/components/DISComponent.min.js +2 -2
- package/dist/assets/components/EventUtilitiesComponent.js +2 -2
- package/dist/assets/components/EventUtilitiesComponent.min.js +2 -2
- package/dist/assets/components/Geometry2DComponent.js +2 -2
- package/dist/assets/components/Geometry2DComponent.min.js +2 -2
- package/dist/assets/components/GeospatialComponent.js +182 -194
- package/dist/assets/components/GeospatialComponent.min.js +2 -2
- package/dist/assets/components/HAnimComponent.js +2 -2
- package/dist/assets/components/HAnimComponent.min.js +2 -2
- package/dist/assets/components/KeyDeviceSensorComponent.js +3 -3
- package/dist/assets/components/KeyDeviceSensorComponent.min.js +2 -2
- package/dist/assets/components/LayoutComponent.js +17 -10
- package/dist/assets/components/LayoutComponent.min.js +2 -2
- package/dist/assets/components/NURBSComponent.js +3 -3
- package/dist/assets/components/NURBSComponent.min.js +2 -2
- package/dist/assets/components/ParticleSystemsComponent.js +8 -8
- package/dist/assets/components/ParticleSystemsComponent.min.js +2 -2
- package/dist/assets/components/PickingComponent.js +71 -109
- package/dist/assets/components/PickingComponent.min.js +2 -2
- package/dist/assets/components/RigidBodyPhysicsComponent.js +203 -188
- package/dist/assets/components/RigidBodyPhysicsComponent.min.js +2 -2
- package/dist/assets/components/ScriptingComponent.js +2 -2
- package/dist/assets/components/ScriptingComponent.min.js +2 -2
- package/dist/assets/components/TextComponent.js +6 -6
- package/dist/assets/components/TextComponent.min.js +2 -2
- package/dist/assets/components/TextureProjectionComponent.js +2 -2
- package/dist/assets/components/TextureProjectionComponent.min.js +2 -2
- package/dist/assets/components/Texturing3DComponent.js +3552 -3552
- package/dist/assets/components/Texturing3DComponent.min.js +2 -2
- package/dist/assets/components/VolumeRenderingComponent.js +2 -2
- package/dist/assets/components/VolumeRenderingComponent.min.js +2 -2
- package/dist/assets/components/WebXRComponent.js +3 -3
- package/dist/assets/components/WebXRComponent.min.js +2 -2
- package/dist/assets/components/X_ITEComponent.js +5 -5
- package/dist/assets/components/X_ITEComponent.min.js +2 -2
- package/dist/assets/images/XR.svg +1 -92
- package/dist/example.html +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +53422 -53369
- package/dist/x_ite.min.js +2 -2
- package/dist/x_ite.min.mjs +2 -2
- package/dist/x_ite.mjs +54961 -54908
- package/dist/x_ite.zip +0 -0
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* X_ITE v11.3.
|
|
2
|
-
const e=window[Symbol.for("X_ITE.X3D-11.3.1")];(()=>{var t={n:e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return t.d(i,{a:i}),i},d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const i=e.Components;var s=t.n(i);const n=e.X3DBaseNode;var o=t.n(n);const r=e.X3DConstants;var a=t.n(r);const l=e.Fields;var h=t.n(l);const g=e.Namespace;var d=t.n(g);function p(e){o().call(this,e),this.addChildObjects(a().inputOutput,"dimension",new(h().SFInt32)(40))}Object.setPrototypeOf(p.prototype,o().prototype),Object.defineProperties(p,{typeName:{value:"Arc2DOptions",enumerable:!0}});const c=p,u=d().add("Arc2DOptions",c);function y(e){o().call(this,e),this.addChildObjects(a().inputOutput,"dimension",new(h().SFInt32)(40))}Object.setPrototypeOf(y.prototype,o().prototype),Object.defineProperties(y,{typeName:{value:"ArcClose2DOptions",enumerable:!0}});const m=y,O=d().add("ArcClose2DOptions",m),D=e.IndexedLineSet;var w=t.n(D);const f=e.Coordinate;var b=t.n(f);const _=e.Complex;var P=t.n(_);function v(e){o().call(this,e),this.addChildObjects(a().inputOutput,"dimension",new(h().SFInt32)(40))}Object.assign(Object.setPrototypeOf(v.prototype,o().prototype),{initialize(){o().prototype.initialize.call(this),this.addInterest("eventsProcessed",this)},getGeometry(){return this.geometry||this.build(),this.geometry},createCoordIndex(){const e=this._dimension.getValue(),t=this.geometry._coordIndex;for(let i=0;i<e;++i)t.push(i);t.push(0,-1)},createPoints(){const e=this._dimension.getValue(),t=2*Math.PI/e,i=this.geometry._coord.getValue()._point;for(let s=0;s<e;++s){const e=P().Polar(1,t*s);i.push(new(h().SFVec3f)(e.real,e.imag,0))}},build(){this.geometry=new(w())(this.getExecutionContext()),this.geometry._coord=new(b())(this.getExecutionContext()),this.createCoordIndex(),this.createPoints();const e=this.geometry;this.geometry._coord.getValue().setup(),e.setup()},eventsProcessed(){this.geometry=null}}),Object.defineProperties(v,{typeName:{value:"Circle2DOptions",enumerable:!0}});const V=v,S=d().add("Circle2DOptions",V),C=e.X3DGeometryNode;var M=t.n(C);function x(e){o().call(this,e),this.addChildObjects(a().inputOutput,"dimension",new(h().SFInt32)(40)),this.diskTexCoords=M().createArray(),this.diskNormals=M().createArray(),this.diskVertices=M().createArray()}Object.assign(Object.setPrototypeOf(x.prototype,o().prototype),{initialize(){o().prototype.initialize.call(this),this.addInterest("eventsProcessed",this)},getDiskTexCoords(){return this.diskTexCoords.length||this.build(),this.diskTexCoords},getDiskNormals(){return this.diskNormals.length||this.build(),this.diskNormals},getDiskVertices(){return this.diskVertices.length||this.build(),this.diskVertices},build:(()=>{const e=new(P())(.5,.5),t=new(P()),i=new(P()),s=new(P()),n=new(P());return function(){const o=this._dimension.getValue(),r=2*Math.PI/o,a=this.diskTexCoords,l=this.diskNormals,h=this.diskVertices;for(let g=0;g<o;++g){const o=r*g,d=r*(g+1);t.setPolar(.5,o).add(e),i.setPolar(.5,d).add(e),s.setPolar(1,o),n.setPolar(1,d),a.push(.5,.5,0,1,t.real,t.imag,0,1,i.real,i.imag,0,1),l.push(0,0,1,0,0,1,0,0,1),h.push(0,0,0,1,s.real,s.imag,0,1,n.real,n.imag,0,1)}a.shrinkToFit(),l.shrinkToFit(),h.shrinkToFit()}})(),eventsProcessed(){this.diskTexCoords.length=0,this.diskNormals.length=0,this.diskVertices.length=0}}),Object.defineProperties(x,{typeName:{value:"Disk2DOptions",enumerable:!0}});const T=x,A=d().add("Disk2DOptions",T),F=e.IndexedFaceSet;var j=t.n(F);const I=e.TextureCoordinate;var N=t.n(I);function k(e){o().call(this,e)}Object.assign(Object.setPrototypeOf(k.prototype,o().prototype),{getGeometry(){if(this.geometry)return this.geometry;this.geometry=new(j())(this.getExecutionContext()),this.geometry._texCoord=new(N())(this.getExecutionContext()),this.geometry._coord=new(b())(this.getExecutionContext());const e=this.geometry,t=this.geometry._texCoord.getValue(),i=this.geometry._coord.getValue();return t._point=[1,1,0,1,0,0,1,0],i._point=[1,1,0,-1,1,0,-1,-1,0,1,-1,0],e._coordIndex=[0,1,2,3,-1],t.setup(),i.setup(),e.setup(),this.geometry}}),Object.defineProperties(k,{typeName:{value:"Rectangle2DOptions",enumerable:!0}});const G=k,R=d().add("Rectangle2DOptions",G),B=e.PrimitiveQuality;var z=t.n(B);function U(){}function L(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(U.prototype,{initialize(){this.setPrimitiveQuality2D(this.getBrowserOptions().getPrimitiveQuality())},getArc2DOptions(){return L.call(this,"getArc2DOptions",u)},getArcClose2DOptions(){return L.call(this,"getArcClose2DOptions",O)},getCircle2DOptions(){return L.call(this,"getCircle2DOptions",S)},getDisk2DOptions(){return L.call(this,"getDisk2DOptions",A)},getRectangle2DOptions(){return L.call(this,"getRectangle2DOptions",R)},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 E=U,X=d().add("X3DGeometry2DContext",E),q=e.X3DFieldDefinition;var Q=t.n(q);const H=e.FieldDefinitionArray;var W=t.n(H);const J=e.X3DNode;var K=t.n(J);const Y=e.X3DLineGeometryNode;var Z=t.n(Y);const $=e.Algorithm;var ee=t.n($);function te(e){Z().call(this,e),this.addType(a().Arc2D),this._startAngle.setUnit("angle"),this._endAngle.setUnit("angle"),this._radius.setUnit("length")}Object.assign(Object.setPrototypeOf(te.prototype,Z().prototype),{set_live__(){Z().prototype.set_live__.call(this);const e=this.getBrowser(),t=this.isLive()&&e.getBrowserOption("AlwaysUpdateGeometries");this.getLive().getValue()||t?e.getArc2DOptions().addInterest("requestRebuild",this):e.getArc2DOptions().removeInterest("requestRebuild",this)},getSweepAngle(){const e=ee().interval(this._startAngle.getValue(),0,2*Math.PI),t=ee().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=P().Polar(i,r),l=t+s*((e+1)/n),h=P().Polar(i,l);o.push(a.real,a.imag,0,1),o.push(h.real,h.imag,0,1)}this.getMin().set(-i,-i,0),this.getMax().set(i,i,0)}}),Object.defineProperties(te,{...K().getStaticProperties("Arc2D","Geometry2D",2,"geometry","3.0"),fieldDefinitions:{value:new(W())([new(Q())(a().inputOutput,"metadata",new(h().SFNode)),new(Q())(a().initializeOnly,"startAngle",new(h().SFFloat)),new(Q())(a().initializeOnly,"endAngle",new(h().SFFloat)(1.570796)),new(Q())(a().initializeOnly,"radius",new(h().SFFloat)(1))]),enumerable:!0}});const ie=te,se=d().add("Arc2D",ie);function ne(e){M().call(this,e),this.addType(a().ArcClose2D),this.setGeometryType(2),this._startAngle.setUnit("angle"),this._endAngle.setUnit("angle"),this._radius.setUnit("length")}Object.assign(Object.setPrototypeOf(ne.prototype,M().prototype),{set_live__(){M().prototype.set_live__.call(this);const e=this.getBrowser(),t=this.isLive()&&e.getBrowserOption("AlwaysUpdateGeometries");this.getLive().getValue()||t?e.getArcClose2DOptions().addInterest("requestRebuild",this):e.getArcClose2DOptions().removeInterest("requestRebuild",this)},getSweepAngle(){const e=ee().interval(this._startAngle.getValue(),0,2*Math.PI),t=ee().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(P())(.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(),h=this.getNormals(),g=this.getVertices(),d=[],p=[];this.getMultiTexCoords().push(l);const c=a-1;for(let t=0;t<a;++t){const i=n+r*(t/c);d.push(P().Polar(.5,i).add(e)),p.push(P().Polar(o,i))}if(i){const e=d[0],t=p[0];for(let i=1;i<c;++i){const s=d[i],n=d[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),h.push(0,0,1,0,0,1,0,0,1),g.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<c;++e){const t=d[e],i=d[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),h.push(0,0,1,0,0,1,0,0,1),g.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(ne,{...K().getStaticProperties("ArcClose2D","Geometry2D",2,"geometry","3.0"),fieldDefinitions:{value:new(W())([new(Q())(a().inputOutput,"metadata",new(h().SFNode)),new(Q())(a().initializeOnly,"closureType",new(h().SFString)("PIE")),new(Q())(a().initializeOnly,"startAngle",new(h().SFFloat)),new(Q())(a().initializeOnly,"endAngle",new(h().SFFloat)(1.570796)),new(Q())(a().initializeOnly,"radius",new(h().SFFloat)(1)),new(Q())(a().initializeOnly,"solid",new(h().SFBool))]),enumerable:!0}});const oe=ne,re=d().add("ArcClose2D",oe);function ae(e){Z().call(this,e),this.addType(a().Circle2D),this._radius.setUnit("length")}Object.assign(Object.setPrototypeOf(ae.prototype,Z().prototype),{set_live__(){Z().prototype.set_live__.call(this);const e=this.getBrowser(),t=this.isLive()&&e.getBrowserOption("AlwaysUpdateGeometries");this.getLive().getValue()||t?e.getCircle2DOptions().addInterest("requestRebuild",this):e.getCircle2DOptions().removeInterest("requestRebuild",this)},build(){const e=this.getBrowser().getCircle2DOptions().getGeometry(),t=this.getVertices(),i=this._radius.getValue();if(1===i)t.assign(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(ae,{...K().getStaticProperties("Circle2D","Geometry2D",2,"geometry","3.0"),fieldDefinitions:{value:new(W())([new(Q())(a().inputOutput,"metadata",new(h().SFNode)),new(Q())(a().initializeOnly,"radius",new(h().SFFloat)(1))]),enumerable:!0}});const le=ae,he=d().add("Circle2D",le),ge=e.X3DPointGeometryNode;var de=t.n(ge);function pe(e){Z().call(this,e),this.addType(a().Disk2D),this._innerRadius.setUnit("length"),this._outerRadius.setUnit("length")}Object.assign(Object.setPrototypeOf(pe.prototype,M().prototype),Z().prototype,{set_live__(){M().prototype.set_live__.call(this);const e=this.getBrowser(),t=this.isLive()&&e.getBrowserOption("AlwaysUpdateGeometries");this.getLive().getValue()||t?e.getDisk2DOptions().addInterest("requestRebuild",this):e.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())),o=this.getVertices();if(s===n){if(0===n)return o.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),this.setSolid(!1),void this.setBase(de());const e=this.getBrowser().getCircle2DOptions().getGeometry();if(1===n)o.assign(e.getVertices());else{const t=e.getVertices().getValue();for(let e=0,i=t.length;e<i;e+=4)o.push(t[e]*n,t[e+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),this.setSolid(!1),void this.setBase(Z())}if(0===s){if(this.getMultiTexCoords().push(i.getDiskTexCoords()),this.getNormals().assign(i.getDiskNormals()),1===n)o.assign(i.getDiskVertices());else{const e=i.getDiskVertices().getValue();for(let t=0,i=e.length;t<i;t+=4)o.push(e[t]*n,e[t+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(M())}const r=s/n,a=(1-r)/2,l=i.getDiskTexCoords().getValue(),h=i.getDiskVertices().getValue(),g=this.getTexCoords(),d=this.getNormals();this.getMultiTexCoords().push(g);for(let e=0,t=h.length;e<t;e+=12)g.push(l[e+4]*r+a,l[e+5]*r+a,0,1,l[e+4],l[e+5],0,1,l[e+8],l[e+9],0,1,l[e+4]*r+a,l[e+5]*r+a,0,1,l[e+8],l[e+9],0,1,l[e+8]*r+a,l[e+9]*r+a,0,1),d.push(0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1),o.push(h[e+4]*s,h[e+5]*s,0,1,h[e+4]*n,h[e+5]*n,0,1,h[e+8]*n,h[e+9]*n,0,1,h[e+4]*s,h[e+5]*s,0,1,h[e+8]*n,h[e+9]*n,0,1,h[e+8]*s,h[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(M())},setBase(e){this.intersectsLine=e.prototype.intersectsLine,this.intersectsBox=e.prototype.intersectsBox,this.generateTexCoords=e.prototype.generateTexCoords,this.displaySimple=e.prototype.displaySimple,this.display=e.prototype.display,this.displaySimpleInstanced=e.prototype.displaySimpleInstanced,this.displayInstanced=e.prototype.displayInstanced},updateRenderFunctions(){}}),Object.defineProperties(pe,{...K().getStaticProperties("Disk2D","Geometry2D",2,"geometry","3.0"),fieldDefinitions:{value:new(W())([new(Q())(a().inputOutput,"metadata",new(h().SFNode)),new(Q())(a().initializeOnly,"innerRadius",new(h().SFFloat)),new(Q())(a().initializeOnly,"outerRadius",new(h().SFFloat)(1)),new(Q())(a().initializeOnly,"solid",new(h().SFBool))]),enumerable:!0}});const ce=pe,ue=d().add("Disk2D",ce);function ye(e){Z().call(this,e),this.addType(a().Polyline2D),this._lineSegments.setUnit("length")}Object.assign(Object.setPrototypeOf(ye.prototype,Z().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(ye,{...K().getStaticProperties("Polyline2D","Geometry2D",1,"geometry","3.0"),fieldDefinitions:{value:new(W())([new(Q())(a().inputOutput,"metadata",new(h().SFNode)),new(Q())(a().initializeOnly,"lineSegments",new(h().MFVec2f))]),enumerable:!0}});const me=ye,Oe=d().add("Polyline2D",me);function De(e){de().call(this,e),this.addType(a().Polypoint2D),this._point.setUnit("length")}Object.assign(Object.setPrototypeOf(De.prototype,de().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,{...K().getStaticProperties("Polypoint2D","Geometry2D",1,"geometry","3.0"),fieldDefinitions:{value:new(W())([new(Q())(a().inputOutput,"metadata",new(h().SFNode)),new(Q())(a().inputOutput,"point",new(h().MFVec2f))]),enumerable:!0}});const we=De,fe=d().add("Polypoint2D",we),be=e.Vector2;var _e=t.n(be);function Pe(e){M().call(this,e),this.addType(a().Rectangle2D),this.setGeometryType(2),this._size.setUnit("length")}Object.assign(Object.setPrototypeOf(Pe.prototype,M().prototype),{build:(()=>{const e=new(_e())(2,2);return function(){const t=this.getBrowser().getRectangle2DOptions().getGeometry(),i=this._size.getValue(),s=this.getVertices();if(this.getMultiTexCoords().push(...t.getMultiTexCoords()),this.getTangents().assign(t.getTangents()),this.getNormals().assign(t.getNormals()),i.equals(e))s.assign(t.getVertices()),this.getMin().assign(t.getMin()),this.getMax().assign(t.getMax());else{const e=Math.abs(i.x/2),n=Math.abs(i.y/2),o=t.getVertices().getValue();for(let t=0;t<o.length;t+=4)s.push(e*o[t],n*o[t+1],0,1);this.getMin().set(-e,-n,0),this.getMax().set(e,n,0)}this.setSolid(this._solid.getValue())}})()}),Object.defineProperties(Pe,{...K().getStaticProperties("Rectangle2D","Geometry2D",1,"geometry","3.0"),fieldDefinitions:{value:new(W())([new(Q())(a().inputOutput,"metadata",new(h().SFNode)),new(Q())(a().initializeOnly,"size",new(h().SFVec2f)(2,2)),new(Q())(a().initializeOnly,"solid",new(h().SFBool))]),enumerable:!0}});const ve=Pe,Ve=d().add("Rectangle2D",ve);function Se(e){M().call(this,e),this.addType(a().TriangleSet2D),this.setGeometryType(2),this._vertices.setUnit("length")}Object.assign(Object.setPrototypeOf(Se.prototype,M().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())},generateTexCoords(){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(Se,{...K().getStaticProperties("TriangleSet2D","Geometry2D",1,"geometry","3.0"),fieldDefinitions:{value:new(W())([new(Q())(a().inputOutput,"metadata",new(h().SFNode)),new(Q())(a().inputOutput,"vertices",new(h().MFVec2f)),new(Q())(a().initializeOnly,"solid",new(h().SFBool))]),enumerable:!0}});const Ce=Se,Me=d().add("TriangleSet2D",Ce);s().add({name:"Geometry2D",concreteNodes:[se,re,he,ue,Oe,fe,Ve,Me],abstractNodes:[],browserContext:X});d().add("Geometry2DComponent",undefined)})();
|
|
1
|
+
/* X_ITE v11.3.2 */
|
|
2
|
+
const e=window[Symbol.for("X_ITE.X3D-11.3.2")];(()=>{var t={n:e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return t.d(i,{a:i}),i},d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const i=e.Components;var s=t.n(i);const n=e.X3DBaseNode;var o=t.n(n);const r=e.X3DConstants;var a=t.n(r);const l=e.Fields;var h=t.n(l);const g=e.Namespace;var d=t.n(g);function p(e){o().call(this,e),this.addChildObjects(a().inputOutput,"dimension",new(h().SFInt32)(40))}Object.setPrototypeOf(p.prototype,o().prototype),Object.defineProperties(p,{typeName:{value:"Arc2DOptions",enumerable:!0}});const c=p,u=d().add("Arc2DOptions",c);function y(e){o().call(this,e),this.addChildObjects(a().inputOutput,"dimension",new(h().SFInt32)(40))}Object.setPrototypeOf(y.prototype,o().prototype),Object.defineProperties(y,{typeName:{value:"ArcClose2DOptions",enumerable:!0}});const m=y,O=d().add("ArcClose2DOptions",m),D=e.IndexedLineSet;var w=t.n(D);const f=e.Coordinate;var b=t.n(f);const _=e.Complex;var P=t.n(_);function v(e){o().call(this,e),this.addChildObjects(a().inputOutput,"dimension",new(h().SFInt32)(40))}Object.assign(Object.setPrototypeOf(v.prototype,o().prototype),{initialize(){o().prototype.initialize.call(this),this.addInterest("eventsProcessed",this)},getGeometry(){return this.geometry||this.build(),this.geometry},createCoordIndex(){const e=this._dimension.getValue(),t=this.geometry._coordIndex;for(let i=0;i<e;++i)t.push(i);t.push(0,-1)},createPoints(){const e=this._dimension.getValue(),t=2*Math.PI/e,i=this.geometry._coord.getValue()._point;for(let s=0;s<e;++s){const e=P().Polar(1,t*s);i.push(new(h().SFVec3f)(e.real,e.imag,0))}},build(){this.geometry=new(w())(this.getExecutionContext()),this.geometry._coord=new(b())(this.getExecutionContext()),this.createCoordIndex(),this.createPoints();const e=this.geometry;this.geometry._coord.getValue().setup(),e.setup()},eventsProcessed(){this.geometry=null}}),Object.defineProperties(v,{typeName:{value:"Circle2DOptions",enumerable:!0}});const V=v,S=d().add("Circle2DOptions",V),C=e.X3DGeometryNode;var M=t.n(C);function x(e){o().call(this,e),this.addChildObjects(a().inputOutput,"dimension",new(h().SFInt32)(40)),this.diskTexCoords=M().createArray(),this.diskNormals=M().createArray(),this.diskVertices=M().createArray()}Object.assign(Object.setPrototypeOf(x.prototype,o().prototype),{initialize(){o().prototype.initialize.call(this),this.addInterest("eventsProcessed",this)},getDiskTexCoords(){return this.diskTexCoords.length||this.build(),this.diskTexCoords},getDiskNormals(){return this.diskNormals.length||this.build(),this.diskNormals},getDiskVertices(){return this.diskVertices.length||this.build(),this.diskVertices},build:(()=>{const e=new(P())(.5,.5),t=new(P()),i=new(P()),s=new(P()),n=new(P());return function(){const o=this._dimension.getValue(),r=2*Math.PI/o,a=this.diskTexCoords,l=this.diskNormals,h=this.diskVertices;for(let g=0;g<o;++g){const o=r*g,d=r*(g+1);t.setPolar(.5,o).add(e),i.setPolar(.5,d).add(e),s.setPolar(1,o),n.setPolar(1,d),a.push(.5,.5,0,1,t.real,t.imag,0,1,i.real,i.imag,0,1),l.push(0,0,1,0,0,1,0,0,1),h.push(0,0,0,1,s.real,s.imag,0,1,n.real,n.imag,0,1)}a.shrinkToFit(),l.shrinkToFit(),h.shrinkToFit()}})(),eventsProcessed(){this.diskTexCoords.length=0,this.diskNormals.length=0,this.diskVertices.length=0}}),Object.defineProperties(x,{typeName:{value:"Disk2DOptions",enumerable:!0}});const T=x,A=d().add("Disk2DOptions",T),F=e.IndexedFaceSet;var j=t.n(F);const I=e.TextureCoordinate;var N=t.n(I);function k(e){o().call(this,e)}Object.assign(Object.setPrototypeOf(k.prototype,o().prototype),{getGeometry(){if(this.geometry)return this.geometry;this.geometry=new(j())(this.getExecutionContext()),this.geometry._texCoord=new(N())(this.getExecutionContext()),this.geometry._coord=new(b())(this.getExecutionContext());const e=this.geometry,t=this.geometry._texCoord.getValue(),i=this.geometry._coord.getValue();return t._point=[1,1,0,1,0,0,1,0],i._point=[1,1,0,-1,1,0,-1,-1,0,1,-1,0],e._coordIndex=[0,1,2,3,-1],t.setup(),i.setup(),e.setup(),this.geometry}}),Object.defineProperties(k,{typeName:{value:"Rectangle2DOptions",enumerable:!0}});const G=k,R=d().add("Rectangle2DOptions",G),B=e.PrimitiveQuality;var z=t.n(B);function U(){}function L(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(U.prototype,{initialize(){this.setPrimitiveQuality2D(this.getBrowserOptions().getPrimitiveQuality())},getArc2DOptions(){return L.call(this,"getArc2DOptions",u)},getArcClose2DOptions(){return L.call(this,"getArcClose2DOptions",O)},getCircle2DOptions(){return L.call(this,"getCircle2DOptions",S)},getDisk2DOptions(){return L.call(this,"getDisk2DOptions",A)},getRectangle2DOptions(){return L.call(this,"getRectangle2DOptions",R)},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 E=U,X=d().add("X3DGeometry2DContext",E),q=e.X3DFieldDefinition;var Q=t.n(q);const H=e.FieldDefinitionArray;var W=t.n(H);const J=e.X3DNode;var K=t.n(J);const Y=e.X3DLineGeometryNode;var Z=t.n(Y);const $=e.Algorithm;var ee=t.n($);function te(e){Z().call(this,e),this.addType(a().Arc2D),this._startAngle.setUnit("angle"),this._endAngle.setUnit("angle"),this._radius.setUnit("length")}Object.assign(Object.setPrototypeOf(te.prototype,Z().prototype),{set_live__(){Z().prototype.set_live__.call(this);const e=this.getBrowser(),t=this.isLive()&&e.getBrowserOption("AlwaysUpdateGeometries");this.getLive().getValue()||t?e.getArc2DOptions().addInterest("requestRebuild",this):e.getArc2DOptions().removeInterest("requestRebuild",this)},getSweepAngle(){const e=ee().interval(this._startAngle.getValue(),0,2*Math.PI),t=ee().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=P().Polar(i,r),l=t+s*((e+1)/n),h=P().Polar(i,l);o.push(a.real,a.imag,0,1),o.push(h.real,h.imag,0,1)}this.getMin().set(-i,-i,0),this.getMax().set(i,i,0)}}),Object.defineProperties(te,{...K().getStaticProperties("Arc2D","Geometry2D",2,"geometry","3.0"),fieldDefinitions:{value:new(W())([new(Q())(a().inputOutput,"metadata",new(h().SFNode)),new(Q())(a().initializeOnly,"startAngle",new(h().SFFloat)),new(Q())(a().initializeOnly,"endAngle",new(h().SFFloat)(1.570796)),new(Q())(a().initializeOnly,"radius",new(h().SFFloat)(1))]),enumerable:!0}});const ie=te,se=d().add("Arc2D",ie);function ne(e){M().call(this,e),this.addType(a().ArcClose2D),this.setGeometryType(2),this._startAngle.setUnit("angle"),this._endAngle.setUnit("angle"),this._radius.setUnit("length")}Object.assign(Object.setPrototypeOf(ne.prototype,M().prototype),{set_live__(){M().prototype.set_live__.call(this);const e=this.getBrowser(),t=this.isLive()&&e.getBrowserOption("AlwaysUpdateGeometries");this.getLive().getValue()||t?e.getArcClose2DOptions().addInterest("requestRebuild",this):e.getArcClose2DOptions().removeInterest("requestRebuild",this)},getSweepAngle(){const e=ee().interval(this._startAngle.getValue(),0,2*Math.PI),t=ee().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(P())(.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(),h=this.getNormals(),g=this.getVertices(),d=[],p=[];this.getMultiTexCoords().push(l);const c=a-1;for(let t=0;t<a;++t){const i=n+r*(t/c);d.push(P().Polar(.5,i).add(e)),p.push(P().Polar(o,i))}if(i){const e=d[0],t=p[0];for(let i=1;i<c;++i){const s=d[i],n=d[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),h.push(0,0,1,0,0,1,0,0,1),g.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<c;++e){const t=d[e],i=d[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),h.push(0,0,1,0,0,1,0,0,1),g.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(ne,{...K().getStaticProperties("ArcClose2D","Geometry2D",2,"geometry","3.0"),fieldDefinitions:{value:new(W())([new(Q())(a().inputOutput,"metadata",new(h().SFNode)),new(Q())(a().initializeOnly,"closureType",new(h().SFString)("PIE")),new(Q())(a().initializeOnly,"startAngle",new(h().SFFloat)),new(Q())(a().initializeOnly,"endAngle",new(h().SFFloat)(1.570796)),new(Q())(a().initializeOnly,"radius",new(h().SFFloat)(1)),new(Q())(a().initializeOnly,"solid",new(h().SFBool))]),enumerable:!0}});const oe=ne,re=d().add("ArcClose2D",oe);function ae(e){Z().call(this,e),this.addType(a().Circle2D),this._radius.setUnit("length")}Object.assign(Object.setPrototypeOf(ae.prototype,Z().prototype),{set_live__(){Z().prototype.set_live__.call(this);const e=this.getBrowser(),t=this.isLive()&&e.getBrowserOption("AlwaysUpdateGeometries");this.getLive().getValue()||t?e.getCircle2DOptions().addInterest("requestRebuild",this):e.getCircle2DOptions().removeInterest("requestRebuild",this)},build(){const e=this.getBrowser().getCircle2DOptions().getGeometry(),t=this.getVertices(),i=this._radius.getValue();if(1===i)t.assign(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(ae,{...K().getStaticProperties("Circle2D","Geometry2D",2,"geometry","3.0"),fieldDefinitions:{value:new(W())([new(Q())(a().inputOutput,"metadata",new(h().SFNode)),new(Q())(a().initializeOnly,"radius",new(h().SFFloat)(1))]),enumerable:!0}});const le=ae,he=d().add("Circle2D",le),ge=e.X3DPointGeometryNode;var de=t.n(ge);function pe(e){Z().call(this,e),this.addType(a().Disk2D),this._innerRadius.setUnit("length"),this._outerRadius.setUnit("length")}Object.assign(Object.setPrototypeOf(pe.prototype,M().prototype),Z().prototype,{set_live__(){M().prototype.set_live__.call(this);const e=this.getBrowser(),t=this.isLive()&&e.getBrowserOption("AlwaysUpdateGeometries");this.getLive().getValue()||t?e.getDisk2DOptions().addInterest("requestRebuild",this):e.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())),o=this.getVertices();if(s===n){if(0===n)return o.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),this.setSolid(!1),void this.setBase(de());const e=this.getBrowser().getCircle2DOptions().getGeometry();if(1===n)o.assign(e.getVertices());else{const t=e.getVertices().getValue();for(let e=0,i=t.length;e<i;e+=4)o.push(t[e]*n,t[e+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),this.setSolid(!1),void this.setBase(Z())}if(0===s){if(this.getMultiTexCoords().push(i.getDiskTexCoords()),this.getNormals().assign(i.getDiskNormals()),1===n)o.assign(i.getDiskVertices());else{const e=i.getDiskVertices().getValue();for(let t=0,i=e.length;t<i;t+=4)o.push(e[t]*n,e[t+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(M())}const r=s/n,a=(1-r)/2,l=i.getDiskTexCoords().getValue(),h=i.getDiskVertices().getValue(),g=this.getTexCoords(),d=this.getNormals();this.getMultiTexCoords().push(g);for(let e=0,t=h.length;e<t;e+=12)g.push(l[e+4]*r+a,l[e+5]*r+a,0,1,l[e+4],l[e+5],0,1,l[e+8],l[e+9],0,1,l[e+4]*r+a,l[e+5]*r+a,0,1,l[e+8],l[e+9],0,1,l[e+8]*r+a,l[e+9]*r+a,0,1),d.push(0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1),o.push(h[e+4]*s,h[e+5]*s,0,1,h[e+4]*n,h[e+5]*n,0,1,h[e+8]*n,h[e+9]*n,0,1,h[e+4]*s,h[e+5]*s,0,1,h[e+8]*n,h[e+9]*n,0,1,h[e+8]*s,h[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(M())},setBase(e){this.intersectsLine=e.prototype.intersectsLine,this.intersectsBox=e.prototype.intersectsBox,this.generateTexCoords=e.prototype.generateTexCoords,this.displaySimple=e.prototype.displaySimple,this.display=e.prototype.display,this.displaySimpleInstanced=e.prototype.displaySimpleInstanced,this.displayInstanced=e.prototype.displayInstanced},updateRenderFunctions(){}}),Object.defineProperties(pe,{...K().getStaticProperties("Disk2D","Geometry2D",2,"geometry","3.0"),fieldDefinitions:{value:new(W())([new(Q())(a().inputOutput,"metadata",new(h().SFNode)),new(Q())(a().initializeOnly,"innerRadius",new(h().SFFloat)),new(Q())(a().initializeOnly,"outerRadius",new(h().SFFloat)(1)),new(Q())(a().initializeOnly,"solid",new(h().SFBool))]),enumerable:!0}});const ce=pe,ue=d().add("Disk2D",ce);function ye(e){Z().call(this,e),this.addType(a().Polyline2D),this._lineSegments.setUnit("length")}Object.assign(Object.setPrototypeOf(ye.prototype,Z().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(ye,{...K().getStaticProperties("Polyline2D","Geometry2D",1,"geometry","3.0"),fieldDefinitions:{value:new(W())([new(Q())(a().inputOutput,"metadata",new(h().SFNode)),new(Q())(a().initializeOnly,"lineSegments",new(h().MFVec2f))]),enumerable:!0}});const me=ye,Oe=d().add("Polyline2D",me);function De(e){de().call(this,e),this.addType(a().Polypoint2D),this._point.setUnit("length")}Object.assign(Object.setPrototypeOf(De.prototype,de().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,{...K().getStaticProperties("Polypoint2D","Geometry2D",1,"geometry","3.0"),fieldDefinitions:{value:new(W())([new(Q())(a().inputOutput,"metadata",new(h().SFNode)),new(Q())(a().inputOutput,"point",new(h().MFVec2f))]),enumerable:!0}});const we=De,fe=d().add("Polypoint2D",we),be=e.Vector2;var _e=t.n(be);function Pe(e){M().call(this,e),this.addType(a().Rectangle2D),this.setGeometryType(2),this._size.setUnit("length")}Object.assign(Object.setPrototypeOf(Pe.prototype,M().prototype),{build:(()=>{const e=new(_e())(2,2);return function(){const t=this.getBrowser().getRectangle2DOptions().getGeometry(),i=this._size.getValue(),s=this.getVertices();if(this.getMultiTexCoords().push(...t.getMultiTexCoords()),this.getTangents().assign(t.getTangents()),this.getNormals().assign(t.getNormals()),i.equals(e))s.assign(t.getVertices()),this.getMin().assign(t.getMin()),this.getMax().assign(t.getMax());else{const e=Math.abs(i.x/2),n=Math.abs(i.y/2),o=t.getVertices().getValue();for(let t=0;t<o.length;t+=4)s.push(e*o[t],n*o[t+1],0,1);this.getMin().set(-e,-n,0),this.getMax().set(e,n,0)}this.setSolid(this._solid.getValue())}})()}),Object.defineProperties(Pe,{...K().getStaticProperties("Rectangle2D","Geometry2D",1,"geometry","3.0"),fieldDefinitions:{value:new(W())([new(Q())(a().inputOutput,"metadata",new(h().SFNode)),new(Q())(a().initializeOnly,"size",new(h().SFVec2f)(2,2)),new(Q())(a().initializeOnly,"solid",new(h().SFBool))]),enumerable:!0}});const ve=Pe,Ve=d().add("Rectangle2D",ve);function Se(e){M().call(this,e),this.addType(a().TriangleSet2D),this.setGeometryType(2),this._vertices.setUnit("length")}Object.assign(Object.setPrototypeOf(Se.prototype,M().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())},generateTexCoords(){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(Se,{...K().getStaticProperties("TriangleSet2D","Geometry2D",1,"geometry","3.0"),fieldDefinitions:{value:new(W())([new(Q())(a().inputOutput,"metadata",new(h().SFNode)),new(Q())(a().inputOutput,"vertices",new(h().MFVec2f)),new(Q())(a().initializeOnly,"solid",new(h().SFBool))]),enumerable:!0}});const Ce=Se,Me=d().add("TriangleSet2D",Ce);s().add({name:"Geometry2D",concreteNodes:[se,re,he,ue,Oe,fe,Ve,Me],abstractNodes:[],browserContext:X});d().add("Geometry2DComponent",undefined)})();
|