[x3d-public] Yay! Bug fixed!

John Carlson yottzumm at gmail.com
Thu May 28 16:05:51 PDT 2020


Found a bug in:

www.web3d.org/x3d/stylesheets/java/node!

I believe this is due to X3DJSAIL no longer emitting JavaScript.

We can either delete the example from the build, or add the
X3dToNodeJS.xslt to the to*JavaScript() functions in X3DJSAIL (recommended):

$ grep -i javascript'('  CreateX3dSceneAccessInterfaceJava.xslt|grep public
        public String toStringJavaScript()
    public File toFileJavaScript(String fileName)

This is a effort replace the nashorn output from X3DJSAIL.   We are now
supporting nodejs instead since Nashorn has been deprecated by Oracle.

I kind of think the main purpose of the nodejs output is to have a
alternate to Java for things like large methods.  Plus, we don't have a
good python-X3DJSAIL solution.

It's a good test of the FFI, and supports node.js processing on the server,
for those that choose that route.

The solution on the browser is to write an es6 x3d.mjs library (TBD--partly
done).

Thanks,

John

On Thu, May 28, 2020 at 5:37 PM John Carlson <yottzumm at gmail.com> wrote:

> I fixed the bug in
>
> www.web3d.org/x3d/stylesheets/java/node!
>
> Diff:
>
> $ svn diff examples/HelloWorldProgramOutput.js
> Index: examples/HelloWorldProgramOutput.js
> ===================================================================
> --- examples/HelloWorldProgramOutput.js (revision 30476)
> +++ examples/HelloWorldProgramOutput.js (working copy)
> @@ -19,7 +19,7 @@
>  var ProtoInstance4 = null;
>  var ProtoInstance5 = null;
>  var ProtoInstance6 = null;
> -      var X3D0 =  new
> autoclass.X3D().setProfile("Immersive").setVersion("3.3")
> +      var X3D0 =  (new
> autoclass.X3D()).setProfile("Immersive").setVersion("3.3")
>        .addComments(new autoclass.CommentsBlock(" x3dVersionComparisonTest
> for this model: supportsX3dVersion(X3DObject.VERSION_3_0)=true "))
>        .setHead(new autoclass.head()
>          .addComments(new autoclass.CommentsBlock(" comment #1 "))
>
> Will check in soon.
>
> I believe this is a problem with the X3dToNodeJS.xslt.  If you want Don, I
> can go ahead and repair the stylesheet as well, but awaiting your
> permission.
>
> Thanks,
>
> John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200528/f12d7faf/attachment.html>


More information about the x3d-public mailing list