Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions src/babylon.scene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
private _onPointerMove: (evt: PointerEvent) => void;
private _onPointerDown: (evt: PointerEvent) => void;
private _onPointerUp: (evt: PointerEvent) => void;
public onPointerMove: (evt: PointerEvent, pickInfo: PickingInfo) => void;
public onPointerDown: (evt: PointerEvent, pickInfo: PickingInfo) => void;
public onPointerUp: (evt: PointerEvent, pickInfo: PickingInfo) => void;
public cameraToUseForPointers: Camera = null; // Define this parameter if you are using multiple cameras and you want to specify which one should be used for pointer position
Expand Down Expand Up @@ -314,7 +315,7 @@
this.workerCollisions = false;//(!!Worker && (!!BABYLON.CollisionWorker || BABYLON.WorkerIncluded));
}

// Properties
// Properties o
public get debugLayer(): DebugLayer {
return this._debugLayer;
}
Expand Down Expand Up @@ -483,13 +484,17 @@

if (pickResult.hit && pickResult.pickedSprite) {
canvas.style.cursor = "pointer";
return;
}
} else {

// Restore pointer
this.setPointerOverMesh(null);
canvas.style.cursor = "";
this._meshUnderPointer = null;
// Restore pointer
this.setPointerOverMesh(null);
canvas.style.cursor = "";
this._meshUnderPointer = null;
}
}

if (this.onPointerMove) {
this.onPointerMove(evt, pickResult);
}
};

Expand Down