x_ite 8.9.2 → 8.9.4

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 (64) hide show
  1. package/dist/assets/components/Annotation.js +13 -13
  2. package/dist/assets/components/Annotation.min.js +1 -1
  3. package/dist/assets/components/CADGeometry.js +13 -13
  4. package/dist/assets/components/CADGeometry.min.js +1 -1
  5. package/dist/assets/components/CubeMapTexturing.js +25 -25
  6. package/dist/assets/components/CubeMapTexturing.min.js +1 -1
  7. package/dist/assets/components/DIS.js +13 -13
  8. package/dist/assets/components/DIS.min.js +1 -1
  9. package/dist/assets/components/EventUtilities.js +9 -9
  10. package/dist/assets/components/EventUtilities.min.js +1 -1
  11. package/dist/assets/components/Geometry2D.js +19 -19
  12. package/dist/assets/components/Geometry2D.min.js +1 -1
  13. package/dist/assets/components/Geospatial.js +77 -73
  14. package/dist/assets/components/Geospatial.min.js +1 -1
  15. package/dist/assets/components/HAnim.js +19 -19
  16. package/dist/assets/components/HAnim.min.js +1 -1
  17. package/dist/assets/components/KeyDeviceSensor.js +8 -8
  18. package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
  19. package/dist/assets/components/Layout.js +27 -27
  20. package/dist/assets/components/Layout.min.js +1 -1
  21. package/dist/assets/components/NURBS.js +31 -30
  22. package/dist/assets/components/NURBS.min.js +1 -1
  23. package/dist/assets/components/ParticleSystems.js +23 -23
  24. package/dist/assets/components/ParticleSystems.min.js +1 -1
  25. package/dist/assets/components/Picking.js +18 -18
  26. package/dist/assets/components/Picking.min.js +1 -1
  27. package/dist/assets/components/RigidBodyPhysics.js +71 -83
  28. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  29. package/dist/assets/components/Scripting.js +38 -38
  30. package/dist/assets/components/Scripting.min.js +1 -1
  31. package/dist/assets/components/Text.js +24 -24
  32. package/dist/assets/components/Text.min.js +1 -1
  33. package/dist/assets/components/TextureProjector.js +14 -14
  34. package/dist/assets/components/TextureProjector.min.js +1 -1
  35. package/dist/assets/components/Texturing3D.js +30 -30
  36. package/dist/assets/components/Texturing3D.min.js +1 -1
  37. package/dist/assets/components/VolumeRendering.js +18 -18
  38. package/dist/assets/components/VolumeRendering.min.js +1 -1
  39. package/dist/assets/components/X_ITE.js +9 -9
  40. package/dist/assets/components/X_ITE.min.js +1 -1
  41. package/dist/x_ite.css +1 -1
  42. package/dist/x_ite.js +778 -801
  43. package/dist/x_ite.min.js +1 -1
  44. package/dist/x_ite.zip +0 -0
  45. package/docs/_config.yml +1 -1
  46. package/docs/_posts/getting-started.md +7 -1
  47. package/package.json +2 -2
  48. package/src/tests.js +360 -0
  49. package/src/x_ite/Browser/VERSION.js +1 -1
  50. package/src/x_ite/Components/Core/X3DPrototypeInstance.js +11 -20
  51. package/src/x_ite/Components/Geometry3D/ElevationGrid.js +8 -5
  52. package/src/x_ite/Components/Geometry3D/Extrusion.js +10 -12
  53. package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +46 -56
  54. package/src/x_ite/Components/Geospatial/GeoElevationGrid.js +44 -40
  55. package/src/x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode.js +7 -6
  56. package/src/x_ite/Components/Networking/X3DUrlObject.js +2 -3
  57. package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +11 -13
  58. package/src/x_ite/Components/Rendering/X3DGeometryNode.js +4 -6
  59. package/src/x_ite/Components/RigidBodyPhysics/BallJoint.js +8 -9
  60. package/src/x_ite/Components/RigidBodyPhysics/CollisionSensor.js +8 -4
  61. package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +20 -21
  62. package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +12 -13
  63. package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +6 -7
  64. package/src/x_ite/Components/Scripting/Script.js +1 -1
