xeogl icon indicating copy to clipboard operation
xeogl copied to clipboard

BoxGeometry: Consider Size Array

Open ghost opened this issue 9 years ago • 2 comments

Consider using key "size" with a size array instead of "xSize", "ySize", "zSize".

ghost avatar Jan 13 '16 02:01 ghost

Yes I was wondering whether I should be doing that - only reason I used the non-array form was for consistency with other scalar properties, for example on XEO.PlaneGeometry, which has properties like xSegments and ySegments (see screenshot from XEO.PlaneGeometry API docs below):

screenshot from 2016-01-13 10 50 03

Would be interested though what use cases you've found for having arrays, might be worth breaking that consistency if they're compelling..

xeolabs avatar Jan 13 '16 09:01 xeolabs

I was really comparing to the xyz array of XEO.Transforms. But overall I like using objects and properties better than arrays because they are more descriptive - for example: size.x, segments.x, xyz.x.

ghost avatar Jan 16 '16 04:01 ghost