x_ite 8.9.3 → 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 (55) 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 +33 -33
  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 +24 -24
  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 +37 -37
  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 +739 -749
  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 +1 -1
  48. package/src/x_ite/Browser/VERSION.js +1 -1
  49. package/src/x_ite/Components/Core/X3DPrototypeInstance.js +11 -20
  50. package/src/x_ite/Components/Networking/X3DUrlObject.js +2 -3
  51. package/src/x_ite/Components/RigidBodyPhysics/BallJoint.js +8 -9
  52. package/src/x_ite/Components/RigidBodyPhysics/CollisionSensor.js +8 -4
  53. package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +20 -21
  54. package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +12 -13
  55. package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +6 -7
package/dist/x_ite.zip CHANGED
Binary file
package/docs/_config.yml CHANGED
@@ -20,7 +20,7 @@ timezone:
20
20
  # ↓ --------------------------
21
21
 
22
22
  title: X_ITE X3D Browser # the main title
23
- version: 8.9.3 # x_ite latest version
23
+ version: 8.9.4 # x_ite latest version
24
24
  size: 286 # size in kb
25
25
  x3d_latest_version: 4.0 # x3d latest version
26
26
 
@@ -29,7 +29,13 @@ X_ITE supports custom shaders, clip planes, reflection mapping, script nodes, pr
29
29
  >**Tip:** X_ITE runs best in fresh installs of Google Chrome, Chromium, Firefox, Safari, Opera, and Microsoft Edge. X_ITE uses the latest JavaScript standard, but is also compatible with older browser, and is available both on your desktop computer and on your modern smart-phone.
30
30
  {: .prompt-tip }
31
31
 
