{ "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":"WheelsRearLeftExample.x3d"
          },
          {
            "@name":"description",
            "@content":"An animation example of rear left wheels and axle Prototype. Clicking the axle triggers an animation for gear to go up or gear down on rear left wheels and axle."
          },
          {
            "@name":"creator",
            "@content":"Etsuko Lippi"
          },
          {
            "@name":"created",
            "@content":"18 October 2001"
          },
          {
            "@name":"modified",
            "@content":"20 October 2019"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/F18BlueAngelUnitedStates/WheelsRearLeftExample.x3d"
          },
          {
            "@name":"subject",
            "@content":"rear wheels' animation, gear up and down"
          },
          {
            "@name":"license",
            "@content":"../../license.html"
          },
          {
            "@name":"translated",
            "@content":"21 April 2026"
          },
          {
            "@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":"WheelsRearLeftExample.x3d"
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"WheelsRearLeft",
              "@url":["WheelsRearLeftPrototype.x3d#WheelsRearLeft","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/F18BlueAngelUnitedStates/WheelsRearLeftPrototype.x3d#WheelsRearLeft","WheelsRearLeftPrototype.wrl#WheelsRearLeft","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/F18BlueAngelUnitedStates/WheelsRearLeftPrototype.wrl#WheelsRearLeft"],
              "field": [
                {
                  "@name":"gearup",
                  "@accessType":"inputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"gearupOut",
                  "@accessType":"outputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"animationStartTime",
                  "@accessType":"inputOnly",
                  "@type":"SFTime"
                },
                {
                  "@name":"traceEnabled",
                  "@accessType":"initializeOnly",
                  "@type":"SFBool"
                }
              ]
            }
          },
          { "Background":
            {
              "@skyColor":[0.7,0.7,0.7]
            }
          },
          { "Group":
            {
              "-children":[
                { "Transform":
                  {
                    "@DEF":"GearUpDown",
                    "-children":[
                      { "Script":
                        {
                          "@DEF":"ExampleSelectionScript",
                          "field": [
                            {
                              "@name":"landed",
                              "@accessType":"initializeOnly",
                              "@type":"SFInt32",
                              "@value":-1
                            },
                            {
                              "@name":"enabled",
                              "@accessType":"inputOnly",
                              "@type":"SFBool"
                            },
                            {
                              "@name":"status",
                              "@accessType":"outputOnly",
                              "@type":"SFBool"
                            }
                          ],
                          "#sourceCode":[
"",
"",
"ecmascript:",
"",
"function tracePrint (outputString)",
"{",
"\tvar traceEnabled = false;",
"\tif (traceEnabled) Browser.println ('[trace] ' + outputString);",
"}",
"",
"function enabled(value, timeStamp) {",
"",
"\ttracePrint('enabled = ' + value);",
"\tif (value == true)",
"\t{",
"\t\tif (landed == -1)",
"\t\t{\t\t\t",
"                        status = false;",
"                        landed = 0;\t\t\t",
"\t\t}",
"",
"\t\tif (landed == 0)",
"\t\t{",
"\t\t\tif (status)",
"\t\t\t{",
"\t\t\t\tstatus = false;                               ",
"\t\t\t}",
"\t\t\telse",
"\t\t\t{",
"\t\t\t\tstatus = true;                               \t\t\t",
"\t\t\t}",
"\t\t}",
"",
"                else",
"                {",
"         \t\tlanded = 0;",
"     \t\t\treturn;",
"                }",
"\t}",
"\t//print ('status = ' + status);",
"}",
"",
""
]
                        }
                      }
                    ]
                  }
                },
                { "TouchSensor":
                  {
                    "@DEF":"GearUpDownTouchSensor",
                    "@description":"click for gears up/down"
                  }
                },
                { "ProtoInstance":
                  {
                    "@name":"WheelsRearLeft",
                    "@DEF":"WP",
                    "fieldValue": [
                      {
                        "@name":"traceEnabled",
                        "@value":true
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "ROUTE":
            {
              "@fromField":"touchTime",
              "@fromNode":"GearUpDownTouchSensor",
              "@toField":"animationStartTime",
              "@toNode":"WP"
            }
          },
          { "ROUTE":
            {
              "@fromField":"isActive",
              "@fromNode":"GearUpDownTouchSensor",
              "@toField":"enabled",
              "@toNode":"ExampleSelectionScript"
            }
          },
          { "ROUTE":
            {
              "@fromField":"status",
              "@fromNode":"ExampleSelectionScript",
              "@toField":"gearup",
              "@toNode":"WP"
            }
          }
        ]
    }
  }
}