[x3d-public] including ProtoInterface keys in the JSON encoding
John Carlson
yottzumm at gmail.com
Thu Dec 10 13:47:57 PST 2015
When I convert this file: examples/X3dForAdvancedModeling/Buildings/ArchPrototype.x3d to JSON, no ProtoInterface is included. I am using xmlsh and the X3dToJson.xslt downloaded from the website. I will try X3D-Edit next. No luck there either. Have either the website or X3D-edit been updated yet? I must be patient. I need to run the stylesheet for some of my tests, rather than having a canned JSON file. Thanks for your hard work Don!
Oh, I see, you want me to try to work with the JSON file to see if it will load. It partially loads minus the arch. the axes load fine. The .x3d I have is not up to date, but the JSON -> XML produced a similar file.
John
> On Dec 6, 2015, at 7:43 PM, Don Brutzman <brutzman at nps.edu> wrote:
>
> Again, great refinement you suggested.
>
> Treating ProtoInterface similarly to ProtoBody seems to work well.
>
> Example attached, please advise.
>
>
> On 12/6/2015 1:09 PM, Don Brutzman wrote:
>> On 12/4/2015 8:55 PM, John Carlson wrote:
>>> I was able to get my scripts working loading from either X3D XML -> Cobweb or X3D XML -> JSON -> Cobweb by inlining them. My scripts don’t use ProtoInterface, so the lack of that didn’t cause an issue. So the good news is, we have Prototypes and Scripts partially working with X3D JSON and the X3D JSON loader, albeit via XML for now until we can get native tool support. We do need ProtoInterfaces for a complete tool, but I’m hoping that will come without many more additional changes to my X3D JSON Loader (Don, can you change X3dToJson.xslt to output ProtoInterface keys? If you like I can be an alias for field Thank you.)
>>
>> Previously we omitted ProtoInterface keys for terseness.
>>
>> However it does make more sense to include them, for symmetry with XML encoding and also since author scripts might be adding class attributes or HTML callbacks etc. to elements in the DOM tree.
>>
>> Added to Issues list of TODO action items, will work on it.
>>
>> http://www.web3d.org/x3d/stylesheets/X3dToJson.html#Issues
>
> all the best, Don
> --
> Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
> Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
> <ArchPrototype.json>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20151210/26677002/attachment.html>
More information about the x3d-public
mailing list