Skip to content

Commit 3daecd3

Browse files
author
sparkjsdev[bot]
committed
Bump dist build
1 parent 3e9ee5f commit 3daecd3

9 files changed

Lines changed: 78 additions & 42 deletions

dist/commit.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/spark.cjs.js

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10385,7 +10385,11 @@ const _SparkRenderer = class _SparkRenderer extends THREE__namespace.Mesh {
1038510385
this.lastUpdateTime = null;
1038610386
this.defaultCameras = [];
1038710387
this.lastStochastic = null;
10388-
this.pendingUpdate = null;
10388+
this.pendingUpdate = {
10389+
scene: null,
10390+
originToWorld: new THREE__namespace.Matrix4(),
10391+
timeoutId: -1
10392+
};
1038910393
this.envViewpoint = null;
1039010394
this.frustumCulled = false;
1039110395
this.renderer = options.renderer;
@@ -10675,21 +10679,32 @@ const _SparkRenderer = class _SparkRenderer extends THREE__namespace.Mesh {
1067510679
scene,
1067610680
viewToWorld
1067710681
}) {
10678-
const originToWorld = this.matrixWorld.clone();
10682+
const originToWorld = this.matrixWorld;
1067910683
if (this.preUpdate) {
10680-
this.updateInternal({ scene, originToWorld, viewToWorld });
10681-
} else {
10682-
this.pendingUpdate = {
10684+
this.updateInternal({
1068310685
scene,
10684-
originToWorld
10685-
};
10686-
setTimeout(() => {
10687-
if (this.pendingUpdate) {
10686+
originToWorld: originToWorld.clone(),
10687+
viewToWorld
10688+
});
10689+
} else {
10690+
this.pendingUpdate.scene = scene;
10691+
this.pendingUpdate.originToWorld.copy(originToWorld);
10692+
if (this.pendingUpdate.timeoutId === -1) {
10693+
this.pendingUpdate.timeoutId = setTimeout(() => {
1068810694
const { scene: scene2, originToWorld: originToWorld2 } = this.pendingUpdate;
10689-
this.pendingUpdate = null;
10690-
this.updateInternal({ scene: scene2, originToWorld: originToWorld2, viewToWorld });
10691-
}
10692-
}, 1);
10695+
this.pendingUpdate.scene = null;
10696+
this.pendingUpdate.timeoutId = -1;
10697+
const updated = this.updateInternal({
10698+
scene: scene2,
10699+
originToWorld: originToWorld2,
10700+
viewToWorld
10701+
});
10702+
if (updated) {
10703+
const gl = this.renderer.getContext();
10704+
gl.flush();
10705+
}
10706+
}, 1);
10707+
}
1069310708
}
1069410709
}
1069510710
updateInternal({

dist/spark.cjs.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/spark.cjs.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/spark.cjs.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/spark.module.js

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10366,7 +10366,11 @@ const _SparkRenderer = class _SparkRenderer extends THREE.Mesh {
1036610366
this.lastUpdateTime = null;
1036710367
this.defaultCameras = [];
1036810368
this.lastStochastic = null;
10369-
this.pendingUpdate = null;
10369+
this.pendingUpdate = {
10370+
scene: null,
10371+
originToWorld: new THREE.Matrix4(),
10372+
timeoutId: -1
10373+
};
1037010374
this.envViewpoint = null;
1037110375
this.frustumCulled = false;
1037210376
this.renderer = options.renderer;
@@ -10656,21 +10660,32 @@ const _SparkRenderer = class _SparkRenderer extends THREE.Mesh {
1065610660
scene,
1065710661
viewToWorld
1065810662
}) {
10659-
const originToWorld = this.matrixWorld.clone();
10663+
const originToWorld = this.matrixWorld;
1066010664
if (this.preUpdate) {
10661-
this.updateInternal({ scene, originToWorld, viewToWorld });
10662-
} else {
10663-
this.pendingUpdate = {
10665+
this.updateInternal({
1066410666
scene,
10665-
originToWorld
10666-
};
10667-
setTimeout(() => {
10668-
if (this.pendingUpdate) {
10667+
originToWorld: originToWorld.clone(),
10668+
viewToWorld
10669+
});
10670+
} else {
10671+
this.pendingUpdate.scene = scene;
10672+
this.pendingUpdate.originToWorld.copy(originToWorld);
10673+
if (this.pendingUpdate.timeoutId === -1) {
10674+
this.pendingUpdate.timeoutId = setTimeout(() => {
1066910675
const { scene: scene2, originToWorld: originToWorld2 } = this.pendingUpdate;
10670-
this.pendingUpdate = null;
10671-
this.updateInternal({ scene: scene2, originToWorld: originToWorld2, viewToWorld });
10672-
}
10673-
}, 1);
10676+
this.pendingUpdate.scene = null;
10677+
this.pendingUpdate.timeoutId = -1;
10678+
const updated = this.updateInternal({
10679+
scene: scene2,
10680+
originToWorld: originToWorld2,
10681+
viewToWorld
10682+
});
10683+
if (updated) {
10684+
const gl = this.renderer.getContext();
10685+
gl.flush();
10686+
}
10687+
}, 1);
10688+
}
1067410689
}
1067510690
}
1067610691
updateInternal({

dist/spark.module.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/spark.module.min.js

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8598,7 +8598,11 @@ const oA = class oA extends I.Mesh {
85988598
depthWrite: !1,
85998599
side: I.DoubleSide
86008600
});
8601-
super(ws, i), this.splatTexture = null, this.autoViewpoints = [], this.rotateToAccumulator = new Tt({ value: new I.Quaternion() }), this.translateToAccumulator = new Ft({ value: new I.Vector3() }), this.lastFrame = -1, this.lastUpdateTime = null, this.defaultCameras = [], this.lastStochastic = null, this.pendingUpdate = null, this.envViewpoint = null, this.frustumCulled = !1, this.renderer = A.renderer, this.material = i, this.uniforms = e;
8601+
super(ws, i), this.splatTexture = null, this.autoViewpoints = [], this.rotateToAccumulator = new Tt({ value: new I.Quaternion() }), this.translateToAccumulator = new Ft({ value: new I.Vector3() }), this.lastFrame = -1, this.lastUpdateTime = null, this.defaultCameras = [], this.lastStochastic = null, this.pendingUpdate = {
8602+
scene: null,
8603+
originToWorld: new I.Matrix4(),
8604+
timeoutId: -1
8605+
}, this.envViewpoint = null, this.frustumCulled = !1, this.renderer = A.renderer, this.material = i, this.uniforms = e;
86028606
const r = vA(
86038607
{ gsplat: AA },
86048608
{ gsplat: AA },
@@ -8776,16 +8780,19 @@ const oA = class oA extends I.Mesh {
87768780
scene: A,
87778781
viewToWorld: e
87788782
}) {
8779-
const s = this.matrixWorld.clone();
8780-
this.preUpdate ? this.updateInternal({ scene: A, originToWorld: s, viewToWorld: e }) : (this.pendingUpdate = {
8783+
const s = this.matrixWorld;
8784+
this.preUpdate ? this.updateInternal({
87818785
scene: A,
8782-
originToWorld: s
8783-
}, setTimeout(() => {
8784-
if (this.pendingUpdate) {
8785-
const { scene: n, originToWorld: i } = this.pendingUpdate;
8786-
this.pendingUpdate = null, this.updateInternal({ scene: n, originToWorld: i, viewToWorld: e });
8787-
}
8788-
}, 1));
8786+
originToWorld: s.clone(),
8787+
viewToWorld: e
8788+
}) : (this.pendingUpdate.scene = A, this.pendingUpdate.originToWorld.copy(s), this.pendingUpdate.timeoutId === -1 && (this.pendingUpdate.timeoutId = setTimeout(() => {
8789+
const { scene: n, originToWorld: i } = this.pendingUpdate;
8790+
this.pendingUpdate.scene = null, this.pendingUpdate.timeoutId = -1, this.updateInternal({
8791+
scene: n,
8792+
originToWorld: i,
8793+
viewToWorld: e
8794+
}) && this.renderer.getContext().flush();
8795+
}, 1)));
87898796
}
87908797
updateInternal({
87918798
scene: A,

dist/spark.module.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)