<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<blockquote cite="mid:543A38B0.1020809@nps.edu" type="cite">
<blockquote type="cite">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. <br>
<br>
JSON question #2, wondering which is correct for an MFVec3f
value, single array or array of arrays? <br>
<br>
"keyValue": [0 0 0 1 1 1 2 2 2], <br>
or <br>
"keyValue": [ [0 0 0], [1 1 1], [2 2 2] ], <br>
</blockquote>
<br>
Revised candidates, with required commas: <br>
<br>
"keyValue": [ 0, 0, 0, 1, 1, 1, 2, 2, 2 ], <br>
or <br>
"keyValue": [ [0, 0, 0], [1, 1, 1], [2, 2, 2] ], <br>
<br>
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. <br>
</blockquote>
<br>
<br>
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.<br>
<br>
Now I see that people seem to like the first version, so I'll supply
more reasoning.<br>
<br>
I am looking at this from the standpoint of a 3D developer who needs
to (programmatically) work with the elements of the array. For this
discussion, assume this is a point array with each point having 3
coordinates (point field in a Coordinate node). If I wish to morph
the existing shape into something else, I want to work with the
points (as a 3-tuple) of the shape. It is creates much clearer code
to reference something like p[27] than (p[27*3], p[27*3+1],
p[27*3+2]). <br>
<br>
I also think that we need a means for importing large data so that
it is not necessary to store all scene data (not scene structure)
together with the structure. This would allow geometry, animations,
normals, etc. to be stored separately and transmitted in an
efficient manner (binary, compressed, etc.) into the scene. This
capability would apply to all encodings.<br>
<br>
<br>
<div class="moz-signature">-- <br>
<font class="tahoma,arial,helvetica san serif" color="#333366">
<font size="+1"><b>Leonard Daly</b></font><br>
X3D Co-Chair<br>
Cloud Consultant<br>
President, Daly Realism - <i>Creating the Future</i>
</font></div>
</body>
</html>