Fix CascadeStudio integration #99

Merged
Irev-Dev merged 11 commits from kurt/issue-95 into main 2020-11-16 19:33:35 +01:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 439d5580f3 - Show all commits

View File

@@ -8,7 +8,7 @@
},
"scripts": {
"comment": "Rather crude approach to move ts definitions into the public folder so the browser can grab them later in CascadeMain.js",
"move-ts-defs": "cp ./node_modules/opencascade.js/dist/opencascade.d.ts ./web/public && cp ./node_modules/three/src/Three.d.ts ./web/public && cp ./web/src/cascade/js/StandardLibraryIntellisense.ts ./web/public"
"move-ts-defs": "cp ./node_modules/opencascade.js/dist/opencascade.d.ts ./web/public && cp ./node_modules/three/src/Three.d.ts ./web/public && cp ./web/src/cascade/js/StandardLibraryIntellisense.ts ./web/public && cp ./web/src/cascade/js/CADWorker/CascadeStudioMainWorker.js ./web/public"
},
"devDependencies": {
Irev-Dev commented 2020-11-16 10:56:32 +01:00 (Migrated from github.com)
Review

This is just copying a bunch of js worker files from the git submodule and putting them in the public folder (so they can be accessed from the browser),
which reminds me I need to update the read me to add a yarn move-cad-worker step to the instructions.

This is just copying a bunch of js worker files from the git submodule and putting them in the public folder (so they can be accessed from the browser), which reminds me I need to update the read me to add a `yarn move-cad-worker` step to the instructions.
"@redwoodjs/core": "^0.19.2"

View File

@@ -29,7 +29,7 @@
// Begins loading the CAD Kernel Web Worker
if (window.Worker) {
cascadeStudioWorker = new Worker('/src/cascade/js/CADWorker/CascadeStudioMainWorker.js');
cascadeStudioWorker = new Worker('/CascadeStudioMainWorker.js');
// Ping Pong Messages Back and Forth based on their registration in messageHandlers
// var messageHandlers = {};
cascadeStudioWorker.onmessage = function (e) {