0032315: Configuration, CMake - fix building Draw Harness plugins as static libraries
[occt.git] / samples / webgl / occt-webgl-viewer.js
index 484b519..4dc2ec1 100644 (file)
@@ -1,28 +1,28 @@
-var OccViewerModule =\r
-{\r
-  print: (function() {\r
-    var anElement = document.getElementById('output');\r
-    return function(theText) { anElement.innerHTML += theText + "<br>"; };\r
-  })(),\r
-  printErr: function(theText) {\r
-    //var anElement = document.getElementById('output');\r
-    //anElement.innerHTML += theText + "<br>";\r
-    console.warn(theText);\r
-  },\r
-  canvas: (function() {\r
-    var aCanvas = document.getElementById('occViewerCanvas');\r
-    var aGlCtx =                   aCanvas.getContext ('webgl2', { alpha: false, depth: true, antialias: false, preserveDrawingBuffer: true } );\r
-    if (aGlCtx == null) { aGlCtx = aCanvas.getContext ('webgl',  { alpha: false, depth: true, antialias: false, preserveDrawingBuffer: true } ); }\r
-    return aCanvas;\r
-  })(),\r
-\r
-  onRuntimeInitialized: function() {\r
-    //console.log(" @@ onRuntimeInitialized()" + Object.getOwnPropertyNames(OccViewerModule));\r
-  }\r
-};\r
-\r
-const OccViewerModuleInitialized = createOccViewerModule(OccViewerModule);\r
-OccViewerModuleInitialized.then(function(Module) {\r
-  //OccViewerModule.setCubemapBackground ("cubemap.jpg");\r
-  OccViewerModule.openFromUrl ("ball", "samples/Ball.brep");\r
-});\r
+var OccViewerModule =
+{
+  print: (function() {
+    var anElement = document.getElementById('output');
+    return function(theText) { anElement.innerHTML += theText + "<br>"; };
+  })(),
+  printErr: function(theText) {
+    //var anElement = document.getElementById('output');
+    //anElement.innerHTML += theText + "<br>";
+    console.warn(theText);
+  },
+  canvas: (function() {
+    var aCanvas = document.getElementById('occViewerCanvas');
+    var aGlCtx =                   aCanvas.getContext ('webgl2', { alpha: false, depth: true, antialias: false, preserveDrawingBuffer: true } );
+    if (aGlCtx == null) { aGlCtx = aCanvas.getContext ('webgl',  { alpha: false, depth: true, antialias: false, preserveDrawingBuffer: true } ); }
+    return aCanvas;
+  })(),
+
+  onRuntimeInitialized: function() {
+    //console.log(" @@ onRuntimeInitialized()" + Object.getOwnPropertyNames(OccViewerModule));
+  }
+};
+
+const OccViewerModuleInitialized = createOccViewerModule(OccViewerModule);
+OccViewerModuleInitialized.then(function(Module) {
+  //OccViewerModule.setCubemapBackground ("cubemap.jpg");
+  OccViewerModule.openFromUrl ("ball", "samples/Ball.brep");
+});