mirror of
https://github.com/storytold/spark.git
synced 2026-10-18 07:40:38 +00:00
Bump dist build
This commit is contained in:
Vendored
+14
-5
@@ -9963,7 +9963,7 @@ const _SparkViewpoint = class _SparkViewpoint {
|
||||
// The method cannot be private because then SparkRenderer would
|
||||
// not be able to call it.
|
||||
autoPoll({ accumulator }) {
|
||||
var _a2, _b2, _c, _d;
|
||||
var _a2, _b2, _c;
|
||||
if (this.camera) {
|
||||
this.camera.updateMatrixWorld();
|
||||
this.viewToWorld = this.camera.matrixWorld.clone();
|
||||
@@ -9976,9 +9976,14 @@ const _SparkViewpoint = class _SparkViewpoint {
|
||||
needsSort = true;
|
||||
const { mappingVersion } = this.display.accumulator;
|
||||
if (accumulator.mappingVersion === mappingVersion) {
|
||||
accumulator.refCount += 1;
|
||||
this.spark.releaseAccumulator(this.display.accumulator);
|
||||
this.display.accumulator = accumulator;
|
||||
this.display.viewToWorld.copy(this.viewToWorld);
|
||||
displayed = true;
|
||||
if (this.spark.viewpoint === this) {
|
||||
this.spark.prepareViewpoint(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
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 {
|
||||
if (accumulator) {
|
||||
accumulator.refCount += 1;
|
||||
}
|
||||
if (accumulator && ((_c = this.pending) == null ? void 0 : _c.accumulator) && this.pending.accumulator !== ((_d = this.display) == null ? void 0 : _d.accumulator)) {
|
||||
if ((_c = this.pending) == null ? void 0 : _c.accumulator) {
|
||||
this.spark.releaseAccumulator(this.pending.accumulator);
|
||||
}
|
||||
this.pending = { accumulator, viewToWorld: this.viewToWorld, displayed };
|
||||
@@ -10014,9 +10019,9 @@ const _SparkViewpoint = class _SparkViewpoint {
|
||||
return;
|
||||
}
|
||||
const { viewToWorld, displayed } = this.pending;
|
||||
let accumulator = this.pending.accumulator ?? ((_a2 = this.display) == null ? void 0 : _a2.accumulator);
|
||||
let accumulator = this.pending.accumulator;
|
||||
if (!accumulator) {
|
||||
accumulator = this.spark.active;
|
||||
accumulator = ((_a2 = this.display) == null ? void 0 : _a2.accumulator) ?? this.spark.active;
|
||||
accumulator.refCount += 1;
|
||||
}
|
||||
this.pending = null;
|
||||
@@ -10026,6 +10031,7 @@ const _SparkViewpoint = class _SparkViewpoint {
|
||||
this.sorting = { viewToWorld };
|
||||
await this.sortUpdate({ accumulator, viewToWorld, displayed });
|
||||
this.sorting = null;
|
||||
this.spark.releaseAccumulator(accumulator);
|
||||
}
|
||||
}
|
||||
async sortUpdate({
|
||||
@@ -10118,6 +10124,7 @@ const _SparkViewpoint = class _SparkViewpoint {
|
||||
displayed = false
|
||||
}) {
|
||||
if (!this.display) {
|
||||
accumulator.refCount += 1;
|
||||
this.display = {
|
||||
accumulator,
|
||||
viewToWorld,
|
||||
@@ -10125,6 +10132,7 @@ const _SparkViewpoint = class _SparkViewpoint {
|
||||
};
|
||||
} else {
|
||||
if (!displayed && accumulator !== this.display.accumulator) {
|
||||
accumulator.refCount += 1;
|
||||
this.spark.releaseAccumulator(this.display.accumulator);
|
||||
this.display.accumulator = accumulator;
|
||||
}
|
||||
@@ -10431,6 +10439,7 @@ const _SparkRenderer = class _SparkRenderer extends THREE.Mesh {
|
||||
this.focalAdjustment = options.focalAdjustment ?? 1;
|
||||
this.splatEncoding = options.splatEncoding ?? { ...DEFAULT_SPLAT_ENCODING };
|
||||
this.active = new SplatAccumulator();
|
||||
this.active.refCount = 1;
|
||||
this.accumulatorCount = 1;
|
||||
this.freeAccumulators = [];
|
||||
for (let count = 0; count < 1; ++count) {
|
||||
@@ -10769,7 +10778,7 @@ const _SparkRenderer = class _SparkRenderer extends THREE.Mesh {
|
||||
}
|
||||
const originChanged = !withinCoorientDist({
|
||||
matrix1: originToWorld,
|
||||
matrix2: this.active.toWorld,
|
||||
matrix2: accumulator.toWorld,
|
||||
maxDistance: 1e-5,
|
||||
minCoorient: 0.99999
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user