diff options
author | manny/MADE <nerurkar@made-apps.biz> | 2013-06-24 11:00:45 +0200 |
---|---|---|
committer | manny/MADE <nerurkar@made-apps.biz> | 2013-06-24 11:00:45 +0200 |
commit | 26f17cca734aca2b6717e16f0f22ead0e43571b8 (patch) | |
tree | 0a6f525b93abfd453c40a9ea4092dbee468837ac /src/library_glut.js | |
parent | 2978204196fa7993490305a2e38598edfa868171 (diff) |
IMPROVED: ensured proper indentation for entire document
Diffstat (limited to 'src/library_glut.js')
-rw-r--r-- | src/library_glut.js | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/src/library_glut.js b/src/library_glut.js index 6fc93574..36d47787 100644 --- a/src/library_glut.js +++ b/src/library_glut.js @@ -117,9 +117,9 @@ var LibraryGLUT = { if (48 <= keycode && keycode <= 57) return keycode; // numeric TODO handle shift? if (65 <= keycode && keycode <= 90) - return event['shiftKey'] ? keycode : keycode + 32; + return event['shiftKey'] ? keycode : keycode + 32; if (106 <= keycode && keycode <= 111) - return keycode - 106 + 42; // *,+-./ TODO handle shift? + return keycode - 106 + 42; // *,+-./ TODO handle shift? switch (keycode) { case 27: // escape @@ -227,7 +227,7 @@ var LibraryGLUT = { } else { width = GLUT.windowWidth; height = GLUT.windowHeight; - // TODO set position + // TODO set position document.removeEventListener('fullscreenchange', GLUT.onFullScreenEventChange, true); document.removeEventListener('mozfullscreenchange', GLUT.onFullScreenEventChange, true); document.removeEventListener('webkitfullscreenchange', GLUT.onFullScreenEventChange, true); @@ -255,7 +255,7 @@ var LibraryGLUT = { document['cancelFullScreen'] || document['mozCancelFullScreen'] || document['webkitCancelFullScreen'] || - (function() {}); + (function() {}); CFS.apply(document, []); } }, @@ -273,11 +273,11 @@ var LibraryGLUT = { window.addEventListener("mousedown", GLUT.onMouseButtonDown, true); window.addEventListener("mouseup", GLUT.onMouseButtonUp, true); - Browser.resizeListeners.push(function(width, height) { - if (GLUT.reshapeFunc) { - Runtime.dynCall('vii', GLUT.reshapeFunc, [width, height]); - } - }); + Browser.resizeListeners.push(function(width, height) { + if (GLUT.reshapeFunc) { + Runtime.dynCall('vii', GLUT.reshapeFunc, [width, height]); + } + }); __ATEXIT__.push({ func: function() { window.removeEventListener("keydown", GLUT.onKeydown, true); @@ -301,25 +301,25 @@ var LibraryGLUT = { glutGet: function(type) { switch (type) { case 100: /* GLUT_WINDOW_X */ - return 0; /* TODO */ + return 0; /* TODO */ case 101: /* GLUT_WINDOW_Y */ - return 0; /* TODO */ + return 0; /* TODO */ case 102: /* GLUT_WINDOW_WIDTH */ - return Module['canvas'].width; + return Module['canvas'].width; case 103: /* GLUT_WINDOW_HEIGHT */ - return Module['canvas'].height; + return Module['canvas'].height; case 200: /* GLUT_SCREEN_WIDTH */ - return Module['canvas'].width; + return Module['canvas'].width; case 201: /* GLUT_SCREEN_HEIGHT */ - return Module['canvas'].height; + return Module['canvas'].height; case 500: /* GLUT_INIT_WINDOW_X */ - return 0; /* TODO */ + return 0; /* TODO */ case 501: /* GLUT_INIT_WINDOW_Y */ - return 0; /* TODO */ + return 0; /* TODO */ case 502: /* GLUT_INIT_WINDOW_WIDTH */ - return GLUT.initWindowWidth; + return GLUT.initWindowWidth; case 503: /* GLUT_INIT_WINDOW_HEIGHT */ - return GLUT.initWindowHeight; + return GLUT.initWindowHeight; case 700: /* GLUT_ELAPSED_TIME */ var now = Date.now(); return now - GLUT.initTime; @@ -397,10 +397,8 @@ var LibraryGLUT = { glutReshapeWindow__deps: ['$GLUT', 'glutPostRedisplay'], glutReshapeWindow: function(width, height) { GLUT.cancelFullScreen(); - // console.log("glutReshapeWindow: " + width + ", " + height); Browser.setCanvasSize(width, height); if (GLUT.reshapeFunc) { - // console.log("GLUT.reshapeFunc: " + width + ", " + height); Runtime.dynCall('vii', GLUT.reshapeFunc, [width, height]); } _glutPostRedisplay(); |