[x3d-public] (My sincerest apologies!) debugging X3DJSONLD withlatest X_ITE

John Carlson yottzumm at gmail.com
Sun Sep 22 18:00:03 PDT 2019


Don,

I just tried the validator on flowers2.x3d, and got the following:

<Script DEF='OrbitScript'> <field name='g' accessType='outputOnly'/> cannot define function g() unless accessType is inputOnly or inputOutput[/X3D/Scene/Group/ProtoDeclare/ProtoBody/Group/Script/field[6], error] <ProtoInstance name='orbit' DEF=''> <fieldValue name='translation' value='-8 0 0'/> with defined type='SFVec3f' accessType='inputOutput' has default value and is optional [/X3D/Scene/Group/ProtoInstance[1]/fieldValue[1], hint] <ProtoInstance name='orbit' DEF=''> <fieldValue name='diffuseColor' value='1 0.5 0'/> with defined type='SFColor' accessType='inputOutput' has default value and is optional [/X3D/Scene/Group/ProtoInstance[1]/fieldValue[2], hint] <ProtoInstance name='orbit' DEF=''> <fieldValue name='specularColor' value='1 0.5 0'/> with defined type='SFColor' accessType='inputOutput' has default value and is optional [/X3D/Scene/Group/ProtoInstance[1]/fieldValue[3], hint] <ProtoInstance name='orbit' DEF=''> <fieldValue name='transparency' value='0.75'/> with defined type='SFFloat' accessType='inputOutput' has default value and is optional [/X3D/Scene/Group/ProtoInstance[1]/fieldValue[4], hint] Error(s) detected during this validation test. X3D Schematron check: fail. Good practice is to fix errors and warnings wherever possible, and consider silencing harmless informational messages, so that important indicators remain noticeable.

The error that appears seems strange.  g is an output variable from my script. I could make it inputOutput, but that’s confusing.

Flowers2.x3d and Flowers2.json are attached.

The validation error shown is on flowers.json, so I’m suspecting some problem in the ProtoExpander for X3DOM.  No validation error shows on index.html for flowers.json with proto expansion on.  Hmm.  Hmm. Prototypes.html uses the dev distribution version of x3dom while index.html uses my version.  The proto expanders are somewhat different between the two.  Hmm. Hmm.

Flowers.x3d and flowers.json are attached.
Guess I’ll have to sleep on it or something.

I am feeling the main problem may be with coordIndex in flowers2.x3d, since it doesn’t display with X_ITE in index.html

I totally agree that the coordIndex problem is mine.

Thanks,

John

Sent from Mail for Windows 10

From: Brutzman, Donald (Don) (CIV)
Sent: Sunday, September 22, 2019 5:57 PM
To: John Carlson; Holger Seelig
Cc: x3d-public at web3d.org
Subject: Re: [x3d-public] (My sincerest apologies!) debugging X3DJSONLD withlatest X_ITE

(First: original posts were extremely large... please use links for big things like that next time.)

John, here are several suggestions.

Have you tried X3D Validator on XML form of your model yet?

	X3D Validator
	https://savage.nps.edu/X3dValidator

X3D Tooltips have lots of information too.

	X3D Tooltips: IndexedFaceSet
	https://www.web3d.org/x3d/tooltips/X3dTooltips.html#IndexedFaceSet

X3DJSAIL can help with conversion if needed (though still needs .json import), also has internal validation complementing X3D Validator:

	X3D Java Scene Access Interface Library (X3DJSAIL)
	https://www.web3d.org/specifications/java/X3DJSAIL.html

IFS is perhaps the most common and long-running node so need for a specification change is quite unlikely.

"Divide and conquer" is a good way to debug issues.  Suggest you work on individual pages before smashups.  It is also popping up an error console, but the text is not copyable, so screenshot attached.

You can find a few thousand examples using X_ITE in the X3D Example Archives, if you think the conversion patterns can be improved then am happy to apply changes.

	X3D Resources, Examples: Scene Archives for X3D
	https://www.web3d.org/x3d/content/examples/X3dResources.html#Examples

	https://www.web3d.org/x3d/content/examples/HelloWorldX_ITE.html

Echoing: good luck.

On 9/22/2019 11:33 AM, John Carlson wrote:
> I have recently added
> 
>          "component": [
> 
>            {
> 
>              "@name":"Scripting",
> 
>              "@level":1
> 
>            }
> 
>          ],
> 
> To the head of my JSON files.
> 
> 
> I still get the following error.
> 
> Please assist me if possible.
> 
> I have had difficulty with PROFILE Full in the past with some browsers, so I am reluctant to add that.
> 
> It should not throw an error with the correct component?
> 
> I have left the initialization error in place.  I’ve upgraded the files on coderextreme.net to have a Scripting component, but not fixed the initialize error as previously mentioned.  Would you recommend not initializing the coordIndex component?
> 
> Perhaps I should issue a standards change request?
> 
> Thanks!
> 
> John
> 
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
> 
> *From: *Holger Seelig <mailto:holger.seelig at googlemail.com>
> *Sent: *Sunday, September 22, 2019 1:32 AM
> *To: *John Carlson <mailto:yottzumm at gmail.com>; X3D Graphics public mailing list <mailto:x3d-public at web3d.org>
> *Subject: *Re: My sincerest apologies!
> 
> Hey John,
> 
> If you get errors like this:
> 
> x_ite.min.js:19 XML Parser Error: Unkown node type 'Script'.
> 
> then you have insufficient component/profile statement.
> 
> add 'COMPONENT Scripting:1'
> 
> or for convenience
> 
> add 'PROFILE Full'
> 
> to your X3D file.
> 
> 
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
> 


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190922/8af177aa/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flowers2.x3d
Type: application/octet-stream
Size: 6384 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190922/8af177aa/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flowers2.json
Type: application/json
Size: 17073 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190922/8af177aa/attachment-0002.json>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flowers.json
Type: application/json
Size: 27496 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190922/8af177aa/attachment-0003.json>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flowers.x3d
Type: application/octet-stream
Size: 11098 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190922/8af177aa/attachment-0003.obj>


More information about the x3d-public mailing list