{ "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":"SliderIntegerPrototype.x3d"
          },
          {
            "@name":"description",
            "@content":"A Slider prototype enabling mouse input where integer output values are needed. Size, min/max values and color are defined by the author."
          },
          {
            "@name":"creator",
            "@content":"Mike Hunsberger, Jane Wu"
          },
          {
            "@name":"created",
            "@content":"3 August 2001"
          },
          {
            "@name":"modified",
            "@content":"28 November 2019"
          },
          {
            "@name":"subject",
            "@content":"animation slider"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderIntegerPrototype.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.2, 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":"SliderIntegerPrototype.x3d"
            }
          },
          { "ProtoDeclare":
            {
              "@name":"SliderInteger",
              "@appinfo":"Slider user-interface widget that produces integer output values",
              "ProtoInterface": {
                  "field": [
                    {
                      "@name":"layoutDirection",
                      "@accessType":"initializeOnly",
                      "@appinfo":"Allowed values: vertical, horizontal",
                      "@type":"SFString",
                      "@value":"vertical"
                    },
                    {
                      "@name":"height",
                      "@accessType":"initializeOnly",
                      "@appinfo":"default value 1.0",
                      "@type":"SFFloat",
                      "@value":1.0
                    },
                    {
                      "@name":"radius",
                      "@accessType":"initializeOnly",
                      "@appinfo":"default value 0.1",
                      "@type":"SFFloat",
                      "@value":0.1
                    },
                    {
                      "@name":"barRadius",
                      "@accessType":"initializeOnly",
                      "@appinfo":"default value 0.02",
                      "@type":"SFFloat",
                      "@value":0.02
                    },
                    {
                      "@name":"sliderBarColor",
                      "@accessType":"initializeOnly",
                      "@appinfo":"default value .8 .4 .8",
                      "@type":"SFColor",
                      "@value":[0.8,0.4,0.8]
                    },
                    {
                      "@name":"sliderBallColor",
                      "@accessType":"initializeOnly",
                      "@appinfo":"default value .3 .4 .8",
                      "@type":"SFColor",
                      "@value":[0.3,0.4,0.8]
                    },
                    {
                      "@name":"sliderEndColor",
                      "@accessType":"initializeOnly",
                      "@appinfo":"default value .2 .3 .9",
                      "@type":"SFColor",
                      "@value":[0.2,0.3,0.9]
                    },
                    {
                      "@name":"min",
                      "@accessType":"initializeOnly",
                      "@appinfo":"default value 0",
                      "@type":"SFInt32",
                      "@value":0
                    },
                    {
                      "@name":"max",
                      "@accessType":"initializeOnly",
                      "@appinfo":"default value 10",
                      "@type":"SFInt32",
                      "@value":10
                    },
                    {
                      "@name":"value",
                      "@accessType":"initializeOnly",
                      "@appinfo":"default value 0",
                      "@type":"SFInt32",
                      "@value":0
                    },
                    {
                      "@name":"setMin",
                      "@accessType":"inputOnly",
                      "@appinfo":"set minimum value for slider bar",
                      "@type":"SFInt32"
                    },
                    {
                      "@name":"setMax",
                      "@accessType":"inputOnly",
                      "@appinfo":"set maximum value for slider bar",
                      "@type":"SFInt32"
                    },
                    {
                      "@name":"setValue",
                      "@accessType":"inputOnly",
                      "@appinfo":"set value for slider bar",
                      "@type":"SFInt32"
                    },
                    {
                      "@name":"valueChanged",
                      "@accessType":"outputOnly",
                      "@appinfo":"output value for slider bar",
                      "@type":"SFInt32"
                    },
                    {
                      "@name":"traceEnabled",
                      "@accessType":"initializeOnly",
                      "@appinfo":"Enable/disable console output for troubleshooting",
                      "@type":"SFBool",
                      "@value":false
                    }
                  ]
              },
              "ProtoBody": {
                  "-children":[
                    { "Group":
                      {
                        "-children":[
                          { "Transform":
                            {
                              "@DEF":"LayoutDirectionTransform",
                              "-children":[
                                { "Transform":
                                  {
                                    "@DEF":"SliderBarTransform",
                                    "-children":[
                                      { "Shape":
                                        {
                                          "-appearance":
                                            { "Appearance":
                                              {
                                                "-material":
                                                  { "Material":
                                                    {
                                                      "@DEF":"SliderBarMaterial",
                                                      "IS": {
                                                          "connect": [
                                                            {
                                                              "@nodeField":"diffuseColor",
                                                              "@protoField":"sliderBarColor"
                                                            },
                                                            {
                                                              "@nodeField":"emissiveColor",
                                                              "@protoField":"sliderBarColor"
                                                            }
                                                          ]
                                                      }
                                                    }
                                                  }
                                              }
                                            },
                                          "-geometry":
                                            { "Cylinder":
                                              {
                                                "@DEF":"SliderBar",
                                                "IS": {
                                                    "connect": [
                                                      {
                                                        "@nodeField":"height",
                                                        "@protoField":"height"
                                                      },
                                                      {
                                                        "@nodeField":"radius",
                                                        "@protoField":"barRadius"
                                                      }
                                                    ]
                                                }
                                              }
                                            }
                                        }
                                      }
                                    ]
                                  }
                                },
                                { "Transform":
                                  {
                                    "@DEF":"SliderBallTransform",
                                    "-children":[
                                      { "PlaneSensor":
                                        {
                                          "@DEF":"SliderBallPlaneSensor",
                                          "@description":"select and drag to change values"
                                        }
                                      },
                                      { "Shape":
                                        {
                                          "-appearance":
                                            { "Appearance":
                                              {
                                                "-material":
                                                  { "Material":
                                                    {
                                                      "@DEF":"SliderBallMaterial",
                                                      "IS": {
                                                          "connect": [
                                                            {
                                                              "@nodeField":"diffuseColor",
                                                              "@protoField":"sliderBallColor"
                                                            }
                                                          ]
                                                      }
                                                    }
                                                  }
                                              }
                                            },
                                          "-geometry":
                                            { "Sphere":
                                              {
                                                "@DEF":"SliderBall",
                                                "IS": {
                                                    "connect": [
                                                      {
                                                        "@nodeField":"radius",
                                                        "@protoField":"radius"
                                                      }
                                                    ]
                                                }
                                              }
                                            }
                                        }
                                      }
                                    ]
                                  }
                                },
                                { "Transform":
                                  {
                                    "@DEF":"BottomEndTransform",
                                    "-children":[
                                      { "TouchSensor":
                                        {
                                          "@DEF":"BottomEndSensor",
                                          "@description":"touch bottom end to decrement"
                                        }
                                      },
                                      { "Shape":
                                        {
                                          "@DEF":"EndShape",
                                          "-appearance":
                                            { "Appearance":
                                              {
                                                "-material":
                                                  { "Material":
                                                    {
                                                      "@DEF":"EndMaterial",
                                                      "IS": {
                                                          "connect": [
                                                            {
                                                              "@nodeField":"diffuseColor",
                                                              "@protoField":"sliderEndColor"
                                                            }
                                                          ]
                                                      }
                                                    }
                                                  }
                                              }
                                            },
                                          "-geometry":
                                            { "Cylinder":
                                              {
                                                "@height":0.05,
                                                "@radius":0.1
                                              }
                                            }
                                        }
                                      },
                                      { "Transform":
                                        {
                                          "@translation":[0,-0.1,0],
                                          "-children":[
                                            { "Shape":
                                              {
                                                "@DEF":"TransparentEndShape",
                                                "-appearance":
                                                  { "Appearance":
                                                    {
                                                      "-material":
                                                        { "Material":
                                                          {
                                                            "@transparency":1
                                                          }
                                                        }
                                                    }
                                                  },
                                                "-geometry":
                                                  { "Box":
                                                    {
                                                      "@size":[0.2,0.2,0.01]
                                                    }
                                                  }
                                              }
                                            }
                                          ]
                                        }
                                      }
                                    ]
                                  }
                                },
                                { "Transform":
                                  {
                                    "@DEF":"TopEndTransform",
                                    "-children":[
                                      { "TouchSensor":
                                        {
                                          "@DEF":"TopEndSensor",
                                          "@description":"touch top end to increment"
                                        }
                                      },
                                      { "Shape":
                                        {
                                          "@USE":"EndShape"
                                        }
                                      },
                                      { "Transform":
                                        {
                                          "@translation":[0,0.1,0],
                                          "-children":[
                                            { "Shape":
                                              {
                                                "@USE":"TransparentEndShape"
                                              }
                                            }
                                          ]
                                        }
                                      }
                                    ]
                                  }
                                },
                                { "Script":
                                  {
                                    "@DEF":"SliderScript",
                                    "field": [
                                      {
                                        "@name":"height",
                                        "@accessType":"initializeOnly",
                                        "@type":"SFFloat"
                                      },
                                      {
                                        "@name":"radius",
                                        "@accessType":"initializeOnly",
                                        "@type":"SFFloat"
                                      },
                                      {
                                        "@name":"min",
                                        "@accessType":"initializeOnly",
                                        "@type":"SFInt32"
                                      },
                                      {
                                        "@name":"max",
                                        "@accessType":"initializeOnly",
                                        "@type":"SFInt32"
                                      },
                                      {
                                        "@name":"value",
                                        "@accessType":"initializeOnly",
                                        "@type":"SFInt32"
                                      },
                                      {
                                        "@name":"dragActive",
                                        "@accessType":"initializeOnly",
                                        "@type":"SFBool",
                                        "@value":false
                                      },
                                      {
                                        "@name":"lastBallPosition",
                                        "@accessType":"initializeOnly",
                                        "@type":"SFVec3f",
                                        "@value":[0,0,0]
                                      },
                                      {
                                        "@name":"beginPosition",
                                        "@accessType":"initializeOnly",
                                        "@type":"SFVec3f",
                                        "@value":[0,0,0]
                                      },
                                      {
                                        "@name":"endPosition",
                                        "@accessType":"initializeOnly",
                                        "@type":"SFVec3f",
                                        "@value":[0,0,0]
                                      },
                                      {
                                        "@name":"incrementInterval",
                                        "@accessType":"initializeOnly",
                                        "@type":"SFFloat",
                                        "@value":1
                                      },
                                      {
                                        "@name":"setMin",
                                        "@accessType":"inputOnly",
                                        "@type":"SFInt32"
                                      },
                                      {
                                        "@name":"setMax",
                                        "@accessType":"inputOnly",
                                        "@type":"SFInt32"
                                      },
                                      {
                                        "@name":"setValue",
                                        "@accessType":"inputOnly",
                                        "@type":"SFInt32"
                                      },
                                      {
                                        "@name":"valueChanged",
                                        "@accessType":"outputOnly",
                                        "@type":"SFInt32"
                                      },
                                      {
                                        "@name":"bottomEndTouched",
                                        "@accessType":"inputOnly",
                                        "@type":"SFBool"
                                      },
                                      {
                                        "@name":"topEndTouched",
                                        "@accessType":"inputOnly",
                                        "@type":"SFBool"
                                      },
                                      {
                                        "@name":"setBallPosition",
                                        "@accessType":"inputOnly",
                                        "@type":"SFVec3f"
                                      },
                                      {
                                        "@name":"setDragActive",
                                        "@accessType":"inputOnly",
                                        "@type":"SFBool"
                                      },
                                      {
                                        "@name":"bottomEndPositionChanged",
                                        "@accessType":"outputOnly",
                                        "@type":"SFVec3f"
                                      },
                                      {
                                        "@name":"topEndPositionChanged",
                                        "@accessType":"outputOnly",
                                        "@type":"SFVec3f"
                                      },
                                      {
                                        "@name":"ballPositionChanged",
                                        "@accessType":"outputOnly",
                                        "@type":"SFVec3f"
                                      },
                                      {
                                        "@name":"minBallPositionChanged",
                                        "@accessType":"outputOnly",
                                        "@type":"SFVec2f"
                                      },
                                      {
                                        "@name":"maxBallPositionChanged",
                                        "@accessType":"outputOnly",
                                        "@type":"SFVec2f"
                                      },
                                      {
                                        "@name":"traceEnabled",
                                        "@accessType":"initializeOnly",
                                        "@type":"SFBool"
                                      }
                                    ],
                                    "IS": {
                                        "connect": [
                                          {
                                            "@nodeField":"height",
                                            "@protoField":"height"
                                          },
                                          {
                                            "@nodeField":"radius",
                                            "@protoField":"radius"
                                          },
                                          {
                                            "@nodeField":"min",
                                            "@protoField":"min"
                                          },
                                          {
                                            "@nodeField":"max",
                                            "@protoField":"max"
                                          },
                                          {
                                            "@nodeField":"value",
                                            "@protoField":"value"
                                          },
                                          {
                                            "@nodeField":"setMin",
                                            "@protoField":"setMin"
                                          },
                                          {
                                            "@nodeField":"setMax",
                                            "@protoField":"setMax"
                                          },
                                          {
                                            "@nodeField":"setValue",
                                            "@protoField":"setValue"
                                          },
                                          {
                                            "@nodeField":"valueChanged",
                                            "@protoField":"valueChanged"
                                          },
                                          {
                                            "@nodeField":"traceEnabled",
                                            "@protoField":"traceEnabled"
                                          }
                                        ]
                                    },
                                    "#sourceCode":[
"",
"",
"ecmascript:",
"function initialize()",
"{",
"        tracePrint('initialize() commenced...');",
"",
"\tbeginPosition = new SFVec3f(0, (height/2) * (-1) + radius, 0);",
"\tendPosition   = new SFVec3f(0, (height/2) - radius, 0);",
"\ttracePrint('beginPosition=' + beginPosition.toString() + ', endPosition=' + endPosition.toString());",
"\tincrementInterval = (height - (2 * radius)) / (max - min);",
"\ttracePrint('incrementInterval=' + incrementInterval.toString());",
"",
"\tbottomEndPositionChanged = new SFVec3f(0, (height/2) * (-1), 0);",
"\ttopEndPositionChanged = new SFVec3f(0, (height/2), 0);",
"\ttracePrint('bottomEndPositionChanged=' + bottomEndPositionChanged.toString() + ', topEndPositionChanged=' + topEndPositionChanged.toString());",
"",
"        minBallPositionChanged = new SFVec2f(0, bottomEndPositionChanged.y + radius);",
"\tmaxBallPositionChanged = new SFVec2f(0, topEndPositionChanged.y - radius);",
"\ttracePrint('minBallPositionChanged=' + minBallPositionChanged.toString() + ', maxBallPositionChanged=' + maxBallPositionChanged.toString());",
"",
"\tballPositionChanged = new SFVec3f(0, beginPosition.y + (incrementInterval * (value - min)), 0);",
"\tlastBallPosition = ballPositionChanged;",
"",
"\tif (value < min) value = min;",
"\tif (value > max) value = max;",
"",
"\tvalueChanged = value;",
"\ttracePrint('value=' + value.toString());",
"\ttracePrint('...initialize() complete');",
"}",
"",
"function setDragActive(inputValue, timeStamp)",
"{",
"\tdragActive = inputValue;",
"}",
"",
"function setMin(inputValue, timeStamp)",
"{",
"\tmin = inputValue;",
"\tif (value < min) value = min;",
"",
"\tincrementInterval = (height - (2 * radius)) / (max - min);",
"\ttracePrint('incrementInterval=' + incrementInterval.toString());",
"",
"\tballPositionChanged = new SFVec3f(0, beginPosition.y + (incrementInterval * (value - min)), 0);",
"\tlastBallPosition = ballPositionChanged;",
"",
"\tvalueChanged = value;",
"\ttracePrint('min=' + min + ', valueChanged=' + valueChanged);",
"}",
"",
"function setMax(inputValue, timeStamp)",
"{",
"\tmax = inputValue;",
"\tif (value > max) value = max;",
"",
"\tincrementInterval = (height - (2 * radius)) / (max - min);",
"",
"\tballPositionChanged = new SFVec3f(0, beginPosition.y + (incrementInterval * (value - min)), 0);",
"\tlastBallPosition = ballPositionChanged;",
"",
"\tvalueChanged = value;",
"\ttracePrint('max=' + max + ', valueChanged=' + valueChanged);",
"}",
"",
"function setValue(inputValue, timeStamp)",
"{",
"\tif (inputValue <= min)",
"\t{",
"\t\tvalueChanged = value = min;",
"\t\tballPositionChanged = beginPosition;",
"\t\tlastBallPosition = ballPositionChanged;",
"\t}",
"\telse if (inputValue >= max)",
"\t{",
"\t\tvalueChanged = value = max;",
"\t\tballPositionChanged = endPosition;",
"\t\tlastBallPosition = ballPositionChanged;",
"\t}",
"\telse",
"\t{",
"\t\tif (inputValue > value) //getting bigger",
"\t\t{",
"\t\t\tballPositionChanged = new SFVec3f(0, lastBallPosition.y + (incrementInterval * (inputValue - value)), 0);",
"\t\t\tlastBallPosition = ballPositionChanged;",
"\t\t}",
"\t\telse if (inputValue < value) //getting smaller",
"\t\t{",
"\t\t\tballPositionChanged = new SFVec3f(0, lastBallPosition.y - (incrementInterval * (value - inputValue)), 0);",
"\t\t\tlastBallPosition = ballPositionChanged;",
"\t\t}",
"\t\tvalueChanged = value = inputValue;",
"\t}",
"}",
"",
"function bottomEndTouched(inputValue, timeStamp)",
"{",
"\ttracePrint('bottomEndTouched(' + inputValue.toString() + ')');",
"\tif (inputValue == false) return; // ignore deselection",
"",
"\tif (value > min)",
"\t{",
"\t\tvalueChanged = --value;",
"\t\tballPositionChanged = new SFVec3f(0, lastBallPosition.y - incrementInterval, 0);",
"\t\tlastBallPosition = ballPositionChanged;",
"\t}",
"}",
"",
"function topEndTouched(inputValue, timeStamp)",
"{",
"\ttracePrint('topEndTouched(' + inputValue.toString() + ')');",
"\tif (inputValue == false) return; // ignore deselection",
"",
"\tif (value < max)",
"\t{",
"\t\tvalueChanged = ++value;",
"\t\tballPositionChanged = new SFVec3f(0, lastBallPosition.y + incrementInterval, 0);",
"\t\tlastBallPosition = ballPositionChanged;",
"\t}",
"}",
"",
"function setBallPosition(inputValue, timeStamp)",
"{",
"\ttracePrint('setBallPosition(' + inputValue.toString() + '), dragActive=' + dragActive);",
"//\tif (!dragActive)",
"//\t\treturn;",
"",
"\tif (inputValue.y > lastBallPosition.y) // moving upwards",
"\t{",
"\t\tif (inputValue.y >= (beginPosition.y + (incrementInterval * ((value + 1) - min))))",
"\t\t{",
"\t\t\tif (value == max - 1)",
"\t\t\t{",
"\t\t\t\tvalue = max;",
"\t\t\t\tlastBallPosition = endPosition;",
"\t\t\t}",
"\t\t\telse",
"\t\t\t{",
"\t\t\t\tvalue = value + 1;",
"\t\t\t\tlastBallPosition = new SFVec3f(0, beginPosition.y + (incrementInterval * (value - min)), 0);",
"\t\t\t}",
"\t\t\tvalueChanged = value;",
"\t\t\tballPositionChanged = lastBallPosition;",
"\t\t}",
"\t}",
"\telse if (inputValue.y < lastBallPosition.y) // moving downwards",
"\t{",
"\t\tif (inputValue.y <= (endPosition.y - (incrementInterval * (max - (value - 1)))))",
"\t\t{",
"\t\t\tif (value == (min + 1))",
"\t\t\t{",
"\t\t\t\tvalue = min;",
"\t\t\t\tlastBallPosition = beginPosition;",
"\t\t\t}",
"\t\t\telse",
"\t\t\t{",
"\t\t\t\tvalue = value - 1;",
"\t\t\t\tlastBallPosition = new SFVec3f(0, endPosition.y - (incrementInterval * (max - value)), 0);",
"\t\t\t}",
"\t\t\tvalueChanged = value;",
"\t\t\tballPositionChanged = lastBallPosition;",
"\t\t}",
"\t}",
"}",
"",
"function tracePrint (text)",
"{",
"\tif (traceEnabled) Browser.println ('[SliderFloat SliderScript] ' + text);",
"}",
"",
""
]
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"isActive",
                                    "@fromNode":"SliderBallPlaneSensor",
                                    "@toField":"setDragActive",
                                    "@toNode":"SliderScript"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"translation_changed",
                                    "@fromNode":"SliderBallPlaneSensor",
                                    "@toField":"setBallPosition",
                                    "@toNode":"SliderScript"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"isActive",
                                    "@fromNode":"BottomEndSensor",
                                    "@toField":"bottomEndTouched",
                                    "@toNode":"SliderScript"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"isActive",
                                    "@fromNode":"TopEndSensor",
                                    "@toField":"topEndTouched",
                                    "@toNode":"SliderScript"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"minBallPositionChanged",
                                    "@fromNode":"SliderScript",
                                    "@toField":"set_minPosition",
                                    "@toNode":"SliderBallPlaneSensor"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"maxBallPositionChanged",
                                    "@fromNode":"SliderScript",
                                    "@toField":"set_maxPosition",
                                    "@toNode":"SliderBallPlaneSensor"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"bottomEndPositionChanged",
                                    "@fromNode":"SliderScript",
                                    "@toField":"set_translation",
                                    "@toNode":"BottomEndTransform"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"topEndPositionChanged",
                                    "@fromNode":"SliderScript",
                                    "@toField":"set_translation",
                                    "@toNode":"TopEndTransform"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"ballPositionChanged",
                                    "@fromNode":"SliderScript",
                                    "@toField":"set_translation",
                                    "@toNode":"SliderBallTransform"
                                  }
                                }
                              ]
                            }
                          },
                          { "Script":
                            {
                              "@DEF":"LayoutDirectionScript",
                              "field": [
                                {
                                  "@name":"direction",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFString"
                                },
                                {
                                  "@name":"directionRotation",
                                  "@accessType":"outputOnly",
                                  "@type":"SFRotation"
                                },
                                {
                                  "@name":"traceEnabled",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFBool"
                                }
                              ],
                              "IS": {
                                  "connect": [
                                    {
                                      "@nodeField":"direction",
                                      "@protoField":"layoutDirection"
                                    },
                                    {
                                      "@nodeField":"traceEnabled",
                                      "@protoField":"traceEnabled"
                                    }
                                  ]
                              },
                              "#sourceCode":[
"",
"",
"ecmascript:",
"",
"function initialize ()",
"{",
"    if      ((direction=='vertical') || (direction=='Vertical') || (direction=='VERTICAL'))",
"    {",
"        directionRotation = new SFRotation(0, 0, 1, 0);",
"    }",
"    else if ((direction=='horizontal') || (direction=='Horizontal') || (direction=='HORIZONTAL'))",
"    {",
"        directionRotation = new SFRotation(0, 0, 1, -1.57);",
"    }",
"    else",
"    {",
"        Browser.println ('[SliderFloat LayoutDirectionScript] unrecognized direction: ' + direction + ', using vertical');",
"        directionRotation = new SFRotation(0, 0, 1, 0);",
"    }",
"    tracePrint ('direction=' + direction);",
"}",
"function tracePrint (text)",
"{",
"\tif (traceEnabled) Browser.println ('[SliderFloat LayoutDirectionScript] ' + text);",
"}",
"",
""
]
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"directionRotation",
                              "@fromNode":"LayoutDirectionScript",
                              "@toField":"set_rotation",
                              "@toNode":"LayoutDirectionTransform"
                            }
                          }
                        ]
                      }
                    }
                  ]
              }
            }
          },
          { "Anchor":
            {
              "@description":"SliderIntegerExample",
              "@parameter":["target=_blank"],
              "@url":["SliderIntegerExample.x3d","https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderIntegerExample.x3d","SliderIntegerExample.wrl","https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderIntegerExample.wrl"],
              "-children":[
                { "Shape":
                  {
                    "-appearance":
                      { "Appearance":
                        {
                          "-material":
                            { "Material":
                              {
                                "@diffuseColor":[0,1,1],
                                "@emissiveColor":[0,1,1]
                              }
                            }
                        }
                      },
                    "-geometry":
                      { "Text":
                        {
                          "@string":["SliderIntegerPrototype is a","Prototype definition file.","To see an example scene","using this new node","click this text and view","SliderIntegerExample.x3d"],
                          "-fontStyle":
                            { "FontStyle":
                              {
                                "@justify":["MIDDLE","MIDDLE"],
                                "@size":0.8
                              }
                            }
                        }
                      }
                  }
                }
              ]
            }
          }
        ]
    }
  }
}