@@ -228,13 +228,17 @@ Object .assign (Object .setPrototypeOf (CollisionSensor .prototype, X3DSensorNod
228
228
  const contactNode = this .contactCache [index];
229
229
 
230
230
  if (contactNode)
231
+ {
231
232
  return contactNode;
233
+ }
234
+ else
235
+ {
236
+ const contactNode = this .contactCache [index] = this .getExecutionContext () .createNode ("Contact", false);
232
237
 
233
- contactNode = this .contactCache [index] = this .getExecutionContext () .createNode ("Contact", false);
234
-
235
- contactNode .setup ();
238
+ contactNode .setup ();
236
239
 
237
- return contactNode;
240
+ return contactNode;
241
+ }
238
242
  },
239
243
  });
240
244
 
@@ -70,7 +70,7 @@ function DoubleAxisHingeJoint (executionContext)
70
70
  this ._suspensionForce .setUnit ("force");
71
71
 
72
72
  this .joint = null;
73
- this .outputs = { };
73
+ this .outputs = new Set ();
74
74
  this .localAnchorPoint1 = new Vector3 (0, 0, 0);
75
75
  this .localAnchorPoint2 = new Vector3 (0, 0, 0);
76
76
  this .localAxis1 = new Vector3 (0, 0, 0);
@@ -146,8 +146,7 @@ Object .assign (Object .setPrototypeOf (DoubleAxisHingeJoint .prototype, X3DRigi
146
146
  },
147
147
  set_forceOutput__ ()
148
148
  {
149
- for (var key in this .outputs)
150
- delete this .outputs [key];
149
+ this .outputs .clear ();
151
150
 
152
151
  for (var i = 0, length = this ._forceOutput .length; i < length; ++ i)
153
152
  {
@@ -155,22 +154,22 @@ Object .assign (Object .setPrototypeOf (DoubleAxisHingeJoint .prototype, X3DRigi
155
154
 
156
155
  if (value == "ALL")
157
156
  {
158
- this .outputs .body1AnchorPoint = true;
159
- this .outputs .body2AnchorPoint = true;
160
- this .outputs .body1Axis = true;
161
- this .outputs .body2Axis = true;
162
- this .outputs .hinge1Angle = true;
163
- this .outputs .hinge2Angle = true;
164
- this .outputs .hinge1AngleRate = true;
165
- this .outputs .hinge2AngleRate = true;
157
+ this .outputs .add ("body1AnchorPoint");
158
+ this .outputs .add ("body2AnchorPoint");
159
+ this .outputs .add ("body1Axis");
160
+ this .outputs .add ("body2Axis");
161
+ this .outputs .add ("hinge1Angle");
162
+ this .outputs .add ("hinge2Angle");
163
+ this .outputs .add ("hinge1AngleRate");
164
+ this .outputs .add ("hinge2AngleRate");
166
165
  }
167
166
  else
168
167
  {
169
- this .outputs [value] = true;
168
+ this .outputs .add (value);
170
169
  }
171
170
  }
172
171
 
173
- this .setOutput (! $.isEmptyObject (this .outputs));
172
+ this .setOutput (!! this .outputs .size);
174
173
  },
175
174
  update1: (() =>
176
175
  {
@@ -182,13 +181,13 @@ Object .assign (Object .setPrototypeOf (DoubleAxisHingeJoint .prototype, X3DRigi
182
181
 
183
182
  return function ()
184
183
  {
185
- if (this .outputs .body1AnchorPoint)
184
+ if (this .outputs .has ("body1AnchorPoint"))
186
185
  this ._body1AnchorPoint = this .getBody1 () .getMatrix () .multVecMatrix (this .getInitialInverseMatrix1 () .multVecMatrix (localAnchorPoint1 .assign (this .localAnchorPoint1)));
187
186
 
188
- if (this .outputs .body1Axis)
187
+ if (this .outputs .has ("body1Axis"))
189
188
  this ._body1Axis = this .getInitialInverseMatrix1 () .multDirMatrix (this .getBody1 () .getMatrix () .multDirMatrix (localAxis1 .assign (this .localAxis1))) .normalize ();
190
189
 
191
- if (this .outputs .hinge1Angle)
190
+ if (this .outputs .has ("hinge1Angle"))
192
191
  {
193
192
  var lastAngle = this ._hinge1Angle .getValue ();
194
193
 
@@ -197,7 +196,7 @@ Object .assign (Object .setPrototypeOf (DoubleAxisHingeJoint .prototype, X3DRigi
197
196
 
198
197
  this ._hinge1Angle = rotation .angle;
199
198
 
200
- if (this .outputs .angleRate)
199
+ if (this .outputs .has ("angleRate"))
201
200
  this ._hinge1AngleRate = (this ._hinge1Angle .getValue () - lastAngle) * this .getBrowser () .getCurrentFrameRate ();
202
201
  }
203
202
  };
@@ -212,13 +211,13 @@ Object .assign (Object .setPrototypeOf (DoubleAxisHingeJoint .prototype, X3DRigi
212
211
 
213
212
  return function ()
214
213
  {
215
- if (this .outputs .body2AnchorPoint)
214
+ if (this .outputs .has ("body2AnchorPoint"))
216
215
  this ._body2AnchorPoint = this .getBody2 () .getMatrix () .multVecMatrix (this .getInitialInverseMatrix2 () .multVecMatrix (localAnchorPoint2 .assign (this .localAnchorPoint2)));
217
216
 
218
- if (this .outputs .body2Axis)
217
+ if (this .outputs .has ("body2Axis"))
219
218
  this ._body2Axis = this .getInitialInverseMatrix2 () .multDirMatrix (this .getBody2 () .getMatrix () .multDirMatrix (localAxis2 .assign (this .localAxis2))) .normalize ();
220
219
 
221
- if (this .outputs .hinge2Angle)
220
+ if (this .outputs .has ("hinge2Angle"))
222
221
  {
223
222
  var lastAngle = this ._hinge2Angle .getValue ();
224
223
 
@@ -227,7 +226,7 @@ Object .assign (Object .setPrototypeOf (DoubleAxisHingeJoint .prototype, X3DRigi
227
226
 
228
227
  this ._hinge2Angle = rotation .angle;
229
228
 
230
- if (this .outputs .angleRate)
229
+ if (this .outputs .has ("angleRate"))
231
230
  this ._hinge2AngleRate = (this ._hinge2Angle .getValue () - lastAngle) * this .getBrowser () .getCurrentFrameRate ();
232
231
  }
233
232
  };
@@ -70,7 +70,7 @@ function SingleAxisHingeJoint (executionContext)
70
70
  this ._angleRate .setUnit ("angularRate");
71
71
 
72
72
  this .joint = null;
73
- this .outputs = { };
73
+ this .outputs = new Set ();
74
74
  this .localAnchorPoint1 = new Vector3 (0, 0, 0);
75
75
  this .localAnchorPoint2 = new Vector3 (0, 0, 0);
76
76
  }
@@ -145,8 +145,7 @@ Object .assign (Object .setPrototypeOf (SingleAxisHingeJoint .prototype, X3DRigi
145
145
  },
146
146
  set_forceOutput__ ()
147
147
  {
148
- for (var key in this .outputs)
149
- delete this .outputs [key];
148
+ this .outputs .clear ();
150
149
 
151
150
  for (var i = 0, length = this ._forceOutput .length; i < length; ++ i)
152
151
  {
@@ -154,18 +153,18 @@ Object .assign (Object .setPrototypeOf (SingleAxisHingeJoint .prototype, X3DRigi
154
153
 
155
154
  if (value == "ALL")
156
155
  {
157
- this .outputs .body1AnchorPoint = true;
158
- this .outputs .body2AnchorPoint = true;
159
- this .outputs .angle = true;
160
- this .outputs .angularRate = true;
156
+ this .outputs .add ("body1AnchorPoint");
157
+ this .outputs .add ("body2AnchorPoint");
158
+ this .outputs .add ("angle");
159
+ this .outputs .add ("angularRate");
161
160
  }
162
161
  else
163
162
  {
164
- this .outputs [value] = true;
163
+ this .outputs .add (value);
165
164
  }
166
165
  }
167
166
 
168
- this .setOutput (! $.isEmptyObject (this .outputs));
167
+ this .setOutput (!! this .outputs .size);
169
168
  },
170
169
  update1: (() =>
171
170
  {
@@ -173,7 +172,7 @@ Object .assign (Object .setPrototypeOf (SingleAxisHingeJoint .prototype, X3DRigi
173
172
 
174
173
  return function ()
175
174
  {
176
- if (this .outputs .body1AnchorPoint)
175
+ if (this .outputs .has ("body1AnchorPoint"))
177
176
  this ._body1AnchorPoint = this .getBody1 () .getMatrix () .multVecMatrix (this .getInitialInverseMatrix1 () .multVecMatrix (localAnchorPoint1 .assign (this .localAnchorPoint1)));
178
177
  };
179
178
  })(),
@@ -186,10 +185,10 @@ Object .assign (Object .setPrototypeOf (SingleAxisHingeJoint .prototype, X3DRigi
186
185
 
187
186
  return function ()
188
187
  {
189
- if (this .outputs .body2AnchorPoint)
188
+ if (this .outputs .has ("body2AnchorPoint"))
190
189
  this ._body2AnchorPoint = this .getBody2 () .getMatrix () .multVecMatrix (this .getInitialInverseMatrix2 () .multVecMatrix (localAnchorPoint2 .assign (this .localAnchorPoint2)));
191
190
 
192
- if (this .outputs .angle)
191
+ if (this .outputs .has ("angle"))
193
192
  {
194
193
  var lastAngle = this ._angle .getValue ();
195
194
 
@@ -198,7 +197,7 @@ Object .assign (Object .setPrototypeOf (SingleAxisHingeJoint .prototype, X3DRigi
198
197
 
199
198
  this ._angle = rotation .angle;
200
199
 
201
- if (this .outputs .angleRate)
200
+ if (this .outputs .has ("angleRate"))
202
201
  this ._angleRate = (this ._angle .getValue () - lastAngle) * this .getBrowser () .getCurrentFrameRate ();
203
202
  }
204
203
  };
@@ -68,7 +68,7 @@ function SliderJoint (executionContext)
68
68
  this ._separationRate .setUnit ("speed");
69
69
 
70
70
  this .joint = null;
71
- this .outputs = { };
71
+ this .outputs = new Set ();
72
72
  }
73
73
 
74
74
  Object .assign (Object .setPrototypeOf (SliderJoint .prototype, X3DRigidJointNode .prototype),
@@ -156,8 +156,7 @@ Object .assign (Object .setPrototypeOf (SliderJoint .prototype, X3DRigidJointNod
156
156
  },
157
157
  set_forceOutput__ ()
158
158
  {
159
- for (var key in this .outputs)
160
- delete this .outputs [key];
159
+ this .outputs .clear ();
161
160
 
162
161
  for (var i = 0, length = this ._forceOutput .length; i < length; ++ i)
163
162
  {
@@ -165,16 +164,16 @@ Object .assign (Object .setPrototypeOf (SliderJoint .prototype, X3DRigidJointNod
165
164
 
166
165
  if (value == "ALL")
167
166
  {
168
- this .outputs .separation = true;
169
- this .outputs .separationRate = true;
167
+ this .outputs .add ("separation");
168
+ this .outputs .add ("separationRate");
170
169
  }
171
170
  else
172
171
  {
173
- this .outputs [value] = true;
172
+ this .outputs .add (value);
174
173
  }
175
174
  }
176
175
 
177
- this .setOutput (! $.isEmptyObject (this .outputs));
176
+ this .setOutput (!! this .outputs .size);
178
177
  },
179
178
  set_separation__ ()
180
179
  {
@@ -167,7 +167,7 @@ Object .assign (Object .setPrototypeOf (Script .prototype, X3DScriptNode .protot
167
167
  }
168
168
  }
169
169
 
170
- sourceText += "\n[" + callbacks .map (c => `typeof ${c} !== "undefined" ? ${c} : undefined`) .join (",") + "];";
170
+ sourceText += ";\n[" + callbacks .map (c => `typeof ${c} !== "undefined" ? ${c} : undefined`) .join (",") + "];";
171
171
 
172
172
  this .globalObject = this .getGlobalObject ();
173
173