Closed meta-meta closed 8 years ago
Yeah, that would be nice. I wonder of passing an {x, y, z} object works already. For taking an array, I think I can make that happen on the A-Frame level.
Passing an {x, y, z} object does not work. I believe aframe parses the "x y z" string into an {x y z} but won't accept an object.
I don't know that it would be advantageous to accept an array at the aframe level. I believe you'd have to JSON.stringify([x, y, z]) to pass the array as an attribute. If a developer has to do that, they might as well just transform it to a string that aframe already accepts.
And then in the pure HTML case, I definitely would prefer "x y z" to '["x","y","z"]'.
:+1:
I'm wondering if you have any strong opinions on how this should work. It's inconvenient to have to convert a Vector3 into a string that a-frame can work with. Should this be handled by aframe-react? Or should this be some external utility function? Likewise for rotation and scale, maybe even color: convert RGB to Hex?
I currently do this:
would be nice to be able to do this:
and/or