diff --git a/web/src/cascade b/web/src/cascade index 330374d..e7823d0 160000 --- a/web/src/cascade +++ b/web/src/cascade @@ -1 +1 @@ -Subproject commit 330374d5cdb7fdaba8d1bd674bbafce5ca93db3f +Subproject commit e7823d0ea2697e0bcdb646c71e8bc071c99b5b64 diff --git a/web/src/index.html b/web/src/index.html index f618a4e..9b5d031 100644 --- a/web/src/index.html +++ b/web/src/index.html @@ -16,31 +16,13 @@ var cascadeStudioWorker var workerWorking = false var galleryProject = undefined - function initCascadeStudio() { - // if ('serviceWorker' in navigator) { - // navigator.serviceWorker.register('service-worker.js').then(function(registration) { - // registration.update(); // Always update the registration for the latest assets - // }, function() { - // console.log('Could not register Cascade Studio for offline use!'); - // }); - // } else { - // console.log('Browser does not support offline access!'); - // } - - // Begins loading the CAD Kernel Web Worker - if (window.Worker) { - cascadeStudioWorker = new Worker('/CADWorker/CascadeStudioMainWorker.js'); - // Ping Pong Messages Back and Forth based on their registration in messageHandlers - // var messageHandlers = {}; - cascadeStudioWorker.onmessage = function (e) { - if(e.data.type in messageHandlers){ - let response = messageHandlers[e.data.type](e.data.payload); - if (response) { cascadeStudioWorker.postMessage({ "type": e.data.type, payload: response }) }; - } - } - } - } - initCascadeStudio() + var myLayout, monacoEditor, + consoleContainer, consoleGolden, codeContainer, gui, + guiPanel, GUIState, count = 0, //focused = true, + mainProject = false, + // messageHandlers = {}, + startup, + isInitialized = false; diff --git a/web/src/index.js b/web/src/index.js index 6e5dc52..652024f 100644 --- a/web/src/index.js +++ b/web/src/index.js @@ -15,6 +15,37 @@ import './index.css' netlifyIdentity.init() +function initCascadeStudio() { + // if ('serviceWorker' in navigator) { + // navigator.serviceWorker.register('service-worker.js').then(function(registration) { + // registration.update(); // Always update the registration for the latest assets + // }, function() { + // console.log('Could not register Cascade Studio for offline use!'); + // }); + // } else { + // console.log('Browser does not support offline access!'); + // } + + // Begins loading the CAD Kernel Web Worker + if (window.Worker) { + cascadeStudioWorker = new Worker('/CADWorker/CascadeStudioMainWorker.js') + // Ping Pong Messages Back and Forth based on their registration in messageHandlers + // var messageHandlers = {}; + cascadeStudioWorker.onmessage = function (e) { + if (e.data.type in messageHandlers) { + let response = messageHandlers[e.data.type](e.data.payload) + if (response) { + cascadeStudioWorker.postMessage({ + type: e.data.type, + payload: response, + }) + } + } + } + } +} +initCascadeStudio() + ReactDOM.render(