[x3d-public] json schema validation problem: "-children" commentsinside"head"element

Joe D Williams joedwil at earthlink.net
Sat Jul 2 15:56:37 PDT 2016


>                          "@center": [
                            0,
                            5
                          ],
                          "@rotation": 0.758,
                          "@scale": [
                            2,
                            0.5
                          ],

why is rotation different than center or scale?
Thanks, Joe
----- Original Message ----- 
From: "John Carlson" <yottzumm at gmail.com>
To: "Roy Walmsley" <roy.walmsley at ntlworld.com>
Cc: "X3D Graphics public mailing list" <x3d-public at web3d.org>
Sent: Saturday, July 02, 2016 5:02 AM
Subject: Re: [x3d-public] json schema validation problem: "-children" 
commentsinside"head"element


This is only in the prototype expander.  Now fairly sure there is a 
bug in my code.  The #comment in question in red, and I’m assuming it’s 
getting there because the textureTransform field did not get set:
"-appearance": {
                    "Appearance": {
                      "@DEF": 
"DECLDarkOak_INSTANCE_DarkOakAppearance",
                      "-children": [
                        {
                          "#comment": "textureTransform field IS 
exposed through the Prototype field interface with same name"
                        }
                      ],
                      "-textureTransform": {
                        "#comment": "NULL node as child"
                      },
                      "-material": {
                        "Material": {
                          "@diffuseColor": [
                            1,
                            0.45,
                            0.23
                          ]
                        }
                      },
                      "-texture": {
                        "ImageTexture": {
                          "@DEF": "DECLDarkOak_INSTANCE_wood_g",
                          "@url": [
                            "wood_g.jpg",
                            "http://www.web3d.org/x3d/content/examples/Vrml2.0Sourcebook/Chapter31-Prototypes/wood_g.jpg"
                          ]
                        }
                      }

Here’s a good one in the same file:

         "-textureTransform": {
                        "TextureTransform": {
                          "@center": [
                            0,
                            5
                          ],
                          "@rotation": 0.758,
                          "@scale": [
                            2,
                            0.5
                          ],
                          "@translation": [
                            0.5,
                            0
                          ]
                        }
                      },
>From the prototype expansion of:

examples/Vrml2.0Sourcebook/Chapter31-Prototypes/Figure31.5WoodAppearanceExternalPrototypes.json
Looking at the JSON, it looks like the node should appear like:

                      "-textureTransform": {
         “-children”: [ {
                        "#comment": "NULL node as child"
         }]
                      },

Which does pass schema without error. Why, I don’t know.  Is this the 
general way to get extra nodes into a containerField through JSON 
schema?  Roy?   Full prototype expanded file attached.

Hmm.
Sent from Mail for Windows 10

From: John Carlson


--------------------------------------------------------------------------------


> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
> 




More information about the x3d-public mailing list