[x3d-public] Holger: trying to understand how to create valid X3D scripts that run in Cobweb and JSON conversions
John Carlson
yottzumm at gmail.com
Fri Dec 4 15:15:59 PST 2015
More results. I was able to view cobweb’s x3d in cobweb’s viewer. I was not able to view instant reality’s conversion to x3d from wrl in cobweb. The X3D -> JSON conversion failed in one place--Ee , which I will detail below. I was not able to view either hand-corrected JSON in Cobweb. Sad day. Means more work on my part for the JSON loader and perhaps the X3D -> JSON converter. Don, I include the converted JSON (old) and hand corrected JSON for each X3D file you can diff them, or look at the diffs I include below. You can get the original X3D from the file below, and also convert the WRL using InstantReality or a better tool. You can also run the ToJson conversion yourself, so I hope I am not tremendously violating people’s IP here by including the JSON. Here https://raw.githubusercontent.com/coderextreme/X3DJSONLD/master/json2x3d.js <https://raw.githubusercontent.com/coderextreme/X3DJSONLD/master/json2x3d.js> is a driver for the JavaScript based JSON -> XML converter built into my loader, available here: https://raw.githubusercontent.com/coderextreme/X3DJSONLD/master/X3DJSONLD.js <https://raw.githubusercontent.com/coderextreme/X3DJSONLD/master/X3DJSONLD.js>. I have made updates to my loader to work in offline mode. Apparently, cobweb accepts indentation, so I will add indentation back to my tool soon so I can get better comparisons to original X3D. What this all means is, we need to cross-pollinate or cross-check with each other’s tools. We need an “InterOp” for X3D. Where everyone gets to try everyone else’s content. Neither X3D file generated validated with Schematron. Thanks for your ears. I understand that everyone has their own tools. There are additional requirements for maintaining standards. The internet wasn’t successful because everyone got a working LAN.
$ diff instantconverted.*json
7364c7364
< "@nodeField":"Ee",
---
> "@nodeField":Ee,
5685c5685
< "@nodeField":"Ee",
---
> "@nodeField":Ee,
On Dec 4, 2015, at 4:19 PM, John Carlson <yottzumm at gmail.com> wrote:
>
> I send this email from the wrong address. Resending.
>
> Also, I was able to convert the .wrl file to .x3d using the instant reality online converter and was able to view the result file in instant player on the mac. I will try to see if I can get instant player’s and cobweb’s x3d files to load in cobweb on my loader page. More research!
>
> John
>> Begin forwarded message:
>>
>> From: John Carlson <john.carlson3 at sbcglobal.net <mailto:john.carlson3 at sbcglobal.net>>
>> Date: December 4, 2015 at 3:52:54 PM CST
>> To: X3D Graphics public mailing list <x3d-public at web3d.org <mailto:x3d-public at web3d.org>>
>> Subject: Holger: trying to understand how to create valid X3D scripts that run in Cobweb
>>
>> In an attempt to understand why my scripts weren’t working in Cobweb, I went digging into Cobweb’s examples at:
>>
>> https://github.com/create3000/Library/tree/master/Examples/VRMLBanner <https://github.com/create3000/Library/tree/master/Examples/VRMLBanner>
>>
>> I opened the .wrl file in InstantPlayer, it worked fine. I tried to open the .x3d file in InstantPlayer, all kinds of errors. Does Cobweb run scripts in .x3d files or are they not supported and only scripts in .wrl files are supported? I didn’t see any kind of inclusion between the vrml banner.wrl and the vrml banner.x3d, so I assumed that they were equivalent converted examples. I will try my own conversion. I will also try to convert my scripts to .wrl and see if they run in cobweb. I didn’t see any problems with X3D XML scripts when checking for the to vrml conversion.
>>
>> What is the general level of support for VRMLScripting in XML? Not having looked at many scripts inside prototypes, I was suddenly surprised by all the connect statements. WOW! Frankly, I am surprised my scripts work at all.
>>
>> More research to do,
>>
>> John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20151204/0c65181c/attachment-0005.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: instantconverted.json
Type: application/json
Size: 436586 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20151204/0c65181c/attachment-0004.json>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20151204/0c65181c/attachment-0006.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: instantconverted.old.json
Type: application/json
Size: 436584 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20151204/0c65181c/attachment-0005.json>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20151204/0c65181c/attachment-0007.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vrmlbanner.json
Type: application/json
Size: 541948 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20151204/0c65181c/attachment-0006.json>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20151204/0c65181c/attachment-0008.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vrmlbanner.old.json
Type: application/json
Size: 541946 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20151204/0c65181c/attachment-0007.json>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20151204/0c65181c/attachment-0009.html>
More information about the x3d-public
mailing list