annotate Platforms/Wasm/default-library.js @ 466:5055031f4a06 bgo-commands-codegen

- Added browserify to build. This allows using require calls for modules that work with tsc compiler. - removed older stuff related to Protocol Buffers and Flatbuffers - changed triple-slash references to import statements - module prefixes are now added at call sites - added cmake module for filename handling - switched to Ninja for sample build - Added virtual dtor in ICommand
author bgo-osimis
date Mon, 11 Feb 2019 16:00:04 +0100
parents 2038d76bf13f
children 7105a0bad250
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
229
b0ba3b38a23c ScheduleRedraw can handle multiple viewports
am@osimis.io
parents:
diff changeset
1 // this file contains the JS method you want to expose to C++ code
b0ba3b38a23c ScheduleRedraw can handle multiple viewports
am@osimis.io
parents:
diff changeset
2
b0ba3b38a23c ScheduleRedraw can handle multiple viewports
am@osimis.io
parents:
diff changeset
3 mergeInto(LibraryManager.library, {
b0ba3b38a23c ScheduleRedraw can handle multiple viewports
am@osimis.io
parents:
diff changeset
4 ScheduleWebViewportRedrawFromCpp: function(cppViewportHandle) {
466
5055031f4a06 - Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents: 287
diff changeset
5 window.ScheduleWebViewportRedraw(cppViewportHandle);
231
5027cb2feb51 viewport is now part of the Application itself and not global anymore
am@osimis.io
parents: 229
diff changeset
6 },
5027cb2feb51 viewport is now part of the Application itself and not global anymore
am@osimis.io
parents: 229
diff changeset
7 CreateWasmViewportFromCpp: function(htmlCanvasId) {
466
5055031f4a06 - Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents: 287
diff changeset
8 return window.CreateWasmViewport(htmlCanvasId);
287
2038d76bf13f interaction with HTML/JS
am@osimis.io
parents: 236
diff changeset
9 },
2038d76bf13f interaction with HTML/JS
am@osimis.io
parents: 236
diff changeset
10 // each time the StoneApplication updates its status, it may signal it through this method. i.e, to change the status of a button in the web interface
2038d76bf13f interaction with HTML/JS
am@osimis.io
parents: 236
diff changeset
11 UpdateStoneApplicationStatusFromCpp: function(statusUpdateMessage) {
2038d76bf13f interaction with HTML/JS
am@osimis.io
parents: 236
diff changeset
12 var statusUpdateMessage_ = UTF8ToString(statusUpdateMessage);
2038d76bf13f interaction with HTML/JS
am@osimis.io
parents: 236
diff changeset
13 UpdateWebApplication(statusUpdateMessage_);
231
5027cb2feb51 viewport is now part of the Application itself and not global anymore
am@osimis.io
parents: 229
diff changeset
14 }
5027cb2feb51 viewport is now part of the Application itself and not global anymore
am@osimis.io
parents: 229
diff changeset
15 });