x_ite 8.11.3 → 8.11.5
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.
- package/build/bin/bump.pl +4 -1
- package/build/bin/version.pl +6 -4
- package/dist/assets/components/Annotation.js +13 -13
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +13 -13
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +26 -30
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +13 -13
- package/dist/assets/components/DIS.min.js +1 -1
- package/dist/assets/components/EventUtilities.js +9 -9
- package/dist/assets/components/EventUtilities.min.js +1 -1
- package/dist/assets/components/Geometry2D.js +19 -19
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +33 -33
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +25 -29
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +8 -8
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +26 -26
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +24 -24
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +29 -33
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +18 -18
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +17 -17
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +37 -37
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +24 -29
- package/dist/assets/components/Text.min.js +1 -1
- package/dist/assets/components/TextureProjector.js +14 -14
- package/dist/assets/components/TextureProjector.min.js +1 -1
- package/dist/assets/components/Texturing3D.js +31 -35
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +18 -18
- package/dist/assets/components/VolumeRendering.min.js +1 -1
- package/dist/assets/components/X_ITE.js +9 -9
- package/dist/assets/components/X_ITE.min.js +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +104 -201
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +1 -1
- package/package.json +1 -1
- package/src/assets/shaders/webgl2/include/Fragment.glsl.js +6 -4
- package/src/assets/shaders/webgl2/include/Skin.glsl.js +1 -1
- package/src/assets/shaders/webgl2/include/Utils.glsl.js +3 -3
- package/src/assets/shaders/webgl2/include/Vertex.glsl.js +1 -1
- package/src/x_ite/Base/X3DChildObject.js +4 -5
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +4 -5
- package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +4 -5
- package/src/x_ite/Browser/Time/X3DTimeContext.js +2 -3
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Components/Core/X3DBindableNode.js +0 -1
- package/src/x_ite/Components/CubeMapTexturing/ImageCubeMapTexture.js +1 -2
- package/src/x_ite/Components/HAnim/HAnimMotion.js +2 -3
- package/src/x_ite/Components/Networking/X3DUrlObject.js +4 -5
- package/src/x_ite/Components/ParticleSystems/ParticleSystem.js +6 -7
- package/src/x_ite/Components/Sound/AudioClip.js +1 -2
- package/src/x_ite/Components/Text/X3DFontStyleNode.js +0 -3
- package/src/x_ite/Components/Texturing/ImageTexture.js +1 -2
- package/src/x_ite/Components/Texturing/MovieTexture.js +1 -2
- package/src/x_ite/Components/Texturing3D/ImageTextureAtlas.js +1 -2
- package/src/x_ite/Components/Time/X3DTimeDependentNode.js +2 -3
- package/src/x_ite/Execution/BindableList.js +4 -8
- package/src/x_ite/Execution/BindableStack.js +3 -5
- package/src/x_ite/Rendering/X3DRenderObject.js +1 -2
- package/src/standard/Time/Time.js +0 -77
package/dist/x_ite.zip
CHANGED
|
Binary file
|
package/docs/_config.yml
CHANGED
package/package.json
CHANGED
|
@@ -142,12 +142,14 @@ fragment_main ()
|
|
|
142
142
|
#endif
|
|
143
143
|
|
|
144
144
|
#if defined (X3D_ORDER_INDEPENDENT_TRANSPARENCY)
|
|
145
|
-
float
|
|
145
|
+
float a = finalColor .a;
|
|
146
|
+
float w = weight (gl_FragCoord .z, a);
|
|
146
147
|
|
|
147
|
-
finalColor.rgb *=
|
|
148
|
+
finalColor.rgb *= a;
|
|
149
|
+
finalColor *= w;
|
|
148
150
|
|
|
149
|
-
x3d_FragData0 = vec4 (finalColor .rgb
|
|
150
|
-
x3d_FragData1 = vec4 (finalColor .a
|
|
151
|
+
x3d_FragData0 = vec4 (finalColor .rgb, a);
|
|
152
|
+
x3d_FragData1 = vec4 (finalColor .a);
|
|
151
153
|
#else
|
|
152
154
|
x3d_FragColor = finalColor;
|
|
153
155
|
#endif
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export default /* glsl */ `
|
|
2
2
|
#if defined (X3D_SKINNING) || defined (X3D_PARTICLE_SYSTEM)
|
|
3
3
|
vec4
|
|
4
|
-
texelFetch (const in sampler2D
|
|
4
|
+
texelFetch (const in sampler2D _sampler, const in int index, const in int lod)
|
|
5
5
|
{
|
|
6
|
-
int x = textureSize (
|
|
6
|
+
int x = textureSize (_sampler, lod) .x;
|
|
7
7
|
ivec2 p = ivec2 (index % x, index / x);
|
|
8
|
-
vec4 t = texelFetch (
|
|
8
|
+
vec4 t = texelFetch (_sampler, p, lod);
|
|
9
9
|
|
|
10
10
|
return t;
|
|
11
11
|
}
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
48
|
import X3DObject from "./X3DObject.js";
|
|
49
|
-
import Time from "../../standard/Time/Time.js";
|
|
50
49
|
import DEVELOPMENT from "../DEVELOPMENT.js";
|
|
51
50
|
|
|
52
51
|
const
|
|
@@ -98,14 +97,14 @@ if (DEVELOPMENT)
|
|
|
98
97
|
},
|
|
99
98
|
addEvent ()
|
|
100
99
|
{
|
|
101
|
-
this .setModificationTime (
|
|
100
|
+
this .setModificationTime (Date .now ());
|
|
102
101
|
|
|
103
102
|
for (const parent of this [_parents] .values ())
|
|
104
103
|
parent .deref () ?.addEvent (this);
|
|
105
104
|
},
|
|
106
105
|
addEventObject (field, event)
|
|
107
106
|
{
|
|
108
|
-
this .setModificationTime (
|
|
107
|
+
this .setModificationTime (Date .now ());
|
|
109
108
|
|
|
110
109
|
for (const parent of this [_parents] .values ())
|
|
111
110
|
parent .deref () ?.addEventObject (this, event);
|
|
@@ -205,14 +204,14 @@ else
|
|
|
205
204
|
},
|
|
206
205
|
addEvent ()
|
|
207
206
|
{
|
|
208
|
-
this .setModificationTime (
|
|
207
|
+
this .setModificationTime (Date .now ());
|
|
209
208
|
|
|
210
209
|
for (const parent of this [_parents])
|
|
211
210
|
parent .addEvent (this);
|
|
212
211
|
},
|
|
213
212
|
addEventObject (field, event)
|
|
214
213
|
{
|
|
215
|
-
this .setModificationTime (
|
|
214
|
+
this .setModificationTime (Date .now ());
|
|
216
215
|
|
|
217
216
|
for (const parent of this [_parents])
|
|
218
217
|
parent .addEventObject (this, event);
|
|
@@ -56,7 +56,6 @@ import TimeSensor from "../../Components/Time/TimeSensor.js";
|
|
|
56
56
|
import Vector2 from "../../../standard/Math/Numbers/Vector2.js";
|
|
57
57
|
import Vector3 from "../../../standard/Math/Numbers/Vector3.js";
|
|
58
58
|
import Rotation4 from "../../../standard/Math/Numbers/Rotation4.js";
|
|
59
|
-
import Time from "../../../standard/Time/Time.js";
|
|
60
59
|
|
|
61
60
|
typeof jquery_mousewheel; // import plugin
|
|
62
61
|
|
|
@@ -165,7 +164,7 @@ Object .assign (Object .setPrototypeOf (ExamineViewer .prototype, X3DViewer .pro
|
|
|
165
164
|
if (this .button >= 0)
|
|
166
165
|
return;
|
|
167
166
|
|
|
168
|
-
this .pressTime =
|
|
167
|
+
this .pressTime = Date .now ();
|
|
169
168
|
|
|
170
169
|
const { x, y } = this .getBrowser () .getPointerFromEvent (event);
|
|
171
170
|
|
|
@@ -248,7 +247,7 @@ Object .assign (Object .setPrototypeOf (ExamineViewer .prototype, X3DViewer .pro
|
|
|
248
247
|
|
|
249
248
|
this .getBrowser () .setCursor ("DEFAULT");
|
|
250
249
|
|
|
251
|
-
if (Math .abs (this .rotation .angle) > SPIN_ANGLE &&
|
|
250
|
+
if (Math .abs (this .rotation .angle) > SPIN_ANGLE && Date .now () - this .motionTime < SPIN_RELEASE_TIME)
|
|
252
251
|
this .addSpinning (this .rotation);
|
|
253
252
|
|
|
254
253
|
this ._isActive = false;
|
|
@@ -302,13 +301,13 @@ Object .assign (Object .setPrototypeOf (ExamineViewer .prototype, X3DViewer .pro
|
|
|
302
301
|
|
|
303
302
|
this .rotation .setFromToVec (toVector, this .fromVector);
|
|
304
303
|
|
|
305
|
-
if (Math .abs (this .rotation .angle) < SPIN_ANGLE &&
|
|
304
|
+
if (Math .abs (this .rotation .angle) < SPIN_ANGLE && Date .now () - this .pressTime < MOTION_TIME)
|
|
306
305
|
return;
|
|
307
306
|
|
|
308
307
|
this .addRotate (this .rotation);
|
|
309
308
|
|
|
310
309
|
this .fromVector .assign (toVector);
|
|
311
|
-
this .motionTime =
|
|
310
|
+
this .motionTime = Date .now ();
|
|
312
311
|
break;
|
|
313
312
|
}
|
|
314
313
|
case 1:
|
|
@@ -53,7 +53,6 @@ import Vector3 from "../../../standard/Math/Numbers/Vector3.js";
|
|
|
53
53
|
import Rotation4 from "../../../standard/Math/Numbers/Rotation4.js";
|
|
54
54
|
import Matrix4 from "../../../standard/Math/Numbers/Matrix4.js";
|
|
55
55
|
import Camera from "../../../standard/Math/Geometry/Camera.js";
|
|
56
|
-
import Time from "../../../standard/Time/Time.js";
|
|
57
56
|
|
|
58
57
|
typeof jquery_mousewheel; // import plugin
|
|
59
58
|
|
|
@@ -418,7 +417,7 @@ Object .assign (Object .setPrototypeOf (X3DFlyViewer .prototype, X3DViewer .prot
|
|
|
418
417
|
const
|
|
419
418
|
navigationInfo = this .getNavigationInfo (),
|
|
420
419
|
viewpoint = this .getActiveViewpoint (),
|
|
421
|
-
now =
|
|
420
|
+
now = Date .now (),
|
|
422
421
|
dt = (now - this .startTime) / 1000;
|
|
423
422
|
|
|
424
423
|
upVector .assign (viewpoint .getUpVector ());
|
|
@@ -488,7 +487,7 @@ Object .assign (Object .setPrototypeOf (X3DFlyViewer .prototype, X3DViewer .prot
|
|
|
488
487
|
const
|
|
489
488
|
navigationInfo = this .getNavigationInfo (),
|
|
490
489
|
viewpoint = this .getActiveViewpoint (),
|
|
491
|
-
now =
|
|
490
|
+
now = Date .now (),
|
|
492
491
|
dt = (now - this .startTime) / 1000,
|
|
493
492
|
upVector = viewpoint .getUpVector ();
|
|
494
493
|
|
|
@@ -526,7 +525,7 @@ Object .assign (Object .setPrototypeOf (X3DFlyViewer .prototype, X3DViewer .prot
|
|
|
526
525
|
this .getBrowser () .prepareEvents () .addInterest ("fly", this);
|
|
527
526
|
this .getBrowser () .addBrowserEvent ();
|
|
528
527
|
|
|
529
|
-
this .startTime =
|
|
528
|
+
this .startTime = Date .now ();
|
|
530
529
|
},
|
|
531
530
|
addPan ()
|
|
532
531
|
{
|
|
@@ -537,7 +536,7 @@ Object .assign (Object .setPrototypeOf (X3DFlyViewer .prototype, X3DViewer .prot
|
|
|
537
536
|
this .getBrowser () .prepareEvents () .addInterest ("pan", this);
|
|
538
537
|
this .getBrowser () .addBrowserEvent ();
|
|
539
538
|
|
|
540
|
-
this .startTime =
|
|
539
|
+
this .startTime = Date .now ();
|
|
541
540
|
},
|
|
542
541
|
addRoll: (() =>
|
|
543
542
|
{
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
48
|
import Vector3 from "../../../standard/Math/Numbers/Vector3.js";
|
|
49
|
-
import Time from "../../../standard/Time/Time.js";
|
|
50
49
|
|
|
51
50
|
const
|
|
52
51
|
_currentTime = Symbol (),
|
|
@@ -56,7 +55,7 @@ const
|
|
|
56
55
|
|
|
57
56
|
function X3DTimeContext ()
|
|
58
57
|
{
|
|
59
|
-
this [_currentTime] =
|
|
58
|
+
this [_currentTime] = Date .now () / 1000;
|
|
60
59
|
this [_currentFrameRate] = 60;
|
|
61
60
|
this [_currentPosition] = new Vector3 (0, 0, 0);
|
|
62
61
|
this [_currentSpeed] = 0;
|
|
@@ -83,7 +82,7 @@ Object .assign (X3DTimeContext .prototype,
|
|
|
83
82
|
return function ()
|
|
84
83
|
{
|
|
85
84
|
const
|
|
86
|
-
time =
|
|
85
|
+
time = Date .now () / 1000,
|
|
87
86
|
interval = time - this [_currentTime];
|
|
88
87
|
|
|
89
88
|
this [_currentTime] = time;
|
|
@@ -53,7 +53,6 @@ import X3DUrlObject from "../Networking/X3DUrlObject.js";
|
|
|
53
53
|
import X3DConstants from "../../Base/X3DConstants.js";
|
|
54
54
|
import Vector2 from "../../../standard/Math/Numbers/Vector2.js";
|
|
55
55
|
import Algorithm from "../../../standard/Math/Algorithm.js";
|
|
56
|
-
import Time from "../../../standard/Time/Time.js";
|
|
57
56
|
import DEVELOPMENT from "../../DEVELOPMENT.js";
|
|
58
57
|
|
|
59
58
|
const defaultData = new Uint8Array ([ 255, 255, 255, 255 ]);
|
|
@@ -129,7 +128,7 @@ Object .assign (Object .setPrototypeOf (ImageCubeMapTexture .prototype, X3DEnvir
|
|
|
129
128
|
if (this .URL .protocol !== "data:")
|
|
130
129
|
{
|
|
131
130
|
if (!this .getCache ())
|
|
132
|
-
this .URL .searchParams .set ("_",
|
|
131
|
+
this .URL .searchParams .set ("_", Date .now ());
|
|
133
132
|
}
|
|
134
133
|
|
|
135
134
|
this .image .attr ("src", this .URL .href);
|
|
@@ -56,7 +56,6 @@ import OrientationInterpolator from "../Interpolation/OrientationInterpolator.js
|
|
|
56
56
|
import Vector3 from "../../../standard/Math/Numbers/Vector3.js";
|
|
57
57
|
import Rotation4 from "../../../standard/Math/Numbers/Rotation4.js";
|
|
58
58
|
import Algorithm from "../../../standard/Math/Algorithm.js";
|
|
59
|
-
import Time from "../../../standard/Time/Time.js";
|
|
60
59
|
|
|
61
60
|
function HAnimMotion (executionContext)
|
|
62
61
|
{
|
|
@@ -128,9 +127,9 @@ Object .assign (Object .setPrototypeOf (HAnimMotion .prototype, X3DChildNode .pr
|
|
|
128
127
|
set_enabled__ ()
|
|
129
128
|
{
|
|
130
129
|
if (this ._enabled .getValue ())
|
|
131
|
-
this .timeSensor ._startTime =
|
|
130
|
+
this .timeSensor ._startTime = Date .now () / 1000;
|
|
132
131
|
else
|
|
133
|
-
this .timeSensor ._stopTime =
|
|
132
|
+
this .timeSensor ._stopTime = Date .now () / 1000;
|
|
134
133
|
},
|
|
135
134
|
set_interpolators__ ()
|
|
136
135
|
{
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
|
|
48
48
|
import Fields from "../../Fields.js";
|
|
49
49
|
import X3DConstants from "../../Base/X3DConstants.js";
|
|
50
|
-
import Time from "../../../standard/Time/Time.js";
|
|
51
50
|
|
|
52
51
|
const
|
|
53
52
|
_cache = Symbol (),
|
|
@@ -63,7 +62,7 @@ function X3DUrlObject (executionContext)
|
|
|
63
62
|
X3DConstants .inputOutput, "loadData", new Fields .SFTime ());
|
|
64
63
|
|
|
65
64
|
this [_cache] = true;
|
|
66
|
-
this [_autoRefreshStartTime] =
|
|
65
|
+
this [_autoRefreshStartTime] = Date .now ();
|
|
67
66
|
}
|
|
68
67
|
|
|
69
68
|
Object .assign (X3DUrlObject .prototype,
|
|
@@ -84,7 +83,7 @@ Object .assign (X3DUrlObject .prototype,
|
|
|
84
83
|
|
|
85
84
|
if (value === X3DConstants .COMPLETE_STATE)
|
|
86
85
|
{
|
|
87
|
-
this [_autoRefreshCompleteTime] =
|
|
86
|
+
this [_autoRefreshCompleteTime] = Date .now ();
|
|
88
87
|
this .setAutoRefreshTimer (this ._autoRefresh .getValue ());
|
|
89
88
|
}
|
|
90
89
|
|
|
@@ -228,7 +227,7 @@ Object .assign (X3DUrlObject .prototype,
|
|
|
228
227
|
|
|
229
228
|
if (autoRefreshTimeLimit !== 0)
|
|
230
229
|
{
|
|
231
|
-
if ((
|
|
230
|
+
if ((Date .now () - this [_autoRefreshStartTime]) / 1000 > autoRefreshTimeLimit - autoRefreshInterval)
|
|
232
231
|
return;
|
|
233
232
|
}
|
|
234
233
|
|
|
@@ -267,7 +266,7 @@ Object .assign (X3DUrlObject .prototype,
|
|
|
267
266
|
return;
|
|
268
267
|
|
|
269
268
|
const
|
|
270
|
-
elapsedTime = (
|
|
269
|
+
elapsedTime = (Date .now () - this [_autoRefreshCompleteTime]) / 1000,
|
|
271
270
|
autoRefresh = this ._autoRefresh .getValue ();
|
|
272
271
|
|
|
273
272
|
let autoRefreshInterval = autoRefresh - elapsedTime;
|
|
@@ -60,7 +60,6 @@ import Vector3 from "../../../standard/Math/Numbers/Vector3.js";
|
|
|
60
60
|
import Matrix4 from "../../../standard/Math/Numbers/Matrix4.js";
|
|
61
61
|
import Matrix3 from "../../../standard/Math/Numbers/Matrix3.js";
|
|
62
62
|
import BVH from "../../../standard/Math/Utility/BVH.js";
|
|
63
|
-
import Time from "../../../standard/Time/Time.js";
|
|
64
63
|
|
|
65
64
|
const PointGeometry = new Float32Array ([0, 0, 0, 1]);
|
|
66
65
|
|
|
@@ -262,7 +261,7 @@ Object .assign (Object .setPrototypeOf (ParticleSystem .prototype, X3DShapeNode
|
|
|
262
261
|
|
|
263
262
|
if (this .pauseTime)
|
|
264
263
|
{
|
|
265
|
-
this .creationTime +=
|
|
264
|
+
this .creationTime += Date .now () / 1000 - this .pauseTime;
|
|
266
265
|
this .pauseTime = 0;
|
|
267
266
|
}
|
|
268
267
|
}
|
|
@@ -274,7 +273,7 @@ Object .assign (Object .setPrototypeOf (ParticleSystem .prototype, X3DShapeNode
|
|
|
274
273
|
this .getBrowser () .sensorEvents () .removeInterest ("animateParticles", this);
|
|
275
274
|
|
|
276
275
|
if (this .pauseTime === 0)
|
|
277
|
-
this .pauseTime =
|
|
276
|
+
this .pauseTime = Date .now () / 1000;
|
|
278
277
|
}
|
|
279
278
|
}
|
|
280
279
|
},
|
|
@@ -292,7 +291,7 @@ Object .assign (Object .setPrototypeOf (ParticleSystem .prototype, X3DShapeNode
|
|
|
292
291
|
}
|
|
293
292
|
else
|
|
294
293
|
{
|
|
295
|
-
this .pauseTime =
|
|
294
|
+
this .pauseTime = Date .now () / 1000;
|
|
296
295
|
}
|
|
297
296
|
|
|
298
297
|
this ._isActive = true;
|
|
@@ -409,7 +408,7 @@ Object .assign (Object .setPrototypeOf (ParticleSystem .prototype, X3DShapeNode
|
|
|
409
408
|
this .numParticles = Math .min (lastNumParticles, maxParticles);
|
|
410
409
|
|
|
411
410
|
if (! this .emitterNode .isExplosive ())
|
|
412
|
-
this .creationTime =
|
|
411
|
+
this .creationTime = Date .now () / 1000;
|
|
413
412
|
|
|
414
413
|
this .resizeBuffers (lastNumParticles);
|
|
415
414
|
this .updateVertexArrays ();
|
|
@@ -696,7 +695,7 @@ Object .assign (Object .setPrototypeOf (ParticleSystem .prototype, X3DShapeNode
|
|
|
696
695
|
if (emitterNode .isExplosive ())
|
|
697
696
|
{
|
|
698
697
|
const
|
|
699
|
-
now =
|
|
698
|
+
now = Date .now () / 1000,
|
|
700
699
|
particleLifetime = this .particleLifetime + this .particleLifetime * this .lifetimeVariation;
|
|
701
700
|
|
|
702
701
|
if (now - this .creationTime > particleLifetime)
|
|
@@ -717,7 +716,7 @@ Object .assign (Object .setPrototypeOf (ParticleSystem .prototype, X3DShapeNode
|
|
|
717
716
|
if (this .numParticles < this .maxParticles)
|
|
718
717
|
{
|
|
719
718
|
const
|
|
720
|
-
now =
|
|
719
|
+
now = Date .now () / 1000,
|
|
721
720
|
newParticles = Math .max (0, Math .floor ((now - this .creationTime) * this .maxParticles / this .particleLifetime));
|
|
722
721
|
|
|
723
722
|
if (newParticles)
|
|
@@ -51,7 +51,6 @@ import FieldDefinitionArray from "../../Base/FieldDefinitionArray.js";
|
|
|
51
51
|
import X3DSoundSourceNode from "./X3DSoundSourceNode.js";
|
|
52
52
|
import X3DUrlObject from "../Networking/X3DUrlObject.js";
|
|
53
53
|
import X3DConstants from "../../Base/X3DConstants.js";
|
|
54
|
-
import Time from "../../../standard/Time/Time.js";
|
|
55
54
|
import DEVELOPMENT from "../../DEVELOPMENT.js";
|
|
56
55
|
|
|
57
56
|
function AudioClip (executionContext)
|
|
@@ -121,7 +120,7 @@ Object .assign (Object .setPrototypeOf (AudioClip .prototype, X3DSoundSourceNode
|
|
|
121
120
|
if (this .URL .protocol !== "data:")
|
|
122
121
|
{
|
|
123
122
|
if (!this .getCache ())
|
|
124
|
-
this .URL .searchParams .set ("_",
|
|
123
|
+
this .URL .searchParams .set ("_", Date .now ());
|
|
125
124
|
}
|
|
126
125
|
|
|
127
126
|
this .audio .attr ("src", this .URL .href);
|
|
@@ -52,7 +52,6 @@ import TextAlignment from "../../Browser/Text/TextAlignment.js";
|
|
|
52
52
|
import FileLoader from "../../InputOutput/FileLoader.js";
|
|
53
53
|
import X3DConstants from "../../Base/X3DConstants.js";
|
|
54
54
|
import URLs from "../../Browser/Networking/URLs.js";
|
|
55
|
-
import Time from "../../../standard/Time/Time.js";
|
|
56
55
|
|
|
57
56
|
/*
|
|
58
57
|
* Font paths for default SERIF, SANS and TYPWRITER families.
|
|
@@ -229,8 +228,6 @@ Object .assign (Object .setPrototypeOf (X3DFontStyleNode .prototype, X3DNode .pr
|
|
|
229
228
|
},
|
|
230
229
|
setFont (font)
|
|
231
230
|
{
|
|
232
|
-
console .info (this .URL .toString ())
|
|
233
|
-
|
|
234
231
|
this .font = font;
|
|
235
232
|
|
|
236
233
|
this .setLoadState (X3DConstants .COMPLETE_STATE);
|
|
@@ -52,7 +52,6 @@ import X3DTexture2DNode from "./X3DTexture2DNode.js";
|
|
|
52
52
|
import X3DUrlObject from "../Networking/X3DUrlObject.js";
|
|
53
53
|
import X3DConstants from "../../Base/X3DConstants.js";
|
|
54
54
|
import Algorithm from "../../../standard/Math/Algorithm.js";
|
|
55
|
-
import Time from "../../../standard/Time/Time.js";
|
|
56
55
|
import DEVELOPMENT from "../../DEVELOPMENT.js";
|
|
57
56
|
|
|
58
57
|
function ImageTexture (executionContext)
|
|
@@ -109,7 +108,7 @@ Object .assign (Object .setPrototypeOf (ImageTexture .prototype, X3DTexture2DNod
|
|
|
109
108
|
if (this .URL .protocol !== "data:")
|
|
110
109
|
{
|
|
111
110
|
if (!this .getCache ())
|
|
112
|
-
this .URL .searchParams .set ("_",
|
|
111
|
+
this .URL .searchParams .set ("_", Date .now ());
|
|
113
112
|
}
|
|
114
113
|
|
|
115
114
|
this .image .attr ("src", this .URL .href);
|
|
@@ -54,7 +54,6 @@ import X3DUrlObject from "../Networking/X3DUrlObject.js";
|
|
|
54
54
|
import GifMedia from "../../Browser/Texturing/GIFMedia.js";
|
|
55
55
|
import X3DConstants from "../../Base/X3DConstants.js";
|
|
56
56
|
import Algorithm from "../../../standard/Math/Algorithm.js";
|
|
57
|
-
import Time from "../../../standard/Time/Time.js";
|
|
58
57
|
import DEVELOPMENT from "../../DEVELOPMENT.js";
|
|
59
58
|
|
|
60
59
|
function MovieTexture (executionContext)
|
|
@@ -127,7 +126,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, X3DTexture2DNod
|
|
|
127
126
|
if (this .URL .protocol !== "data:")
|
|
128
127
|
{
|
|
129
128
|
if (!this .getCache ())
|
|
130
|
-
this .URL .searchParams .set ("_",
|
|
129
|
+
this .URL .searchParams .set ("_", Date .now ());
|
|
131
130
|
}
|
|
132
131
|
|
|
133
132
|
if (this .URL .pathname .endsWith (".gif"))
|
|
@@ -51,7 +51,6 @@ import FieldDefinitionArray from "../../Base/FieldDefinitionArray.js";
|
|
|
51
51
|
import X3DTexture3DNode from "./X3DTexture3DNode.js";
|
|
52
52
|
import X3DUrlObject from "../Networking/X3DUrlObject.js";
|
|
53
53
|
import X3DConstants from "../../Base/X3DConstants.js";
|
|
54
|
-
import Time from "../../../standard/Time/Time.js";
|
|
55
54
|
import DEVELOPMENT from "../../DEVELOPMENT.js";
|
|
56
55
|
|
|
57
56
|
function ImageTextureAtlas (executionContext)
|
|
@@ -105,7 +104,7 @@ Object .assign (Object .setPrototypeOf (ImageTextureAtlas .prototype, X3DTexture
|
|
|
105
104
|
if (this .URL .protocol !== "data:")
|
|
106
105
|
{
|
|
107
106
|
if (!this .getCache ())
|
|
108
|
-
this .URL .searchParams .set ("_",
|
|
107
|
+
this .URL .searchParams .set ("_", Date .now ());
|
|
109
108
|
}
|
|
110
109
|
|
|
111
110
|
this .image .attr ("src", this .URL .href);
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
import Fields from "../../Fields.js";
|
|
49
49
|
import X3DChildNode from "../Core/X3DChildNode.js";
|
|
50
50
|
import X3DConstants from "../../Base/X3DConstants.js";
|
|
51
|
-
import Time from "../../../standard/Time/Time.js";
|
|
52
51
|
|
|
53
52
|
function X3DTimeDependentNode (executionContext)
|
|
54
53
|
{
|
|
@@ -264,7 +263,7 @@ Object .assign (Object .setPrototypeOf (X3DTimeDependentNode .prototype, X3DChil
|
|
|
264
263
|
},
|
|
265
264
|
real_pause ()
|
|
266
265
|
{
|
|
267
|
-
this .pause =
|
|
266
|
+
this .pause = Date .now ();
|
|
268
267
|
|
|
269
268
|
this .set_pause ();
|
|
270
269
|
|
|
@@ -285,7 +284,7 @@ Object .assign (Object .setPrototypeOf (X3DTimeDependentNode .prototype, X3DChil
|
|
|
285
284
|
},
|
|
286
285
|
real_resume ()
|
|
287
286
|
{
|
|
288
|
-
const interval = (
|
|
287
|
+
const interval = (Date .now () - this .pause) / 1000;
|
|
289
288
|
|
|
290
289
|
this .pauseInterval += interval;
|
|
291
290
|
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
48
|
import X3DBaseNode from "../Base/X3DBaseNode.js";
|
|
49
|
-
import Time from "../../standard/Time/Time.js";
|
|
50
49
|
|
|
51
50
|
function BindableList (executionContext, defaultNode)
|
|
52
51
|
{
|
|
@@ -129,10 +128,7 @@ Object .assign (Object .setPrototypeOf (BindableList .prototype, X3DBaseNode .pr
|
|
|
129
128
|
},
|
|
130
129
|
update (layerNode, stack)
|
|
131
130
|
{
|
|
132
|
-
const
|
|
133
|
-
collectedNodes = this .collectedNodes,
|
|
134
|
-
changedNodes = this .changedNodes,
|
|
135
|
-
removedNodes = this .removedNodes;
|
|
131
|
+
const { collectedNodes, changedNodes, removedNodes } = this;
|
|
136
132
|
|
|
137
133
|
for (const node of collectedNodes)
|
|
138
134
|
{
|
|
@@ -171,14 +167,14 @@ Object .assign (Object .setPrototypeOf (BindableList .prototype, X3DBaseNode .pr
|
|
|
171
167
|
|
|
172
168
|
// Advance updateTime time.
|
|
173
169
|
|
|
174
|
-
this .updateTime =
|
|
170
|
+
this .updateTime = Date .now ();
|
|
175
171
|
},
|
|
176
172
|
});
|
|
177
173
|
|
|
178
174
|
for (const key of Object .keys (BindableList .prototype))
|
|
179
175
|
Object .defineProperty (BindableList .prototype, key, { enumerable: false });
|
|
180
176
|
|
|
181
|
-
// Compares two
|
|
177
|
+
// Compares two nodes.
|
|
182
178
|
|
|
183
179
|
function equals (lhs, rhs)
|
|
184
180
|
{
|
|
@@ -188,7 +184,7 @@ function equals (lhs, rhs)
|
|
|
188
184
|
for (let i = 0; i < lhs .length; ++ i)
|
|
189
185
|
{
|
|
190
186
|
if (lhs [i] !== rhs [i])
|
|
191
|
-
return false
|
|
187
|
+
return false;
|
|
192
188
|
}
|
|
193
189
|
|
|
194
190
|
return true;
|
|
@@ -80,7 +80,7 @@ Object .assign (Object .setPrototypeOf (BindableStack .prototype, X3DBaseNode .p
|
|
|
80
80
|
},
|
|
81
81
|
update (layerNode, removedNodes, changedNodes)
|
|
82
82
|
{
|
|
83
|
-
if (removedNodes .length
|
|
83
|
+
if (!removedNodes .length && !changedNodes .length)
|
|
84
84
|
return;
|
|
85
85
|
|
|
86
86
|
// Save top node for later use.
|
|
@@ -103,7 +103,7 @@ Object .assign (Object .setPrototypeOf (BindableStack .prototype, X3DBaseNode .p
|
|
|
103
103
|
|
|
104
104
|
if (boundNode !== this .nodes [0])
|
|
105
105
|
{
|
|
106
|
-
if (changedNodes .some (node => !
|
|
106
|
+
if (changedNodes .some (node => !node ._set_bind .getValue () && node === boundNode))
|
|
107
107
|
{
|
|
108
108
|
this .nodes .pop ();
|
|
109
109
|
}
|
|
@@ -132,12 +132,10 @@ Object .assign (Object .setPrototypeOf (BindableStack .prototype, X3DBaseNode .p
|
|
|
132
132
|
{
|
|
133
133
|
// First unbind last bound node.
|
|
134
134
|
|
|
135
|
-
boundNode .
|
|
136
|
-
boundNode ._isBound = false;
|
|
135
|
+
boundNode ._isBound = false;
|
|
137
136
|
|
|
138
137
|
// Now bind new top node.
|
|
139
138
|
|
|
140
|
-
top ._set_bind = true;
|
|
141
139
|
top ._isBound = true;
|
|
142
140
|
top ._bindTime = this .getBrowser () .getCurrentTime ();
|
|
143
141
|
}
|
|
@@ -58,7 +58,6 @@ import Rotation4 from "../../standard/Math/Numbers/Rotation4.js";
|
|
|
58
58
|
import Matrix4 from "../../standard/Math/Numbers/Matrix4.js";
|
|
59
59
|
import MatrixStack from "../../standard/Math/Utility/MatrixStack.js";
|
|
60
60
|
import StopWatch from "../../standard/Time/StopWatch.js";
|
|
61
|
-
import Time from "../../standard/Time/Time.js";
|
|
62
61
|
|
|
63
62
|
const DEPTH_BUFFER_SIZE = 16;
|
|
64
63
|
|
|
@@ -992,7 +991,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
992
991
|
oit = browser .getFrameBuffer () .getOrderIndependentTransparency ();
|
|
993
992
|
|
|
994
993
|
|
|
995
|
-
this .renderTime =
|
|
994
|
+
this .renderTime = Date .now ();
|
|
996
995
|
|
|
997
996
|
this .logarithmicDepthBuffer = browser .getBrowserOption ("LogarithmicDepthBuffer")
|
|
998
997
|
|| this .getViewpoint () .getLogarithmicDepthBuffer ();
|