[x3d-public] Possible error in X3dToNodeJS.xslt?

John Carlson yottzumm at gmail.com
Fri May 29 10:43:12 PDT 2020


This line from my serialized code does the trick.  Let's revisit how to do
this in X3dToNodeJS.xslt on Monday.

        .addLayerSet((new
autoclass.LayerSet()).setDEF("scene.addChildLayerSetTest"))

Will now check in my "repairs."

John

On Fri, May 29, 2020 at 12:22 PM John Carlson <yottzumm at gmail.com> wrote:

> java -cp ../jars/X3DJSAIL.4.0.full.jar org.web3d.x3d.jsail.CommandLine
> examples/HelloWorldProgramOutput.x3d -tojs -toFile
> examples/HelloWorldProgramOutput.Node.js
> parameter: source file HelloWorldProgramOutput.x3d filesize 22317 bytes
> CommandLine parameter: "-tojs" for conversion to X3DJSONLD JavaScript
> source
> CommandLine parameter: "-toFile"
> "examples/HelloWorldProgramOutput.Node.js" for result file name root
> examples/HelloWorldProgramOutput.Node
> Parsing using Document Object Model (DOM) based X3DLoaderDOM...
> [X3DLoaderDOM] <meta name='info' content='continued development and
> testing in progress'/>
> convert to JS JavaScript:
> Warning: toFileStylesheetConversion(X3dToNodeJS.xslt) is overwriting prior
> file examples/HelloWorldProgramOutput.Node.js
> className='HelloWorldProgramOutput.Node' has illegal character(s) ( -.,;)
> replaced with '_' underscore character.
> newClassName='HelloWorldProgramOutput_Node'
> file conversion successful: HelloWorldProgramOutput.Node.js (37121 bytes)
>
> coderextreme at DESKTOP-DOPK2VD MINGW64 /c/x3d-code/
> www.web3d.org/x3d/stylesheets/java/node
> $ node examples/HelloWorldProgramOutput.Node.js
> C:\x3d-code\www.web3d.org
> \x3d\stylesheets\java\node\examples\HelloWorldProgramOu
> tput.Node.js:176
>     .addChild((new autoclass.LayerSet("scene.addChildLayerSetTest")))
>      ^
>
> Error: Could not find method
> "addChild(org.web3d.x3d.jsail.Layering.LayerSetObje
> ct)" on class "class org.web3d.x3d.jsail.Core.SceneObject". Possible
> matches:
>   public org.web3d.x3d.jsail.Core.SceneObject
> org.web3d.x3d.jsail.Core.SceneObje
> ct.addChild(org.web3d.x3d.sai.Core.X3DChildNode)
>
>     at HelloWorldProgramOutput_Node.initialize (C:\x3d-code\www.web3d.org
> \x3d\st
> ylesheets\java\node\examples\HelloWorldProgramOutput.Node.js:176:6)
>     at new HelloWorldProgramOutput_Node (C:\x3d-code\www.web3d.org
> \x3d\styleshee
> ts\java\node\examples\HelloWorldProgramOutput.Node.js:123:10)
>     at Object.<anonymous> (C:\x3d-code\www.web3d.org
> \x3d\stylesheets\java\node\e
> xamples\HelloWorldProgramOutput.Node.js:484:1)
> ?[90m    at Module._compile (internal/modules/cjs/loader.js:1176:30)?[39m
> ?[90m    at Object.Module._extensions..js
> (internal/modules/cjs/loader.js:1196:1
> 0)?[39m
> ?[90m    at Module.load (internal/modules/cjs/loader.js:1040:32)?[39m
> ?[90m    at Function.Module._load
> (internal/modules/cjs/loader.js:929:14)?[39m
> ?[90m    at Function.executeUserEntryPoint [as runMain]
> (internal/modules/run_ma
> in.js:71:12)?[39m
> ?[90m    at internal/main/run_main_module.js:17:47?[39m
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200529/75afad5f/attachment.html>


More information about the x3d-public mailing list