File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -302,7 +302,9 @@ export class SparkViewpoint {
302302 while ( update ?? true ) {
303303 // Force an update, possibly with origin centered at this camera
304304 // to yield the best quality output.
305- const originToWorld = forceOrigin ? this . viewToWorld : undefined ;
305+ const originToWorld = forceOrigin
306+ ? this . viewToWorld
307+ : this . spark . matrixWorld ;
306308 const updated = this . spark . updateInternal ( { scene, originToWorld } ) ;
307309 if ( updated ) {
308310 break ;
@@ -312,10 +314,11 @@ export class SparkViewpoint {
312314 }
313315
314316 const accumulator = this . spark . active ;
315- if ( accumulator !== this . display ?. accumulator ) {
316- this . spark . active . refCount += 1 ;
317- }
317+ // Hold reference to accumulator while sorting
318+ accumulator . refCount += 1 ;
318319 await this . sortUpdate ( { accumulator, viewToWorld : this . viewToWorld } ) ;
320+ // Release accumulator reference
321+ this . spark . releaseAccumulator ( accumulator ) ;
319322 }
320323
321324 // Render out the viewpoint to the view target RGBA buffer.
You can’t perform that action at this time.
0 commit comments