x_ite 8.6.10 → 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 (87) 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 +422 -488
  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/laboratory/gltf-sample-viewer.html +4 -2
  49. package/package.json +1 -1
  50. package/src/assets/shaders/webgl1/include/Fragment.glsl.js +11 -4
  51. package/src/assets/shaders/webgl2/include/Fragment.glsl.js +11 -4
  52. package/src/standard/Math/Algorithm.js +8 -1
  53. package/src/standard/Utility/BitSet.js +33 -0
  54. package/src/x_ite/Browser/Core/BrowserTimings.js +7 -1
  55. package/src/x_ite/Browser/Core/Context.js +1 -1
  56. package/src/x_ite/Browser/Rendering/GeometryContext.js +2 -0
  57. package/src/x_ite/Browser/Shape/AlphaMode.js +1 -1
  58. package/src/x_ite/Browser/VERSION.js +1 -1
  59. package/src/x_ite/Browser/X3DBrowser.js +2 -2
  60. package/src/x_ite/Components/EnvironmentalEffects/X3DBackgroundNode.js +115 -139
  61. package/src/x_ite/Components/EnvironmentalEffects/X3DFogObject.js +1 -1
  62. package/src/x_ite/Components/Geometry3D/ElevationGrid.js +10 -31
  63. package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +3 -6
  64. package/src/x_ite/Components/Geospatial/GeoElevationGrid.js +7 -25
  65. package/src/x_ite/Components/Grouping/X3DGroupingNode.js +1 -1
  66. package/src/x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode.js +4 -10
  67. package/src/x_ite/Components/Navigation/X3DViewpointNode.js +0 -10
  68. package/src/x_ite/Components/ParticleSystems/ParticleSystem.js +4 -3
  69. package/src/x_ite/Components/Rendering/IndexedLineSet.js +11 -33
  70. package/src/x_ite/Components/Rendering/LineSet.js +12 -37
  71. package/src/x_ite/Components/Rendering/PointSet.js +11 -24
  72. package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +14 -39
  73. package/src/x_ite/Components/RigidBodyPhysics/CollidableShape.js +1 -1
  74. package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +0 -2
  75. package/src/x_ite/Components/Shape/Appearance.js +9 -5
  76. package/src/x_ite/Components/Shape/Material.js +1 -2
  77. package/src/x_ite/Components/Shape/PhysicalMaterial.js +1 -2
  78. package/src/x_ite/Components/Shape/TwoSidedMaterial.js +1 -1
  79. package/src/x_ite/Components/Shape/UnlitMaterial.js +1 -1
  80. package/src/x_ite/Components/Shape/X3DMaterialNode.js +24 -9
  81. package/src/x_ite/Components/Shape/X3DShapeNode.js +1 -2
  82. package/src/x_ite/Components/Texturing/ImageTexture.js +1 -1
  83. package/src/x_ite/Components/Texturing/X3DTexture2DNode.js +2 -0
  84. package/src/x_ite/Fields/SFImage.js +9 -9
  85. package/src/x_ite/Fields/SFInt32.js +2 -2
  86. package/src/x_ite/Rendering/X3DRenderObject.js +0 -1
  87. package/x_ite.min.html +1 -1
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.10 # 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
 
@@ -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.10",
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>",
@@ -8,7 +8,6 @@ export default /* glsl */ `
8
8
  #endif
9
9
 
10
10
  uniform float x3d_AlphaCutoff;
11
- uniform float x3d_MinAlpha;
12
11
 
13
12
  #if defined (X3D_FOG) && defined (X3D_FOG_COORDS)
14
13
  varying float fogDepth;
@@ -115,10 +114,18 @@ fragment_main ()
115
114
  finalColor .rgb = getFogColor (finalColor .rgb);
116
115
  #endif
117
116
 
118
- if (finalColor .a < x3d_AlphaCutoff)
119
- 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
120
127
 
121
- gl_FragColor = vec4 (finalColor .rgb, max (finalColor .a, x3d_MinAlpha));
128
+ gl_FragColor = finalColor;
122
129
 
123
130
  #if defined (X3D_LOGARITHMIC_DEPTH_BUFFER)
124
131
  //https://outerra.blogspot.com/2013/07/logarithmic-depth-buffer-optimizations.html
@@ -1,6 +1,5 @@
1
1
  export default /* glsl */ `
2
2
  uniform float x3d_AlphaCutoff;
3
- uniform float x3d_MinAlpha;
4
3
 
5
4
  #if defined (X3D_FOG) && defined (X3D_FOG_COORDS)
6
5
  in float fogDepth;
@@ -116,10 +115,18 @@ fragment_main ()
116
115
  finalColor .rgb = getFogColor (finalColor .rgb);
117
116
  #endif
118
117
 
119
- if (finalColor .a < x3d_AlphaCutoff)
120
- 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
121
128
 
122
- x3d_FragColor = vec4 (finalColor .rgb, max (finalColor .a, x3d_MinAlpha));
129
+ x3d_FragColor = finalColor;
123
130
 
124
131
  #if defined (X3D_LOGARITHMIC_DEPTH_BUFFER)
125
132
  //https://outerra.blogspot.com/2013/07/logarithmic-depth-buffer-optimizations.html
@@ -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;
@@ -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 ();
@@ -227,7 +227,7 @@ const Context =
227
227
  }
228
228
  };
229
229
 
230
- check ();
230
+ setTimeout (check, 0);
231
231
  });
232
232
  },
233
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.10";
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