x_ite 8.6.9 → 8.6.11

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 (92) hide show
  1. package/Makefile +12 -12
  2. package/build/bin/version.pl +6 -0
  3. package/dist/assets/components/Annotation.js +13 -13
  4. package/dist/assets/components/Annotation.min.js +1 -1
  5. package/dist/assets/components/CADGeometry.js +13 -13
  6. package/dist/assets/components/CADGeometry.min.js +1 -1
  7. package/dist/assets/components/CubeMapTexturing.js +25 -25
  8. package/dist/assets/components/CubeMapTexturing.min.js +1 -1
  9. package/dist/assets/components/DIS.js +13 -13
  10. package/dist/assets/components/DIS.min.js +1 -1
  11. package/dist/assets/components/EventUtilities.js +9 -9
  12. package/dist/assets/components/EventUtilities.min.js +1 -1
  13. package/dist/assets/components/Geometry2D.js +19 -19
  14. package/dist/assets/components/Geometry2D.min.js +1 -1
  15. package/dist/assets/components/Geospatial.js +40 -58
  16. package/dist/assets/components/Geospatial.min.js +1 -1
  17. package/dist/assets/components/HAnim.js +18 -18
  18. package/dist/assets/components/HAnim.min.js +1 -1
  19. package/dist/assets/components/KeyDeviceSensor.js +8 -8
  20. package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
  21. package/dist/assets/components/Layout.js +27 -27
  22. package/dist/assets/components/Layout.min.js +1 -1
  23. package/dist/assets/components/NURBS.js +28 -34
  24. package/dist/assets/components/NURBS.min.js +1 -1
  25. package/dist/assets/components/ParticleSystems.js +27 -26
  26. package/dist/assets/components/ParticleSystems.min.js +1 -1
  27. package/dist/assets/components/Picking.js +19 -19
  28. package/dist/assets/components/Picking.min.js +1 -1
  29. package/dist/assets/components/RigidBodyPhysics.js +19 -19
  30. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  31. package/dist/assets/components/Scripting.js +28 -28
  32. package/dist/assets/components/Scripting.min.js +1 -1
  33. package/dist/assets/components/Text.js +24 -24
  34. package/dist/assets/components/Text.min.js +1 -1
  35. package/dist/assets/components/TextureProjector.js +14 -14
  36. package/dist/assets/components/TextureProjector.min.js +1 -1
  37. package/dist/assets/components/Texturing3D.js +30 -30
  38. package/dist/assets/components/Texturing3D.min.js +1 -1
  39. package/dist/assets/components/VolumeRendering.js +19 -19
  40. package/dist/assets/components/VolumeRendering.min.js +1 -1
  41. package/dist/assets/components/X_ITE.js +9 -9
  42. package/dist/assets/components/X_ITE.min.js +1 -1
  43. package/dist/x_ite.css +1 -1
  44. package/dist/x_ite.js +431 -487
  45. package/dist/x_ite.min.js +1 -1
  46. package/dist/x_ite.zip +0 -0
  47. package/docs/_config.yml +1 -1
  48. package/docs/_posts/getting-started.md +1 -1
  49. package/docs/laboratory/gltf-sample-viewer.html +4 -2
  50. package/package.json +1 -1
  51. package/src/assets/shaders/webgl1/include/Fragment.glsl.js +10 -2
  52. package/src/assets/shaders/webgl2/include/Fragment.glsl.js +10 -2
  53. package/src/standard/Math/Algorithm.js +8 -1
  54. package/src/standard/Utility/BitSet.js +33 -0
  55. package/src/tests.js +1 -1
  56. package/src/x_ite/Browser/Core/BrowserTimings.js +7 -1
  57. package/src/x_ite/Browser/Core/Context.js +5 -3
  58. package/src/x_ite/Browser/Rendering/GeometryContext.js +2 -0
  59. package/src/x_ite/Browser/Shape/AlphaMode.js +1 -1
  60. package/src/x_ite/Browser/VERSION.js +1 -1
  61. package/src/x_ite/Browser/X3DBrowser.js +2 -2
  62. package/src/x_ite/Components/EnvironmentalEffects/X3DBackgroundNode.js +115 -139
  63. package/src/x_ite/Components/EnvironmentalEffects/X3DFogObject.js +1 -1
  64. package/src/x_ite/Components/Geometry3D/ElevationGrid.js +10 -31
  65. package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +3 -6
  66. package/src/x_ite/Components/Geospatial/GeoElevationGrid.js +7 -25
  67. package/src/x_ite/Components/Grouping/X3DGroupingNode.js +1 -1
  68. package/src/x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode.js +4 -10
  69. package/src/x_ite/Components/Navigation/X3DViewpointNode.js +0 -10
  70. package/src/x_ite/Components/ParticleSystems/ParticleSystem.js +4 -3
  71. package/src/x_ite/Components/Rendering/IndexedLineSet.js +11 -33
  72. package/src/x_ite/Components/Rendering/LineSet.js +12 -37
  73. package/src/x_ite/Components/Rendering/PointSet.js +11 -24
  74. package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +14 -39
  75. package/src/x_ite/Components/RigidBodyPhysics/CollidableShape.js +1 -1
  76. package/src/x_ite/Components/Shape/Appearance.js +9 -5
  77. package/src/x_ite/Components/Shape/Material.js +1 -2
  78. package/src/x_ite/Components/Shape/PhysicalMaterial.js +1 -2
  79. package/src/x_ite/Components/Shape/TwoSidedMaterial.js +1 -1
  80. package/src/x_ite/Components/Shape/UnlitMaterial.js +1 -1
  81. package/src/x_ite/Components/Shape/X3DMaterialNode.js +24 -9
  82. package/src/x_ite/Components/Shape/X3DShapeNode.js +1 -2
  83. package/src/x_ite/Components/Texturing/ImageTexture.js +8 -3
  84. package/src/x_ite/Components/Texturing/X3DTexture2DNode.js +2 -0
  85. package/src/x_ite/Fields/SFImage.js +9 -9
  86. package/src/x_ite/Fields/SFInt32.js +2 -2
  87. package/src/x_ite/Rendering/X3DRenderObject.js +0 -2
  88. package/src/x_ite.html +1 -1
  89. package/x_ite.min.html +2 -2
  90. /package/docs/assets/X3D/{Michroma-Regular.ttf → teaser/Michroma-Regular.ttf} +0 -0
  91. /package/docs/assets/X3D/{peakpx.jpg → teaser/peakpx.jpg} +0 -0
  92. /package/docs/assets/X3D/{teaser.x3d → teaser/teaser.x3d} +0 -0
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.6.9 # x_ite latest version
23
+ version: 8.6.11 # x_ite latest version
24
24
  size: 289 # size in kb
