[x3d-public] -textureTransform -children fails to validate

John Carlson yottzumm at gmail.com
Thu Jul 14 16:27:55 PDT 2016


Roy,

The following JSON fails to validate, I think, at this point:

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

Likely more work needs to be done on the JSON schema and SFNode node fields.  I believe this is how you told me to do it this morning, so please advise.  Note that this is version 3.0, but I am validating with 3.3, I hope, it’s hard to tell, I cleared the 3.0 schema out of my browser.  It would probably be best if you validated against 3.3 yourself.  The error report failure is popping up (-children is an unexpected additional property), so…

Thanks,

John

{
  "X3D": {
    "encoding": "UTF-8",
    "@profile": "Immersive",
    "@version": "3.0",
    "@xsd:noNamespaceSchemaLocation": "http://www.web3d.org/specifications/x3d-3.0.xsd",
    "JSON schema": "http://www.web3d.org/specifications/x3d-3.3-JSONSchema.json",
    "head": {
      "meta": [
        {
          "@name": "title",
          "@content": "Figure31.4WoodAppearancePrototypesLibrary.x3d"
        },
        {
          "@name": "creator",
          "@content": "Figure 31.4, The VRML 2.0 Sourcebook, Copyright [1997] By Andrea L. Ames, David R. Nadeau, and John L. Moreland"
        },
        {
          "@name": "reference",
          "@content": "http://www.wiley.com/legacy/compbooks/vrml2sbk/ch31/31fig04.htm"
        },
        {
          "@name": "translator",
          "@content": "Don Brutzman"
        },
        {
          "@name": "created",
          "@content": "31 October 2000"
        },
        {
          "@name": "modified",
          "@content": "28 May 2016"
        },
        {
          "@name": "description",
          "@content": "An external file containing an appearance library with wood appearances."
        },
        {
          "@name": "identifier",
          "@content": "http://www.web3d.org/x3d/content/examples/Vrml2.0Sourcebook/Chapter31-Prototypes/Figure31.4WoodAppearancePrototypesLibrary.x3d"
        },
        {
          "@name": "generator",
          "@content": "X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit"
        },
        {
          "@name": "license",
          "@content": "../../license.html"
        },
        {
          "@name": "translated",
          "@content": "02 July 2016"
        },
        {
          "@name": "generator",
          "@content": "X3dToJson.xslt, http://www.web3d.org/x3d/stylesheets/X3dToJson.html"
        },
        {
          "@name": "warning",
          "@content": "An experimental version of X3D JSON encoding is used for this scene.  Status online at http://www.web3d.org/wiki/index.php/X3D_JSON_Encoding"
        }
      ]
    },
    "Scene": {
      "-children": [
        {},
        {},
        {
          "#comment": "It is a good practice to include default message linking to an example scene, in case a user tries to view this Prototype library directly."
        },
        {
          "Anchor": {
            "@description": "Figure31.5WoodAppearanceExternalPrototypes link",
            "@url": [
              "Figure31.5WoodAppearanceExternalPrototypes.x3d",
              "http://www.web3d.org/x3d/content/examples/Vrml2.0Sourcebook/Chapter31-Prototypes/Figure31.5WoodAppearanceExternalPrototypes.x3d",
              "Figure31.5WoodAppearanceExternalPrototypes.wrl",
              "http://www.web3d.org/x3d/content/examples/Vrml2.0Sourcebook/Chapter31-Prototypes/Figure31.5WoodAppearanceExternalPrototypes.wrl"
            ],
            "-children": [
              {
                "Shape": {
                  "-geometry": {
                    "Text": {
                      "@string": [
                        "Figure31.4WoodAppearancePrototypesLibrary",
                        "contains prototype definitions",
                        "",
                        "Click on text to see these Appearances in",
                        "Figure31.5WoodAppearanceExternalPrototypes"
                      ],
                      "-fontStyle": {
                        "FontStyle": {
                          "@justify": [
                            "MIDDLE",
                            "MIDDLE"
                          ],
                          "@size": 0.5
                        }
                      }
                    }
                  },
                  "-appearance": {
                    "Appearance": {
                      "@DEF": "DECLLightOak_INSTANCE_LightOakAppearance",
                      "-children": [
                        {
                          "#comment": "textureTransform field IS exposed through the Prototype field interface with same name"
                        },
                        {
                          "#comment": "Note that each prototype declaration has independent scope, and so DEF/USE is not possible for sharing. DEF remains a good way to identify the image file however."
                        }
                      ],
                      "-textureTransform": {
                        "-children": [
                          {
                            "#comment": "NULL node as child"
                          }
                        ]
                      },
                      "-material": {
                        "Material": {
                          "@diffuseColor": [
                            1,
                            0.65,
                            0.53
                          ]
                        }
                      },
                      "-texture": {
                        "ImageTexture": {
                          "@DEF": "DECLLightOak_INSTANCE_wood_g_scope2",
                          "@url": [
                            "../Chapter17-Textures/wood_g.jpg",
                            "http://www.web3d.org/x3d/content/examples/Vrml2.0Sourcebook/Chapter17-Textures/wood_g.jpg"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            ]
          }
        }
      ]
    }
  }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160714/1ea846bb/attachment-0001.html>


More information about the x3d-public mailing list