x_ite
Version:
X_ITE X3D Browser, view and manipulate X3D, VRML, glTF and other 3D sources in HTML.
2 lines • 7.35 kB
JavaScript
/* X_ITE v12.2.3 */
const e=window[Symbol.for("X_ITE.X3D-12.2.3")];(()=>{var t={n:e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return t.d(i,{a:i}),i},d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const i=e.Components;var n=t.n(i);const o=e.Fields;var s=t.n(o);const r=e.X3DFieldDefinition;var a=t.n(r);const 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)})();