SLProject
4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
|
App::run implementation from App.h for the Emscripten platform. More...
#include <App.h>
#include <SLGLState.h>
#include <SLEnums.h>
#include <SLInterface.h>
#include <AppCommon.h>
#include <SLAssetManager.h>
#include <SLScene.h>
#include <SLSceneView.h>
#include <CVCapture.h>
#include <Profiler.h>
#include <SLAssetLoader.h>
#include <emscripten.h>
#include <emscripten/em_asm.h>
#include <emscripten/html5.h>
#include <emscripten/val.h>
Go to the source code of this file.
Functions | |
static SLbool | onPaint () |
Paint event handler that passes the event to the slPaintAllViews function. More... | |
static void | updateCanvas () |
static void | onLoadingCoreAssets () |
static EM_BOOL | onAnimationFrame (double time, void *userData) |
static EMSCRIPTEN_RESULT | onMousePressed (int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData) |
static EM_BOOL | onMouseReleased (int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData) |
static EM_BOOL | onMouseDoubleClicked (int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData) |
static EM_BOOL | onMouseMove (int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData) |
static EM_BOOL | onMouseWheel (int eventType, const EmscriptenWheelEvent *wheelEvent, void *userData) |
static EM_BOOL | onKeyPressed (int eventType, const EmscriptenKeyboardEvent *keyEvent, void *userData) |
static EM_BOOL | onKeyReleased (int eventType, const EmscriptenKeyboardEvent *keyEvent, void *userData) |
static EM_BOOL | onTouchStart (int eventType, const EmscriptenTouchEvent *touchEvent, void *userData) |
static EM_BOOL | onTouchEnd (int eventType, const EmscriptenTouchEvent *touchEvent, void *userData) |
static EM_BOOL | onTouchMove (int eventType, const EmscriptenTouchEvent *touchEvent, void *userData) |
static const char * | onUnload (int eventType, const void *reserved, void *userData) |
static SLint | convertToCanvasCoordinate (SLint coordinate) |
static SLKey | mapKeyToSLKey (unsigned long key) |
static SLKey | mapModifiersToSLModifiers (bool shiftDown, bool ctrlDown, bool altDown) |
static SLKey | mapModifiersToSLModifiers (const EmscriptenMouseEvent *mouseEvent) |
static SLKey | mapModifiersToSLModifiers (const EmscriptenKeyboardEvent *keyEvent) |
Variables | |
static SLint | svIndex |
Scene view index. More... | |
static SLint | startX |
start position x in pixels More... | |
static SLint | startY |
start position y in pixels More... | |
static SLint | mouseX |
Last mouse position x in pixels. More... | |
static SLint | mouseY |
Last mouse position y in pixels. More... | |
static SLVec2i | touch2 |
Last finger touch 2 position in pixels. More... | |
static SLVec2i | touchDelta |
Delta between two fingers in x. More... | |
static SLint | lastWidth |
Last window width in pixels. More... | |
static SLint | lastHeight |
Last window height in pixels. More... | |
static int | canvasWidth |
Width of the HTML canvas. More... | |
static int | canvasHeight |
Height of the HTML canvas. More... | |
static int | lastTouchDownX |
X coordinate of last touch down. More... | |
static int | lastTouchDownY |
Y coordinate of last touch down. More... | |
static double | lastTouchDownTimeMS |
Time of last touch down in milliseconds. More... | |
static long | animationFrameID = 0 |
ID of the current JavaScript animation frame. More... | |
static SLbool | coreAssetsLoaded = false |
Indicates whether core assets can be used. More... | |
App::run implementation from App.h for the Emscripten platform.
The functions implement mostly the callbacks for the platform that are forwarded to the C interface in SLInterface. For more info on how to create a new app with SLProject see: https://github.com/cpvrlab/SLProject4/wiki/Creating-a-New-App For more info about App framework see: https://cpvrlab.github.io/SLProject4/app-framework.html For more info about the Emscripten platform see: https://cpvrlab.github.io/SLProject4/emscripten.html For more info on how to set up the Emscripten platform see: https://github.com/cpvrlab/SLProject4/wiki/Build-for-the-web-with-Emscripten
Definition in file AppEmscripten.cpp.
Definition at line 534 of file AppEmscripten.cpp.
|
static |
Definition at line 539 of file AppEmscripten.cpp.
|
static |
Definition at line 592 of file AppEmscripten.cpp.
|
static |
Definition at line 608 of file AppEmscripten.cpp.
|
static |
Definition at line 601 of file AppEmscripten.cpp.
|
static |
Definition at line 230 of file AppEmscripten.cpp.
|
static |
Definition at line 400 of file AppEmscripten.cpp.
|
static |
Definition at line 414 of file AppEmscripten.cpp.
|
static |
Definition at line 204 of file AppEmscripten.cpp.
|
static |
Definition at line 326 of file AppEmscripten.cpp.
|
static |
Definition at line 363 of file AppEmscripten.cpp.
|
static |
Definition at line 243 of file AppEmscripten.cpp.
|
static |
Definition at line 286 of file AppEmscripten.cpp.
|
static |
Definition at line 384 of file AppEmscripten.cpp.
|
static |
Paint event handler that passes the event to the slPaintAllViews function.
Definition at line 152 of file AppEmscripten.cpp.
|
static |
Definition at line 455 of file AppEmscripten.cpp.
|
static |
Definition at line 499 of file AppEmscripten.cpp.
|
static |
Definition at line 425 of file AppEmscripten.cpp.
Definition at line 521 of file AppEmscripten.cpp.
|
static |
Definition at line 193 of file AppEmscripten.cpp.
|
static |
ID of the current JavaScript animation frame.
Definition at line 55 of file AppEmscripten.cpp.
|
static |
Height of the HTML canvas.
Definition at line 51 of file AppEmscripten.cpp.
|
static |
Width of the HTML canvas.
Definition at line 50 of file AppEmscripten.cpp.
|
static |
Indicates whether core assets can be used.
Definition at line 56 of file AppEmscripten.cpp.
|
static |
Last window height in pixels.
Definition at line 49 of file AppEmscripten.cpp.
|
static |
Time of last touch down in milliseconds.
Definition at line 54 of file AppEmscripten.cpp.
|
static |
X coordinate of last touch down.
Definition at line 52 of file AppEmscripten.cpp.
|
static |
Y coordinate of last touch down.
Definition at line 53 of file AppEmscripten.cpp.
|
static |
Last window width in pixels.
Definition at line 48 of file AppEmscripten.cpp.
|
static |
Last mouse position x in pixels.
Definition at line 44 of file AppEmscripten.cpp.
|
static |
Last mouse position y in pixels.
Definition at line 45 of file AppEmscripten.cpp.
|
static |
start position x in pixels
Definition at line 42 of file AppEmscripten.cpp.
|
static |
start position y in pixels
Definition at line 43 of file AppEmscripten.cpp.
|
static |
Scene view index.
Definition at line 41 of file AppEmscripten.cpp.
|
static |
Last finger touch 2 position in pixels.
Definition at line 46 of file AppEmscripten.cpp.
|
static |
Delta between two fingers in x.
Definition at line 47 of file AppEmscripten.cpp.