{ "X3D": {
    "encoding":"UTF-8",
    "@profile":"Immersive",
    "@version":"3.3",
    "@xsd:noNamespaceSchemaLocation":"https://www.web3d.org/specifications/x3d-3.3.xsd",
    "JSON schema":"https://www.web3d.org/specifications/x3d-4.0-JSONSchema.autogenerated.json",
    "head": {
        "meta": [
          {
            "@name":"title",
            "@content":"TimeOfDay.x3d"
          },
          {
            "@name":"creator",
            "@content":"Joe Roth"
          },
          {
            "@name":"created",
            "@content":"29 December 2000"
          },
          {
            "@name":"modified",
            "@content":"20 October 2019"
          },
          {
            "@name":"description",
            "@content":"Control scene lighting to simulate time of day, and also modify Fog for visibility."
          },
          {
            "@name":"warning",
            "@content":"Fog affects 3D objects but not background in scene."
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Savage/Environment/TimeOfDay/TimeOfDay.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"license",
            "@content":"../../license.html"
          },
          {
            "@name":"translated",
            "@content":"26 March 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":"TimeOfDay.x3d"
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"ClockMechanism",
              "@url":["ClockMechanismPROTO.x3d#ClockMechanism","https://www.web3d.org/x3d/content/examples/Savage/Environment/TimeOfDay/ClockMechanismPROTO.x3d#ClockMechanism","ClockMechanismPROTO.wrl#ClockMechanism","https://www.web3d.org/x3d/content/examples/Savage/Environment/TimeOfDay/ClockMechanismPROTO.wrl#ClockMechanism","http://www.cgrg.ohio-state.edu/%257Epgerstma/protolib/protolib/ClockMechanism/ClockMechanismPROTO.wrl#ClockMechanism"],
              "field": [
                {
                  "@name":"set_hour",
                  "@accessType":"inputOnly",
                  "@type":"SFInt32"
                },
                {
                  "@name":"set_minute",
                  "@accessType":"inputOnly",
                  "@type":"SFInt32"
                },
                {
                  "@name":"set_second",
                  "@accessType":"inputOnly",
                  "@type":"SFInt32"
                },
                {
                  "@name":"autoClock",
                  "@accessType":"initializeOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"hour",
                  "@accessType":"initializeOnly",
                  "@type":"SFInt32"
                },
                {
                  "@name":"minute",
                  "@accessType":"initializeOnly",
                  "@type":"SFInt32"
                },
                {
                  "@name":"second",
                  "@accessType":"initializeOnly",
                  "@type":"SFInt32"
                },
                {
                  "@name":"hourHandAxis",
                  "@accessType":"initializeOnly",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"minuteHandAxis",
                  "@accessType":"initializeOnly",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"secondHandAxis",
                  "@accessType":"initializeOnly",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"twentyFourHours",
                  "@accessType":"initializeOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"hour_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFInt32"
                },
                {
                  "@name":"minute_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFInt32"
                },
                {
                  "@name":"second_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFInt32"
                },
                {
                  "@name":"hourHand_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFRotation"
                },
                {
                  "@name":"minuteHand_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFRotation"
                },
                {
                  "@name":"secondHand_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFRotation"
                },
                {
                  "@name":"hourpercent_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFFloat"
                }
              ]
            }
          },
          { "ProtoInstance":
            {
              "@name":"ClockMechanism",
              "@DEF":"ClockMechanism"
            }
          },
          {
            "#comment":"Note headlight turned off in NavigationInfo. Most browsers allow user toggling headlight also."
          },
          {
            "#comment":"This NavigationInfo node is bound at runtime and overrides the NavigationInfo headlight setting within the Inlined scene."
          },
          { "Background":
            {
              "@groundColor":[0,0,0]
            }
          },
          { "Background":
            {
              "@backUrl":["urn:web3d:media:textures/panoramas/ocean_3_back.jpg","../../../Basic/UniversalMediaPanoramas/ocean_3_back.jpg","https://www.web3d.org/WorkingGroups/media/textures/panoramas/ocean_3_back.jpg","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaPanoramas/ocean_3_back.jpg","http://www.web3dmedia.com/UniversalMedia/textures/panoramas/ocean_3_back.jpg","http://www.officetowers.com/UniversalMedia/textures/panoramas/ocean_3_back.jpg","http://geometrek.com/UniversalMedia/textures/panoramas/ocean_3_back.jpg","http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/ocean_3_back.jpg"],
              "@bottomUrl":["urn:web3d:media:textures/panoramas/ocean_3_bottom.jpg","../../../Basic/UniversalMediaPanoramas/ocean_3_bottom.jpg","https://www.web3d.org/WorkingGroups/media/textures/panoramas/ocean_3_bottom.jpg","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaPanoramas/ocean_3_bottom.jpg","http://www.web3dmedia.com/UniversalMedia/textures/panoramas/ocean_3_bottom.jpg","http://www.officetowers.com/UniversalMedia/textures/panoramas/ocean_3_bottom.jpg","http://geometrek.com/UniversalMedia/textures/panoramas/ocean_3_bottom.jpg","http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/ocean_3_bottom.jpg"],
              "@frontUrl":["urn:web3d:media:textures/panoramas/ocean_3_front.jpg","../../../Basic/UniversalMediaPanoramas/ocean_3_front.jpg","https://www.web3d.org/WorkingGroups/media/textures/panoramas/ocean_3_front.jpg","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaPanoramas/ocean_3_front.jpg","http://www.web3dmedia.com/UniversalMedia/textures/panoramas/ocean_3_front.jpg","http://www.officetowers.com/UniversalMedia/textures/panoramas/ocean_3_front.jpg","http://geometrek.com/UniversalMedia/textures/panoramas/ocean_3_front.jpg","http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/ocean_3_front.jpg"],
              "@groundAngle":[0.1,1.309,1.570796],
              "@groundColor":[0,0,0,0,0.1,0.3,0,0.2,0.5,0,0.3,0.8],
              "@leftUrl":["urn:web3d:media:textures/panoramas/ocean_3_left.jpg","../../../Basic/UniversalMediaPanoramas/ocean_3_left.jpg","https://www.web3d.org/WorkingGroups/media/textures/panoramas/ocean_3_left.jpg","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaPanoramas/ocean_3_left.jpg","http://www.web3dmedia.com/UniversalMedia/textures/panoramas/ocean_3_left.jpg","http://www.officetowers.com/UniversalMedia/textures/panoramas/ocean_3_left.jpg","http://geometrek.com/UniversalMedia/textures/panoramas/ocean_3_left.jpg","http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/ocean_3_left.jpg"],
              "@rightUrl":["urn:web3d:media:textures/panoramas/ocean_3_right.jpg","../../../Basic/UniversalMediaPanoramas/ocean_3_right.jpg","https://www.web3d.org/WorkingGroups/media/textures/panoramas/ocean_3_right.jpg","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaPanoramas/ocean_3_right.jpg","http://www.web3dmedia.com/UniversalMedia/textures/panoramas/ocean_3_right.jpg","http://www.officetowers.com/UniversalMedia/textures/panoramas/ocean_3_right.jpg","http://geometrek.com/UniversalMedia/textures/panoramas/ocean_3_right.jpg","http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/ocean_3_right.jpg"],
              "@skyAngle":[0.1,0.15,1.309,1.57079],
              "@skyColor":[0.4,0.4,0.1,0.4,0.4,0.1,0,0.1,0.3,0,0.2,0.6,0.8,0.8,0.8],
              "@topUrl":["urn:web3d:media:textures/panoramas/ocean_3_top.jpg","../../../Basic/UniversalMediaPanoramas/ocean_3_top.jpg","https://www.web3d.org/WorkingGroups/media/textures/panoramas/ocean_3_top.jpg","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaPanoramas/ocean_3_top.jpg","http://www.web3dmedia.com/UniversalMedia/textures/panoramas/ocean_3_top.jpg","http://www.officetowers.com/UniversalMedia/textures/panoramas/ocean_3_top.jpg","http://geometrek.com/UniversalMedia/textures/panoramas/ocean_3_top.jpg","http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/ocean_3_top.jpg"]
            }
          },
          { "NavigationInfo":
            {
              "@headlight":false
            }
          },
          { "Group":
            {
              "-children":[
                { "DirectionalLight":
                  {
                    "@DEF":"SunLight",
                    "@ambientIntensity":0.5,
                    "@color":[0.25,0.25,0.25],
                    "@direction":[-0.8,-0.2,-0.2]
                  }
                },
                { "ScalarInterpolator":
                  {
                    "@DEF":"LightAmbient",
                    "@key":[0,0.1,0.5,0.9,1],
                    "@keyValue":[0.3,0.3,0.7,0.2,0.2]
                  }
                },
                { "PositionInterpolator":
                  {
                    "@DEF":"LightDirection",
                    "@key":[0,0.1,0.5,0.9,1],
                    "@keyValue":[0.8,-0.2,-0.2,0.8,-0.2,-0.2,0,-1,-0.2,-0.8,-0.2,-0.2,-0.8,-0.2,-0.2]
                  }
                },
                { "Transform":
                  {
                    "@translation":[0,5,135],
                    "-children":[
                      { "Viewpoint":
                        {
                          "@description":"Control Panel"
                        }
                      }
                    ]
                  }
                },
                { "Transform":
                  {
                    "@translation":[0,0,100],
                    "-children":[
                      { "Transform":
                        {
                          "@rotation":[-1,0,0,1.57],
                          "@translation":[0,-10,0],
                          "-children":[
                            { "Inline":
                              {
                                "@DEF":"Indy",
                                "@bboxCenter":[0,1,0],
                                "@bboxSize":[6,2,6],
                                "@url":["indy.x3d","https://www.web3d.org/x3d/content/examples/Savage/Environment/TimeOfDay/indy.x3d","indy.wrl","https://www.web3d.org/x3d/content/examples/Savage/Environment/TimeOfDay/indy.wrl"]
                              }
                            }
                          ]
                        }
                      },
                      { "Transform":
                        {
                          "@scale":[5,5,5],
                          "@translation":[-3,10,0],
                          "-children":[
                            { "Inline":
                              {
                                "@DEF":"clock",
                                "@url":["ClockMechanismExample2.x3d","https://www.web3d.org/x3d/content/examples/Savage/Environment/TimeOfDay/ClockMechanismExample2.x3d","ClockMechanismExample2.wrl","https://www.web3d.org/x3d/content/examples/Savage/Environment/TimeOfDay/ClockMechanismExample2.wrl"]
                              }
                            },
                            { "TouchSensor":
                              {
                                "@DEF":"button",
                                "@description":"click to increment"
                              }
                            },
                            { "Transform":
                              {
                                "@DEF":"M",
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@DEF":"green",
                                            "-material":
                                              { "Material":
                                                {
                                                  "@emissiveColor":[0,1,0]
                                                }
                                              }
                                          }
                                        },
                                      "-geometry":
                                        { "IndexedLineSet":
                                          {
                                            "@coordIndex":[0,1,2,3,4,5,6,7,-1,7,8,9,10,11,12,13,14,-1,14,15,16,17,18,19,20,21,0,-1],
                                            "-coord":
                                              { "Coordinate":
                                                {
                                                  "@point":[-0.02,0.705,0.04,-0.019,0.711,0.04,-0.016,0.716,0.04,-0.012,0.721,0.04,-0.006,0.723,0.04,0,0.724,0.04,0.006,0.723,0.04,0.012,0.721,0.04,0.016,0.716,0.04,0.019,0.711,0.04,0.02,0.705,0.04,0.02,-0.005,0.04,0.019,-0.011,0.04,0.016,-0.016,0.04,0.012,-0.021,0.04,0.006,-0.023,0.04,0,-0.024,0.04,-0.003,-0.023,0.04,-0.012,-0.021,0.04,-0.016,-0.016,0.04,-0.019,-0.011,0.04,-0.02,-0.005,0.04]
                                                }
                                              }
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Transform":
                              {
                                "@DEF":"H",
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "-material":
                                              { "Material":
                                                {
                                                  "@emissiveColor":[0,1,0]
                                                }
                                              }
                                          }
                                        },
                                      "-geometry":
                                        { "IndexedLineSet":
                                          {
                                            "@coordIndex":[0,1,2,3,4,5,6,7,-1,7,8,9,10,11,12,13,14,-1,14,15,16,17,18,19,20,21,0,-1],
                                            "-coord":
                                              { "Coordinate":
                                                {
                                                  "@point":[-0.056,0.62,0.02,-0.053,0.637,0.02,-0.045,0.653,0.02,-0.033,0.665,0.02,-0.017,0.673,0.02,0,0.676,0.02,0.017,0.673,0.02,0.033,0.665,0.02,0.045,0.653,0.02,0.053,0.637,0.02,0.056,0.62,0.02,0.056,0,0.02,0.053,-0.017,0.02,0.045,-0.033,0.02,0.033,-0.045,0.02,0.017,-0.053,0.02,0,-0.056,0.02,-0.017,-0.053,0.02,-0.033,-0.045,0.02,-0.045,-0.033,0.02,-0.053,-0.017,0.02,-0.056,0,0.02]
                                                }
                                              }
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Transform":
                              {
                                "@DEF":"S",
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "-material":
                                              { "Material":
                                                {
                                                  "@emissiveColor":[0,1,0]
                                                }
                                              }
                                          }
                                        },
                                      "-geometry":
                                        { "IndexedLineSet":
                                          {
                                            "@coordIndex":[0,1,2,3,4,5,6,7,-1,7,8,9,10,11,12,13,14,-1,14,15,16,17,18,19,20,21,0,-1],
                                            "-coord":
                                              { "Coordinate":
                                                {
                                                  "@point":[-0.02,0.705,0.04,-0.019,0.711,0.04,-0.016,0.716,0.04,-0.012,0.721,0.04,-0.006,0.723,0.04,0,0.724,0.04,0.006,0.723,0.04,0.012,0.721,0.04,0.016,0.716,0.04,0.019,0.711,0.04,0.02,0.705,0.04,0.02,-0.005,0.04,0.019,-0.011,0.04,0.016,-0.016,0.04,0.012,-0.021,0.04,0.006,-0.023,0.04,0,-0.024,0.04,-0.003,-0.023,0.04,-0.012,-0.021,0.04,-0.016,-0.016,0.04,-0.019,-0.011,0.04,-0.02,-0.005,0.04]
                                                }
                                              }
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Shape":
                              {
                                "-appearance":
                                  { "Appearance":
                                    {
                                      "-material":
                                        { "Material":
                                          {
                                            "@transparency":1
                                          }
                                        }
                                    }
                                  },
                                "-geometry":
                                  { "Box":
                                    {
                                    }
                                  }
                              }
                            }
                          ]
                        }
                      },
                      { "Transform":
                        {
                          "@scale":[5,5,5],
                          "@translation":[5,10,0],
                          "-children":[
                            { "Switch":
                              {
                                "@DEF":"ampmswitch",
                                "@whichChoice":0,
                                "-children":[
                                  { "Group":
                                    {
                                      "-children":[
                                        { "Shape":
                                          {
                                            "-appearance":
                                              { "Appearance":
                                                {
                                                  "@USE":"green"
                                                }
                                              },
                                            "-geometry":
                                              { "Text":
                                                {
                                                  "@string":["AM"],
                                                  "-fontStyle":
                                                    { "FontStyle":
                                                      {
                                                      }
                                                    }
                                                }
                                              }
                                          }
                                        }
                                      ]
                                    }
                                  },
                                  { "Group":
                                    {
                                      "-children":[
                                        { "Shape":
                                          {
                                            "-appearance":
                                              { "Appearance":
                                                {
                                                  "@USE":"green"
                                                }
                                              },
                                            "-geometry":
                                              { "Text":
                                                {
                                                  "@string":["PM"],
                                                  "-fontStyle":
                                                    { "FontStyle":
                                                      {
                                                      }
                                                    }
                                                }
                                              }
                                          }
                                        }
                                      ]
                                    }
                                  }
                                ]
                              }
                            },
                            { "Script":
                              {
                                "@DEF":"ampm",
                                "field": [
                                  {
                                    "@name":"set_boolean",
                                    "@accessType":"inputOnly",
                                    "@type":"SFBool"
                                  },
                                  {
                                    "@name":"whichchoice",
                                    "@accessType":"outputOnly",
                                    "@type":"SFInt32"
                                  }
                                ],
                                "#sourceCode":[
"",
"",
"ecmascript:",
"",
"function set_boolean ( boolean_input, eventTime)",
"{",
"",
"        if ( boolean_input== false ) { whichchoice = 0;}",
"",
"\tif ( boolean_input== true ) { whichchoice = 1; }",
"",
"}",
"",
""
]
                              }
                            },
                            { "Transform":
                              {
                                "@scale":[4,1,1],
                                "@translation":[-1,2.5,0],
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "-material":
                                              { "Material":
                                                {
                                                  "@transparency":1
                                                }
                                              }
                                          }
                                        },
                                      "-geometry":
                                        { "Box":
                                          {
                                          }
                                        }
                                    }
                                  },
                                  { "TouchSensor":
                                    {
                                      "@DEF":"VisibilityButton",
                                      "@description":"click to change"
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      { "Transform":
                        {
                          "@scale":[5,5,5],
                          "@translation":[-37,2,0],
                          "-children":[
                            { "Shape":
                              {
                                "-appearance":
                                  { "Appearance":
                                    {
                                      "@USE":"green"
                                    }
                                  },
                                "-geometry":
                                  { "Text":
                                    {
                                      "@string":["Click on the clock to increment time by one hour."],
                                      "-fontStyle":
                                        { "FontStyle":
                                          {
                                            "@size":0.7
                                          }
                                        }
                                    }
                                  }
                              }
                            },
                            { "Transform":
                              {
                                "@translation":[0,-1,0],
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"green"
                                          }
                                        },
                                      "-geometry":
                                        { "Text":
                                          {
                                            "@string":["Select the word Visibility to change visibility range"],
                                            "-fontStyle":
                                              { "FontStyle":
                                                {
                                                  "@size":0.7
                                                }
                                              }
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                { "Transform":
                  {
                    "-children":[
                      { "Shape":
                        {
                          "-geometry":
                            { "Extrusion":
                              {
                                "@crossSection":[0,0,0,100,100,100,100,0,0,0],
                                "@solid":false,
                                "@spine":[-50,-50,50,-50,50,50]
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@DEF":"transparent",
                                      "@diffuseColor":[0,0,0]
                                    }
                                  }
                              }
                            }
                        }
                      }
                    ]
                  }
                },
                { "Transform":
                  {
                    "@rotation":[0,1,0,3.14],
                    "@translation":[0,0,-60],
                    "-children":[
                      { "Viewpoint":
                        {
                          "@description":"outside"
                        }
                      }
                    ]
                  }
                },
                { "Script":
                  {
                    "@DEF":"Incrementor",
                    "field": [
                      {
                        "@name":"set_boolean",
                        "@accessType":"inputOnly",
                        "@type":"SFBool"
                      },
                      {
                        "@name":"hour_changed",
                        "@accessType":"outputOnly",
                        "@type":"SFInt32"
                      },
                      {
                        "@name":"twelvebool",
                        "@accessType":"outputOnly",
                        "@type":"SFBool"
                      }
                    ],
                    "#sourceCode":[
"",
"",
"ecmascript:",
"",
"function set_boolean ( boolean_input, eventTime)",
"{",
"\tBrowser.println ('boolean_input=' + boolean_input);",
"\tif ( boolean_input == true )",
"\t\t{ hour_changed = hour_changed + 1;}",
"",
"        if (hour_changed <= 11){twelvebool = false; }",
"",
"\tif (hour_changed > 11){twelvebool = true; }",
"\tif (hour_changed ==24) {hour_changed = 0;}",
"}",
"",
"// separage function needed for set_hour",
"// hour_changed is an output, it gets set in the function",
"",
""
]
                  }
                },
                { "Transform":
                  {
                    "@scale":[5,5,5],
                    "@translation":[-18,18,100],
                    "-children":[
                      { "Switch":
                        {
                          "@DEF":"FogSwitch",
                          "@whichChoice":0,
                          "-children":[
                            { "Group":
                              {
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"green"
                                          }
                                        },
                                      "-geometry":
                                        { "Text":
                                          {
                                            "@string":["Visibility Unlimited"],
                                            "-fontStyle":
                                              { "FontStyle":
                                                {
                                                }
                                              }
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Group":
                              {
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"green"
                                          }
                                        },
                                      "-geometry":
                                        { "Text":
                                          {
                                            "@string":["Visibility 5000 Meters"],
                                            "-fontStyle":
                                              { "FontStyle":
                                                {
                                                }
                                              }
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Group":
                              {
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"green"
                                          }
                                        },
                                      "-geometry":
                                        { "Text":
                                          {
                                            "@string":["Visibility 2500 Meters"],
                                            "-fontStyle":
                                              { "FontStyle":
                                                {
                                                }
                                              }
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Group":
                              {
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"green"
                                          }
                                        },
                                      "-geometry":
                                        { "Text":
                                          {
                                            "@string":["Visibility 1000 Meters"],
                                            "-fontStyle":
                                              { "FontStyle":
                                                {
                                                }
                                              }
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Group":
                              {
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"green"
                                          }
                                        },
                                      "-geometry":
                                        { "Text":
                                          {
                                            "@string":["Visibility 500 Meters"],
                                            "-fontStyle":
                                              { "FontStyle":
                                                {
                                                }
                                              }
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Group":
                              {
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"green"
                                          }
                                        },
                                      "-geometry":
                                        { "Text":
                                          {
                                            "@string":["Visibility 250 Meters"],
                                            "-fontStyle":
                                              { "FontStyle":
                                                {
                                                }
                                              }
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Group":
                              {
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"green"
                                          }
                                        },
                                      "-geometry":
                                        { "Text":
                                          {
                                            "@string":["Visibility 100 Meters"],
                                            "-fontStyle":
                                              { "FontStyle":
                                                {
                                                }
                                              }
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Group":
                              {
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"green"
                                          }
                                        },
                                      "-geometry":
                                        { "Text":
                                          {
                                            "@string":["Visibility 50 Meters"],
                                            "-fontStyle":
                                              { "FontStyle":
                                                {
                                                }
                                              }
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Group":
                              {
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"green"
                                          }
                                        },
                                      "-geometry":
                                        { "Text":
                                          {
                                            "@string":["Visibility 25 Meters"],
                                            "-fontStyle":
                                              { "FontStyle":
                                                {
                                                }
                                              }
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Group":
                              {
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"green"
                                          }
                                        },
                                      "-geometry":
                                        { "Text":
                                          {
                                            "@string":["Visibility 10 Meters"],
                                            "-fontStyle":
                                              { "FontStyle":
                                                {
                                                }
                                              }
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Group":
                              {
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"green"
                                          }
                                        },
                                      "-geometry":
                                        { "Text":
                                          {
                                            "@string":["Visibility 5 Meters"],
                                            "-fontStyle":
                                              { "FontStyle":
                                                {
                                                }
                                              }
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Group":
                              {
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"green"
                                          }
                                        },
                                      "-geometry":
                                        { "Text":
                                          {
                                            "@string":["Visibility 1 Meter"],
                                            "-fontStyle":
                                              { "FontStyle":
                                                {
                                                }
                                              }
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      { "Script":
                        {
                          "@DEF":"VisibilityScript",
                          "field": [
                            {
                              "@name":"set_boolean",
                              "@accessType":"inputOnly",
                              "@type":"SFBool"
                            },
                            {
                              "@name":"whichchoice",
                              "@accessType":"outputOnly",
                              "@type":"SFInt32"
                            },
                            {
                              "@name":"range",
                              "@accessType":"outputOnly",
                              "@type":"SFFloat"
                            },
                            {
                              "@name":"binder",
                              "@accessType":"outputOnly",
                              "@type":"SFBool"
                            }
                          ],
                          "#sourceCode":[
"",
"",
"ecmascript:",
"",
"function set_boolean ( boolean_input, eventTime)",
"{",
"binder =true;",
"if ( boolean_input== false ) { return; }",
"whichchoice = whichchoice +1;",
"if ( whichchoice ==12 ) { whichchoice = 0; }",
"if (whichchoice ==0) {range = 0;}",
"if (whichchoice ==1) {range = 5000;}",
"if (whichchoice ==2) {range = 2500;}",
"if (whichchoice ==3) {range = 1000;}",
"if (whichchoice ==4) {range = 500;}",
"if (whichchoice ==5) {range = 250;}",
"if (whichchoice ==6) {range = 100;}",
"if (whichchoice ==7) {range = 50;}",
"if (whichchoice ==8) {range = 25;}",
"if (whichchoice ==9) {range = 10;}",
"if (whichchoice ==10) {range = 5;}",
"if (whichchoice ==11) {range = 1;}",
"}",
"",
""
]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Fog":
            {
              "@DEF":"Foggy",
              "@color":[0,0,0],
              "@fogType":"EXPONENTIAL"
            }
          },
          {
            "#comment":"The following two routes toggle the twelve Visibility Text Range labels driven by a touch sensor."
          },
          { "ROUTE":
            {
              "@fromField":"isActive",
              "@fromNode":"VisibilityButton",
              "@toField":"set_boolean",
              "@toNode":"VisibilityScript"
            }
          },
          { "ROUTE":
            {
              "@fromField":"whichchoice",
              "@fromNode":"VisibilityScript",
              "@toField":"whichChoice",
              "@toNode":"FogSwitch"
            }
          },
          {
            "#comment":"The following two routes change the visibility range on the Fog node through twelve settings."
          },
          { "ROUTE":
            {
              "@fromField":"range",
              "@fromNode":"VisibilityScript",
              "@toField":"visibilityRange",
              "@toNode":"Foggy"
            }
          },
          { "ROUTE":
            {
              "@fromField":"binder",
              "@fromNode":"VisibilityScript",
              "@toField":"set_bind",
              "@toNode":"Foggy"
            }
          },
          {
            "#comment":"The following two routes changes the am to pm text and vice-versa when the clock strikes twelve."
          },
          { "ROUTE":
            {
              "@fromField":"twelvebool",
              "@fromNode":"Incrementor",
              "@toField":"set_boolean",
              "@toNode":"ampm"
            }
          },
          { "ROUTE":
            {
              "@fromField":"whichchoice",
              "@fromNode":"ampm",
              "@toField":"whichChoice",
              "@toNode":"ampmswitch"
            }
          },
          {
            "#comment":"The following three routes rotate the hour, minute, and second hands."
          },
          { "ROUTE":
            {
              "@fromField":"hourHand_changed",
              "@fromNode":"ClockMechanism",
              "@toField":"set_rotation",
              "@toNode":"H"
            }
          },
          { "ROUTE":
            {
              "@fromField":"minuteHand_changed",
              "@fromNode":"ClockMechanism",
              "@toField":"set_rotation",
              "@toNode":"M"
            }
          },
          { "ROUTE":
            {
              "@fromField":"secondHand_changed",
              "@fromNode":"ClockMechanism",
              "@toField":"set_rotation",
              "@toNode":"S"
            }
          },
          {
            "#comment":"The following two routes incremnet the clock one hour when the button is pushed."
          },
          { "ROUTE":
            {
              "@fromField":"isActive",
              "@fromNode":"button",
              "@toField":"set_boolean",
              "@toNode":"Incrementor"
            }
          },
          { "ROUTE":
            {
              "@fromField":"hour_changed",
              "@fromNode":"Incrementor",
              "@toField":"set_hour",
              "@toNode":"ClockMechanism"
            }
          },
          {
            "#comment":"The following five routes have the clock mechanism drive the light direction, light ambient intensity, as well as the transparency of a box around the world which has the effect darkening the background nodes."
          },
          { "ROUTE":
            {
              "@fromField":"hourpercent_changed",
              "@fromNode":"ClockMechanism",
              "@toField":"set_fraction",
              "@toNode":"LightAmbient"
            }
          },
          { "ROUTE":
            {
              "@fromField":"hourpercent_changed",
              "@fromNode":"ClockMechanism",
              "@toField":"set_fraction",
              "@toNode":"LightDirection"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"LightDirection",
              "@toField":"set_direction",
              "@toNode":"SunLight"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"LightAmbient",
              "@toField":"set_ambientIntensity",
              "@toNode":"SunLight"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"LightAmbient",
              "@toField":"set_transparency",
              "@toNode":"transparent"
            }
          }
        ]
    }
  }
}