32
- If you ever get into trouble, please [report a bug](report-a-bug). If you have any questions or need help [open a new issue](report-a-bug).
32
+ If you ever get into trouble, please [report a bug](report-a-bug). If you have any questions or need help please [open a new issue](report-a-bug){:target="_blank"}.
33
+
34
+ ### Become a Patreon of X_ITE
35
+
36
+ Yeah, tell me!
37
+
38
+ Have a look at: [https://patreon.com/X_ITE](https://patreon.com/X_ITE).
33
39
 
34
40
  ## X3D Examples
35
41
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x_ite",
3
- "version": "8.9.3",
3
+ "version": "8.9.4",
4
4
  "description": "X_ITE X3D Browser, view and manipulate X3D and VRML scenes in HTML.",
5
5
  "homepage": "https://create3000.github.io/x_ite/",
6
6
  "author": "Holger Seelig <holger.seelig@gmail.com>",
@@ -45,4 +45,4 @@
45
45
  *
46
46
  ******************************************************************************/
47
47
 
48
- export default "8.9.3";
48
+ export default "8.9.4";
@@ -88,25 +88,9 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, X3DNode
88
88
  {
89
89
  this [_body] ?.dispose ();
90
90
 
91
- const protoNode = this [_protoNode];
92
-
93
- if (protoNode .isExternProto)
94
- {
95
- if (protoNode .checkLoadState () !== X3DConstants .COMPLETE_STATE)
96
- {
97
- this [_body] = null;
98
-
99
- if (this .isInitialized ())
100
- X3DChildObject .prototype .addEvent .call (this);
101
-
102
- protoNode ._updateInstances .addInterest ("construct", this);
103
- protoNode .requestImmediateLoad () .catch (Function .prototype);
104
-
105
- return;
106
- }
107
- }
108
-
109
- const proto = protoNode .getProtoDeclaration ();
91
+ const
92
+ protoNode = this [_protoNode],
93
+ proto = protoNode .getProtoDeclaration ();
110
94
 
111
95
  // If there is a proto, the externproto is completely loaded.
112
96
 
@@ -249,7 +233,14 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, X3DNode
249
233
 
250
234
  protoNode ._name_changed .addFieldInterest (this ._typeName_changed);
251
235
 
252
- this .construct ();
236
+ if (protoNode .isExternProto && protoNode .checkLoadState () !== X3DConstants .COMPLETE_STATE)
237
+ {
238
+ protoNode ._updateInstances .addInterest ("construct", this);
239
+ }
240
+ else
241
+ {
242
+ this .construct ();
243
+ }
253
244
  },
254
245
  getBody ()
255
246
  {
@@ -45,9 +45,8 @@
45
45
  *
46
46
  ******************************************************************************/
47
47
 
48
- import Fields from "../../Fields.js";
49
- import X3DConstants from "../../Base/X3DConstants.js";
50
- import X3DProtoDeclaration from "../../Prototype/X3DProtoDeclaration.js";
48
+ import Fields from "../../Fields.js";
49
+ import X3DConstants from "../../Base/X3DConstants.js";
51
50
 
52
51
  const
53
52
  _cache = Symbol (),
@@ -62,7 +62,7 @@ function BallJoint (executionContext)
62
62
  this ._anchorPoint .setUnit ("length");
63
63
 
64
64
  this .joint = null;
65
- this .outputs = { };
65
+ this .outputs = new Set ();
66
66
  this .localAnchorPoint1 = new Vector3 (0, 0, 0);
67
67
  this .localAnchorPoint2 = new Vector3 (0, 0, 0);
68
68
  }
@@ -114,8 +114,7 @@ Object .assign (Object .setPrototypeOf (BallJoint .prototype, X3DRigidJointNode
114
114
  },
115
115
  set_forceOutput__ ()
116
116
  {
117
- for (var key in this .outputs)
118
- delete this .outputs [key];
117
+ this .outputs .clear ();
119
118
 
120
119
  for (var i = 0, length = this ._forceOutput .length; i < length; ++ i)
121
120
  {
@@ -123,16 +122,16 @@ Object .assign (Object .setPrototypeOf (BallJoint .prototype, X3DRigidJointNode
123
122
 
124
123
  if (value == "ALL")
125
124
  {
126
- this .outputs .body1AnchorPoint = true;
127
- this .outputs .body2AnchorPoint = true;
125
+ this .outputs .add ("body1AnchorPoint");
126
+ this .outputs .add ("body2AnchorPoint");
128
127
  }
129
128
  else
130
129
  {
131
- this .outputs [value] = true;
130
+ this .outputs .add (value);
132
131
  }
133
132
  }
134
133
 
135
- this .setOutput (!$.isEmptyObject (this .outputs));
134
+ this .setOutput (!! this .outputs .size);
136
135
  },
137
136
  set_anchorPoint__ ()
138
137
  {
@@ -155,7 +154,7 @@ Object .assign (Object .setPrototypeOf (BallJoint .prototype, X3DRigidJointNode
155
154
 
156
155
  return function ()
157
156
  {
158
- if (this .outputs .body1AnchorPoint)
157
+ if (this .outputs .has ("body1AnchorPoint"))
159
158
  this ._body1AnchorPoint = this .getBody1 () .getMatrix () .multVecMatrix (this .getInitialInverseMatrix1 () .multVecMatrix (localAnchorPoint1 .assign (this .localAnchorPoint1)));
160
159
  };
161
160
  })(),
@@ -165,7 +164,7 @@ Object .assign (Object .setPrototypeOf (BallJoint .prototype, X3DRigidJointNode
165
164
 
166
165
  return function ()
167
166
  {
168
- if (this .outputs .body2AnchorPoint)
167
+ if (this .outputs .has ("body2AnchorPoint"))
169
168
  this ._body2AnchorPoint = this .getBody2 () .getMatrix () .multVecMatrix (this .getInitialInverseMatrix2 () .multVecMatrix (localAnchorPoint2 .assign (this .localAnchorPoint2)));
170
169
  };
171
170
  })(),
@@ -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
  {