25
25
  x3d_latest_version: 4.0 # x3d latest version
26
26
 
@@ -9,7 +9,7 @@ x_ite: true
9
9
  ---
10
10
  <x3d-canvas
11
11
  class="teaser"
12
- src="/x_ite/assets/X3D/teaser.x3d"
12
+ src="/x_ite/assets/X3D/teaser/teaser.x3d"
13
13
  splashScreen="false"
14
14
  contextMenu="false"
15
15
  notifications="false">
@@ -341,10 +341,12 @@ function createList (description, array)
341
341
 
342
342
  for (const filename of array)
343
343
  {
344
- const m = filename .match (/^([^\/]+)/);
344
+ const
345
+ match = filename .match (/^([^\/]+)/),
346
+ name = match [1] .replace (/([A-Z]+)/g, " $1") .replace (/\s+/g, " ") .trim ();
345
347
 
346
348
  $("<a></a>")
347
- .text (m [1])
349
+ .text (name)
348
350
  .attr ("href", array .server + filename)
349
351
  .appendTo ($("<li></li>") .appendTo (list))
350
352
  .on ("click", loadURL .bind (null, filename, array .server));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x_ite",
3
- "version": "8.6.9",
3
+ "version": "8.6.11",
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>",
@@ -114,8 +114,16 @@ fragment_main ()
114
114
  finalColor .rgb = getFogColor (finalColor .rgb);
115
115
  #endif
116
116
 
117
- if (finalColor .a < x3d_AlphaCutoff)
118
- discard;
117
+ #if defined (X3D_ALPHA_MODE_OPAQUE)
118
+ finalColor .a = 1.0;
119
+ #endif
120
+
121
+ #if defined (X3D_ALPHA_MODE_MASK)
122
+ if (finalColor .a < x3d_AlphaCutoff)
123
+ discard;
124
+
125
+ finalColor .a = 1.0;
126
+ #endif
119
127
 
120
128
  gl_FragColor = finalColor;
121
129
 
@@ -115,8 +115,16 @@ fragment_main ()
115
115
  finalColor .rgb = getFogColor (finalColor .rgb);
116
116
  #endif
117
117
 
118
- if (finalColor .a < x3d_AlphaCutoff)
119
- discard;
118
+ #if defined (X3D_ALPHA_MODE_OPAQUE)
119
+ finalColor .a = 1.0;
120
+ #endif
121
+
122
+ #if defined (X3D_ALPHA_MODE_MASK)
123
+ if (finalColor .a < x3d_AlphaCutoff)
124
+ discard;
125
+
126
+ finalColor .a = 1.0;
127
+ #endif
120
128
 
121
129
  x3d_FragColor = finalColor;
122
130
 
@@ -154,7 +154,14 @@ export default class Algorithm
154
154
  if (this .isPowerOfTwo (n))
155
155
  return n;
156
156
 
157
- return 1 << 32 - Math .clz32 (n);
157
+ return 1 << (32 - Math .clz32 (n));
158
+ }
159
+
160
+ static bitCount (n)
161
+ {
162
+ n = n - ((n >>> 1) & 0x55555555);
163
+ n = (n & 0x33333333) + ((n >>> 2) & 0x33333333);
164
+ return ((n + (n >>> 4) & 0xF0F0F0F) * 0x1010101) >>> 24;
158
165
  }
