byWulf / threejs-dice

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

TypeError: uvScaleMap.updateMatrix is not a function #13

Open arunpdl opened 5 years ago

arunpdl commented 5 years ago

Hi, I'm trying to use this package with React and I'm getting the following error, TypeError: uvScaleMap.updateMatrix is not a function as soon as I add scene.add(dice.getObject())

My code:

var scene = new THREE.Scene(); var world = new CANNON.World(); DiceManager.setWorld(world); var dice = new DiceD6({backColor: '#ff0000'}); scene.add(dice.getObject()); Any help would be great. Thanks :)

millsb commented 5 years ago

Just ran into this myself. I reverted Three.js to use the version this module uses (0.90.0) and the error went away.

SirNeural commented 4 years ago

If you guys are still held up on this issue, simply copying the dice.js into my project and importing it as a local library instead of a node_module worked. It's definitely because of the three.js version mismatch. On ThreeJS R116.1