[x3d-public] X3DJSAIL updates

John Carlson yottzumm at gmail.com
Sun Dec 17 10:39:08 PST 2017


I have a mapping, but I believe it’s not taking effect.  There are many other possible methods, and -material should be specified.

But first, fix toStringJava()

John

Sent from Mail for Windows 10

From: John Carlson
Sent: Sunday, December 17, 2017 1:29 PM
To: Don Brutzman
Cc: X3D Graphics public mailing list
Subject: RE: [x3d-public] X3DJSAIL updates

I believe this happens because -children is generated instead of -material in the Java -> JSON generation.   I don’t believe -children is valid at this point, since addChild is also unavailable. (See Java code generated from HelloWorldProgramOutput.java—does not compile).

Also getting error at toStringJava, so I can’t really test anything—fix this first, then get back to me):

test-nashorn:
    [javac] Compiling 2 source files to C:\x3d-code\www.web3d.org\x3d\stylesheets\java\classes
    [javac] C:\x3d-code\www.web3d.org\x3d\stylesheets\java\examples\HelloWorldProgram.java:193: error: cannot find symbol
    [javac]                     System.out.println (x3dModel.toStringJava());
   [javac]                                                 ^
    [javac]   symbol:   method toStringJava()
    [javac]   location: variable x3dModel of type X3DObject
    [javac] 1 error

This does not produce anything or errors:

$ java -cp "java/examples;java/jars/X3DJSAIL.3.3.full.jar" HelloWorldProgramOutput java foo.java
HelloWorldProgramOutput self-validation test results: success

Please advise as to correct invocation.  Thanks!

I will try to add a mapping from -children to -material.  I don’t think this is correct though, and will cause issues.

John

Sent from Mail for Windows 10

From: Don Brutzman
Sent: Sunday, December 17, 2017 11:45 AM
To: John Carlson
Cc: X3D Graphics public mailing list
Subject: Re: [x3d-public] X3DJSAIL updates

On 12/16/2017 11:47 PM, John Carlson wrote:
> $ jjs -cp ../../java/jars/X3DJSAIL.3.3.full.jar HelloWorldProgramOutput.js
> 
> HelloWorldProgramOutput.js:128 TypeError: new AppearanceObject().setDEF("TestAppearance1").setProtoInstance is not a function
  
correct, .setProtoInstance is not a function

see AppearanceObject javadoc for provided methods.  You won't find any setProtoInstance() methods anywhere, rather look for setMaterial(new ProtoInstanceObject()) methods.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20171217/926bf9f3/attachment-0001.html>


More information about the x3d-public mailing list