x_ite 14.1.4 → 14.2.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.
Files changed (55) hide show
  1. package/README.md +32 -32
  2. package/dist/X3DUOM.xml +6 -0
  3. package/dist/assets/components/AnnotationComponent.js +2 -2
  4. package/dist/assets/components/AnnotationComponent.min.js +2 -2
  5. package/dist/assets/components/CADGeometryComponent.js +2 -2
  6. package/dist/assets/components/CADGeometryComponent.min.js +2 -2
  7. package/dist/assets/components/CubeMapTexturingComponent.js +2 -2
  8. package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
  9. package/dist/assets/components/DISComponent.js +2 -2
  10. package/dist/assets/components/DISComponent.min.js +2 -2
  11. package/dist/assets/components/EventUtilitiesComponent.js +2 -2
  12. package/dist/assets/components/EventUtilitiesComponent.min.js +2 -2
  13. package/dist/assets/components/Geometry2DComponent.js +2 -2
  14. package/dist/assets/components/Geometry2DComponent.min.js +2 -2
  15. package/dist/assets/components/Geometry3DComponent.js +2 -2
  16. package/dist/assets/components/Geometry3DComponent.min.js +2 -2
  17. package/dist/assets/components/GeospatialComponent.js +2 -2
  18. package/dist/assets/components/GeospatialComponent.min.js +2 -2
  19. package/dist/assets/components/HAnimComponent.js +2 -2
  20. package/dist/assets/components/HAnimComponent.min.js +2 -2
  21. package/dist/assets/components/KeyDeviceSensorComponent.js +2 -2
  22. package/dist/assets/components/KeyDeviceSensorComponent.min.js +2 -2
  23. package/dist/assets/components/LayoutComponent.js +8 -5
  24. package/dist/assets/components/LayoutComponent.min.js +2 -2
  25. package/dist/assets/components/NURBSComponent.js +2 -2
  26. package/dist/assets/components/NURBSComponent.min.js +2 -2
  27. package/dist/assets/components/ParticleSystemsComponent.js +2 -2
  28. package/dist/assets/components/ParticleSystemsComponent.min.js +2 -2
  29. package/dist/assets/components/PickingComponent.js +2 -2
  30. package/dist/assets/components/PickingComponent.min.js +2 -2
  31. package/dist/assets/components/RigidBodyPhysicsComponent.js +2 -2
  32. package/dist/assets/components/RigidBodyPhysicsComponent.min.js +2 -2
  33. package/dist/assets/components/ScriptingComponent.js +3 -3
  34. package/dist/assets/components/ScriptingComponent.min.js +2 -2
  35. package/dist/assets/components/TextComponent.js +48 -29
  36. package/dist/assets/components/TextComponent.min.js +2 -2
  37. package/dist/assets/components/TextureProjectionComponent.js +2 -2
  38. package/dist/assets/components/TextureProjectionComponent.min.js +2 -2
  39. package/dist/assets/components/Texturing3DComponent.js +10 -10
  40. package/dist/assets/components/Texturing3DComponent.min.js +2 -2
  41. package/dist/assets/components/VolumeRenderingComponent.js +2 -2
  42. package/dist/assets/components/VolumeRenderingComponent.min.js +2 -2
  43. package/dist/assets/components/WebXRComponent.js +2 -2
  44. package/dist/assets/components/WebXRComponent.min.js +2 -2
  45. package/dist/assets/components/X_ITEComponent.js +2 -2
  46. package/dist/assets/components/X_ITEComponent.min.js +2 -2
  47. package/dist/example.html +1 -1
  48. package/dist/x_ite.css +1 -1
  49. package/dist/x_ite.d.ts +70 -20
  50. package/dist/x_ite.js +289 -280
  51. package/dist/x_ite.min.js +2 -2
  52. package/dist/x_ite.min.mjs +2 -2
  53. package/dist/x_ite.mjs +288 -278
  54. package/dist/x_ite.zip +0 -0
  55. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
