Skip to content

Commit

Permalink
Handle the mouseup event outside of the canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
jwdunn1 authored May 28, 2023
1 parent 2c4e224 commit 95010cb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions examples/HeadUpDisplay/HeadUpDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ function setup() {
console.log(Dw.EasyCam.INFO);
easycam = new Dw.EasyCam(this._renderer, {distance : 300});
initHUD();

// Handle the mouseup event outside of the canvas
document.documentElement.addEventListener('mouseup', function(e){
easycam.cam.mouse.ismousedown=false
});
}


Expand All @@ -60,9 +65,9 @@ function draw() {

// gizmo
strokeWeight(1);
stroke(255, 32, 0); line(0,0,0,100,0,0);
stroke( 32,255, 32); line(0,0,0,0,100,0);
stroke( 0, 32,255); line(0,0,0,0,0,100);
stroke(255, 32, 0); line(0,0,0, 100,0,0);
stroke( 32,255, 32); line(0,0,0, 0,100,0);
stroke( 0, 32,255); line(0,0,0, 0,0,100);

// objects
strokeWeight(0.5);
Expand Down

0 comments on commit 95010cb

Please sign in to comment.