Skip to content

Commit

Permalink
Use draco npm package for testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacsv committed Apr 27, 2024
1 parent aaa65ac commit 0e15dfb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion libs/occt-import-js-worker.js
Original file line number Diff line number Diff line change
@@ -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)
{
Expand Down
11 changes: 3 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion test/utils/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ();
Expand Down

0 comments on commit 0e15dfb

Please sign in to comment.