- /* X_ITE v14.1.4 */
2
- const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-14.1.4")];
1
+ /* X_ITE v14.2.0 */
2
+ const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-14.2.0")];
3
3
  /******/ (() => { // webpackBootstrap
4
4
  /******/ "use strict";
5
5
  /******/ var __webpack_modules__ = ({
@@ -404,7 +404,7 @@ Object .assign (Object .setPrototypeOf (Script .prototype, Scripting_X3DScriptNo
404
404
  node .fromString (vrmlSyntax, getScriptNode () .getExecutionContext ());
405
405
 
406
406
  if (node .getValue ())
407
- return node;
407
+ return external_X_ITE_X3D_SFNodeCache_default().get (node .getValue ());
408
408
 
409
409
  throw new Error ("SFNode.new: invalid argument.");
410
410
  }
@@ -1,2 +1,2 @@
1
- /* X_ITE v14.1.4 */
2
- const e=window[Symbol.for("X_ITE.X3D-14.1.4")];(()=>{var t={254(t){t.exports=e.jquery}},n={};function o(e){var a=n[e];if(void 0!==a)return a.exports;var r=n[e]={exports:{}};return t[e](r,r.exports,o),r.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const a=e.Components;var r=o.n(a);const i=e.X3DBaseNode;var s=o.n(i);const l=e.X3DFieldDefinition;var c=o.n(l);const u=e.FieldDefinitionArray;var d=o.n(u);const p=e.X3DField;var v=o.n(p);const F=e.X3DArrayField;var f=o.n(F);const h=e.Fields;var g=o.n(h);const S=e.X3DBrowser;var y=o.n(S);const D=e.ComponentInfo;var M=o.n(D);const m=e.ComponentInfoArray;var x=o.n(m);const w=e.ProfileInfo;var _=o.n(w);const N=e.ProfileInfoArray;var A=o.n(N);const O=e.ConcreteNodesArray;var E=o.n(O);const I=e.AbstractNodesArray;var b=o.n(I);const X=e.UnitInfo;var T=o.n(X);const C=e.UnitInfoArray;var V=o.n(C);const P=e.NamedNodesArray;var j=o.n(P);const B=e.ImportedNodesArray;var R=o.n(B);const U=e.X3DImportedNode;var L=o.n(U);const z=e.ExportedNodesArray;var $=o.n(z);const G=e.X3DExportedNode;var q=o.n(G);const k=e.X3DExecutionContext;var W=o.n(k);const H=e.X3DScene;var J=o.n(H);const K=e.ExternProtoDeclarationArray;var Q=o.n(K);const Y=e.ProtoDeclarationArray;var Z=o.n(Y);const ee=e.X3DExternProtoDeclaration;var te=o.n(ee);const ne=e.X3DProtoDeclaration;var oe=o.n(ne);const ae=e.X3DProtoDeclarationNode;var re=o.n(ae);const ie=e.RouteArray;var se=o.n(ie);const le=e.X3DRoute;var ce=o.n(le);const ue=e.Namespace;var de=o.n(ue);const pe=function(e,t,n){return new Function("with (arguments [0])\n {\n return eval ((() =>\n {\n const sourceText = arguments [1];\n\n delete arguments [0];\n delete arguments [1];\n\n arguments .length = 0;\n\n return sourceText;\n })\n ());\n }").call(e,t,n)},ve=de().add("evaluate",pe),Fe=e.X3DNode;var fe=o.n(Fe);const he=e.X3DChildNode;var ge=o.n(he);const Se=e.X3DUrlObject;var ye=o.n(Se);const De=e.X3DConstants;var Me=o.n(De);function me(e){ge().call(this,e),ye().call(this,e),this.addType(Me().X3DScriptNode)}Object.assign(Object.setPrototypeOf(me.prototype,ge().prototype),ye().prototype,{initialize(){ge().prototype.initialize.call(this),ye().prototype.initialize.call(this)},dispose(){ye().prototype.dispose.call(this),ge().prototype.dispose.call(this)}}),Object.defineProperties(me,fe().getStaticProperties("X3DScriptNode","Scripting",1));const xe=me,we=de().add("X3DScriptNode",xe),_e=e.FileLoader;var Ne=o.n(_e);const Ae=e.SFNodeCache;var Oe=o.n(Ae),Ee=o(254);function Ie(e){we.call(this,e),this.addType(Me().Script)}Object.assign(Object.setPrototypeOf(Ie.prototype,we.prototype),{initialize(){we.prototype.initialize.call(this),this.requestImmediateLoad().catch(Function.prototype)},getExtendedEventHandling:()=>!1,canUserDefinedFields:()=>!0,addUserDefinedField(e,t,n){we.prototype.addUserDefinedField.call(this,e,t,n),this.isInitialized()&&(this.setLoadState(Me().NOT_STARTED_STATE),this.requestImmediateLoad().catch(Function.prototype))},removeUserDefinedField(e){this.getUserDefinedFields().get(e)?.removeInterest("set_field__",this),we.prototype.removeUserDefinedField.call(this,e),this.isInitialized()&&(this.setLoadState(Me().NOT_STARTED_STATE),this.requestImmediateLoad().catch(Function.prototype))},getSourceText(){return this._url},async unloadData(){const e=this.context?.get("shutdown");"function"==typeof e&&this.call__(e,"shutdown"),Ee(window).off(`.Script-${this.getId()}`),this.getBrowser().prepareEvents().removeInterest("call__",this),this.removeInterest("call__",this);for(const e of this.getUserDefinedFields())e.removeInterest("set_field__",this)},async loadData(){await this.unloadData(),new(Ne())(this).loadDocument(this._url,async e=>{null===e?this.setLoadState(Me().FAILED_STATE):(await this.initialize__(Ee.decodeText(e)),this.setLoadState(Me().COMPLETE_STATE))})},createGlobalObject(){const e=()=>this,t={get(t,n){switch(n){case"getScriptNode":return e;case"currentScene":return e().getExecutionContext();default:return t[n]}}},n=new Proxy(this.getBrowser(),t);function o(t){const n=new(g().SFNode);if(n.fromString(t,e().getExecutionContext()),n.getValue())return n;throw new Error("SFNode.new: invalid argument.")}o.prototype=g().SFNode.prototype;const a={NULL:{value:null},FALSE:{value:!1},TRUE:{value:!0},print:{value:n.println.bind(n)},trace:{value:n.println.bind(n)},Browser:{value:n},X3DConstants:{value:Me()},X3DBrowser:{value:y()},X3DExecutionContext:{value:W()},X3DScene:{value:J()},ComponentInfo:{value:M()},ComponentInfoArray:{value:x()},ProfileInfo:{value:_()},ProfileInfoArray:{value:A()},ConcreteNodesArray:{value:E()},AbstractNodesArray:{value:b()},UnitInfo:{value:T()},UnitInfoArray:{value:V()},NamedNodesArray:{value:j()},ImportedNodesArray:{value:R()},X3DImportedNode:{value:L()},ExportedNodesArray:{value:$()},X3DExportedNode:{value:q()},ExternProtoDeclarationArray:{value:Q()},ProtoDeclarationArray:{value:Z()},X3DExternProtoDeclaration:{value:te()},X3DProtoDeclaration:{value:oe()},X3DProtoDeclarationNode:{value:re()},RouteArray:{value:se()},X3DRoute:{value:ce()},X3DBaseNode:{value:s()},X3DFieldDefinition:{value:c()},FieldDefinitionArray:{value:d()},X3DField:{value:v()},X3DArrayField:{value:f()},SFColor:{value:g().SFColor},SFColorRGBA:{value:g().SFColorRGBA},SFImage:{value:g().SFImage},SFMatrix3d:{value:g().SFMatrix3d},SFMatrix3f:{value:g().SFMatrix3f},SFMatrix4d:{value:g().SFMatrix4d},SFMatrix4f:{value:g().SFMatrix4f},SFNode:{value:o},SFRotation:{value:g().SFRotation},SFString:{value:g().SFString},SFVec2d:{value:g().SFVec2d},SFVec2f:{value:g().SFVec2f},SFVec3d:{value:g().SFVec3d},SFVec3f:{value:g().SFVec3f},SFVec4d:{value:g().SFVec4d},SFVec4f:{value:g().SFVec4f},VrmlMatrix:{value:g().VrmlMatrix},MFBool:{value:g().MFBool},MFColor:{value:g().MFColor},MFColorRGBA:{value:g().MFColorRGBA},MFDouble:{value:g().MFDouble},MFFloat:{value:g().MFFloat},MFImage:{value:g().MFImage},MFInt32:{value:g().MFInt32},MFMatrix3d:{value:g().MFMatrix3d},MFMatrix3f:{value:g().MFMatrix3f},MFMatrix4d:{value:g().MFMatrix4d},MFMatrix4f:{value:g().MFMatrix4f},MFNode:{value:g().MFNode},MFRotation:{value:g().MFRotation},MFString:{value:g().MFString},MFTime:{value:g().MFTime},MFVec2d:{value:g().MFVec2d},MFVec2f:{value:g().MFVec2f},MFVec3d:{value:g().MFVec3d},MFVec3f:{value:g().MFVec3f},MFVec4d:{value:g().MFVec4d},MFVec4f:{value:g().MFVec4f}};for(const e of this.getUserDefinedFields()){if(e.getAccessType()===Me().inputOnly)continue;const t=[e.getName()];e.getAccessType()===Me().inputOutput&&t.push(e.getName()+"_changed");for(const n of t)n in a||(a[n]={get:e.valueOf.bind(e),set:e.setValue.bind(e)})}return Object.create(Object.prototype,a)},createContext(e){const t=["initialize","prepareEvents","eventsProcessed","shutdown"];for(const e of this.getUserDefinedFields())switch(e.getAccessType()){case Me().inputOnly:t.push(e.getName());break;case Me().inputOutput:t.push("set_"+e.getName())}e+="\n;\n["+t.map(e=>`typeof ${e} !== "undefined" ? ${e} : undefined`).join(",")+"];";const n=this.evaluate(e),o=new Map;for(let e=0;e<t.length;++e)o.set(t[e],n[e]);return o},evaluate(e){return this.globalObject??=this.createGlobalObject(),ve(Oe().get(this),this.globalObject,e)},async initialize__(e){const t=this.getBrowser();this.globalObject=this.createGlobalObject(),this.context=this.createContext(e);const n=this.context.get("shutdown");"function"==typeof n&&Ee(window).on(`unload.Script-${this.getId()}`,()=>this.call__(n,"shutdown"));const o=this.context.get("prepareEvents");"function"==typeof o&&t.prepareEvents().addInterest("call__",this,o,"prepareEvents");const a=this.context.get("eventsProcessed");"function"==typeof a&&this.addInterest("call__",this,a,"eventsProcessed");for(const e of this.getUserDefinedFields())switch(e.getAccessType()){case Me().inputOnly:{const t=this.context.get(e.getName());"function"==typeof t&&e.addInterest("set_field__",this,t,[]);break}case Me().inputOutput:{const t=this.context.get("set_"+e.getName());"function"==typeof t&&e.addInterest("set_field__",this,t,[]);break}}const r=this.context.get("initialize");"function"==typeof r&&await this.call__(r,"initialize")},async call__(e,t){try{await e.call(Oe().get(this),this.getBrowser().getCurrentTime())}catch(e){this.setError(`in function '${t}'`,e)}},async set_field__(e,t,n){const o=t.pop()??n.create();try{o.assign(n),await e.call(Oe().get(this),o.valueOf(),this.getBrowser().getCurrentTime())}catch(e){this.setError(`in function '${n.getName()}'`,e)}finally{t.push(o)}},setError(e,t){const n=this.getExecutionContext().getWorldURL().startsWith("data:")?"data:":this.getExecutionContext().getWorldURL();console.error(`JavaScript Error in Script '${this.getName()}', ${e}\nworld url is '${n}':`),console.error(t)},dispose(){this.unloadData(),we.prototype.dispose.call(this)}}),Object.defineProperties(Ie,{...fe().getStaticProperties("Script","Scripting",1,"children","2.0"),fieldDefinitions:{value:new(d())([new(c())(Me().inputOutput,"metadata",new(g().SFNode)),new(c())(Me().inputOutput,"description",new(g().SFString)),new(c())(Me().inputOutput,"load",new(g().SFBool)(!0)),new(c())(Me().inputOutput,"url",new(g().MFString)),new(c())(Me().inputOutput,"autoRefresh",new(g().SFTime)(0)),new(c())(Me().inputOutput,"autoRefreshTimeLimit",new(g().SFTime)(3600)),new(c())(Me().initializeOnly,"directOutput",new(g().SFBool)),new(c())(Me().initializeOnly,"mustEvaluate",new(g().SFBool))]),enumerable:!0}});const be=Ie,Xe=de().add("Script",be);r().add({name:"Scripting",concreteNodes:[Xe],abstractNodes:[we]});de().add("ScriptingComponent",void 0)})();
1
+ /* X_ITE v14.2.0 */
2
+ const e=window[Symbol.for("X_ITE.X3D-14.2.0")];(()=>{var t={254(t){t.exports=e.jquery}},n={};function o(e){var a=n[e];if(void 0!==a)return a.exports;var r=n[e]={exports:{}};return t[e](r,r.exports,o),r.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const a=e.Components;var r=o.n(a);const i=e.X3DBaseNode;var s=o.n(i);const l=e.X3DFieldDefinition;var c=o.n(l);const u=e.FieldDefinitionArray;var d=o.n(u);const p=e.X3DField;var v=o.n(p);const F=e.X3DArrayField;var f=o.n(F);const h=e.Fields;var g=o.n(h);const S=e.X3DBrowser;var y=o.n(S);const D=e.ComponentInfo;var M=o.n(D);const m=e.ComponentInfoArray;var x=o.n(m);const w=e.ProfileInfo;var _=o.n(w);const N=e.ProfileInfoArray;var A=o.n(N);const O=e.ConcreteNodesArray;var E=o.n(O);const I=e.AbstractNodesArray;var b=o.n(I);const X=e.UnitInfo;var T=o.n(X);const C=e.UnitInfoArray;var V=o.n(C);const P=e.NamedNodesArray;var j=o.n(P);const B=e.ImportedNodesArray;var R=o.n(B);const U=e.X3DImportedNode;var L=o.n(U);const z=e.ExportedNodesArray;var $=o.n(z);const G=e.X3DExportedNode;var q=o.n(G);const k=e.X3DExecutionContext;var W=o.n(k);const H=e.X3DScene;var J=o.n(H);const K=e.ExternProtoDeclarationArray;var Q=o.n(K);const Y=e.ProtoDeclarationArray;var Z=o.n(Y);const ee=e.X3DExternProtoDeclaration;var te=o.n(ee);const ne=e.X3DProtoDeclaration;var oe=o.n(ne);const ae=e.X3DProtoDeclarationNode;var re=o.n(ae);const ie=e.RouteArray;var se=o.n(ie);const le=e.X3DRoute;var ce=o.n(le);const ue=e.Namespace;var de=o.n(ue);const pe=function(e,t,n){return new Function("with (arguments [0])\n {\n return eval ((() =>\n {\n const sourceText = arguments [1];\n\n delete arguments [0];\n delete arguments [1];\n\n arguments .length = 0;\n\n return sourceText;\n })\n ());\n }").call(e,t,n)},ve=de().add("evaluate",pe),Fe=e.X3DNode;var fe=o.n(Fe);const he=e.X3DChildNode;var ge=o.n(he);const Se=e.X3DUrlObject;var ye=o.n(Se);const De=e.X3DConstants;var Me=o.n(De);function me(e){ge().call(this,e),ye().call(this,e),this.addType(Me().X3DScriptNode)}Object.assign(Object.setPrototypeOf(me.prototype,ge().prototype),ye().prototype,{initialize(){ge().prototype.initialize.call(this),ye().prototype.initialize.call(this)},dispose(){ye().prototype.dispose.call(this),ge().prototype.dispose.call(this)}}),Object.defineProperties(me,fe().getStaticProperties("X3DScriptNode","Scripting",1));const xe=me,we=de().add("X3DScriptNode",xe),_e=e.FileLoader;var Ne=o.n(_e);const Ae=e.SFNodeCache;var Oe=o.n(Ae),Ee=o(254);function Ie(e){we.call(this,e),this.addType(Me().Script)}Object.assign(Object.setPrototypeOf(Ie.prototype,we.prototype),{initialize(){we.prototype.initialize.call(this),this.requestImmediateLoad().catch(Function.prototype)},getExtendedEventHandling:()=>!1,canUserDefinedFields:()=>!0,addUserDefinedField(e,t,n){we.prototype.addUserDefinedField.call(this,e,t,n),this.isInitialized()&&(this.setLoadState(Me().NOT_STARTED_STATE),this.requestImmediateLoad().catch(Function.prototype))},removeUserDefinedField(e){this.getUserDefinedFields().get(e)?.removeInterest("set_field__",this),we.prototype.removeUserDefinedField.call(this,e),this.isInitialized()&&(this.setLoadState(Me().NOT_STARTED_STATE),this.requestImmediateLoad().catch(Function.prototype))},getSourceText(){return this._url},async unloadData(){const e=this.context?.get("shutdown");"function"==typeof e&&this.call__(e,"shutdown"),Ee(window).off(`.Script-${this.getId()}`),this.getBrowser().prepareEvents().removeInterest("call__",this),this.removeInterest("call__",this);for(const e of this.getUserDefinedFields())e.removeInterest("set_field__",this)},async loadData(){await this.unloadData(),new(Ne())(this).loadDocument(this._url,async e=>{null===e?this.setLoadState(Me().FAILED_STATE):(await this.initialize__(Ee.decodeText(e)),this.setLoadState(Me().COMPLETE_STATE))})},createGlobalObject(){const e=()=>this,t={get(t,n){switch(n){case"getScriptNode":return e;case"currentScene":return e().getExecutionContext();default:return t[n]}}},n=new Proxy(this.getBrowser(),t);function o(t){const n=new(g().SFNode);if(n.fromString(t,e().getExecutionContext()),n.getValue())return Oe().get(n.getValue());throw new Error("SFNode.new: invalid argument.")}o.prototype=g().SFNode.prototype;const a={NULL:{value:null},FALSE:{value:!1},TRUE:{value:!0},print:{value:n.println.bind(n)},trace:{value:n.println.bind(n)},Browser:{value:n},X3DConstants:{value:Me()},X3DBrowser:{value:y()},X3DExecutionContext:{value:W()},X3DScene:{value:J()},ComponentInfo:{value:M()},ComponentInfoArray:{value:x()},ProfileInfo:{value:_()},ProfileInfoArray:{value:A()},ConcreteNodesArray:{value:E()},AbstractNodesArray:{value:b()},UnitInfo:{value:T()},UnitInfoArray:{value:V()},NamedNodesArray:{value:j()},ImportedNodesArray:{value:R()},X3DImportedNode:{value:L()},ExportedNodesArray:{value:$()},X3DExportedNode:{value:q()},ExternProtoDeclarationArray:{value:Q()},ProtoDeclarationArray:{value:Z()},X3DExternProtoDeclaration:{value:te()},X3DProtoDeclaration:{value:oe()},X3DProtoDeclarationNode:{value:re()},RouteArray:{value:se()},X3DRoute:{value:ce()},X3DBaseNode:{value:s()},X3DFieldDefinition:{value:c()},FieldDefinitionArray:{value:d()},X3DField:{value:v()},X3DArrayField:{value:f()},SFColor:{value:g().SFColor},SFColorRGBA:{value:g().SFColorRGBA},SFImage:{value:g().SFImage},SFMatrix3d:{value:g().SFMatrix3d},SFMatrix3f:{value:g().SFMatrix3f},SFMatrix4d:{value:g().SFMatrix4d},SFMatrix4f:{value:g().SFMatrix4f},SFNode:{value:o},SFRotation:{value:g().SFRotation},SFString:{value:g().SFString},SFVec2d:{value:g().SFVec2d},SFVec2f:{value:g().SFVec2f},SFVec3d:{value:g().SFVec3d},SFVec3f:{value:g().SFVec3f},SFVec4d:{value:g().SFVec4d},SFVec4f:{value:g().SFVec4f},VrmlMatrix:{value:g().VrmlMatrix},MFBool:{value:g().MFBool},MFColor:{value:g().MFColor},MFColorRGBA:{value:g().MFColorRGBA},MFDouble:{value:g().MFDouble},MFFloat:{value:g().MFFloat},MFImage:{value:g().MFImage},MFInt32:{value:g().MFInt32},MFMatrix3d:{value:g().MFMatrix3d},MFMatrix3f:{value:g().MFMatrix3f},MFMatrix4d:{value:g().MFMatrix4d},MFMatrix4f:{value:g().MFMatrix4f},MFNode:{value:g().MFNode},MFRotation:{value:g().MFRotation},MFString:{value:g().MFString},MFTime:{value:g().MFTime},MFVec2d:{value:g().MFVec2d},MFVec2f:{value:g().MFVec2f},MFVec3d:{value:g().MFVec3d},MFVec3f:{value:g().MFVec3f},MFVec4d:{value:g().MFVec4d},MFVec4f:{value:g().MFVec4f}};for(const e of this.getUserDefinedFields()){if(e.getAccessType()===Me().inputOnly)continue;const t=[e.getName()];e.getAccessType()===Me().inputOutput&&t.push(e.getName()+"_changed");for(const n of t)n in a||(a[n]={get:e.valueOf.bind(e),set:e.setValue.bind(e)})}return Object.create(Object.prototype,a)},createContext(e){const t=["initialize","prepareEvents","eventsProcessed","shutdown"];for(const e of this.getUserDefinedFields())switch(e.getAccessType()){case Me().inputOnly:t.push(e.getName());break;case Me().inputOutput:t.push("set_"+e.getName())}e+="\n;\n["+t.map(e=>`typeof ${e} !== "undefined" ? ${e} : undefined`).join(",")+"];";const n=this.evaluate(e),o=new Map;for(let e=0;e<t.length;++e)o.set(t[e],n[e]);return o},evaluate(e){return this.globalObject??=this.createGlobalObject(),ve(Oe().get(this),this.globalObject,e)},async initialize__(e){const t=this.getBrowser();this.globalObject=this.createGlobalObject(),this.context=this.createContext(e);const n=this.context.get("shutdown");"function"==typeof n&&Ee(window).on(`unload.Script-${this.getId()}`,()=>this.call__(n,"shutdown"));const o=this.context.get("prepareEvents");"function"==typeof o&&t.prepareEvents().addInterest("call__",this,o,"prepareEvents");const a=this.context.get("eventsProcessed");"function"==typeof a&&this.addInterest("call__",this,a,"eventsProcessed");for(const e of this.getUserDefinedFields())switch(e.getAccessType()){case Me().inputOnly:{const t=this.context.get(e.getName());"function"==typeof t&&e.addInterest("set_field__",this,t,[]);break}case Me().inputOutput:{const t=this.context.get("set_"+e.getName());"function"==typeof t&&e.addInterest("set_field__",this,t,[]);break}}const r=this.context.get("initialize");"function"==typeof r&&await this.call__(r,"initialize")},async call__(e,t){try{await e.call(Oe().get(this),this.getBrowser().getCurrentTime())}catch(e){this.setError(`in function '${t}'`,e)}},async set_field__(e,t,n){const o=t.pop()??n.create();try{o.assign(n),await e.call(Oe().get(this),o.valueOf(),this.getBrowser().getCurrentTime())}catch(e){this.setError(`in function '${n.getName()}'`,e)}finally{t.push(o)}},setError(e,t){const n=this.getExecutionContext().getWorldURL().startsWith("data:")?"data:":this.getExecutionContext().getWorldURL();console.error(`JavaScript Error in Script '${this.getName()}', ${e}\nworld url is '${n}':`),console.error(t)},dispose(){this.unloadData(),we.prototype.dispose.call(this)}}),Object.defineProperties(Ie,{...fe().getStaticProperties("Script","Scripting",1,"children","2.0"),fieldDefinitions:{value:new(d())([new(c())(Me().inputOutput,"metadata",new(g().SFNode)),new(c())(Me().inputOutput,"description",new(g().SFString)),new(c())(Me().inputOutput,"load",new(g().SFBool)(!0)),new(c())(Me().inputOutput,"url",new(g().MFString)),new(c())(Me().inputOutput,"autoRefresh",new(g().SFTime)(0)),new(c())(Me().inputOutput,"autoRefreshTimeLimit",new(g().SFTime)(3600)),new(c())(Me().initializeOnly,"directOutput",new(g().SFBool)),new(c())(Me().initializeOnly,"mustEvaluate",new(g().SFBool))]),enumerable:!0}});const be=Ie,Xe=de().add("Script",be);r().add({name:"Scripting",concreteNodes:[Xe],abstractNodes:[we]});de().add("ScriptingComponent",void 0)})();
@@ -1,5 +1,5 @@
1
- /* X_ITE v14.1.4 */
2
- const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-14.1.4")];
1
+ /* X_ITE v14.2.0 */
2
+ const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-14.2.0")];
3
3
  /******/ (() => { // webpackBootstrap
4
4
  /******/ "use strict";
5
5
  /******/ var __webpack_modules__ = ({
@@ -166,7 +166,9 @@ function X3DFontStyleNode (executionContext)
166
166
 
167
167
  // Private properties
168
168
 
169
- this .alignments = [ ];
169
+ this .alignments = [ ];
170
+ this .loadCounter = 0;
171
+ this .loadCount = -1;
170
172
  }
171
173
 
172
174
  Object .assign (Object .setPrototypeOf (X3DFontStyleNode .prototype, (external_X_ITE_X3D_X3DNode_default()).prototype),
@@ -253,9 +255,9 @@ Object .assign (Object .setPrototypeOf (X3DFontStyleNode .prototype, (external_X
253
255
  },
254
256
  async loadData ()
255
257
  {
256
- // Wait for FontLibrary nodes to be setuped or changed.
258
+ // Prevent race condition when this function is called multiple times.
257
259
 
258
- await $.sleep (0);
260
+ const count = ++ this .loadCounter;
259
261
 
260
262
  // Add default font to family array.
261
263
 
@@ -267,7 +269,13 @@ Object .assign (Object .setPrototypeOf (X3DFontStyleNode .prototype, (external_X
267
269
 
268
270
  family .push ("SERIF");
269
271
 
270
- this .font = null;
272
+ // Wait for FontLibrary nodes to be setuped or changed.
273
+
274
+ await $.sleep (0);
275
+
276
+ // Get font.
277
+
278
+ let font = null;
271
279
 
272
280
  for (const fontFamily of family)
273
281
  {
@@ -277,24 +285,18 @@ Object .assign (Object .setPrototypeOf (X3DFontStyleNode .prototype, (external_X
277
285
 
278
286
  if (defaultFont)
279
287
  {
280
- const font = await browser .loadFont (new URL (defaultFont), true);
288
+ font = await browser .loadFont (new URL (defaultFont), true);
281
289
 
282
290
  if (font)
283
- {
284
- this .font = font;
285
291
  break;
286
- }
287
292
  }
288
293
 
289
294
  // Try to get font from family names.
290
295
 
291
- const font = await browser .getFont (executionContext, fontFamily);
296
+ font = await browser .getFont (executionContext, fontFamily);
292
297
 
293
298
  if (font)
294
- {
295
- this .font = font;
296
299
  break;
297
- }
298
300
 
299
301
  // DEPRECIATED: Try to get font by URL.
300
302
 
@@ -305,21 +307,25 @@ Object .assign (Object .setPrototypeOf (X3DFontStyleNode .prototype, (external_X
305
307
  if (executionContext .getSpecificationVersion () >= 4.1)
306
308
  console .warn (`Loading a font file via family field is deprecated, please use new FontLibrary node instead.`);
307
309
 
308
- const font = await browser .loadFont (fileURL, this .getCache ());
310
+ font = await browser .loadFont (fileURL, this .getCache ());
309
311
 
310
312
  if (font)
311
- {
312
- this .font = font;
313
313
  break;
314
- }
315
314
  }
316
315
  else
317
316
  {
318
- console .warn (`Couldn't find font family '${fontFamily}' with style '${fontStyle}'.`);
317
+ if (count > this .loadCount)
318
+ console .warn (`Couldn't find font family '${fontFamily}' with style '${fontStyle}'.`);
319
319
  }
320
320
  }
321
321
 
322
- this .setLoadState (this .font ? (external_X_ITE_X3D_X3DConstants_default()).COMPLETE_STATE : (external_X_ITE_X3D_X3DConstants_default()).FAILED_STATE);
322
+ if (count < this .loadCount)
323
+ return;
324
+
325
+ this .loadCount = count;
326
+ this .font = font;
327
+
328
+ this .setLoadState (font ? (external_X_ITE_X3D_X3DConstants_default()).COMPLETE_STATE : (external_X_ITE_X3D_X3DConstants_default()).FAILED_STATE);
323
329
  this .addNodeEvent ();
324
330
  },
325
331
  dispose ()
@@ -1409,6 +1415,11 @@ function FontLibrary (executionContext)
1409
1415
  external_X_ITE_X3D_X3DUrlObject_default().call (this, executionContext);
1410
1416
 
1411
1417
  this .addType ((external_X_ITE_X3D_X3DConstants_default()).FontLibrary);
1418
+
1419
+ // Private properties
1420
+
1421
+ this .loadCounter = 0;
1422
+ this .loadCount = -1;
1412
1423
  }
1413
1424
 
1414
1425
  Object .assign (Object .setPrototypeOf (FontLibrary .prototype, (external_X_ITE_X3D_X3DChildNode_default()).prototype),
@@ -1437,27 +1448,35 @@ Object .assign (Object .setPrototypeOf (FontLibrary .prototype, (external_X_ITE_
1437
1448
  },
1438
1449
  async loadData ()
1439
1450
  {
1451
+ // Prevent race condition when this function is called multiple times.
1452
+
1453
+ const count = ++ this .loadCounter;
1454
+
1455
+ // Load font.
1456
+
1440
1457
  const
1441
1458
  browser = this .getBrowser (),
1442
1459
  executionContext = this .getExecutionContext (),
1443
1460
  fileURLs = Array .from (this ._url) .map (fileURL => new URL (fileURL, executionContext .getBaseURL ()));
1444
1461
 
1445
- this .font = null;
1462
+ let font;
1446
1463
 
1447
1464
  for (const fileURL of fileURLs)
1448
1465
  {
1449
- this .font = await browser .loadFont (fileURL, this .getCache ());
1450
-
1451
- if (!this .font)
1452
- continue;
1466
+ font = await browser .loadFont (fileURL, this .getCache ());
1453
1467
 
1454
- this .set_family__ ();
1468
+ if (font)
1469
+ break;
1470
+ }
1455
1471
 
1456
- this .setLoadState ((external_X_ITE_X3D_X3DConstants_default()).COMPLETE_STATE);
1472
+ if (count < this .loadCount)
1457
1473
  return;
1458
- }
1459
1474
 
1460
- this .setLoadState ((external_X_ITE_X3D_X3DConstants_default()).FAILED_STATE);
1475
+ this .loadCount = count;
1476
+ this .font = font;
1477
+
1478
+ this .set_family__ ();
1479
+ this .setLoadState (font ? (external_X_ITE_X3D_X3DConstants_default()).COMPLETE_STATE : (external_X_ITE_X3D_X3DConstants_default()).FAILED_STATE);
1461
1480
  },
1462
1481
  dispose ()
1463
1482
  {