From 0e15dfba5114951b5ac602d612f4023c62798e2d Mon Sep 17 00:00:00 2001 From: kovacsv Date: Sat, 27 Apr 2024 11:17:25 +0200 Subject: [PATCH] Use draco npm package for testing. --- libs/occt-import-js-worker.js | 2 +- package-lock.json | 11 +++-------- package.json | 3 ++- test/utils/globals.js | 3 ++- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/libs/occt-import-js-worker.js b/libs/occt-import-js-worker.js index 138923c9..76c18c4b 100644 --- a/libs/occt-import-js-worker.js +++ b/libs/occt-import-js-worker.js @@ -1,4 +1,4 @@ -importScripts ('occt-import-js.js'); +importScripts ('https://cdn.jsdelivr.net/npm/occt-import-js@0.0.21/dist/occt-import-js.min.js'); onmessage = async function (ev) { diff --git a/package-lock.json b/package-lock.json index cb6b2658..f4af8100 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,15 +10,14 @@ "license": "MIT", "dependencies": { "@simonwep/pickr": "1.9.0", - "draco3d": "1.5.7", "fflate": "0.8.2", "occt-import-js": "0.0.21", - "rhino3dm": "8.4.0", "three": "0.163.0", "web-ifc": "0.0.44" }, "devDependencies": { "@types/node": "^20.1.0", + "draco3d": "1.5.7", "esbuild": "^0.20.0", "eslint": "^8.29.0", "eslint-plugin-unused-imports": "^3.0.0", @@ -2530,7 +2529,8 @@ "node_modules/draco3d": { "version": "1.5.7", "resolved": "https://registry.npmjs.org/draco3d/-/draco3d-1.5.7.tgz", - "integrity": "sha512-m6WCKt/erDXcw+70IJXnG7M3awwQPAsZvJGX5zY7beBqpELw6RDGkYVU0W43AFxye4pDZ5i2Lbyc/NNGqwjUVQ==" + "integrity": "sha512-m6WCKt/erDXcw+70IJXnG7M3awwQPAsZvJGX5zY7beBqpELw6RDGkYVU0W43AFxye4pDZ5i2Lbyc/NNGqwjUVQ==", + "dev": true }, "node_modules/emoji-regex": { "version": "8.0.0", @@ -5067,11 +5067,6 @@ "node": ">=0.10.0" } }, - "node_modules/rhino3dm": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/rhino3dm/-/rhino3dm-8.4.0.tgz", - "integrity": "sha512-jKkwoeA49nBkC27CNLpdP5kZ6QkY+WZv3I44bHSnYIzuPaszexyRukXUDc8QTnkeJR/oTJjH4QygyaKlKtHa8Q==" - }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", diff --git a/package.json b/package.json index 50dbf73c..cc9b3089 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,8 @@ "rollup": "^4.0.2", "run-python3": "^0.0.5", "svgo": "^3.0.2", - "typescript": "^5.0.4" + "typescript": "^5.0.4", + "draco3d": "1.5.7" }, "dependencies": { "@simonwep/pickr": "1.9.0", diff --git a/test/utils/globals.js b/test/utils/globals.js index 647e2c4b..79b3e194 100644 --- a/test/utils/globals.js +++ b/test/utils/globals.js @@ -81,7 +81,8 @@ export function SetGlobals () head : { appendChild : function (element) { if (element.type === 'text/javascript') { - if (element.src.indexOf ('draco') !== -1) { + console.log (element.src); + if (element.src.indexOf ('draco_decoder_nodejs.min.js') !== -1) { import ('draco3d').then (mod => { global.DracoDecoderModule = function () { return mod.createDecoderModule ();