x_ite 16.4.1 → 16.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +6 -6
  2. package/dist/assets/components/AnnotationComponent.js +1 -1
  3. package/dist/assets/components/AnnotationComponent.min.js +1 -1
  4. package/dist/assets/components/CADGeometryComponent.js +1 -1
  5. package/dist/assets/components/CADGeometryComponent.min.js +1 -1
  6. package/dist/assets/components/CubeMapTexturingComponent.js +1 -1
  7. package/dist/assets/components/CubeMapTexturingComponent.min.js +1 -1
  8. package/dist/assets/components/DISComponent.js +1 -1
  9. package/dist/assets/components/DISComponent.min.js +1 -1
  10. package/dist/assets/components/EventUtilitiesComponent.js +1 -1
  11. package/dist/assets/components/EventUtilitiesComponent.min.js +1 -1
  12. package/dist/assets/components/GaussianSplatsComponent.js +1 -1
  13. package/dist/assets/components/GaussianSplatsComponent.min.js +1 -1
  14. package/dist/assets/components/Geometry2DComponent.js +1 -1
  15. package/dist/assets/components/Geometry2DComponent.min.js +1 -1
  16. package/dist/assets/components/Geometry3DComponent.js +1 -1
  17. package/dist/assets/components/Geometry3DComponent.min.js +1 -1
  18. package/dist/assets/components/GeospatialComponent.js +1 -1
  19. package/dist/assets/components/GeospatialComponent.min.js +1 -1
  20. package/dist/assets/components/HAnimComponent.js +1 -1
  21. package/dist/assets/components/HAnimComponent.min.js +1 -1
  22. package/dist/assets/components/KeyDeviceSensorComponent.js +1 -1
  23. package/dist/assets/components/KeyDeviceSensorComponent.min.js +1 -1
  24. package/dist/assets/components/LayoutComponent.js +7 -39
  25. package/dist/assets/components/LayoutComponent.min.js +2 -2
  26. package/dist/assets/components/NURBSComponent.js +1 -1
  27. package/dist/assets/components/NURBSComponent.min.js +1 -1
  28. package/dist/assets/components/ParticleSystemsComponent.js +1 -1
  29. package/dist/assets/components/ParticleSystemsComponent.min.js +1 -1
  30. package/dist/assets/components/PickingComponent.js +8 -12
  31. package/dist/assets/components/PickingComponent.min.js +2 -2
  32. package/dist/assets/components/RigidBodyPhysicsComponent.js +1 -1
  33. package/dist/assets/components/RigidBodyPhysicsComponent.min.js +1 -1
  34. package/dist/assets/components/ScriptingComponent.js +1 -1
  35. package/dist/assets/components/ScriptingComponent.min.js +1 -1
  36. package/dist/assets/components/TextComponent.js +17 -21
  37. package/dist/assets/components/TextComponent.min.js +2 -2
  38. package/dist/assets/components/TextureProjectionComponent.js +1 -1
  39. package/dist/assets/components/TextureProjectionComponent.min.js +1 -1
  40. package/dist/assets/components/Texturing3DComponent.js +9 -9
  41. package/dist/assets/components/Texturing3DComponent.min.js +2 -2
  42. package/dist/assets/components/VolumeRenderingComponent.js +1 -1
  43. package/dist/assets/components/VolumeRenderingComponent.min.js +1 -1
  44. package/dist/assets/components/WebXRComponent.js +3 -3
  45. package/dist/assets/components/WebXRComponent.min.js +2 -2
  46. package/dist/assets/components/X_ITEComponent.js +1 -1
  47. package/dist/assets/components/X_ITEComponent.min.js +1 -1
  48. package/dist/assets/lib/meshopt_decoder.js +1 -1
  49. package/dist/example.html +1 -1
  50. package/dist/x_ite.css +1 -1
  51. package/dist/x_ite.d.ts +8 -4
  52. package/dist/x_ite.js +199 -199
  53. package/dist/x_ite.min.js +2 -2
  54. package/dist/x_ite.min.mjs +2 -2
  55. package/dist/x_ite.mjs +199 -199
  56. package/dist/x_ite.zip +0 -0
  57. package/package.json +6 -6
@@ -1,4 +1,4 @@
1
- /* X_ITE v16.4.1 */
1
+ /* X_ITE v16.4.2 */
2
2
  const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D")];
