Use draco npm package for testing.

This commit is contained in:
kovacsv 2024-04-27 11:17:25 +02:00
parent aaa65acadb
commit 0e15dfba51
4 changed files with 8 additions and 11 deletions

View File

@ -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) onmessage = async function (ev)
{ {

11
package-lock.json generated
View File

@ -10,15 +10,14 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@simonwep/pickr": "1.9.0", "@simonwep/pickr": "1.9.0",
"draco3d": "1.5.7",
"fflate": "0.8.2", "fflate": "0.8.2",
"occt-import-js": "0.0.21", "occt-import-js": "0.0.21",
"rhino3dm": "8.4.0",
"three": "0.163.0", "three": "0.163.0",
"web-ifc": "0.0.44" "web-ifc": "0.0.44"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.1.0", "@types/node": "^20.1.0",
"draco3d": "1.5.7",
"esbuild": "^0.20.0", "esbuild": "^0.20.0",
"eslint": "^8.29.0", "eslint": "^8.29.0",
"eslint-plugin-unused-imports": "^3.0.0", "eslint-plugin-unused-imports": "^3.0.0",
@ -2530,7 +2529,8 @@
"node_modules/draco3d": { "node_modules/draco3d": {
"version": "1.5.7", "version": "1.5.7",
"resolved": "https://registry.npmjs.org/draco3d/-/draco3d-1.5.7.tgz", "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": { "node_modules/emoji-regex": {
"version": "8.0.0", "version": "8.0.0",
@ -5067,11 +5067,6 @@
"node": ">=0.10.0" "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": { "node_modules/rimraf": {
"version": "3.0.2", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",

View File

@ -70,7 +70,8 @@
"rollup": "^4.0.2", "rollup": "^4.0.2",
"run-python3": "^0.0.5", "run-python3": "^0.0.5",
"svgo": "^3.0.2", "svgo": "^3.0.2",
"typescript": "^5.0.4" "typescript": "^5.0.4",
"draco3d": "1.5.7"
}, },
"dependencies": { "dependencies": {
"@simonwep/pickr": "1.9.0", "@simonwep/pickr": "1.9.0",

View File

@ -81,7 +81,8 @@ export function SetGlobals ()
head : { head : {
appendChild : function (element) { appendChild : function (element) {
if (element.type === 'text/javascript') { 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 => { import ('draco3d').then (mod => {
global.DracoDecoderModule = function () { global.DracoDecoderModule = function () {
return mod.createDecoderModule (); return mod.createDecoderModule ();