matthias-research / pages

My web page containing all the demos from my youtube channel "Ten Minute Physics" www.youtube.com/c/TenMinutePhysics
651 stars 134 forks source link

Change addAttribute to setAttribute in softBody.html #14

Closed elliotwaite closed 2 years ago

elliotwaite commented 2 years ago

The Soft Body Simulation page seems to be broken. For me, the canvas stays blank white and I'm getting the following error in the console: Uncaught TypeError: geometry.addAttribute is not a function

It looks like three.js renamed the addAttribute() method on BufferGeometry to setAttribute() at some point.

I tried changing every addAttribute to setAttribute and that seemed to resolve the issue.