Skip to content

Commit

Permalink
fix(seg): Handle useSharedArrayBuffer configuration properly in volum…
Browse files Browse the repository at this point in the history
…e creation (#1290)
  • Loading branch information
sedghi authored May 29, 2024
1 parent 6d61b1f commit 561bd4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/loaders/volumeLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
IVolumeLoadObject,
PixelDataTypedArrayString,
} from '../types';
import { getConfiguration } from '../init';
import { getConfiguration, getShouldUseSharedArrayBuffer } from '../init';
import {
performCacheOptimizationForVolume,
setupCacheOptimizationEventListener,
Expand Down Expand Up @@ -643,7 +643,7 @@ function generateVolumeScalarData(
}

let volumeScalarData;
if (targetBuffer?.sharedArrayBuffer) {
if (targetBuffer?.sharedArrayBuffer ?? getShouldUseSharedArrayBuffer()) {
switch (targetBuffer.type) {
case 'Float32Array':
volumeScalarData = createFloat32SharedArray(scalarLength);
Expand Down

0 comments on commit 561bd4b

Please sign in to comment.