Skip to content

Commit

Permalink
chore: Add getShouldUseSharedArrayBuffer to volumeLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
sedghi committed May 29, 2024
1 parent 6d61b1f commit c423575
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 c423575

Please sign in to comment.