[X3D-Public] [x3dom-developers] initial X3D JSON conversion support using X3dToJson.xslt
Leonard Daly
Leonard.Daly at realism.com
Mon Oct 13 10:26:44 PDT 2014
>> There are very few examples in the JSON spec. A strict reading there
>> seems to permit either form: an array with a single value, or else a
>> singleton number with no surrounding brackets.
>>
>> JSON question #2, wondering which is correct for an MFVec3f value,
>> single array or array of arrays?
>>
>> "keyValue": [0 0 0 1 1 1 2 2 2],
>> or
>> "keyValue": [ [0 0 0], [1 1 1], [2 2 2] ],
>
> Revised candidates, with required commas:
>
> "keyValue": [ 0, 0, 0, 1, 1, 1, 2, 2, 2 ],
> or
> "keyValue": [ [0, 0, 0], [1, 1, 1], [2, 2, 2] ],
>
> Still wondering. This is likely a player question, what form is
> preferred for efficient operations. Will assume the second form
> (array of arrays) unless someone argues otherwise.
I prefer the second case. That way the elements of the array are the
points, colors, rotations, etc. and the elements of each array element
are the particular coordinate-value. Otherwise it would be necessary to
compute the indices.
--
*Leonard Daly*
X3D Co-Chair
Cloud Consultant
President, Daly Realism - /Creating the Future/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20141013/aee8b83a/attachment.html>
More information about the X3D-Public
mailing list