diff --git a/source/threejs/threeconverter.js b/source/threejs/threeconverter.js index 31e4b50..aa24852 100644 --- a/source/threejs/threeconverter.js +++ b/source/threejs/threeconverter.js @@ -217,7 +217,7 @@ OV.ConvertModelToThreeMeshes = function (model, params, output, callbacks) let threeMeshes = []; let taskRunner = new OV.TaskRunner (); taskRunner.RunBatch (model.MeshCount (), 100, { - runTask : function (firstIndex, lastIndex, ready) { + runTask : (firstIndex, lastIndex, ready) => { for (let meshIndex = firstIndex; meshIndex <= lastIndex; meshIndex++) { let mesh = model.GetMesh (meshIndex); if (mesh.TriangleCount () > 0) { @@ -227,7 +227,7 @@ OV.ConvertModelToThreeMeshes = function (model, params, output, callbacks) } ready (); }, - onReady : function () { + onReady : () => { callbacks.onModelLoaded (threeMeshes); } }); diff --git a/website/o3dv/loader.js b/website/o3dv/loader.js index 8442fbd..79d5ec9 100644 --- a/website/o3dv/loader.js +++ b/website/o3dv/loader.js @@ -34,26 +34,26 @@ OV.InitModelLoader = function (modelLoader, callbacks) let errorDialog = null; let progressDialog = null; modelLoader.Init ({ - onLoadStart : function () { + onLoadStart : () => { CloseDialogIfOpen (errorDialog); callbacks.onStart (); progressDialog = new OV.ProgressDialog (); progressDialog.Show ('Loading Model'); }, - onImportStart : function () { + onImportStart : () => { progressDialog.SetText ('Importing Model'); }, - onVisualizationStart : function () { + onVisualizationStart : () => { progressDialog.SetText ('Visualizing Model'); }, - onModelFinished : function (importResult, threeMeshes) { + onModelFinished : (importResult, threeMeshes) => { progressDialog.Hide (); callbacks.onFinish (importResult, threeMeshes); }, - onTextureLoaded : function () { + onTextureLoaded : () => { callbacks.onRender (); }, - onLoadError : function (importError) { + onLoadError : (importError) => { progressDialog.Hide (); errorDialog = OpenErrorDialog (importError); },