[x3d-public] Please generate an array for -geometry here, it's an MFNode. in X3dToJson.xslt

John Carlson yottzumm at gmail.com
Mon Apr 23 12:57:42 PDT 2018


don, did this get fixed?  thanks

> On Apr 18, 2018, at 1:11 AM, John Carlson <yottzumm at gmail.com> wrote:
> 
>     <Transform translation='1.0 1.0 0.0'>
>       <Shape>
>         <Appearance>
>           <Material DEF='INDICATOR-MATERIAL' emissiveColor='0.0 0.0 1.0'/>
>         </Appearance>
>         <Sphere radius='0.2'/>
>       </Shape>
>     </Transform>
>     <RigidBodyCollection DEF='BODY-COLLECTION'>
>       <RigidBody DEF='BODY-1' containerField='bodies' finiteRotationAxis='0 1 0' position='0.0 2.0 0.0'>
>         <CollidableShape USE='BALL-GEOM' containerField='geometry'/>
>       </RigidBody>
>     </RigidBodyCollection>
>  
> Here’s what it ends up in JSON:
>  
> { "RigidBodyCollection":
>             {
>               "@DEF":"BODY-COLLECTION",
>               "-bodies":[
>                 { "RigidBody":
>                   {
>                     "@DEF":"BODY-1",
>                     "@position":[0.0,2.0,0.0],
>                     "-geometry":
>                       { "CollidableShape":
>                         {
>                           "@USE":"BALL-GEOM"
>                         }
>                       }
>                   }
>                 }
>               ]
>             }
>           },
>  
>  
> Is this valid?  The object model says it is.  However the autogenerated JSON schema doesn’t pass.  Looking at the object model again, it says geometry is an MFNode.   Therefore x3dToJson.xslt should generate an array, not an object.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180423/b261573d/attachment.html>


More information about the x3d-public mailing list