Skip to content

Commit

Permalink
Use three from the npm in node.js
Browse files Browse the repository at this point in the history
One can import all necessary components
  • Loading branch information
linev committed Oct 29, 2024
1 parent 22796ee commit 0273325
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/base/base3d.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ async function importThreeJs(original) {

if (!isNodeJs() || (THREE.REVISION <= 162))
return THREE;
return import('../r162/three.mjs').then(h1 => {
return import('three').then(h1 => {
Object.assign(THREE, h1);
return import('../r162/three_addons.mjs');
return import('three/addons');
}).then(h2 => {
Object.assign(THREE, h2);
return THREE;
Expand Down

0 comments on commit 0273325

Please sign in to comment.