Skip to content

Commit d116b6e

Browse files
author
sparkjsdev[bot]
committed
Bump dist build
1 parent 8f90fe0 commit d116b6e

File tree

9 files changed

+45
-28
lines changed

9 files changed

+45
-28
lines changed

dist/commit.txt

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

dist/spark.cjs.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9982,7 +9982,7 @@ const _SparkViewpoint = class _SparkViewpoint {
99829982
// The method cannot be private because then SparkRenderer would
99839983
// not be able to call it.
99849984
autoPoll({ accumulator }) {
9985-
var _a2, _b2, _c, _d;
9985+
var _a2, _b2, _c;
99869986
if (this.camera) {
99879987
this.camera.updateMatrixWorld();
99889988
this.viewToWorld = this.camera.matrixWorld.clone();
@@ -9995,9 +9995,14 @@ const _SparkViewpoint = class _SparkViewpoint {
99959995
needsSort = true;
99969996
const { mappingVersion } = this.display.accumulator;
99979997
if (accumulator.mappingVersion === mappingVersion) {
9998+
accumulator.refCount += 1;
99989999
this.spark.releaseAccumulator(this.display.accumulator);
999910000
this.display.accumulator = accumulator;
10001+
this.display.viewToWorld.copy(this.viewToWorld);
1000010002
displayed = true;
10003+
if (this.spark.viewpoint === this) {
10004+
this.spark.prepareViewpoint(this);
10005+
}
1000110006
}
1000210007
}
1000310008
const latestView = ((_a2 = this.sorting) == null ? void 0 : _a2.viewToWorld) ?? ((_b2 = this.display) == null ? void 0 : _b2.viewToWorld);
@@ -10020,7 +10025,7 @@ const _SparkViewpoint = class _SparkViewpoint {
1002010025
if (accumulator) {
1002110026
accumulator.refCount += 1;
1002210027
}
10023-
if (accumulator && ((_c = this.pending) == null ? void 0 : _c.accumulator) && this.pending.accumulator !== ((_d = this.display) == null ? void 0 : _d.accumulator)) {
10028+
if ((_c = this.pending) == null ? void 0 : _c.accumulator) {
1002410029
this.spark.releaseAccumulator(this.pending.accumulator);
1002510030
}
1002610031
this.pending = { accumulator, viewToWorld: this.viewToWorld, displayed };
@@ -10033,9 +10038,9 @@ const _SparkViewpoint = class _SparkViewpoint {
1003310038
return;
1003410039
}
1003510040
const { viewToWorld, displayed } = this.pending;
10036-
let accumulator = this.pending.accumulator ?? ((_a2 = this.display) == null ? void 0 : _a2.accumulator);
10041+
let accumulator = this.pending.accumulator;
1003710042
if (!accumulator) {
10038-
accumulator = this.spark.active;
10043+
accumulator = ((_a2 = this.display) == null ? void 0 : _a2.accumulator) ?? this.spark.active;
1003910044
accumulator.refCount += 1;
1004010045
}
1004110046
this.pending = null;
@@ -10045,6 +10050,7 @@ const _SparkViewpoint = class _SparkViewpoint {
1004510050
this.sorting = { viewToWorld };
1004610051
await this.sortUpdate({ accumulator, viewToWorld, displayed });
1004710052
this.sorting = null;
10053+
this.spark.releaseAccumulator(accumulator);
1004810054
}
1004910055
}
1005010056
async sortUpdate({
@@ -10137,13 +10143,15 @@ const _SparkViewpoint = class _SparkViewpoint {
1013710143
displayed = false
1013810144
}) {
1013910145
if (!this.display) {
10146+
accumulator.refCount += 1;
1014010147
this.display = {
1014110148
accumulator,
1014210149
viewToWorld,
1014310150
geometry: new SplatGeometry(ordering, activeSplats)
1014410151
};
1014510152
} else {
1014610153
if (!displayed && accumulator !== this.display.accumulator) {
10154+
accumulator.refCount += 1;
1014710155
this.spark.releaseAccumulator(this.display.accumulator);
1014810156
this.display.accumulator = accumulator;
1014910157
}
@@ -10450,6 +10458,7 @@ const _SparkRenderer = class _SparkRenderer extends THREE__namespace.Mesh {
1045010458
this.focalAdjustment = options.focalAdjustment ?? 1;
1045110459
this.splatEncoding = options.splatEncoding ?? { ...DEFAULT_SPLAT_ENCODING };
1045210460
this.active = new SplatAccumulator();
10461+
this.active.refCount = 1;
1045310462
this.accumulatorCount = 1;
1045410463
this.freeAccumulators = [];
1045510464
for (let count = 0; count < 1; ++count) {
@@ -10788,7 +10797,7 @@ const _SparkRenderer = class _SparkRenderer extends THREE__namespace.Mesh {
1078810797
}
1078910798
const originChanged = !withinCoorientDist({
1079010799
matrix1: originToWorld,
10791-
matrix2: this.active.toWorld,
10800+
matrix2: accumulator.toWorld,
1079210801
maxDistance: 1e-5,
1079310802
minCoorient: 0.99999
1079410803
});

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: 2 additions & 2 deletions
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: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9963,7 +9963,7 @@ const _SparkViewpoint = class _SparkViewpoint {
99639963
// The method cannot be private because then SparkRenderer would
99649964
// not be able to call it.
99659965
autoPoll({ accumulator }) {
9966-
var _a2, _b2, _c, _d;
9966+
var _a2, _b2, _c;
99679967
if (this.camera) {
99689968
this.camera.updateMatrixWorld();
99699969
this.viewToWorld = this.camera.matrixWorld.clone();
@@ -9976,9 +9976,14 @@ const _SparkViewpoint = class _SparkViewpoint {
99769976
needsSort = true;
99779977
const { mappingVersion } = this.display.accumulator;
99789978
if (accumulator.mappingVersion === mappingVersion) {
9979+
accumulator.refCount += 1;
99799980
this.spark.releaseAccumulator(this.display.accumulator);
99809981
this.display.accumulator = accumulator;
9982+
this.display.viewToWorld.copy(this.viewToWorld);
99819983
displayed = true;
9984+
if (this.spark.viewpoint === this) {
9985+
this.spark.prepareViewpoint(this);
9986+
}
99829987
}
99839988
}
99849989
const latestView = ((_a2 = this.sorting) == null ? void 0 : _a2.viewToWorld) ?? ((_b2 = this.display) == null ? void 0 : _b2.viewToWorld);
@@ -10001,7 +10006,7 @@ const _SparkViewpoint = class _SparkViewpoint {
1000110006
if (accumulator) {
1000210007
accumulator.refCount += 1;
1000310008
}
10004-
if (accumulator && ((_c = this.pending) == null ? void 0 : _c.accumulator) && this.pending.accumulator !== ((_d = this.display) == null ? void 0 : _d.accumulator)) {
10009+
if ((_c = this.pending) == null ? void 0 : _c.accumulator) {
1000510010
this.spark.releaseAccumulator(this.pending.accumulator);
1000610011
}
1000710012
this.pending = { accumulator, viewToWorld: this.viewToWorld, displayed };
@@ -10014,9 +10019,9 @@ const _SparkViewpoint = class _SparkViewpoint {
1001410019
return;
1001510020
}
1001610021
const { viewToWorld, displayed } = this.pending;
10017-
let accumulator = this.pending.accumulator ?? ((_a2 = this.display) == null ? void 0 : _a2.accumulator);
10022+
let accumulator = this.pending.accumulator;
1001810023
if (!accumulator) {
10019-
accumulator = this.spark.active;
10024+
accumulator = ((_a2 = this.display) == null ? void 0 : _a2.accumulator) ?? this.spark.active;
1002010025
accumulator.refCount += 1;
1002110026
}
1002210027
this.pending = null;
@@ -10026,6 +10031,7 @@ const _SparkViewpoint = class _SparkViewpoint {
1002610031
this.sorting = { viewToWorld };
1002710032
await this.sortUpdate({ accumulator, viewToWorld, displayed });
1002810033
this.sorting = null;
10034+
this.spark.releaseAccumulator(accumulator);
1002910035
}
1003010036
}
1003110037
async sortUpdate({
@@ -10118,13 +10124,15 @@ const _SparkViewpoint = class _SparkViewpoint {
1011810124
displayed = false
1011910125
}) {
1012010126
if (!this.display) {
10127+
accumulator.refCount += 1;
1012110128
this.display = {
1012210129
accumulator,
1012310130
viewToWorld,
1012410131
geometry: new SplatGeometry(ordering, activeSplats)
1012510132
};
1012610133
} else {
1012710134
if (!displayed && accumulator !== this.display.accumulator) {
10135+
accumulator.refCount += 1;
1012810136
this.spark.releaseAccumulator(this.display.accumulator);
1012910137
this.display.accumulator = accumulator;
1013010138
}
@@ -10431,6 +10439,7 @@ const _SparkRenderer = class _SparkRenderer extends THREE.Mesh {
1043110439
this.focalAdjustment = options.focalAdjustment ?? 1;
1043210440
this.splatEncoding = options.splatEncoding ?? { ...DEFAULT_SPLAT_ENCODING };
1043310441
this.active = new SplatAccumulator();
10442+
this.active.refCount = 1;
1043410443
this.accumulatorCount = 1;
1043510444
this.freeAccumulators = [];
1043610445
for (let count = 0; count < 1; ++count) {
@@ -10769,7 +10778,7 @@ const _SparkRenderer = class _SparkRenderer extends THREE.Mesh {
1076910778
}
1077010779
const originChanged = !withinCoorientDist({
1077110780
matrix1: originToWorld,
10772-
matrix2: this.active.toWorld,
10781+
matrix2: accumulator.toWorld,
1077310782
maxDistance: 1e-5,
1077410783
minCoorient: 0.99999
1077510784
});

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: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7745,15 +7745,15 @@ const jh = new Float32Array([
77457745
// The method cannot be private because then SparkRenderer would
77467746
// not be able to call it.
77477747
autoPoll({ accumulator: A }) {
7748-
var i, r, a, o;
7748+
var i, r, a;
77497749
this.camera && (this.camera.updateMatrixWorld(), this.viewToWorld = this.camera.matrixWorld.clone());
77507750
let e = !1, s = !1;
77517751
if (!this.display)
77527752
e = !0;
77537753
else if (A) {
77547754
e = !0;
7755-
const { mappingVersion: g } = this.display.accumulator;
7756-
A.mappingVersion === g && (this.spark.releaseAccumulator(this.display.accumulator), this.display.accumulator = A, s = !0);
7755+
const { mappingVersion: o } = this.display.accumulator;
7756+
A.mappingVersion === o && (A.refCount += 1, this.spark.releaseAccumulator(this.display.accumulator), this.display.accumulator = A, this.display.viewToWorld.copy(this.viewToWorld), s = !0, this.spark.viewpoint === this && this.spark.prepareViewpoint(this));
77577757
}
77587758
const n = ((i = this.sorting) == null ? void 0 : i.viewToWorld) ?? ((r = this.display) == null ? void 0 : r.viewToWorld);
77597759
n && !ge({
@@ -7766,18 +7766,18 @@ const jh = new Float32Array([
77667766
// For depth sort, small rotations can change sort order a lot, so
77677767
// update sort for even small rotations.
77687768
minCoorient: this.sortCoorient ?? this.sortRadial ? 0.99 : 0.999
7769-
}) && (e = !0), e && (A && (A.refCount += 1), A && ((a = this.pending) != null && a.accumulator) && this.pending.accumulator !== ((o = this.display) == null ? void 0 : o.accumulator) && this.spark.releaseAccumulator(this.pending.accumulator), this.pending = { accumulator: A, viewToWorld: this.viewToWorld, displayed: s }, this.driveSort());
7769+
}) && (e = !0), e && (A && (A.refCount += 1), (a = this.pending) != null && a.accumulator && this.spark.releaseAccumulator(this.pending.accumulator), this.pending = { accumulator: A, viewToWorld: this.viewToWorld, displayed: s }, this.driveSort());
77707770
}
77717771
async driveSort() {
77727772
var A;
77737773
for (; ; ) {
77747774
if (this.sorting || !this.pending)
77757775
return;
77767776
const { viewToWorld: e, displayed: s } = this.pending;
7777-
let n = this.pending.accumulator ?? ((A = this.display) == null ? void 0 : A.accumulator);
7778-
if (n || (n = this.spark.active, n.refCount += 1), this.pending = null, !n)
7777+
let n = this.pending.accumulator;
7778+
if (n || (n = ((A = this.display) == null ? void 0 : A.accumulator) ?? this.spark.active, n.refCount += 1), this.pending = null, !n)
77797779
throw new Error("No accumulator to sort");
7780-
this.sorting = { viewToWorld: e }, await this.sortUpdate({ accumulator: n, viewToWorld: e, displayed: s }), this.sorting = null;
7780+
this.sorting = { viewToWorld: e }, await this.sortUpdate({ accumulator: n, viewToWorld: e, displayed: s }), this.sorting = null, this.spark.releaseAccumulator(n);
77817781
}
77827782
}
77837783
async sortUpdate({
@@ -7849,13 +7849,13 @@ const jh = new Float32Array([
78497849
displayed: i = !1
78507850
}) {
78517851
if (!this.display)
7852-
this.display = {
7852+
A.refCount += 1, this.display = {
78537853
accumulator: A,
78547854
viewToWorld: e,
78557855
geometry: new Pe(s, n)
78567856
};
78577857
else {
7858-
!i && A !== this.display.accumulator && (this.spark.releaseAccumulator(this.display.accumulator), this.display.accumulator = A), this.display.viewToWorld = e;
7858+
!i && A !== this.display.accumulator && (A.refCount += 1, this.spark.releaseAccumulator(this.display.accumulator), this.display.accumulator = A), this.display.viewToWorld = e;
78597859
const r = this.display.geometry.ordering;
78607860
r.length === s.length ? this.display.geometry.update(s, n) : (this.display.geometry.dispose(), this.display.geometry = new Pe(s, n)), this.orderingFreelist.free(r);
78617861
}
@@ -8642,7 +8642,7 @@ const ys = 5, oA = class oA extends h.Mesh {
86428642
}), { gsplat: a };
86438643
}
86448644
);
8645-
this.modifier = new mh(r), this.premultipliedAlpha = n, this.autoUpdate = A.autoUpdate ?? !0, this.preUpdate = A.preUpdate ?? !1, this.needsUpdate = !1, this.originDistance = A.originDistance ?? 1, this.maxStdDev = A.maxStdDev ?? Math.sqrt(8), this.minPixelRadius = A.minPixelRadius ?? 0, this.maxPixelRadius = A.maxPixelRadius ?? 512, this.minAlpha = A.minAlpha ?? 0.5 * (1 / 255), this.enable2DGS = A.enable2DGS ?? !1, this.preBlurAmount = A.preBlurAmount ?? 0, this.blurAmount = A.blurAmount ?? 0.3, this.focalDistance = A.focalDistance ?? 0, this.apertureAngle = A.apertureAngle ?? 0, this.falloff = A.falloff ?? 1, this.clipXY = A.clipXY ?? 1.4, this.focalAdjustment = A.focalAdjustment ?? 1, this.splatEncoding = A.splatEncoding ?? { ...de }, this.active = new ke(), this.accumulatorCount = 1, this.freeAccumulators = [];
8645+
this.modifier = new mh(r), this.premultipliedAlpha = n, this.autoUpdate = A.autoUpdate ?? !0, this.preUpdate = A.preUpdate ?? !1, this.needsUpdate = !1, this.originDistance = A.originDistance ?? 1, this.maxStdDev = A.maxStdDev ?? Math.sqrt(8), this.minPixelRadius = A.minPixelRadius ?? 0, this.maxPixelRadius = A.maxPixelRadius ?? 512, this.minAlpha = A.minAlpha ?? 0.5 * (1 / 255), this.enable2DGS = A.enable2DGS ?? !1, this.preBlurAmount = A.preBlurAmount ?? 0, this.blurAmount = A.blurAmount ?? 0.3, this.focalDistance = A.focalDistance ?? 0, this.apertureAngle = A.apertureAngle ?? 0, this.falloff = A.falloff ?? 1, this.clipXY = A.clipXY ?? 1.4, this.focalAdjustment = A.focalAdjustment ?? 1, this.splatEncoding = A.splatEncoding ?? { ...de }, this.active = new ke(), this.active.refCount = 1, this.accumulatorCount = 1, this.freeAccumulators = [];
86468646
for (let a = 0; a < 1; ++a)
86478647
this.freeAccumulators.push(new ke()), this.accumulatorCount += 1;
86488648
this.defaultView = new Be({
@@ -8863,7 +8863,7 @@ const ys = 5, oA = class oA extends h.Mesh {
88638863
throw new Error("Unreachable");
88648864
const B = !ge({
88658865
matrix1: e,
8866-
matrix2: this.active.toWorld,
8866+
matrix2: I.toWorld,
88678867
maxDistance: 1e-5,
88688868
minCoorient: 0.99999
88698869
}), E = o.map((x, w) => {

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)