[x3d-public] Somewhat significant change to X3DUOM 3.3 causes X3D JSON schema 3.3 to reject files (please fix X3DOM if you can).

John Carlson yottzumm at gmail.com
Thu May 27 22:19:55 PDT 2021


I have been unable to build X3DJSAIL, so this may be water under the 
bridge.  The main problem appears to be the JSON stylesheet generation.


Okay, only a couple of handfuls of my JSON files are affected. Firefox 
reports:

"TypeError: this._cf.back.node is null" in an alert.

X_ITE seems somewhat okay, but my shapes are all white and spheres.   It 
looks pretty much like that the shaders didn't get applied.

I will try Chrome next.

It reports:

"TypeError: Cannot read property '_vf' of null"


Also there appears to be an issue with JSON generation:


coderextreme at coderextreme-Kubuntu20:~/X3DJSONLD/src/main/data$ grep 
bottomTexture ball.json
                                 "-bottomTexture":
coderextreme at coderextreme-Kubuntu20:~/X3DJSONLD/src/main/data$ grep 
bottomTexture ball.new.json
coderextreme at coderextreme-Kubuntu20:~/X3DJSONLD/src/main/data$


Note the missing bottomTexture in the JSON file generated from my Java 
file.  So somehow, the setBottomTexture is not working.  See below JSON

See this JSON code in ball.new.json (note, this file does not pass 
jsonlint. After JSON generation, the JSON should be parsed for 
correctness (hint for extension to X3DJSAIL).  jsondiff.js reports this, 
but apparently there was a driver error and I missed seeing it for quite 
a while.

  { "ComposedCubeMapTexture":
                               {
                                 "@DEF":"texture",
                                 "-backTexture":
                                   { "ImageTexture":
                                     {
"@url":["../resources/images/all_probes/stpeters_cross/stpeters_back.png","https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_back.png"]
                                     }
                                   },
                                   { "ImageTexture":
                                     {
"@url":["../resources/images/all_probes/stpeters_cross/stpeters_bottom.png","https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_bottom.png"]
                                     }
                                   },
                                   { "ImageTexture":
                                     {
"@url":["../resources/images/all_probes/stpeters_cross/stpeters_front.png","https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_front.png"]
                                     }
                                   },
                                   { "ImageTexture":
                                     {
"@url":["../resources/images/all_probes/stpeters_cross/stpeters_left.png","https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_left.png"]
                                     }
                                   },
                                   { "ImageTexture":
                                     {
"@url":["../resources/images/all_probes/stpeters_cross/stpeters_right.png","https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_right.png"]
                                     }
                                   },
                                   { "ImageTexture":
                                     {
"@url":["../resources/images/all_probes/stpeters_cross/stpeters_top.png","https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_top.png"]
                                     }
                                   }
                               }
                             }

Here are the errors from jsondiff.js

RIGHT FILE ../data/ball.new.json SyntaxError: Unexpected token { in JSON 
at position 14380 ../data/ball.json ../data/ball.new.json
RIGHT FILE ../data/bubbles.new.json SyntaxError: Unexpected token { in 
JSON at position 9911 ../data/bubbles.json ../data/bubbles.new.json
RIGHT FILE ../data/bub.new.json SyntaxError: Unexpected token { in JSON 
at position 14144 ../data/bub.json ../data/bub.new.json
RIGHT FILE ../data/flowerproto.new.json SyntaxError: Unexpected token { 
in JSON at position 10402 ../data/flowerproto.json 
../data/flowerproto.new.json
RIGHT FILE ../data/flowers4.new.json SyntaxError: Unexpected token { in 
JSON at position 6963 ../data/flowers4.json ../data/flowers4.new.json
RIGHT FILE ../data/flowers7.new.json SyntaxError: Unexpected token { in 
JSON at position 13858 ../data/flowers7.json ../data/flowers7.new.json
RIGHT FILE ../data/flowers.new.json SyntaxError: Unexpected token { in 
JSON at position 16168 ../data/flowers.json ../data/flowers.new.json
RIGHT FILE ../data/geo.new.json SyntaxError: Unexpected token { in JSON 
at position 9712 ../data/geo.json ../data/geo.new.json
RIGHT FILE ../data/mirror2.new.json SyntaxError: Unexpected token { in 
JSON at position 10111 ../data/mirror2.json ../data/mirror2.new.json
RIGHT FILE ../data/mirror.new.json SyntaxError: Unexpected token { in 
JSON at position 10979 ../data/mirror.json ../data/mirror.new.json

I am attaching an original file for your testing.


I have been unable to rebuild X3DJSAIL, and I don't know if the 
stylesheets are used from the jar or not.


The XML generated from a node.js app seems to have too many backTextures:

~/X3DJSONLD/src/main/data$ grep backTexture ball.new.x3d
             <ImageTexture containerField='backTexture' 
url='"../resources/images/all_probes/stpeters_cross/stpeters_back.png" 
"https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_back.png"'/>
             <ImageTexture containerField='backTexture' 
url='"../resources/images/all_probes/stpeters_cross/stpeters_bottom.png" 
"https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_bottom.png"'/>
             <ImageTexture containerField='backTexture' 
url='"../resources/images/all_probes/stpeters_cross/stpeters_front.png" 
"https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_front.png"'/>
             <ImageTexture containerField='backTexture' 
url='"../resources/images/all_probes/stpeters_cross/stpeters_left.png" 
"https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_left.png"'/>
             <ImageTexture containerField='backTexture' 
url='"../resources/images/all_probes/stpeters_cross/stpeters_right.png" 
"https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_right.png"'/>
             <ImageTexture containerField='backTexture' 
url='"../resources/images/all_probes/stpeters_cross/stpeters_top.png" 
"https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_top.png"'/>


There will probably be more things forth coming.

I guess my monthly volunteer time has started.

John

On 5/27/21 10:52 PM, John Carlson wrote:
> A somewhat significant change to X3DUOM 3.3 causes generated X3D JSON 
> schema 3.3 to reject files.
>
> That is, there is no longer a bottomTexture, topTexture, frontTexture, 
> etc. for ComposedCubeMapTexture.  Instead, "Texture" is left off of 
> these fields.
>
>
> 4.0 has the Texture added.
>
>
> 2 suggestions:
>
> Update your files to X3D4.
>
> OR:
>
> Add these fields to X3DUOM 3.3 or find some way to get the old fields 
> into X3D JSON schema 3.3 during schema generation (help!).
>
> I am not sure what the standard or the browsers do at this point.
>
> I'm upgrading my files to X3D4 and see if they work in various browsers.
>
> Help!
>
> John
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ball.x3d
Type: model/x3d+xml
Size: 9471 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20210528/a210bb8f/attachment-0001.x3d>


More information about the x3d-public mailing list