Mercurial > hg > orthanc-stone
comparison Platforms/WebAssembly/wasm-application.ts @ 229:b0ba3b38a23c am
ScheduleRedraw can handle multiple viewports
author | am@osimis.io |
---|---|
date | Thu, 14 Jun 2018 16:51:43 +0200 |
parents | 1fa4c65c7e1b |
children | 7d2631320615 |
comparison
equal
deleted
inserted
replaced
228:210c1ce8e1a6 | 229:b0ba3b38a23c |
---|---|
1 ///<reference path='stone-framework-loader.ts'/> | 1 ///<reference path='stone-framework-loader.ts'/> |
2 ///<reference path='wasm-viewport.ts'/> | |
2 | 3 |
3 declare function InitializeWasmApplication() :void; // still in a js file | 4 module Stone { |
5 | |
6 // export declare type InitializationCallback = () => void; | |
7 | |
8 // export declare var StoneFrameworkModule : any; | |
9 | |
10 //const ASSETS_FOLDER : string = "assets/lib"; | |
11 //const WASM_FILENAME : string = "orthanc-framework"; | |
12 | |
13 export class WasmApplication { | |
14 | |
15 private viewport_ : WasmViewport; | |
16 private canvasId_: string; | |
17 | |
18 private pimpl_ : any; // Private pointer to the underlying WebAssembly C++ object | |
19 | |
20 public constructor(canvasId: string) { | |
21 this.canvasId_ = canvasId; | |
22 //this.module_ = module; | |
23 } | |
24 } | |
25 } | |
26 | |
27 | |
28 declare function InitializeWasmApplication(canvasId: string) :void; // still in a js file | |
4 | 29 |
5 | 30 |
6 | 31 |
7 | 32 |
8 // Wait for the Orthanc Framework to be initialized (this initializes | 33 // Wait for the Orthanc Framework to be initialized (this initializes |
9 // the WebAssembly environment) | 34 // the WebAssembly environment) and then, create and initialize the Wasm application |
10 Stone.Framework.Initialize(true, function() { | 35 Stone.Framework.Initialize(true, function() { |
11 InitializeWasmApplication(); | 36 InitializeWasmApplication("canvas"); |
12 }); | 37 }); |