x_ite 11.2.3 → 11.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/assets/components/AnnotationComponent.js +3 -3
- package/dist/assets/components/AnnotationComponent.min.js +2 -2
- package/dist/assets/components/CADGeometryComponent.js +97 -39
- package/dist/assets/components/CADGeometryComponent.min.js +2 -2
- package/dist/assets/components/CubeMapTexturingComponent.js +4 -4
- 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 +90 -125
- package/dist/assets/components/GeospatialComponent.min.js +2 -2
- package/dist/assets/components/HAnimComponent.js +16 -13
- package/dist/assets/components/HAnimComponent.min.js +2 -2
- package/dist/assets/components/KeyDeviceSensorComponent.js +2 -2
- package/dist/assets/components/KeyDeviceSensorComponent.min.js +2 -2
- package/dist/assets/components/LayoutComponent.js +2 -2
- package/dist/assets/components/LayoutComponent.min.js +2 -2
- package/dist/assets/components/NURBSComponent.js +2 -2
- package/dist/assets/components/NURBSComponent.min.js +2 -2
- package/dist/assets/components/ParticleSystemsComponent.js +37 -96
- package/dist/assets/components/ParticleSystemsComponent.min.js +2 -2
- package/dist/assets/components/PickingComponent.js +78 -81
- package/dist/assets/components/PickingComponent.min.js +2 -2
- package/dist/assets/components/RigidBodyPhysicsComponent.js +244 -291
- 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 +2 -2
- 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 +104 -104
- package/dist/assets/components/Texturing3DComponent.min.js +2 -2
- package/dist/assets/components/VolumeRenderingComponent.js +14 -9
- package/dist/assets/components/VolumeRenderingComponent.min.js +2 -2
- package/dist/assets/components/WebXRComponent.js +2 -2
- package/dist/assets/components/WebXRComponent.min.js +2 -2
- package/dist/assets/components/X_ITEComponent.js +5 -65
- package/dist/assets/components/X_ITEComponent.min.js +2 -2
- package/dist/assets/hatching/1.png +0 -0
- package/dist/assets/hatching/10.png +0 -0
- package/dist/assets/hatching/11.png +0 -0
- package/dist/assets/hatching/12.png +0 -0
- package/dist/assets/hatching/13.png +0 -0
- package/dist/assets/hatching/14.png +0 -0
- package/dist/assets/hatching/15.png +0 -0
- package/dist/assets/hatching/16.png +0 -0
- package/dist/assets/hatching/17.png +0 -0
- package/dist/assets/hatching/18.png +0 -0
- package/dist/assets/hatching/19.png +0 -0
- package/dist/assets/hatching/2.png +0 -0
- package/dist/assets/hatching/3.png +0 -0
- package/dist/assets/hatching/4.png +0 -0
- package/dist/assets/hatching/5.png +0 -0
- package/dist/assets/hatching/6.png +0 -0
- package/dist/assets/hatching/7.png +0 -0
- package/dist/assets/hatching/8.png +0 -0
- package/dist/assets/hatching/9.png +0 -0
- package/dist/assets/images/ExamineViewer.png +0 -0
- package/dist/assets/images/FlyViewer.png +0 -0
- package/dist/assets/images/NoneViewer.png +0 -0
- package/dist/assets/images/PlaneViewer.png +0 -0
- package/dist/assets/images/PrimitiveQuality.png +0 -0
- package/dist/assets/images/Shading.png +0 -0
- package/dist/assets/images/TextureQuality.png +0 -0
- package/dist/assets/images/Time.png +0 -0
- package/dist/assets/images/Viewpoint.png +0 -0
- package/dist/assets/images/WalkViewer.png +0 -0
- package/dist/assets/images/go-next.png +0 -0
- package/dist/assets/images/gtk-fullscreen.png +0 -0
- package/dist/assets/images/gtk-leave-fullscreen.png +0 -0
- package/dist/assets/images/gtk-zoom-fit.png +0 -0
- package/dist/assets/images/gtk-zoom-in.png +0 -0
- package/dist/assets/images/help-about.png +0 -0
- package/dist/assets/images/icon.bw.png +0 -0
- package/dist/assets/images/icon.png +0 -0
- package/dist/assets/images/logo.128.png +0 -0
- package/dist/assets/images/logo.bw.png +0 -0
- package/dist/assets/images/logo.png +0 -0
- package/dist/assets/lib/lut_charlie.png +0 -0
- package/dist/assets/lib/lut_ggx.png +0 -0
- package/dist/assets/lib/lut_sheen_E.png +0 -0
- package/dist/assets/linetype/linetypes.png +0 -0
- package/dist/example.html +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +56211 -55975
- package/dist/x_ite.min.js +2 -2
- package/dist/x_ite.min.mjs +2 -2
- package/dist/x_ite.mjs +56157 -55921
- package/dist/x_ite.zip +0 -0
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* X_ITE v11.
|
|
2
|
-
const e=window[Symbol.for("X_ITE.X3D-11.
|
|
1
|
+
/* X_ITE v11.3.0 */
|
|
2
|
+
const e=window[Symbol.for("X_ITE.X3D-11.3.0")];(()=>{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 l=e.FieldDefinitionArray;var p=t.n(l);const u=e.X3DNode;var d=t.n(u);const c=e.X3DChildNode;var _=t.n(c);const h=e.X3DConstants;var g=t.n(h);const y=e.Namespace;var w=t.n(y);function O(e){_().call(this,e),this.addType(g().BooleanFilter)}Object.assign(Object.setPrototypeOf(O.prototype,_().prototype),{initialize(){_().prototype.initialize.call(this),this._set_boolean.addInterest("set_boolean__",this)},set_boolean__(){const e=this._set_boolean.getValue();e?this._inputTrue=!0:this._inputFalse=!1,this._inputNegate=!e}}),Object.defineProperties(O,{...d().getStaticProperties("BooleanFilter","EventUtilities",1,"children","3.0"),fieldDefinitions:{value:new(p())([new(a())(g().inputOutput,"metadata",new(s().SFNode)),new(a())(g().inputOnly,"set_boolean",new(s().SFBool)),new(a())(g().outputOnly,"inputTrue",new(s().SFBool)),new(a())(g().outputOnly,"inputFalse",new(s().SFBool)),new(a())(g().outputOnly,"inputNegate",new(s().SFBool))]),enumerable:!0}});const f=O,b=w().add("BooleanFilter",f),S=e.Algorithm;var F=t.n(S);function T(e){_().call(this,e),this.addType(g().X3DSequencerNode),this.index=-1}Object.assign(Object.setPrototypeOf(T.prototype,_().prototype),{initialize(){_().prototype.initialize.call(this),this._set_fraction.addInterest("set_fraction__",this),this._previous.addInterest("set_previous__",this),this._next.addInterest("set_next__",this),this._key.addInterest("set_index__",this)},set_fraction__(){const e=this._set_fraction.getValue(),t=this._key,i=t.length;if(0===i)return;let n=0;if(1===i||e<=t[0])n=0;else if(e>=t[i-1])n=this.getSize()-1;else{n=F().upperBound(t,0,i,e)-1}n!==this.index&&n<this.getSize()&&this.sequence(this.index=n)},set_previous__(){this._previous.getValue()&&(this.index<=0?this.index=this.getSize()-1:--this.index,this.index<this.getSize()&&this.sequence(this.index))},set_next__(){this._next.getValue()&&(this.index>=this.getSize()-1?this.index=0:++this.index,this.index<this.getSize()&&this.sequence(this.index))},set_index__(){this.index=-1}}),Object.defineProperties(T,d().getStaticProperties("X3DSequencerNode","EventUtilities",1));const v=T,m=w().add("X3DSequencerNode",v);function B(e){m.call(this,e),this.addType(g().BooleanSequencer)}Object.assign(Object.setPrototypeOf(B.prototype,m.prototype),{initialize(){m.prototype.initialize.call(this),this._keyValue.addInterest("set_index__",this)},getSize(){return this._keyValue.length},sequence(e){this._value_changed=this._keyValue[e]}}),Object.defineProperties(B,{...d().getStaticProperties("BooleanSequencer","EventUtilities",1,"children","3.0"),fieldDefinitions:{value:new(p())([new(a())(g().inputOutput,"metadata",new(s().SFNode)),new(a())(g().inputOnly,"set_fraction",new(s().SFFloat)),new(a())(g().inputOnly,"previous",new(s().SFBool)),new(a())(g().inputOnly,"next",new(s().SFBool)),new(a())(g().inputOutput,"key",new(s().MFFloat)),new(a())(g().inputOutput,"keyValue",new(s().MFBool)),new(a())(g().outputOnly,"value_changed",new(s().SFBool))]),enumerable:!0}});const P=B,j=w().add("BooleanSequencer",P);function x(e){_().call(this,e),this.addType(g().BooleanToggle)}Object.assign(Object.setPrototypeOf(x.prototype,_().prototype),{initialize(){_().prototype.initialize.call(this),this._set_boolean.addInterest("set_boolean__",this)},set_boolean__(){this._set_boolean.getValue()&&(this._toggle=!this._toggle.getValue())}}),Object.defineProperties(x,{...d().getStaticProperties("BooleanToggle","EventUtilities",1,"children","3.0"),fieldDefinitions:{value:new(p())([new(a())(g().inputOutput,"metadata",new(s().SFNode)),new(a())(g().inputOnly,"set_boolean",new(s().SFBool)),new(a())(g().inputOutput,"toggle",new(s().SFBool))]),enumerable:!0}});const z=x,I=w().add("BooleanToggle",z);function D(e){_().call(this,e),this.addType(g().X3DTriggerNode)}Object.setPrototypeOf(D.prototype,_().prototype),Object.defineProperties(D,d().getStaticProperties("X3DTriggerNode","EventUtilities",1));const N=D,V=w().add("X3DTriggerNode",N);function q(e){V.call(this,e),this.addType(g().BooleanTrigger)}Object.assign(Object.setPrototypeOf(q.prototype,V.prototype),{initialize(){V.prototype.initialize.call(this),this._set_triggerTime.addInterest("set_triggerTime__",this)},set_triggerTime__(){this._triggerTrue=!0}}),Object.defineProperties(q,{...d().getStaticProperties("BooleanTrigger","EventUtilities",1,"children","3.0"),fieldDefinitions:{value:new(p())([new(a())(g().inputOutput,"metadata",new(s().SFNode)),new(a())(g().inputOnly,"set_triggerTime",new(s().SFTime)),new(a())(g().outputOnly,"triggerTrue",new(s().SFBool))]),enumerable:!0}});const k=q,E=w().add("BooleanTrigger",k);function X(e){m.call(this,e),this.addType(g().IntegerSequencer)}Object.assign(Object.setPrototypeOf(X.prototype,m.prototype),{initialize(){m.prototype.initialize.call(this),this._keyValue.addInterest("set_index__",this)},getSize(){return this._keyValue.length},sequence(e){this._value_changed=this._keyValue[e]}}),Object.defineProperties(X,{...d().getStaticProperties("IntegerSequencer","EventUtilities",1,"children","3.0"),fieldDefinitions:{value:new(p())([new(a())(g().inputOutput,"metadata",new(s().SFNode)),new(a())(g().inputOnly,"set_fraction",new(s().SFFloat)),new(a())(g().inputOnly,"previous",new(s().SFBool)),new(a())(g().inputOnly,"next",new(s().SFBool)),new(a())(g().inputOutput,"key",new(s().MFFloat)),new(a())(g().inputOutput,"keyValue",new(s().MFInt32)),new(a())(g().outputOnly,"value_changed",new(s().SFInt32))]),enumerable:!0}});const U=X,C=w().add("IntegerSequencer",U);function M(e){V.call(this,e),this.addType(g().IntegerTrigger)}Object.assign(Object.setPrototypeOf(M.prototype,V.prototype),{initialize(){V.prototype.initialize.call(this),this._set_boolean.addInterest("set_boolean__",this)},set_boolean__(){this._triggerValue=this._integerKey}}),Object.defineProperties(M,{...d().getStaticProperties("IntegerTrigger","EventUtilities",1,"children","3.0"),fieldDefinitions:{value:new(p())([new(a())(g().inputOutput,"metadata",new(s().SFNode)),new(a())(g().inputOnly,"set_boolean",new(s().SFBool)),new(a())(g().inputOutput,"integerKey",new(s().SFInt32)(-1)),new(a())(g().outputOnly,"triggerValue",new(s().SFInt32))]),enumerable:!0}});const A=M,K=w().add("IntegerTrigger",A);function G(e){V.call(this,e),this.addType(g().TimeTrigger)}Object.assign(Object.setPrototypeOf(G.prototype,V.prototype),{initialize(){V.prototype.initialize.call(this),this._set_boolean.addInterest("set_boolean__",this)},set_boolean__(){this._triggerTime=this.getBrowser().getCurrentTime()}}),Object.defineProperties(G,{...d().getStaticProperties("TimeTrigger","EventUtilities",1,"children","3.0"),fieldDefinitions:{value:new(p())([new(a())(g().inputOutput,"metadata",new(s().SFNode)),new(a())(g().inputOnly,"set_boolean",new(s().SFBool)),new(a())(g().outputOnly,"triggerTime",new(s().SFTime))]),enumerable:!0}});const H=G,J=w().add("TimeTrigger",H);n().add({name:"EventUtilities",concreteNodes:[b,j,I,E,C,K,J],abstractNodes:[m,V]});w().add("EventUtilitiesComponent",undefined)})();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* X_ITE v11.
|
|
2
|
-
const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.
|
|
1
|
+
/* X_ITE v11.3.0 */
|
|
2
|
+
const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.3.0")];
|
|
3
3
|
/******/ (() => { // webpackBootstrap
|
|
4
4
|
/******/ "use strict";
|
|
5
5
|
/******/ // The require scope
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* X_ITE v11.
|
|
2
|
-
const e=window[Symbol.for("X_ITE.X3D-11.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 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.0 */
|
|
2
|
+
const e=window[Symbol.for("X_ITE.X3D-11.3.0")];(()=>{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,5 +1,5 @@
|
|
|
1
|
-
/* X_ITE v11.
|
|
2
|
-
const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.
|
|
1
|
+
/* X_ITE v11.3.0 */
|
|
2
|
+
const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.3.0")];
|
|
3
3
|
/******/ (() => { // webpackBootstrap
|
|
4
4
|
/******/ "use strict";
|
|
5
5
|
/******/ // The require scope
|
|
@@ -1936,8 +1936,6 @@ var external_X_ITE_X3D_Box3_default = /*#__PURE__*/__webpack_require__.n(externa
|
|
|
1936
1936
|
|
|
1937
1937
|
|
|
1938
1938
|
|
|
1939
|
-
var center = new (external_X_ITE_X3D_Vector3_default()) ();
|
|
1940
|
-
|
|
1941
1939
|
function GeoLOD (executionContext)
|
|
1942
1940
|
{
|
|
1943
1941
|
external_X_ITE_X3D_X3DChildNode_default().call (this, executionContext);
|
|
@@ -1946,6 +1944,8 @@ function GeoLOD (executionContext)
|
|
|
1946
1944
|
|
|
1947
1945
|
this .addType ((external_X_ITE_X3D_X3DConstants_default()).GeoLOD);
|
|
1948
1946
|
|
|
1947
|
+
this .setVisibleObject (true);
|
|
1948
|
+
|
|
1949
1949
|
// Units
|
|
1950
1950
|
|
|
1951
1951
|
this ._range .setUnit ("length");
|
|
@@ -1959,6 +1959,7 @@ function GeoLOD (executionContext)
|
|
|
1959
1959
|
this .child2Inline = new (external_X_ITE_X3D_Inline_default()) (executionContext);
|
|
1960
1960
|
this .child3Inline = new (external_X_ITE_X3D_Inline_default()) (executionContext);
|
|
1961
1961
|
this .child4Inline = new (external_X_ITE_X3D_Inline_default()) (executionContext);
|
|
1962
|
+
this .childInlines = [this .child1Inline, this .child2Inline, this .child3Inline, this .child4Inline];
|
|
1962
1963
|
this .childrenLoaded = false;
|
|
1963
1964
|
this .childBBox = new (external_X_ITE_X3D_Box3_default()) ();
|
|
1964
1965
|
this .keepCurrentLevel = false;
|
|
@@ -1979,13 +1980,11 @@ Object .assign (Object .setPrototypeOf (GeoLOD .prototype, (external_X_ITE_X3D_X
|
|
|
1979
1980
|
|
|
1980
1981
|
this .rootGroup ._children = this ._rootNode;
|
|
1981
1982
|
this .rootGroup .setPrivate (true);
|
|
1982
|
-
this .rootGroup .setup ();
|
|
1983
1983
|
|
|
1984
|
-
this .rootInline
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
this .child4Inline ._loadState .addInterest ("set_childLoadState__", this);
|
|
1984
|
+
this .rootInline ._loadState .addInterest ("set_rootLoadState__", this);
|
|
1985
|
+
|
|
1986
|
+
for (const childInline of this .childInlines)
|
|
1987
|
+
childInline ._loadState .addInterest ("set_childLoadState__", this);
|
|
1989
1988
|
|
|
1990
1989
|
this ._rootUrl .addFieldInterest (this .rootInline ._url);
|
|
1991
1990
|
this ._child1Url .addFieldInterest (this .child1Inline ._url);
|
|
@@ -1993,11 +1992,10 @@ Object .assign (Object .setPrototypeOf (GeoLOD .prototype, (external_X_ITE_X3D_X
|
|
|
1993
1992
|
this ._child3Url .addFieldInterest (this .child3Inline ._url);
|
|
1994
1993
|
this ._child4Url .addFieldInterest (this .child4Inline ._url);
|
|
1995
1994
|
|
|
1996
|
-
this .rootInline
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
this .child4Inline ._load = false;
|
|
1995
|
+
this .rootInline ._load = true;
|
|
1996
|
+
|
|
1997
|
+
for (const childInline of this .childInlines)
|
|
1998
|
+
childInline ._load = false;
|
|
2001
1999
|
|
|
2002
2000
|
this .rootInline ._url = this ._rootUrl;
|
|
2003
2001
|
this .child1Inline ._url = this ._child1Url;
|
|
@@ -2006,10 +2004,9 @@ Object .assign (Object .setPrototypeOf (GeoLOD .prototype, (external_X_ITE_X3D_X
|
|
|
2006
2004
|
this .child4Inline ._url = this ._child4Url;
|
|
2007
2005
|
|
|
2008
2006
|
this .rootInline .setup ();
|
|
2009
|
-
|
|
2010
|
-
this .
|
|
2011
|
-
|
|
2012
|
-
this .child4Inline .setup ();
|
|
2007
|
+
|
|
2008
|
+
for (const childInline of this .childInlines)
|
|
2009
|
+
childInline .setup ();
|
|
2013
2010
|
},
|
|
2014
2011
|
getBBox (bbox, shadows)
|
|
2015
2012
|
{
|
|
@@ -2031,10 +2028,8 @@ Object .assign (Object .setPrototypeOf (GeoLOD .prototype, (external_X_ITE_X3D_X
|
|
|
2031
2028
|
|
|
2032
2029
|
bbox .set ();
|
|
2033
2030
|
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
bbox .add (this .child3Inline .getBBox (childBBox, shadows));
|
|
2037
|
-
bbox .add (this .child4Inline .getBBox (childBBox, shadows));
|
|
2031
|
+
for (const childInline of this .childInlines)
|
|
2032
|
+
bbox .add (childInline .getBBox (childBBox, shadows));
|
|
2038
2033
|
|
|
2039
2034
|
return bbox;
|
|
2040
2035
|
}
|
|
@@ -2064,89 +2059,79 @@ Object .assign (Object .setPrototypeOf (GeoLOD .prototype, (external_X_ITE_X3D_X
|
|
|
2064
2059
|
if (this ._level_changed .getValue () !== 1)
|
|
2065
2060
|
return;
|
|
2066
2061
|
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
if (this .child1Inline .checkLoadState () === (external_X_ITE_X3D_X3DConstants_default()).COMPLETE_STATE ||
|
|
2070
|
-
this .child1Inline .checkLoadState () === (external_X_ITE_X3D_X3DConstants_default()).FAILED_STATE)
|
|
2071
|
-
++ loaded;
|
|
2062
|
+
let loaded = 0;
|
|
2072
2063
|
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
++ loaded;
|
|
2080
|
-
|
|
2081
|
-
if (this .child4Inline .checkLoadState () === (external_X_ITE_X3D_X3DConstants_default()).COMPLETE_STATE ||
|
|
2082
|
-
this .child4Inline .checkLoadState () === (external_X_ITE_X3D_X3DConstants_default()).FAILED_STATE)
|
|
2083
|
-
++ loaded;
|
|
2064
|
+
for (const childInline of this .childInlines)
|
|
2065
|
+
{
|
|
2066
|
+
if (childInline .checkLoadState () === (external_X_ITE_X3D_X3DConstants_default()).COMPLETE_STATE ||
|
|
2067
|
+
childInline .checkLoadState () === (external_X_ITE_X3D_X3DConstants_default()).FAILED_STATE)
|
|
2068
|
+
++ loaded;
|
|
2069
|
+
}
|
|
2084
2070
|
|
|
2085
2071
|
if (loaded === 4)
|
|
2086
2072
|
{
|
|
2087
2073
|
this .childrenLoaded = true;
|
|
2088
2074
|
|
|
2089
|
-
|
|
2075
|
+
const children = this ._children;
|
|
2090
2076
|
|
|
2091
2077
|
children .length = 0;
|
|
2092
2078
|
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
children .push (rootNodes [i]);
|
|
2097
|
-
|
|
2098
|
-
var rootNodes = this .child2Inline .getInternalScene () .getRootNodes ();
|
|
2099
|
-
|
|
2100
|
-
for (var i = 0, length = rootNodes .length; i < length; ++ i)
|
|
2101
|
-
children .push (rootNodes [i]);
|
|
2102
|
-
|
|
2103
|
-
var rootNodes = this .child3Inline .getInternalScene () .getRootNodes ();
|
|
2104
|
-
|
|
2105
|
-
for (var i = 0, length = rootNodes .length; i < length; ++ i)
|
|
2106
|
-
children .push (rootNodes [i]);
|
|
2107
|
-
|
|
2108
|
-
var rootNodes = this .child4Inline .getInternalScene () .getRootNodes ();
|
|
2079
|
+
for (const childInline of this .childInlines)
|
|
2080
|
+
{
|
|
2081
|
+
const rootNodes = childInline .getInternalScene () .getRootNodes ();
|
|
2109
2082
|
|
|
2110
|
-
|
|
2111
|
-
|
|
2083
|
+
for (const rootNode of rootNodes)
|
|
2084
|
+
children .push (rootNode);
|
|
2085
|
+
}
|
|
2112
2086
|
}
|
|
2113
2087
|
},
|
|
2088
|
+
set_childPointingObject__ ()
|
|
2089
|
+
{
|
|
2090
|
+
this .setPointingObject (this .childInlines .some (childInline => childInline .isPointingObject ()));
|
|
2091
|
+
},
|
|
2114
2092
|
set_childCameraObject__ ()
|
|
2115
2093
|
{
|
|
2116
|
-
this .setCameraObject (this .
|
|
2117
|
-
this .child2Inline .isCameraObject () ||
|
|
2118
|
-
this .child3Inline .isCameraObject () ||
|
|
2119
|
-
this .child4Inline .isCameraObject ());
|
|
2094
|
+
this .setCameraObject (this .childInlines .some (childInline => childInline .isCameraObject ()));
|
|
2120
2095
|
},
|
|
2121
2096
|
set_childPickableObject__ ()
|
|
2122
2097
|
{
|
|
2123
|
-
this .setPickableObject (this .
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2098
|
+
this .setPickableObject (this .childInlines .some (childInline => childInline .isPickableObject ()));
|
|
2099
|
+
},
|
|
2100
|
+
set_childCollisionObject__ ()
|
|
2101
|
+
{
|
|
2102
|
+
this .setCollisionObject (this .childInlines .some (childInline => childInline .isCollisionObject ()));
|
|
2103
|
+
},
|
|
2104
|
+
set_childShadowObject__ ()
|
|
2105
|
+
{
|
|
2106
|
+
this .setShadowObject (this .childInlines .some (childInline => childInline .isShadowObject ()));
|
|
2127
2107
|
},
|
|
2128
2108
|
getLevel (modelViewMatrix)
|
|
2129
2109
|
{
|
|
2130
|
-
|
|
2110
|
+
const distance = this .getDistance (modelViewMatrix);
|
|
2131
2111
|
|
|
2132
2112
|
if (distance < this ._range .getValue ())
|
|
2133
2113
|
return 1;
|
|
2134
2114
|
|
|
2135
2115
|
return 0;
|
|
2136
2116
|
},
|
|
2137
|
-
getDistance (
|
|
2117
|
+
getDistance: (function ()
|
|
2138
2118
|
{
|
|
2139
|
-
|
|
2119
|
+
const center = new (external_X_ITE_X3D_Vector3_default()) ();
|
|
2140
2120
|
|
|
2141
|
-
return
|
|
2142
|
-
|
|
2121
|
+
return function (modelViewMatrix)
|
|
2122
|
+
{
|
|
2123
|
+
modelViewMatrix .translate (this .getCoord (this ._center .getValue (), center));
|
|
2124
|
+
|
|
2125
|
+
return modelViewMatrix .origin .magnitude ();
|
|
2126
|
+
};
|
|
2127
|
+
})(),
|
|
2143
2128
|
traverse (type, renderObject)
|
|
2144
2129
|
{
|
|
2145
2130
|
switch (type)
|
|
2146
2131
|
{
|
|
2147
2132
|
case (external_X_ITE_X3D_TraverseType_default()).PICKING:
|
|
2148
2133
|
{
|
|
2149
|
-
|
|
2134
|
+
const
|
|
2150
2135
|
browser = this .getBrowser (),
|
|
2151
2136
|
pickingHierarchy = browser .getPickingHierarchy ();
|
|
2152
2137
|
|
|
@@ -2159,7 +2144,7 @@ Object .assign (Object .setPrototypeOf (GeoLOD .prototype, (external_X_ITE_X3D_X
|
|
|
2159
2144
|
}
|
|
2160
2145
|
case (external_X_ITE_X3D_TraverseType_default()).DISPLAY:
|
|
2161
2146
|
{
|
|
2162
|
-
|
|
2147
|
+
const level = this .getLevel (this .modelViewMatrix .assign (renderObject .getModelViewMatrix () .get ()));
|
|
2163
2148
|
|
|
2164
2149
|
if (level !== this ._level_changed .getValue ())
|
|
2165
2150
|
{
|
|
@@ -2169,22 +2154,18 @@ Object .assign (Object .setPrototypeOf (GeoLOD .prototype, (external_X_ITE_X3D_X
|
|
|
2169
2154
|
{
|
|
2170
2155
|
case 0:
|
|
2171
2156
|
{
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2157
|
+
for (const childInline of this .childInlines)
|
|
2158
|
+
{
|
|
2159
|
+
childInline ._isPointingObject .removeInterest ("set_childPointingObject__", this);
|
|
2160
|
+
childInline ._isCameraObject .removeInterest ("set_childCameraObject__", this);
|
|
2161
|
+
childInline ._isPickableObject .removeInterest ("set_childPickableObject__", this);
|
|
2162
|
+
childInline ._isCollisionObject .removeInterest ("set_childCollisionObject__", this);
|
|
2163
|
+
childInline ._isShadowObject .removeInterest ("set_childShadowObject__", this);
|
|
2164
|
+
}
|
|
2180
2165
|
|
|
2181
2166
|
if (this ._rootNode .length)
|
|
2182
2167
|
{
|
|
2183
|
-
this .
|
|
2184
|
-
this .rootGroup ._isPickableObject .addFieldInterest (this ._isPickableObject);
|
|
2185
|
-
|
|
2186
|
-
this .setCameraObject (this .rootGroup .isCameraObject ());
|
|
2187
|
-
this .setPickableObject (this .rootGroup .isPickableObject ());
|
|
2168
|
+
this .connectChildNode (this .rootGroup, [(external_X_ITE_X3D_TraverseType_default()).DISPLAY]);
|
|
2188
2169
|
|
|
2189
2170
|
this ._children = this ._rootNode;
|
|
2190
2171
|
this .childrenLoaded = false;
|
|
@@ -2193,11 +2174,7 @@ Object .assign (Object .setPrototypeOf (GeoLOD .prototype, (external_X_ITE_X3D_X
|
|
|
2193
2174
|
{
|
|
2194
2175
|
if (this .rootInline .checkLoadState () == (external_X_ITE_X3D_X3DConstants_default()).COMPLETE_STATE)
|
|
2195
2176
|
{
|
|
2196
|
-
this .
|
|
2197
|
-
this .rootInline ._isPickableObject .addFieldInterest (this ._isPickableObject);
|
|
2198
|
-
|
|
2199
|
-
this .setCameraObject (this .rootInline .isCameraObject ());
|
|
2200
|
-
this .setPickableObject (this .rootInline .isPickableObject ());
|
|
2177
|
+
this .connectChildNode (this .rootInline, [(external_X_ITE_X3D_TraverseType_default()).DISPLAY]);
|
|
2201
2178
|
|
|
2202
2179
|
this ._children = this .rootInline .getInternalScene () .getRootNodes ();
|
|
2203
2180
|
this .childrenLoaded = false;
|
|
@@ -2206,10 +2183,8 @@ Object .assign (Object .setPrototypeOf (GeoLOD .prototype, (external_X_ITE_X3D_X
|
|
|
2206
2183
|
|
|
2207
2184
|
if (this .unload)
|
|
2208
2185
|
{
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
this .child3Inline ._load = false;
|
|
2212
|
-
this .child4Inline ._load = false;
|
|
2186
|
+
for (const childInline of this .childInlines)
|
|
2187
|
+
childInline ._load = false;
|
|
2213
2188
|
}
|
|
2214
2189
|
|
|
2215
2190
|
break;
|
|
@@ -2217,27 +2192,24 @@ Object .assign (Object .setPrototypeOf (GeoLOD .prototype, (external_X_ITE_X3D_X
|
|
|
2217
2192
|
case 1:
|
|
2218
2193
|
{
|
|
2219
2194
|
if (this ._rootNode .length)
|
|
2220
|
-
|
|
2221
|
-
this .rootGroup ._isCameraObject .removeFieldInterest (this ._isCameraObject);
|
|
2222
|
-
this .rootGroup ._isPickableObject .removeFieldInterest (this ._isPickableObject);
|
|
2223
|
-
}
|
|
2195
|
+
this .disconnectChildNode (this .rootGroup);
|
|
2224
2196
|
else
|
|
2197
|
+
this .disconnectChildNode (this .rootInline);
|
|
2198
|
+
|
|
2199
|
+
for (const childInline of this .childInlines)
|
|
2225
2200
|
{
|
|
2226
|
-
|
|
2227
|
-
|
|
2201
|
+
childInline ._isPointingObject .addInterest ("set_childPointingObject__", this);
|
|
2202
|
+
childInline ._isCameraObject .addInterest ("set_childCameraObject__", this);
|
|
2203
|
+
childInline ._isPickableObject .addInterest ("set_childPickableObject__", this);
|
|
2204
|
+
childInline ._isCollisionObject .addInterest ("set_childCollisionObject__", this);
|
|
2205
|
+
childInline ._isShadowObject .addInterest ("set_childShadowObject__", this);
|
|
2228
2206
|
}
|
|
2229
2207
|
|
|
2230
|
-
this .
|
|
2231
|
-
this .child2Inline ._isCameraObject .addInterest ("set_childCameraObject__", this);
|
|
2232
|
-
this .child3Inline ._isCameraObject .addInterest ("set_childCameraObject__", this);
|
|
2233
|
-
this .child4Inline ._isCameraObject .addInterest ("set_childCameraObject__", this);
|
|
2234
|
-
this .child1Inline ._isPickableObject .addInterest ("set_childPickableObject__", this);
|
|
2235
|
-
this .child2Inline ._isPickableObject .addInterest ("set_childPickableObject__", this);
|
|
2236
|
-
this .child3Inline ._isPickableObject .addInterest ("set_childPickableObject__", this);
|
|
2237
|
-
this .child4Inline ._isPickableObject .addInterest ("set_childPickableObject__", this);
|
|
2238
|
-
|
|
2208
|
+
this .set_childPointingObject__ ();
|
|
2239
2209
|
this .set_childCameraObject__ ();
|
|
2240
2210
|
this .set_childPickableObject__ ();
|
|
2211
|
+
this .set_childCollisionObject__ ();
|
|
2212
|
+
this .set_childShadowObject__ ();
|
|
2241
2213
|
|
|
2242
2214
|
if (this .child1Inline ._load .getValue ())
|
|
2243
2215
|
{
|
|
@@ -2245,10 +2217,8 @@ Object .assign (Object .setPrototypeOf (GeoLOD .prototype, (external_X_ITE_X3D_X
|
|
|
2245
2217
|
}
|
|
2246
2218
|
else
|
|
2247
2219
|
{
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
this .child3Inline ._load = true;
|
|
2251
|
-
this .child4Inline ._load = true;
|
|
2220
|
+
for (const childInline of this .childInlines)
|
|
2221
|
+
childInline ._load = true;
|
|
2252
2222
|
}
|
|
2253
2223
|
|
|
2254
2224
|
break;
|
|
@@ -2281,10 +2251,9 @@ Object .assign (Object .setPrototypeOf (GeoLOD .prototype, (external_X_ITE_X3D_X
|
|
|
2281
2251
|
}
|
|
2282
2252
|
case 1:
|
|
2283
2253
|
{
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
this .child4Inline .traverse (type, renderObject);
|
|
2254
|
+
for (const childInline of this .childInlines)
|
|
2255
|
+
childInline .traverse (type, renderObject);
|
|
2256
|
+
|
|
2288
2257
|
break;
|
|
2289
2258
|
}
|
|
2290
2259
|
}
|
|
@@ -2526,7 +2495,7 @@ Object .assign (Object .setPrototypeOf (GeoMetadata .prototype, (external_X_ITE_
|
|
|
2526
2495
|
external_X_ITE_X3D_X3DInfoNode_default().prototype .initialize .call (this);
|
|
2527
2496
|
external_X_ITE_X3D_X3DUrlObject_default().prototype .initialize .call (this);
|
|
2528
2497
|
},
|
|
2529
|
-
requestImmediateLoad (cache = true)
|
|
2498
|
+
async requestImmediateLoad (cache = true)
|
|
2530
2499
|
{ },
|
|
2531
2500
|
dispose ()
|
|
2532
2501
|
{
|
|
@@ -2891,9 +2860,6 @@ function GeoProximitySensor (executionContext)
|
|
|
2891
2860
|
// Private properties
|
|
2892
2861
|
|
|
2893
2862
|
this .proximitySensor = new (external_X_ITE_X3D_ProximitySensor_default()) (executionContext);
|
|
2894
|
-
|
|
2895
|
-
this .setCameraObject (this .proximitySensor .isCameraObject ());
|
|
2896
|
-
this .setPickableObject (this .proximitySensor .isPickableObject ());
|
|
2897
2863
|
}
|
|
2898
2864
|
|
|
2899
2865
|
Object .assign (Object .setPrototypeOf (GeoProximitySensor .prototype, (external_X_ITE_X3D_X3DEnvironmentalSensorNode_default()).prototype),
|
|
@@ -2910,9 +2876,6 @@ Object .assign (Object .setPrototypeOf (GeoProximitySensor .prototype, (external
|
|
|
2910
2876
|
|
|
2911
2877
|
this ._geoCenter .addFieldInterest (this ._center);
|
|
2912
2878
|
|
|
2913
|
-
this .proximitySensor ._isCameraObject .addFieldInterest (this ._isCameraObject);
|
|
2914
|
-
this .proximitySensor ._isPickableObject .addFieldInterest (this ._isPickableObject);
|
|
2915
|
-
|
|
2916
2879
|
this .proximitySensor ._isActive .addFieldInterest (this ._isActive);
|
|
2917
2880
|
this .proximitySensor ._enterTime .addFieldInterest (this ._enterTime);
|
|
2918
2881
|
this .proximitySensor ._exitTime .addFieldInterest (this ._exitTime);
|
|
@@ -2927,6 +2890,8 @@ Object .assign (Object .setPrototypeOf (GeoProximitySensor .prototype, (external
|
|
|
2927
2890
|
this .proximitySensor ._center = this ._center;
|
|
2928
2891
|
|
|
2929
2892
|
this .proximitySensor .setup ();
|
|
2893
|
+
|
|
2894
|
+
this .connectChildNode (this .proximitySensor);
|
|
2930
2895
|
},
|
|
2931
2896
|
set_position__ (position)
|
|
2932
2897
|
{
|