Skip to content

Commit

Permalink
completely removing artoolkitNFT global variable
Browse files Browse the repository at this point in the history
  • Loading branch information
kalwalt committed Feb 27, 2023
1 parent 35368e9 commit f3660b9
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 20 deletions.
2 changes: 1 addition & 1 deletion dist/ARToolkitNFT.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ARToolkitNFT_simd.js

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions src/ARToolkitNFT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ const { version } = packageJson;
const UNKNOWN_MARKER = -1;
const NFT_MARKER = 0;

declare global {
var artoolkitNFT: IARToolkitNFT;
}

export default class ARToolkitNFT implements IARToolkitNFT {
static get UNKNOWN_MARKER() {
return UNKNOWN_MARKER;
Expand Down Expand Up @@ -127,8 +123,8 @@ export default class ARToolkitNFT implements IARToolkitNFT {

this._decorate();

let scope = typeof window !== "undefined" ? window : global;
scope.artoolkitNFT = this;
//let scope = typeof window !== "undefined" ? window : global;
//scope.artoolkitNFT = this;

return this;
}
Expand Down
8 changes: 2 additions & 6 deletions src/ARToolkitNFT_simd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ const { version } = packageJson;
const UNKNOWN_MARKER = -1;
const NFT_MARKER = 0;

declare global {
var artoolkitNFT: IARToolkitNFT;
}

export default class ARToolkitNFT implements IARToolkitNFT {
static get UNKNOWN_MARKER() {
return UNKNOWN_MARKER;
Expand Down Expand Up @@ -127,8 +123,8 @@ export default class ARToolkitNFT implements IARToolkitNFT {

this._decorate();

let scope = typeof window !== "undefined" ? window : global;
scope.artoolkitNFT = this;
//let scope = typeof window !== "undefined" ? window : global;
//scope.artoolkitNFT = this;

return this;
}
Expand Down
3 changes: 0 additions & 3 deletions types/src/ARToolkitNFT.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { IARToolkitNFT } from "./abstractions/IARToolkitNFT";
import { INFTMarkerInfo } from "./abstractions/CommonInterfaces";
declare global {
var artoolkitNFT: IARToolkitNFT;
}
export default class ARToolkitNFT implements IARToolkitNFT {
static get UNKNOWN_MARKER(): number;
static get NFT_MARKER(): number;
Expand Down
3 changes: 0 additions & 3 deletions types/src/ARToolkitNFT_simd.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { IARToolkitNFT } from "./abstractions/IARToolkitNFT";
import { INFTMarkerInfo } from "./abstractions/CommonInterfaces";
declare global {
var artoolkitNFT: IARToolkitNFT;
}
export default class ARToolkitNFT implements IARToolkitNFT {
static get UNKNOWN_MARKER(): number;
static get NFT_MARKER(): number;
Expand Down

0 comments on commit f3660b9

Please sign in to comment.