Physijs icon indicating copy to clipboard operation
Physijs copied to clipboard

Physijs.HeightfieldMesh error when xdiv !== ydiv

Open SET001 opened this issue 8 years ago • 1 comments

Seems like Physijs.HeightfieldMesh does not allow to create mesh with different height and width -

http://jsfiddle.net/u1mps219/1/

The erorr is VM106 physi.js:1126Uncaught TypeError: Cannot read property 'z' of undefined

I don't know if this is how it intended to work, but if yes then maybe xdiv and ydiv should be replaced with single parameter with something like divSize?

SET001 avatar Apr 15 '16 15:04 SET001

Refer to this excerpt from the comments of a heightfield example...

If your plane is not square as far as face count then the HeightfieldMesh takes two more arguments at the end: # of x faces and # of y faces that were passed to THREE.PlaneMaterial

aleciavogel avatar Feb 11 '17 00:02 aleciavogel