|
@@ -14,9 +14,9 @@ export default class StaticMeshEvent extends EventEmitter {
|
|
E(this, "_pointerTapDelay", 200);
|
|
E(this, "_pointerTapDelay", 200);
|
|
E(this, "_pickedMeshType");
|
|
E(this, "_pickedMeshType");
|
|
E(this, "registerEvent", ()=>{
|
|
E(this, "registerEvent", ()=>{
|
|
- this.scene.onPrePointerObservable.add(this.onDown, PointerEventTypes.POINTERDOWN),
|
|
|
|
- this.scene.onPrePointerObservable.add(this.onUp, PointerEventTypes.POINTERUP),
|
|
|
|
- this.scene.onPrePointerObservable.add(this.onDoubleTap, PointerEventTypes.POINTERDOUBLETAP),
|
|
|
|
|
|
+ this.scene.onPrePointerObservable.add(this.onDown, BABYLON.PointerEventTypes.POINTERDOWN),
|
|
|
|
+ this.scene.onPrePointerObservable.add(this.onUp, BABYLON.PointerEventTypes.POINTERUP),
|
|
|
|
+ this.scene.onPrePointerObservable.add(this.onDoubleTap, BABYLON.PointerEventTypes.POINTERDOUBLETAP),
|
|
this.scene.onDispose = ()=>{
|
|
this.scene.onDispose = ()=>{
|
|
this.scene.onPrePointerObservable.removeCallback(this.onUp),
|
|
this.scene.onPrePointerObservable.removeCallback(this.onUp),
|
|
this.scene.onPrePointerObservable.removeCallback(this.onDown),
|
|
this.scene.onPrePointerObservable.removeCallback(this.onDown),
|
|
@@ -62,7 +62,7 @@ export default class StaticMeshEvent extends EventEmitter {
|
|
}
|
|
}
|
|
onPointerTap(e, t=!1) {
|
|
onPointerTap(e, t=!1) {
|
|
var n, o;
|
|
var n, o;
|
|
- let r = new PickingInfo;
|
|
|
|
|
|
+ let r = new BABYLON.PickingInfo;
|
|
if (t) {
|
|
if (t) {
|
|
const a = this.scene.multiPick(this.scene.pointerX, this.scene.pointerY, e, void 0, void 0);
|
|
const a = this.scene.multiPick(this.scene.pointerX, this.scene.pointerY, e, void 0, void 0);
|
|
a && a.length > 1 ? r = a[1] : a && (r = a[0])
|
|
a && a.length > 1 ? r = a[1] : a && (r = a[0])
|