3
3
  /******/ (() => { // webpackBootstrap
4
4
  /******/ "use strict";
@@ -1,2 +1,2 @@
1
- /* X_ITE v16.4.1 */
1
+ /* X_ITE v16.4.2 */
2
2
  const e=window[Symbol.for("X_ITE.X3D")];(()=>{const t={n:e=>{const n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},n=e.Components;var o=t.n(n);const a=e.X3DBaseNode;var r=t.n(a);const i=e.X3DFieldDefinition;var s=t.n(i);const l=e.FieldDefinitionArray;var c=t.n(l);const u=e.X3DField;var d=t.n(u);const v=e.X3DArrayField;var p=t.n(v);const F=e.Fields;var h=t.n(F);const f=e.X3DBrowser;var g=t.n(f);const S=e.ComponentInfo;var y=t.n(S);const D=e.ComponentInfoArray;var M=t.n(D);const m=e.ProfileInfo;var w=t.n(m);const x=e.ProfileInfoArray;var N=t.n(x);const _=e.ConcreteNodesArray;var A=t.n(_);const E=e.AbstractNodesArray;var O=t.n(E);const b=e.UnitInfo;var I=t.n(b);const X=e.UnitInfoArray;var T=t.n(X);const C=e.NamedNodesArray;var V=t.n(C);const P=e.ImportedNodesArray;var R=t.n(P);const B=e.X3DImportedNode;var L=t.n(B);const U=e.ExportedNodesArray;var j=t.n(U);const z=e.X3DExportedNode;var G=t.n(z);const $=e.X3DExecutionContext;var Q=t.n($);const k=e.X3DScene;var q=t.n(k);const W=e.ExternProtoDeclarationArray;var H=t.n(W);const J=e.ProtoDeclarationArray;var K=t.n(J);const Y=e.X3DExternProtoDeclaration;var Z=t.n(Y);const ee=e.X3DProtoDeclaration;var te=t.n(ee);const ne=e.X3DProtoDeclarationNode;var oe=t.n(ne);const ae=e.RouteArray;var re=t.n(ae);const ie=e.X3DRoute;var se=t.n(ie);const le=e.Namespace;var ce=t.n(le);const ue=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)},de=ce().add("evaluate",ue),ve=e.X3DNode;var pe=t.n(ve);const Fe=e.X3DChildNode;var he=t.n(Fe);const fe=e.X3DUrlObject;var ge=t.n(fe);const Se=e.X3DConstants;var ye=t.n(Se);function De(e){he().call(this,e),ge().call(this,e),this.addType(ye().X3DScriptNode)}Object.assign(Object.setPrototypeOf(De.prototype,he().prototype),ge().prototype,{initialize(){he().prototype.initialize.call(this),ge().prototype.initialize.call(this)},dispose(){ge().prototype.dispose.call(this),he().prototype.dispose.call(this)}}),Object.defineProperties(De,pe().getStaticProperties("X3DScriptNode","Scripting",1));const Me=De,me=ce().add("X3DScriptNode",Me),we=e.FileLoader;var xe=t.n(we);const Ne=e.SFNodeCache;var _e=t.n(Ne);const Ae=e.helper;var Ee=t.n(Ae);function Oe(e){me.call(this,e),this.addType(ye().Script)}Object.assign(Object.setPrototypeOf(Oe.prototype,me.prototype),{initialize(){me.prototype.initialize.call(this),this.requestImmediateLoad().catch(Function.prototype)},getExtendedEventHandling:()=>!1,canUserDefinedFields:()=>!0,addUserDefinedField(e,t,n){me.prototype.addUserDefinedField.call(this,e,t,n),this.isInitialized()&&(this.setLoadState(ye().NOT_STARTED_STATE),this.requestImmediateLoad().catch(Function.prototype))},removeUserDefinedField(e){this.getUserDefinedFields().get(e)?.removeInterest("set_field__",this),me.prototype.removeUserDefinedField.call(this,e),this.isInitialized()&&(this.setLoadState(ye().NOT_STARTED_STATE),this.requestImmediateLoad().catch(Function.prototype))},getSourceText(){return this._url},async unloadData(){this.shutdown?.(),window.removeEventListener("unload",this.shutdown),this.shutdown=null,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(xe())(this).loadDocument(this._url,async e=>{null===e?this.setLoadState(ye().FAILED_STATE):(await this.initialize__(Ee().decodeText(e)),this.setLoadState(ye().COMPLETE_STATE))})},createGlobalObject(){const e=()=>this,t={get(t,n,o){switch(n){case"getScriptNode":return e;case"currentScene":return e().getExecutionContext();default:return Reflect.get(t,n,o)}}},n=new Proxy(this.getBrowser(),t);function o(t){const n=new(h().SFNode);if(n.fromString(t,e().getExecutionContext()),n.getValue())return _e().get(n.getValue());throw new Error("SFNode.new: invalid argument.")}o.prototype=h().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:ye()},X3DBrowser:{value:g()},X3DExecutionContext:{value:Q()},X3DScene:{value:q()},ComponentInfo:{value:y()},ComponentInfoArray:{value:M()},ProfileInfo:{value:w()},ProfileInfoArray:{value:N()},ConcreteNodesArray:{value:A()},AbstractNodesArray:{value:O()},UnitInfo:{value:I()},UnitInfoArray:{value:T()},NamedNodesArray:{value:V()},ImportedNodesArray:{value:R()},X3DImportedNode:{value:L()},ExportedNodesArray:{value:j()},X3DExportedNode:{value:G()},ExternProtoDeclarationArray:{value:H()},ProtoDeclarationArray:{value:K()},X3DExternProtoDeclaration:{value:Z()},X3DProtoDeclaration:{value:te()},X3DProtoDeclarationNode:{value:oe()},RouteArray:{value:re()},X3DRoute:{value:se()},X3DBaseNode:{value:r()},X3DFieldDefinition:{value:s()},FieldDefinitionArray:{value:c()},X3DField:{value:d()},X3DArrayField:{value:p()},SFColor:{value:h().SFColor},SFColorRGBA:{value:h().SFColorRGBA},SFImage:{value:h().SFImage},SFMatrix3d:{value:h().SFMatrix3d},SFMatrix3f:{value:h().SFMatrix3f},SFMatrix4d:{value:h().SFMatrix4d},SFMatrix4f:{value:h().SFMatrix4f},SFNode:{value:o},SFQuaternion:{value:h().SFQuaternion},SFRotation:{value:h().SFRotation},SFString:{value:h().SFString},SFVec2d:{value:h().SFVec2d},SFVec2f:{value:h().SFVec2f},SFVec3d:{value:h().SFVec3d},SFVec3f:{value:h().SFVec3f},SFVec4d:{value:h().SFVec4d},SFVec4f:{value:h().SFVec4f},VrmlMatrix:{value:h().VrmlMatrix},MFBool:{value:h().MFBool},MFColor:{value:h().MFColor},MFColorRGBA:{value:h().MFColorRGBA},MFDouble:{value:h().MFDouble},MFFloat:{value:h().MFFloat},MFImage:{value:h().MFImage},MFInt32:{value:h().MFInt32},MFMatrix3d:{value:h().MFMatrix3d},MFMatrix3f:{value:h().MFMatrix3f},MFMatrix4d:{value:h().MFMatrix4d},MFMatrix4f:{value:h().MFMatrix4f},MFNode:{value:h().MFNode},MFQuaternion:{value:h().MFQuaternion},MFRotation:{value:h().MFRotation},MFString:{value:h().MFString},MFTime:{value:h().MFTime},MFVec2d:{value:h().MFVec2d},MFVec2f:{value:h().MFVec2f},MFVec3d:{value:h().MFVec3d},MFVec3f:{value:h().MFVec3f},MFVec4d:{value:h().MFVec4d},MFVec4f:{value:h().MFVec4f}};for(const e of this.getUserDefinedFields()){if(e.getAccessType()===ye().inputOnly)continue;const t=[e.getName()];e.getAccessType()===ye().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 ye().inputOnly:t.push(e.getName());break;case ye().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(),de(_e().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&&(this.shutdown=()=>{t.isContextLost()||this.call__(n,"shutdown")},window.addEventListener("unload",this.shutdown,{once:!0}));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 ye().inputOnly:{const t=this.context.get(e.getName());"function"==typeof t&&e.addInterest("set_field__",this,t,[]);break}case ye().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(_e().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(_e().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(),me.prototype.dispose.call(this)}}),Object.defineProperties(Oe,{...pe().getStaticProperties("Script","Scripting",1,"children","2.0"),fieldDefinitions:{value:new(c())([new(s())(ye().inputOutput,"metadata",new(h().SFNode)),new(s())(ye().inputOutput,"description",new(h().SFString)),new(s())(ye().inputOutput,"load",new(h().SFBool)(!0)),new(s())(ye().inputOutput,"url",new(h().MFString)),new(s())(ye().inputOutput,"autoRefresh",new(h().SFTime)(0)),new(s())(ye().inputOutput,"autoRefreshTimeLimit",new(h().SFTime)(3600)),new(s())(ye().initializeOnly,"directOutput",new(h().SFBool)),new(s())(ye().initializeOnly,"mustEvaluate",new(h().SFBool))]),enumerable:!0}});const be=Oe,Ie=ce().add("Script",be);o().add({name:"Scripting",concreteNodes:[Ie],abstractNodes:[me]});ce().add("ScriptingComponent",void 0)})();
@@ -1,4 +1,4 @@
1
- /* X_ITE v16.4.1 */
1
+ /* X_ITE v16.4.2 */
2
2
  const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D")];
3
3
  /******/ (() => { // webpackBootstrap
4
4
  /******/ "use strict";
@@ -982,9 +982,6 @@ const X3DTextGeometry_default_ = X3DTextGeometry;
982
982
  ;
983
983
 
984
984
  /* harmony default export */ const Text_X3DTextGeometry = (external_X_ITE_X3D_Namespace_default().add ("X3DTextGeometry", X3DTextGeometry_default_));
985
- ;// external "__X_ITE_X3D__ .Matrix4"
986
- const external_X_ITE_X3D_Matrix4_namespaceObject = __X_ITE_X3D__ .Matrix4;
987
- var external_X_ITE_X3D_Matrix4_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Matrix4_namespaceObject);
988
985
  ;// external "__X_ITE_X3D__ .Bezier"
989
986
  const external_X_ITE_X3D_Bezier_namespaceObject = __X_ITE_X3D__ .Bezier;
990
987
  var external_X_ITE_X3D_Bezier_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Bezier_namespaceObject);
@@ -998,7 +995,6 @@ var external_X_ITE_X3D_libtess_default = /*#__PURE__*/__webpack_require__.n(exte
998
995
 
999
996
 
1000
997
 
1001
-
1002
998
  const _glyphCache = Symbol ();
1003
999
 
1004
1000
  function PolygonText (text, fontStyle)
@@ -1010,10 +1006,6 @@ function PolygonText (text, fontStyle)
1010
1006
 
1011
1007
  Object .assign (Object .setPrototypeOf (PolygonText .prototype, Text_X3DTextGeometry .prototype),
1012
1008
  {
1013
- getMatrix ()
1014
- {
1015
- return (external_X_ITE_X3D_Matrix4_default()).IDENTITY;
1016
- },
1017
1009
  getTextureNode ()
1018
1010
  {
1019
1011
  return null;
@@ -1275,7 +1267,7 @@ Object .assign (Object .setPrototypeOf (PolygonText .prototype, Text_X3DTextGeom
1275
1267
  triangles .push (point);
1276
1268
  }
1277
1269
 
1278
- function combineCallback (coords, data, weight)
1270
+ function combineCallback (coords /* , data, weight */)
1279
1271
  {
1280
1272
  return new (external_X_ITE_X3D_Vector3_default()) (... coords);
1281
1273
  }
@@ -18033,17 +18025,6 @@ Object .assign (Object .setPrototypeOf (Text .prototype, (external_X_ITE_X3D_X3D
18033
18025
 
18034
18026
  this .set_fontStyle__ ();
18035
18027
  },
18036
- getMatrix ()
18037
- {
18038
- return this .textGeometry .getMatrix ();
18039
- },
18040
- getLength (index)
18041
- {
18042
- if (index < this ._length .length)
18043
- return Math .max (0, this ._length [index]);
18044
-
18045
- return 0;
18046
- },
18047
18028
  set_live__ ()
18048
18029
  {
18049
18030
  const
@@ -18074,6 +18055,13 @@ Object .assign (Object .setPrototypeOf (Text .prototype, (external_X_ITE_X3D_X3D
18074
18055
 
18075
18056
  this .textGeometry = this .fontStyleNode .createTextGeometry (this);
18076
18057
  },
18058
+ getLength (index)
18059
+ {
18060
+ if (index < this ._length .length)
18061
+ return Math .max (0, this ._length [index]);
18062
+
18063
+ return 0;
18064
+ },
18077
18065
  build ()
18078
18066
  {
18079
18067
  this .textGeometry .update ();
@@ -18094,6 +18082,14 @@ Object .assign (Object .setPrototypeOf (Text .prototype, (external_X_ITE_X3D_X3D
18094
18082
 
18095
18083
  external_X_ITE_X3D_X3DGeometryNode_default().prototype .display .call (this, gl, renderContext);
18096
18084
 
18085
+ renderContext .textureNode = null;
18086
+ },
18087
+ displayInstanced (gl, renderContext, shapeNode)
18088
+ {
18089
+ renderContext .textureNode = this .textGeometry .getTextureNode ();
18090
+
18091
+ external_X_ITE_X3D_X3DGeometryNode_default().prototype .displayInstanced .call (this, gl, renderContext, shapeNode);
18092
+
18097
18093
  renderContext .textureNode = null;
18098
18094
  },
18099
18095
  });