Skip to content

Commit 5f03b39

Browse files
committed
Update zephyr.js
Fixed bug with mouse position initialization
1 parent 883607e commit 5f03b39

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nightly/zephyr.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ PIXI.Zephyr = {
4343
useMouse: () => {
4444
PIXI.Mouse.bounds = document.getElementsByTagName("html")[0].getBoundingClientRect();
4545
PIXI.Mouse.container = document.getElementsByTagName("html")[0];
46+
PIXI.Mouse.x = screen.width / 2;
47+
PIXI.Mouse.y = screen.height / 2;
4648
PIXI.Mouse.setContainer = (view) => {
4749
PIXI.Mouse.container = view;
4850
PIXI.Mouse.bounds = PIXI.Mouse.container.getBoundingClientRect();

0 commit comments

Comments
 (0)