Skip to content

Commit

Permalink
Move models out of assets
Browse files Browse the repository at this point in the history
Assets is a Vite managed folder - the model files are not hashed so not
safe to cache unlike everything else

Not easy to convert to be imported as one file references the other.
There's probably a Vite plugin that could do the job but one for
another time.
  • Loading branch information
microbit-matt-hillsdon committed Dec 6, 2023
1 parent cae6018 commit e7ccac7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 6 additions & 1 deletion src/components/3d-inspector/View3DUtility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,12 @@ class Live3DUtility {
resolve(group);
};

this.loader.load('/assets/models/microbit.gltf', onFinished, onProgress, reject);
this.loader.load(
`${import.meta.env.BASE_URL}/models/microbit.gltf`,
onFinished,
onProgress,
reject,
);
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"src/setup_tests.ts"
],
"compilerOptions": {
"module": "ES6",
"module": "esnext",
"lib": [
"DOM",
"ES6",
Expand Down

0 comments on commit e7ccac7

Please sign in to comment.