typed array and
itemSize. In my understanding,
itemSize is the number of elements assigned for each vertex (e.g.
itemSize = 3 for position array because a vertex requires three values x, y and z)
Now I have a rectangle which is a collection of 4 vertices. I want to add attribute, say,
isClickable to each rectangle.
A naive way is to set itemSize 1 and repeat same
isClickable value 4 times.
isClickableArray = [ 0, 0, 0, 0, 1, 1, 1, 1 ... ]
This is apparently inefficient because 4 vertices use same value. However, itemSize cannot be less than 1.
How can I assign same attribute to 4 vertices?