1 var OccViewerModule =
\r
4 var anElement = document.getElementById('output');
\r
5 return function(theText) { anElement.innerHTML += theText + "<br>"; };
\r
7 printErr: function(theText) {
\r
8 //var anElement = document.getElementById('output');
\r
9 //anElement.innerHTML += theText + "<br>";
\r
10 console.warn(theText);
\r
12 canvas: (function() {
\r
13 var aCanvas = document.getElementById('occViewerCanvas');
\r
14 var aGlCtx = aCanvas.getContext ('webgl2', { alpha: false, depth: true, antialias: false, preserveDrawingBuffer: true } );
\r
15 if (aGlCtx == null) { aGlCtx = aCanvas.getContext ('webgl', { alpha: false, depth: true, antialias: false, preserveDrawingBuffer: true } ); }
\r
19 onRuntimeInitialized: function() {
\r
20 //console.log(" @@ onRuntimeInitialized()" + Object.getOwnPropertyNames(OccViewerModule));
\r
24 const OccViewerModuleInitialized = createOccViewerModule(OccViewerModule);
\r
25 OccViewerModuleInitialized.then(function(Module) {
\r
26 //OccViewerModule.setCubemapBackground ("cubemap.jpg");
\r
27 OccViewerModule.openFromUrl ("ball", "samples/Ball.brep");
\r