Sorry to post such a basic JS and browser question BUT here goes:
Given a plane buffer object with these dimensions:
let numHVerts = geometry.heightSegments + 1;
etc. for numWVerts
let numVerts = numHVerts * numWVerts;
output of console.log(numVerts) is NaN.
I understand what I need is the value of the object numVerts but I have burned up the Internet looking for helpful way around my stupidly simple problem.
Can anyone point me to a solution? Thanks a million!
jee7: Thanks for your comments. You have solved my problem!
I was using an access method into geometry I found in Stack Overflow. But notice the value for numHVerts was given as geometry.heightSegments + 1 with the term .parameters missing.
No wonder console.log() wasn’t working. Evidently I have lots to learn in geometry and mesh documentation.
@bob1942 the best thing to do when you run into a problem like this is console.log( geometry ). Then you can take a look at geometry’s properties and make sure that you are using them correctly. Usually faster than looking up the docs.