Browse Source

PR feedback

Sebastien Lebreton 5 years ago
parent
commit
c1ea0501a5
2 changed files with 4 additions and 4 deletions
  1. 2 2
      Playground/js/main.js
  2. 2 2
      Playground/js/mainWebGPU.js

+ 2 - 2
Playground/js/main.js

@@ -40,7 +40,7 @@ compileAndRun = function(parent, fpsLabel) {
         var createEngineFunction = "createDefaultEngine";
         var createEngineFunction = "createDefaultEngine";
         var createSceneFunction;
         var createSceneFunction;
 
 
-        parent.monacoCreator.getRunCode().then(function (code) {
+        parent.monacoCreator.getRunCode().then(code => {
             var createDefaultEngine = function () {
             var createDefaultEngine = function () {
                 return new BABYLON.Engine(canvas, true, { preserveDrawingBuffer: true, stencil: true });
                 return new BABYLON.Engine(canvas, true, { preserveDrawingBuffer: true, stencil: true });
             }
             }
@@ -172,7 +172,7 @@ compileAndRun = function(parent, fpsLabel) {
                     }
                     }
                 }
                 }
             }
             }
-        }.bind(this));
+        });
 
 
     } catch (e) {
     } catch (e) {
         parent.utils.showError(e.message, e);
         parent.utils.showError(e.message, e);

+ 2 - 2
Playground/js/mainWebGPU.js

@@ -45,7 +45,7 @@ compileAndRun = function(parent, fpsLabel) {
             return;
             return;
         }
         }
 
 
-        parent.monacoCreator.getRunCode().then((async function (code) {
+        parent.monacoCreator.getRunCode().then(async code => {
             try {
             try {
                 var createDefaultEngine = function () {
                 var createDefaultEngine = function () {
                     return new BABYLON.WebGPUEngine(canvas);
                     return new BABYLON.WebGPUEngine(canvas);
@@ -196,7 +196,7 @@ compileAndRun = function(parent, fpsLabel) {
                 // Also log error in console to help debug playgrounds
                 // Also log error in console to help debug playgrounds
                 console.error(e);
                 console.error(e);
             }
             }
-        }).bind(this));
+        });
     } catch (e) {
     } catch (e) {
         parent.utils.showError(e.message, e);
         parent.utils.showError(e.message, e);
         // Also log error in console to help debug playgrounds
         // Also log error in console to help debug playgrounds