comparison Platforms/Wasm/wasm-application-runner.ts @ 535:79bb0a02d1cc bgo-commands-codegen

- Added ORTHANC_OVERRIDE to several methods (translates to "override" in C++ 11 compilers) - Last fixes to new style command handling (removed useless commands and switch command handling in simple samples to use XxxxSerializedMessageXxxx instead of XxxxCommandXxxx - Fixed hardcoded input instance in SingleFrameEditorApplication
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 19 Mar 2019 09:13:57 +0100
parents 548eed46f535
children f65748b33bd1
comparison
equal deleted inserted replaced
534:7016c35d163c 535:79bb0a02d1cc
19 var CreateWasmApplication: Function = null; 19 var CreateWasmApplication: Function = null;
20 export var CreateCppViewport: Function = null; 20 export var CreateCppViewport: Function = null;
21 var ReleaseCppViewport: Function = null; 21 var ReleaseCppViewport: Function = null;
22 var StartWasmApplication: Function = null; 22 var StartWasmApplication: Function = null;
23 export var SendSerializedMessageToStoneApplication: Function = null; 23 export var SendSerializedMessageToStoneApplication: Function = null;
24 export var SendCommandToStoneApplication: Function = null;
25 24
26 function DoAnimationThread() { 25 function DoAnimationThread() {
27 if (WasmDoAnimation != null) { 26 if (WasmDoAnimation != null) {
28 WasmDoAnimation(); 27 WasmDoAnimation();
29 } 28 }
100 (<any> window).WasmDelayedCallExecutor_ExecuteCallback = (<any> window).StoneFrameworkModule.cwrap('WasmDelayedCallExecutor_ExecuteCallback', null, ['number']); 99 (<any> window).WasmDelayedCallExecutor_ExecuteCallback = (<any> window).StoneFrameworkModule.cwrap('WasmDelayedCallExecutor_ExecuteCallback', null, ['number']);
101 // no need to put this into the globals for it's only used in this very module 100 // no need to put this into the globals for it's only used in this very module
102 WasmDoAnimation = (<any> window).StoneFrameworkModule.cwrap('WasmDoAnimation', null, []); 101 WasmDoAnimation = (<any> window).StoneFrameworkModule.cwrap('WasmDoAnimation', null, []);
103 102
104 SendSerializedMessageToStoneApplication = (<any> window).StoneFrameworkModule.cwrap('SendSerializedMessageToStoneApplication', 'string', ['string']); 103 SendSerializedMessageToStoneApplication = (<any> window).StoneFrameworkModule.cwrap('SendSerializedMessageToStoneApplication', 'string', ['string']);
105 SendCommandToStoneApplication = (<any> window).StoneFrameworkModule.cwrap('SendCommandToStoneApplication', 'string', ['string']);
106 104
107 Logger.defaultLogger.debug("Connecting C++ methods to JS methods - done"); 105 Logger.defaultLogger.debug("Connecting C++ methods to JS methods - done");
108 106
109 // Prevent scrolling 107 // Prevent scrolling
110 document.body.addEventListener('touchmove', function (event) { 108 document.body.addEventListener('touchmove', function (event) {