Armen Babakanian
Armen Babakanian

Reputation: 2305

three.js code working is JSfiddle but not in my browser

Here is a simple three.js code that creates a custom geometry http://jsfiddle.net/67Lgzjpb/. When I try to run this directly on my browser, (not throught JSFiddle) it says

TypeError: geom.computeCentroids is not a function

Has anyone got a clue why?

Upvotes: 0

Views: 183

Answers (1)

WestLangley
WestLangley

Reputation: 104783

It is because the fiddle is linking to a version of three.js that is two years old.

Hopefully, you are linking to the current version.

The method Geometry.computeCentroids() no longer exists, and Face3 no longer has a centroid property.

three.js r.68

Upvotes: 2

Related Questions