{ "X3D": {
    "encoding":"UTF-8",
    "@profile":"Immersive",
    "@version":"3.0",
    "@xsd:noNamespaceSchemaLocation":"https://www.web3d.org/specifications/x3d-3.0.xsd",
    "JSON schema":"https://www.web3d.org/specifications/x3d-4.0-JSONSchema.autogenerated.json",
    "head": {
        "meta": [
          {
            "@name":"title",
            "@content":"ScriptNodeFieldControl_Java.x3d"
          },
          {
            "@name":"description",
            "@content":"Script node interface between VRML and Java: this conformance example tests field-based VRML-Java functionality."
          },
          {
            "@name":"creator",
            "@content":"Don Brutzman"
          },
          {
            "@name":"warning",
            "@content":"VRML97 script classes, not X3D Scene Authoring Interface (SAI)"
          },
          {
            "@name":"created",
            "@content":"30 November 1997"
          },
          {
            "@name":"translated",
            "@content":"8 July 2001"
          },
          {
            "@name":"modified",
            "@content":"20 October 2019"
          },
          {
            "@name":"Image",
            "@content":"ScriptEventPassingVrmlJava.png"
          },
          {
            "@name":"Image",
            "@content":"ScriptFieldInvocationVrmlJava.png"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Basic/ScriptConformance/ScriptNodeFieldControl_Java.x3d"
          },
          {
            "@name":"reference",
            "@content":"VRML 97 Specification, Annex B, Java platform scripting reference"
          },
          {
            "@name":"reference",
            "@content":"https://www.web3d.org/technicalinfo/specifications/vrml97/part1/java.html"
          },
          {
            "@name":"reference",
            "@content":"https://www.web3d.org/technicalinfo/specifications/vrml97/part1/java.html#B.5"
          },
          {
            "@name":"reference",
            "@content":"Don Brutzman, \"The Virtual Reality Modeling Language and Java,\" Communications of the ACM, vol. 41 no. 6, June 1998, pp. 57-64."
          },
          {
            "@name":"reference",
            "@content":"VrmlJavaPaper.pdf"
          },
          {
            "@name":"reference",
            "@content":"ScriptNodeFieldControl.java"
          },
          {
            "@name":"reference",
            "@content":"VRML97javadoc/index.html"
          },
          {
            "@name":"reference",
            "@content":"Makefile"
          },
          {
            "@name":"reference",
            "@content":"Makefile.out"
          },
          {
            "@name":"reference",
            "@content":"Vrml97ScriptNodePackages.jar"
          },
          {
            "@name":"reference",
            "@content":"ScriptNodeFieldControl_JavaConsoleOutput.txt"
          },
          {
            "@name":"reference",
            "@content":"ScriptNodeFieldControl_JavaSnapshots.html"
          },
          {
            "@name":"reference",
            "@content":"ScriptNodeFieldControl_EcmaScript.x3d"
          },
          {
            "@name":"subject",
            "@content":"VRML X3D Java Script conformance"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"license",
            "@content":"../license.html"
          },
          {
            "@name":"translated",
            "@content":"02 September 2025"
          },
          {
            "@name":"generator",
            "@content":"X3dToJson.xslt, https://www.web3d.org/x3d/stylesheets/X3dToJson.html"
          },
          {
            "@name":"reference",
            "@content":"X3D JSON encoding: https://www.web3d.org/wiki/index.php/X3D_JSON_Encoding"
          }
        ]
    },
    "Scene": {
        "-children":[
          { "WorldInfo":
            {
              "@title":"ScriptNodeFieldControl_Java.x3d"
            }
          },
          { "Viewpoint":
            {
              "@description":"View test",
              "@position":[0,0,12]
            }
          },
          { "Group":
            {
              "-children":[
                { "TouchSensor":
                  {
                    "@DEF":"ClickTextToTest",
                    "@description":"Click text to test"
                  }
                },
                { "Transform":
                  {
                    "@DEF":"TextPosition",
                    "-children":[
                      {
                        "#comment":"TextPosition translation is modified by InterfaceScriptNode."
                      },
                      { "Shape":
                        {
                          "-geometry":
                            { "Text":
                              {
                                "@DEF":"MessageToUser",
                                "@string":["Default text in VRML scene will be replaced by","Java initialize() in Script using field control.","This text appears first, if Java initialization fails.",""],
                                "-fontStyle":
                                  { "FontStyle":
                                    {
                                      "@justify":["MIDDLE","MIDDLE"],
                                      "@size":0.8
                                    }
                                  }
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@DEF":"TextMaterial",
                                      "@diffuseColor":[0.8,0.2,0.2],
                                      "@shininess":0.9
                                    }
                                  }
                              }
                            }
                        }
                      },
                      {
                        "#comment":"Selectable Text design pattern has transparent Box and TouchSensor description as a tooltip"
                      },
                      { "Shape":
                        {
                          "-geometry":
                            { "Box":
                              {
                                "@size":[15,4,0.001]
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@transparency":0.95
                                    }
                                  }
                              }
                            }
                        }
                      }
                    ]
                  }
                },
                {
                  "#comment":"Warning: VRML97-style scripting, not X3D Scene Authoring Interface (SAI)"
                },
                { "Script":
                  {
                    "@DEF":"InterfaceScriptNode",
                    "@directOutput":true,
                    "@url":["ScriptNodeFieldControl.class","https://www.web3d.org/x3d/content/examples/Basic/ScriptConformance/ScriptNodeFieldControl.class"],
                    "-children":[
                      {
                        "#comment":"No default values are allowed for eventIn or eventOut."
                      }
                    ],
                    "field": [
                      {
                        "@name":"startTime",
                        "@accessType":"inputOnly",
                        "@type":"SFTime"
                      },
                      {
                        "@name":"sceneText",
                        "@accessType":"initializeOnly",
                        "@type":"SFNode",
                        "-children":[
                          { "Text":
                            {
                              "@USE":"MessageToUser"
                            }
                          }
                        ]
                      },
                      {
                        "@name":"sceneTransform",
                        "@accessType":"initializeOnly",
                        "@type":"SFNode",
                        "-children":[
                          { "Transform":
                            {
                              "@USE":"TextPosition"
                            }
                          }
                        ]
                      },
                      {
                        "@name":"sceneMaterial",
                        "@accessType":"initializeOnly",
                        "@type":"SFNode",
                        "-children":[
                          { "Material":
                            {
                              "@USE":"TextMaterial"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "ROUTE":
            {
              "@fromField":"touchTime",
              "@fromNode":"ClickTextToTest",
              "@toField":"startTime",
              "@toNode":"InterfaceScriptNode"
            }
          }
        ]
    }
  }
}