159
166
 
160
167
  static cmp (lhs, rhs)
@@ -45,6 +45,8 @@
45
45
  *
46
46
  ******************************************************************************/
47
47
 
48
+ import Algorithm from "../Math/Algorithm.js";
49
+
48
50
  function BitSet (value = 0)
49
51
  {
50
52
  this .value = value;
@@ -53,6 +55,21 @@ function BitSet (value = 0)
53
55
  BitSet .prototype =
54
56
  {
55
57
  constructor: BitSet,
58
+ [Symbol .iterator]: function* ()
59
+ {
60
+ let
61
+ value = this .value,
62
+ index = 0;
63
+
64
+ while (value)
65
+ {
66
+ if (value & 1)
67
+ yield index;
68
+
69
+ value >>>= 1;
70
+ index += 1;
71
+ }
72
+ },
56
73
  get: function (index)
57
74
  {
58
75
  const mask = 1 << index;
@@ -72,6 +89,11 @@ BitSet .prototype =
72
89
  {
73
90
  this .value = 0;
74
91
  },
92
+ entries: function* ()
93
+ {
94
+ for (const i of this)
95
+ yield [i, i];
96
+ },
75
97
  valueOf: function ()
76
98
  {
77
99
  return this .value;
@@ -82,4 +104,15 @@ BitSet .prototype =
82
104
  },
83
105
  };
84
106
 
107
+ BitSet .prototype .keys = BitSet .prototype [Symbol .iterator];
108
+ BitSet .prototype .values = BitSet .prototype [Symbol .iterator];
109
+
110
+ Object .defineProperty (BitSet .prototype, "size",
111
+ {
112
+ get: function ()
113
+ {
114
+ return Algorithm .bitCount (this .value);
115
+ },
116
+ });
117
+
85
118
  export default BitSet;
package/src/tests.js CHANGED
@@ -14,7 +14,7 @@ const X_ITE_TESTS = [
14
14
  { path: "Core/Comment.x3d" },
15
15
  { path: "Core/DataURL.x3d" },
16
16
  { path: "Core/EXPORT.wrl" },
17
- { path: "Core/EXPORT.x3d" },
17
+ { path: "Core/export.x3d" },
18
18
  { path: "Core/EXPORT.x3dv" },
19
19
  { path: "Core/IMPORT.x3d" },
20
20
  { path: "Core/IMPORT.x3dv" },
@@ -78,6 +78,8 @@ BrowserTimings .prototype = Object .assign (Object .create (X3DBaseNode .prototy
78
78
  {
79
79
  X3DBaseNode .prototype .initialize .call (this);
80
80
 
81
+ this .getBrowser () .getBrowserOptions () ._ContextMenu .addInterest ("set_enabled__", this);
82
+
81
83
  this .localStorage .addDefaultValues ({ type: "LESS" });
82
84
 
83
85
  this .element = $("<div></div>") .hide () .addClass ("x_ite-private-browser-timings") .appendTo (this .getBrowser () .getSurface ());
@@ -103,7 +105,11 @@ BrowserTimings .prototype = Object .assign (Object .create (X3DBaseNode .prototy
103
105
 
104
106
  this .enabled = enabled;
105
107
 
106
- if (enabled)
108
+ this .set_enabled__ ();
109
+ },
110
+ set_enabled__: function ()
111
+ {
112
+ if (this .enabled && this .getBrowser () .getBrowserOption ("ContextMenu"))
107
113
  {
108
114
  this .element .stop (true, true) .fadeIn ();
109
115
  this .fps .reset ();
@@ -193,10 +193,12 @@ const Context =
193
193
  // Async functions
194
194
 
195
195
  Object .assign (gl, gl .getVersion () === 1
196
- ? {
196
+ ?
197
+ {
197
198
  readPixelsAsync: gl .readPixels,
198
199
  }
199
- : {
200
+ :
201
+ {
200
202
  clientWaitAsync: function (sync, flags, timeout)
201
203
  {
202
204
  return new Promise ((resolve, reject) =>
@@ -225,7 +227,7 @@ const Context =
225
227
  }
226
228
  };
227
229
 
228
- check ();
230
+ setTimeout (check, 0);
229
231
  });
230
232
  },
231
233
  getBufferSubDataAsync: async function (target, buffer, srcByteOffset, dstBuffer, /* optional */ dstOffset, /* optional */ length)
@@ -46,11 +46,13 @@
46
46
  ******************************************************************************/
47
47
 
48
48
  import X3DGeometryNode from "../../Components/Rendering/X3DGeometryNode.js";
49
+ import AlphaMode from "../Shape/AlphaMode.js";
49
50
 
50
51
  function GeometryContext (options = { })
51
52
  {
52
53
  Object .assign (this,
53
54
  {
55
+ alphaMode: AlphaMode .OPAQUE,
54
56
  geometryType: 3,
55
57
  hasFogCoords: false,
56
58
  colorMaterial: false,
@@ -49,7 +49,7 @@ let i = 0;
49
49
 
50
50
  const AlphaMode =
51
51
  {
52
- AUTO: i ++,
52
+ AUTO: i ++, // Must be zero!
53
53
  OPAQUE: i ++,
54
54
  MASK: i ++,
55
55
  BLEND: i ++,
@@ -45,4 +45,4 @@
45
45
  *
46
46
  ******************************************************************************/
47
47
 
48
- export default "8.6.9";
48
+ export default "8.6.11";
@@ -186,8 +186,8 @@ X3DBrowser .prototype = Object .assign (Object .create (X3DBrowserContext .proto
186
186
  },
187
187
  getComponent: function (name, level)
188
188
  {
189
- name = String (name);
190
- level = ~~level;
189
+ name = String (name);
190
+ level |= 0;
191
191
 
192
192
  const component = SupportedComponents .get (name);
193
193