@@ -467,7 +467,7 @@ var LibraryGLFW = {
467
467
Browser . calculateMouseEvent ( event ) ;
468
468
}
469
469
470
- if ( event . target != Module [ " canvas" ] || ! GLFW . active . cursorPosFunc ) return ;
470
+ if ( event . target != Module [ ' canvas' ] || ! GLFW . active . cursorPosFunc ) return ;
471
471
472
472
if ( GLFW . active . cursorPosFunc ) {
473
473
#if USE_GLFW == 2
@@ -496,7 +496,7 @@ var LibraryGLFW = {
496
496
onMouseenter : ( event ) => {
497
497
if ( ! GLFW . active ) return ;
498
498
499
- if ( event . target != Module [ " canvas" ] ) return ;
499
+ if ( event . target != Module [ ' canvas' ] ) return ;
500
500
501
501
#if USE_GLFW == 3
502
502
if ( GLFW . active . cursorEnterFunc ) {
@@ -508,7 +508,7 @@ var LibraryGLFW = {
508
508
onMouseleave : ( event ) => {
509
509
if ( ! GLFW . active ) return ;
510
510
511
- if ( event . target != Module [ " canvas" ] ) return ;
511
+ if ( event . target != Module [ ' canvas' ] ) return ;
512
512
513
513
#if USE_GLFW == 3
514
514
if ( GLFW . active . cursorEnterFunc ) {
@@ -520,7 +520,7 @@ var LibraryGLFW = {
520
520
onMouseButtonChanged : ( event , status ) => {
521
521
if ( ! GLFW . active ) return ;
522
522
523
- if ( event . target != Module [ " canvas" ] ) return ;
523
+ if ( event . target != Module [ ' canvas' ] ) return ;
524
524
525
525
// Is this from a touch event?
526
526
const isTouchType = event . type === 'touchstart' || event . type === 'touchend' || event . type === 'touchcancel' ;
@@ -1262,7 +1262,7 @@ var LibraryGLFW = {
1262
1262
calculateMouseCoords ( pageX , pageY ) {
1263
1263
// Calculate the movement based on the changes
1264
1264
// in the coordinates.
1265
- const rect = Module [ " canvas" ] . getBoundingClientRect ( ) ;
1265
+ const rect = Module [ ' canvas' ] . getBoundingClientRect ( ) ;
1266
1266
1267
1267
// Neither .scrollX or .pageXOffset are defined in a spec, but
1268
1268
// we prefer .scrollX because it is currently in a spec draft.
@@ -1384,30 +1384,30 @@ var LibraryGLFW = {
1384
1384
GLFW . scale = GLFW . getDevicePixelRatio ( ) ;
1385
1385
1386
1386
1387
- window . addEventListener ( " gamepadconnected" , GLFW . onGamepadConnected , true ) ;
1388
- window . addEventListener ( " gamepaddisconnected" , GLFW . onGamepadDisconnected , true ) ;
1389
- window . addEventListener ( " keydown" , GLFW . onKeydown , true ) ;
1390
- window . addEventListener ( " keypress" , GLFW . onKeyPress , true ) ;
1391
- window . addEventListener ( " keyup" , GLFW . onKeyup , true ) ;
1392
- window . addEventListener ( " blur" , GLFW . onBlur , true ) ;
1387
+ window . addEventListener ( ' gamepadconnected' , GLFW . onGamepadConnected , true ) ;
1388
+ window . addEventListener ( ' gamepaddisconnected' , GLFW . onGamepadDisconnected , true ) ;
1389
+ window . addEventListener ( ' keydown' , GLFW . onKeydown , true ) ;
1390
+ window . addEventListener ( ' keypress' , GLFW . onKeyPress , true ) ;
1391
+ window . addEventListener ( ' keyup' , GLFW . onKeyup , true ) ;
1392
+ window . addEventListener ( ' blur' , GLFW . onBlur , true ) ;
1393
1393
1394
1394
// watch for devicePixelRatio changes
1395
1395
GLFW . devicePixelRatioMQL = window . matchMedia ( '(resolution: ' + GLFW . getDevicePixelRatio ( ) + 'dppx)' ) ;
1396
1396
GLFW . devicePixelRatioMQL . addEventListener ( 'change' , GLFW . onDevicePixelRatioChange ) ;
1397
1397
1398
- Module [ " canvas" ] . addEventListener ( " touchmove" , GLFW . onMousemove , true ) ;
1399
- Module [ " canvas" ] . addEventListener ( " touchstart" , GLFW . onMouseButtonDown , true ) ;
1400
- Module [ " canvas" ] . addEventListener ( " touchcancel" , GLFW . onMouseButtonUp , true ) ;
1401
- Module [ " canvas" ] . addEventListener ( " touchend" , GLFW . onMouseButtonUp , true ) ;
1402
- Module [ " canvas" ] . addEventListener ( " mousemove" , GLFW . onMousemove , true ) ;
1403
- Module [ " canvas" ] . addEventListener ( " mousedown" , GLFW . onMouseButtonDown , true ) ;
1404
- Module [ " canvas" ] . addEventListener ( " mouseup" , GLFW . onMouseButtonUp , true ) ;
1405
- Module [ " canvas" ] . addEventListener ( 'wheel' , GLFW . onMouseWheel , true ) ;
1406
- Module [ " canvas" ] . addEventListener ( 'mousewheel' , GLFW . onMouseWheel , true ) ;
1407
- Module [ " canvas" ] . addEventListener ( 'mouseenter' , GLFW . onMouseenter , true ) ;
1408
- Module [ " canvas" ] . addEventListener ( 'mouseleave' , GLFW . onMouseleave , true ) ;
1409
- Module [ " canvas" ] . addEventListener ( 'drop' , GLFW . onDrop , true ) ;
1410
- Module [ " canvas" ] . addEventListener ( 'dragover' , GLFW . onDragover , true ) ;
1398
+ Module [ ' canvas' ] . addEventListener ( ' touchmove' , GLFW . onMousemove , true ) ;
1399
+ Module [ ' canvas' ] . addEventListener ( ' touchstart' , GLFW . onMouseButtonDown , true ) ;
1400
+ Module [ ' canvas' ] . addEventListener ( ' touchcancel' , GLFW . onMouseButtonUp , true ) ;
1401
+ Module [ ' canvas' ] . addEventListener ( ' touchend' , GLFW . onMouseButtonUp , true ) ;
1402
+ Module [ ' canvas' ] . addEventListener ( ' mousemove' , GLFW . onMousemove , true ) ;
1403
+ Module [ ' canvas' ] . addEventListener ( ' mousedown' , GLFW . onMouseButtonDown , true ) ;
1404
+ Module [ ' canvas' ] . addEventListener ( ' mouseup' , GLFW . onMouseButtonUp , true ) ;
1405
+ Module [ ' canvas' ] . addEventListener ( 'wheel' , GLFW . onMouseWheel , true ) ;
1406
+ Module [ ' canvas' ] . addEventListener ( 'mousewheel' , GLFW . onMouseWheel , true ) ;
1407
+ Module [ ' canvas' ] . addEventListener ( 'mouseenter' , GLFW . onMouseenter , true ) ;
1408
+ Module [ ' canvas' ] . addEventListener ( 'mouseleave' , GLFW . onMouseleave , true ) ;
1409
+ Module [ ' canvas' ] . addEventListener ( 'drop' , GLFW . onDrop , true ) ;
1410
+ Module [ ' canvas' ] . addEventListener ( 'dragover' , GLFW . onDragover , true ) ;
1411
1411
1412
1412
// Overriding implementation to account for HiDPI
1413
1413
Browser . requestFullscreen = GLFW . requestFullscreen ;
@@ -1427,30 +1427,30 @@ var LibraryGLFW = {
1427
1427
} ,
1428
1428
1429
1429
glfwTerminate : ( ) => {
1430
- window . removeEventListener ( " gamepadconnected" , GLFW . onGamepadConnected , true ) ;
1431
- window . removeEventListener ( " gamepaddisconnected" , GLFW . onGamepadDisconnected , true ) ;
1432
- window . removeEventListener ( " keydown" , GLFW . onKeydown , true ) ;
1433
- window . removeEventListener ( " keypress" , GLFW . onKeyPress , true ) ;
1434
- window . removeEventListener ( " keyup" , GLFW . onKeyup , true ) ;
1435
- window . removeEventListener ( " blur" , GLFW . onBlur , true ) ;
1436
- Module [ " canvas" ] . removeEventListener ( " touchmove" , GLFW . onMousemove , true ) ;
1437
- Module [ " canvas" ] . removeEventListener ( " touchstart" , GLFW . onMouseButtonDown , true ) ;
1438
- Module [ " canvas" ] . removeEventListener ( " touchcancel" , GLFW . onMouseButtonUp , true ) ;
1439
- Module [ " canvas" ] . removeEventListener ( " touchend" , GLFW . onMouseButtonUp , true ) ;
1440
- Module [ " canvas" ] . removeEventListener ( " mousemove" , GLFW . onMousemove , true ) ;
1441
- Module [ " canvas" ] . removeEventListener ( " mousedown" , GLFW . onMouseButtonDown , true ) ;
1442
- Module [ " canvas" ] . removeEventListener ( " mouseup" , GLFW . onMouseButtonUp , true ) ;
1443
- Module [ " canvas" ] . removeEventListener ( 'wheel' , GLFW . onMouseWheel , true ) ;
1444
- Module [ " canvas" ] . removeEventListener ( 'mousewheel' , GLFW . onMouseWheel , true ) ;
1445
- Module [ " canvas" ] . removeEventListener ( 'mouseenter' , GLFW . onMouseenter , true ) ;
1446
- Module [ " canvas" ] . removeEventListener ( 'mouseleave' , GLFW . onMouseleave , true ) ;
1447
- Module [ " canvas" ] . removeEventListener ( 'drop' , GLFW . onDrop , true ) ;
1448
- Module [ " canvas" ] . removeEventListener ( 'dragover' , GLFW . onDragover , true ) ;
1430
+ window . removeEventListener ( ' gamepadconnected' , GLFW . onGamepadConnected , true ) ;
1431
+ window . removeEventListener ( ' gamepaddisconnected' , GLFW . onGamepadDisconnected , true ) ;
1432
+ window . removeEventListener ( ' keydown' , GLFW . onKeydown , true ) ;
1433
+ window . removeEventListener ( ' keypress' , GLFW . onKeyPress , true ) ;
1434
+ window . removeEventListener ( ' keyup' , GLFW . onKeyup , true ) ;
1435
+ window . removeEventListener ( ' blur' , GLFW . onBlur , true ) ;
1436
+ Module [ ' canvas' ] . removeEventListener ( ' touchmove' , GLFW . onMousemove , true ) ;
1437
+ Module [ ' canvas' ] . removeEventListener ( ' touchstart' , GLFW . onMouseButtonDown , true ) ;
1438
+ Module [ ' canvas' ] . removeEventListener ( ' touchcancel' , GLFW . onMouseButtonUp , true ) ;
1439
+ Module [ ' canvas' ] . removeEventListener ( ' touchend' , GLFW . onMouseButtonUp , true ) ;
1440
+ Module [ ' canvas' ] . removeEventListener ( ' mousemove' , GLFW . onMousemove , true ) ;
1441
+ Module [ ' canvas' ] . removeEventListener ( ' mousedown' , GLFW . onMouseButtonDown , true ) ;
1442
+ Module [ ' canvas' ] . removeEventListener ( ' mouseup' , GLFW . onMouseButtonUp , true ) ;
1443
+ Module [ ' canvas' ] . removeEventListener ( 'wheel' , GLFW . onMouseWheel , true ) ;
1444
+ Module [ ' canvas' ] . removeEventListener ( 'mousewheel' , GLFW . onMouseWheel , true ) ;
1445
+ Module [ ' canvas' ] . removeEventListener ( 'mouseenter' , GLFW . onMouseenter , true ) ;
1446
+ Module [ ' canvas' ] . removeEventListener ( 'mouseleave' , GLFW . onMouseleave , true ) ;
1447
+ Module [ ' canvas' ] . removeEventListener ( 'drop' , GLFW . onDrop , true ) ;
1448
+ Module [ ' canvas' ] . removeEventListener ( 'dragover' , GLFW . onDragover , true ) ;
1449
1449
1450
1450
if ( GLFW . devicePixelRatioMQL )
1451
1451
GLFW . devicePixelRatioMQL . removeEventListener ( 'change' , GLFW . onDevicePixelRatioChange ) ;
1452
1452
1453
- Module [ " canvas" ] . width = Module [ " canvas" ] . height = 1 ;
1453
+ Module [ ' canvas' ] . width = Module [ ' canvas' ] . height = 1 ;
1454
1454
GLFW . windows = null ;
1455
1455
GLFW . active = null ;
1456
1456
} ,
0 commit comments