Skip to content

Commit 6e9fb05

Browse files
author
Avaer Kazmer
committed
Use ArrayBuffer instead of SharedArrayBuffer for XRState
1 parent 261df06 commit 6e9fb05

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/XR.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ GlobalContext.XRInputSourceEvent = XRInputSourceEvent;
546546

547547
class XRRigidTransform {
548548
constructor(position, orientation, scale) {
549-
if (position && position.constructor && position.constructor.name === 'SharedArrayBuffer') {
549+
if (typeof position == 'object') {
550550
const inverse = orientation instanceof XRRigidTransform ? orientation : null;
551551

552552
this.initialize(position, inverse);

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ GlobalContext.windows = windows;
3939

4040
const xrState = (() => {
4141
const _makeSab = size => {
42-
const sab = new SharedArrayBuffer(size);
42+
const sab = new ArrayBuffer(size);
4343
let index = 0;
4444
return (c, n) => {
4545
const result = new c(sab, index, n);

0 commit comments

Comments
 (0)