225
|
1 ///<reference path='stone-framework-loader.ts'/>
|
229
|
2 ///<reference path='wasm-viewport.ts'/>
|
225
|
3
|
229
|
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
|
225
|
29
|
|
30
|
226
|
31
|
|
32
|
225
|
33 // Wait for the Orthanc Framework to be initialized (this initializes
|
229
|
34 // the WebAssembly environment) and then, create and initialize the Wasm application
|
225
|
35 Stone.Framework.Initialize(true, function() {
|
229
|
36 InitializeWasmApplication("canvas");
|
225
|
37 }); |