Skip to content

Commit 5413494

Browse files
committed
fix for issue #5
- this need to be tested adding more than one marker.
1 parent 03848f7 commit 5413494

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

dist/ar.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ArBaseControls.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
import { EventDispatcher, Object3D} from "three";
1+
import { EventDispatcher, Object3D } from "three";
22
import { IArBaseControls } from "./CommonInterfaces/THREEx-interfaces";
33

44
export class ArBaseControls extends EventDispatcher implements IArBaseControls {
5-
static id: number;
6-
private _id;
5+
static _id: number = 0;
6+
private id: number;
77
protected object3d: Object3D;
88
/**
99
* THe ArBaseControls constructor, you need to pass a Theee.js Object3d to it.
1010
* @param object3d the Threejs Object3D to pass.
1111
*/
1212
constructor(object3d: Object3D) {
1313
super()
14-
this._id = ArBaseControls.id++;
15-
14+
this.id = ArBaseControls._id++
1615
this.object3d = object3d;
1716
this.object3d.matrixAutoUpdate = false;
1817
this.object3d.visible = false;

types/ArBaseControls.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { EventDispatcher, Object3D } from "three";
22
import { IArBaseControls } from "./CommonInterfaces/THREEx-interfaces";
33
export declare class ArBaseControls extends EventDispatcher implements IArBaseControls {
4-
static id: number;
5-
private _id;
4+
static _id: number;
5+
private id;
66
protected object3d: Object3D;
77
constructor(object3d: Object3D);
88
update(): void;

0 commit comments

Comments
 (0)