byWulf / threejs-dice

Javascript library to create throwable dice with threejs and cannonjs
MIT License
180 stars 69 forks source link

Cannot use import statement outside a module & DiceManager is not defined #15

Open fmgrafikdesign opened 4 years ago

fmgrafikdesign commented 4 years ago

Hi, after cloning and installing the project, the examples don't work for me. I get the errors

Uncaught SyntaxError: Cannot use import statement outside a module and Uncaught ReferenceError: DiceManager is not defined.

I am not sure if I'm missing some transpiling here or anything, it would be much appreciated if you could help me out.

Best Regards!

m1ket commented 3 years ago

Hey,

Did you figure this out? I'm facing the same problem having just started to try using this code.

Thanks!

jadinm commented 3 years ago

The examples only work if you remove the import statements and remove the "export" key word from the library file