[x3d-public] including ProtoInterface keys in the JSON encoding
John Carlson
yottzumm at gmail.com
Thu Dec 10 09:33:53 PST 2015
I converted the ArchPrototype.json to X3D XML and InstantPlayer reported errors when I tried to load it. Will try X3D-Edit (just one error about inlining…appears harmless). I don’t know where the InstantPlayer log files are kept, and I can’t copy paste. I fixed the fieldValue conversion, but there may be other errors. I was able to see the coordinates, but not the arch in cobweb and x3dom. Returning ArchPrototype.x3d results from my loader for your perusal.
New loader has been uploaded to my website:
http://coderextreme.net/X3DJSONLD/
Source code:
https://github.com/coderextreme/X3DJSONLD
More research required. Intermediate results. At least it’s more than a blank screen now. Current converted ArchPrototype.x3d from ArchPrototype.json is attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ArchPrototype.x3d
Type: model/x3d+xml
Size: 13044 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20151210/ad71cf2b/attachment.x3d>
-------------- next part --------------
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>
More information about the x3d-public
mailing list