looeee / discoverthreejs-site

Repo for the book Discover three.js!
https://discoverthreejs.com/
747 stars 98 forks source link

BoxGeometry instead of BoxBufferGeometry #101

Open pereaf13 opened 10 months ago

pereaf13 commented 10 months ago

Hello! I am following and trying to reproduce the code in https://discoverthreejs.com/book/first-steps/first-scene/

And I was getting this error:

Uncaught SyntaxError: The requested module './vendor/three/build/three.module.js' does not provide an export named 'BoxBufferGeometry' (at main.js:3:3)

After some research I realized instead of BoxBufferGeometry it needs to be BoxGeometry.

So maybe you want to fix it in the book.

nayakayp commented 6 months ago

+1 for this. This happend also when using npm

The solution is to import BoxGeometry