Skip to content

Commit

Permalink
Update zephyr.js
Browse files Browse the repository at this point in the history
Fixed bug with mouse position initialization
  • Loading branch information
OttCS committed Oct 24, 2022
1 parent 883607e commit 5f03b39
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nightly/zephyr.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ PIXI.Zephyr = {
useMouse: () => {
PIXI.Mouse.bounds = document.getElementsByTagName("html")[0].getBoundingClientRect();
PIXI.Mouse.container = document.getElementsByTagName("html")[0];
PIXI.Mouse.x = screen.width / 2;
PIXI.Mouse.y = screen.height / 2;
PIXI.Mouse.setContainer = (view) => {
PIXI.Mouse.container = view;
PIXI.Mouse.bounds = PIXI.Mouse.container.getBoundingClientRect();
Expand Down

0 comments on commit 5f03b39

Please sign in to comment.