Skip to content

Commit 643da0b

Browse files
author
Avaer Kazmer
authored
Merge pull request #47 from exokitxr/no-sab
SharedArrayBuffer -> ArrayBuffer
2 parents b0f3cef + 6e9fb05 commit 643da0b

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
@@ -545,7 +545,7 @@ GlobalContext.XRInputSourceEvent = XRInputSourceEvent;
545545

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

551551
this.initialize(position, inverse);

src/index.js

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

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

0 commit comments

Comments
 (0)