{ "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":"SliderFloatExample.x3d"
          },
          {
            "@name":"description",
            "@content":"This is an example of the SliderFloatPrototype, showing a slider bar starting at 12 and ranging from 0 to 24."
          },
          {
            "@name":"creator",
            "@content":"Jane Wu"
          },
          {
            "@name":"created",
            "@content":"17 October 2001"
          },
          {
            "@name":"modified",
            "@content":"28 November 2019"
          },
          {
            "@name":"TODO",
            "@content":"slow it down, change to positive control by user selection"
          },
          {
            "@name":"subject",
            "@content":"float slider example"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderFloatExample.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":"SliderFloatExample.x3d"
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"SliderFloat",
              "@appinfo":"Slider user-interface widget that produces floating-point output values",
              "@url":["SliderFloatPrototype.x3d#SliderFloat","../../../Savage/Tools/Animation/SliderFloatPrototype.x3d#SliderFloat","https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderFloatPrototype.x3d#SliderFloat","SliderFloatPrototype.wrl#SliderFloat","../../../Savage/Tools/Animation/SliderFloatPrototype.wrl#SliderFloat","https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderFloatPrototype.wrl#SliderFloat"],
              "field": [
                {
                  "@name":"layoutDirection",
                  "@accessType":"initializeOnly",
                  "@appinfo":"Allowed values: vertical, horizontal",
                  "@type":"SFString"
                },
                {
                  "@name":"height",
                  "@accessType":"initializeOnly",
                  "@appinfo":"default value 1.0",
                  "@type":"SFFloat"
                },
                {
                  "@name":"radius",
                  "@accessType":"initializeOnly",
                  "@appinfo":"default value 0.1",
                  "@type":"SFFloat"
                },
                {
                  "@name":"barRadius",
                  "@accessType":"initializeOnly",
                  "@appinfo":"default value 0.02",
                  "@type":"SFFloat"
                },
                {
                  "@name":"sliderBarColor",
                  "@accessType":"initializeOnly",
                  "@appinfo":"default value .8 .4 .8",
                  "@type":"SFColor"
                },
                {
                  "@name":"sliderBallColor",
                  "@accessType":"initializeOnly",
                  "@appinfo":"default value .3 .4 .8",
                  "@type":"SFColor"
                },
                {
                  "@name":"sliderEndColor",
                  "@accessType":"initializeOnly",
                  "@appinfo":"default value .2 .3 .9",
                  "@type":"SFColor"
                },
                {
                  "@name":"min",
                  "@accessType":"initializeOnly",
                  "@appinfo":"default value 0.0",
                  "@type":"SFFloat"
                },
                {
                  "@name":"max",
                  "@accessType":"initializeOnly",
                  "@appinfo":"default value 10.0",
                  "@type":"SFFloat"
                },
                {
                  "@name":"value",
                  "@accessType":"initializeOnly",
                  "@appinfo":"default value 0.0",
                  "@type":"SFFloat"
                },
                {
                  "@name":"setMin",
                  "@accessType":"inputOnly",
                  "@appinfo":"set minimum value for slider bar",
                  "@type":"SFFloat"
                },
                {
                  "@name":"setMax",
                  "@accessType":"inputOnly",
                  "@appinfo":"set maximum value for slider bar",
                  "@type":"SFFloat"
                },
                {
                  "@name":"setValue",
                  "@accessType":"inputOnly",
                  "@appinfo":"set value for slider bar",
                  "@type":"SFFloat"
                },
                {
                  "@name":"valueChanged",
                  "@accessType":"outputOnly",
                  "@appinfo":"output value for slider bar",
                  "@type":"SFFloat"
                },
                {
                  "@name":"traceEnabled",
                  "@accessType":"initializeOnly",
                  "@appinfo":"enable/disable console output for troubleshooting",
                  "@type":"SFBool"
                }
              ]
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"SingleTypeConversion",
              "@appinfo":"SingleTypeConversion converts from a single typed value to various other types of values",
              "@url":["../../../Savage/Tools/Authoring/SingleTypeConversionPrototype.x3d#SingleTypeConversion","https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/SingleTypeConversionPrototype.x3d#SingleTypeConversion","../../../Savage/Tools/Authoring/SingleTypeConversionPrototype.wrl#SingleTypeConversion","https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/SingleTypeConversionPrototype.wrl#SingleTypeConversion"],
              "field": [
                {
                  "@name":"decimalPlaces",
                  "@accessType":"initializeOnly",
                  "@appinfo":"decimalPlaces is the number of significant digits after the decimal point, use -1 to indicate no round off",
                  "@type":"SFInt32"
                },
                {
                  "@name":"setDecimalPlaces",
                  "@accessType":"inputOnly",
                  "@type":"SFInt32"
                },
                {
                  "@name":"BooleanValue",
                  "@accessType":"inputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"FloatValue",
                  "@accessType":"inputOnly",
                  "@type":"SFFloat"
                },
                {
                  "@name":"IntegerValue",
                  "@accessType":"inputOnly",
                  "@type":"SFInt32"
                },
                {
                  "@name":"BooleanResult",
                  "@accessType":"outputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"FloatResult",
                  "@accessType":"outputOnly",
                  "@type":"SFFloat"
                },
                {
                  "@name":"IntegerResult",
                  "@accessType":"outputOnly",
                  "@type":"SFInt32"
                },
                {
                  "@name":"StringResult",
                  "@accessType":"outputOnly",
                  "@type":"SFString"
                },
                {
                  "@name":"StringsResult",
                  "@accessType":"outputOnly",
                  "@type":"MFString"
                },
                {
                  "@name":"TimeResult",
                  "@accessType":"outputOnly",
                  "@type":"SFTime"
                },
                {
                  "@name":"TimeValue",
                  "@accessType":"inputOnly",
                  "@type":"SFTime"
                }
              ]
            }
          },
          {
            "#comment":"Scene graph begins here"
          },
          { "Viewpoint":
            {
              "@description":"Drag slider ball to change values",
              "@position":[0,1,9]
            }
          },
          { "Billboard":
            {
              "@axisOfRotation":[0,0,0],
              "-children":[
                { "Transform":
                  {
                    "@translation":[0,2.5,0],
                    "-children":[
                      { "Shape":
                        {
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@diffuseColor":[0,1,1]
                                    }
                                  }
                              }
                            },
                          "-geometry":
                            { "Text":
                              {
                                "@string":["Drag slider ball","to change values,","select end stops to","increment/decrement"],
                                "-fontStyle":
                                  { "FontStyle":
                                    {
                                      "@DEF":"FontOutputText",
                                      "@justify":["MIDDLE","MIDDLE"],
                                      "@size":0.9
                                    }
                                  }
                              }
                            }
                        }
                      }
                    ]
                  }
                },
                { "Transform":
                  {
                    "@translation":[-0.8,-0.7,0],
                    "-children":[
                      { "Shape":
                        {
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                    }
                                  }
                              }
                            },
                          "-geometry":
                            { "Text":
                              {
                                "@DEF":"ResultString",
                                "-fontStyle":
                                  { "FontStyle":
                                    {
                                      "@USE":"FontOutputText"
                                    }
                                  }
                              }
                            }
                        }
                      }
                    ]
                  }
                },
                { "Transform":
                  {
                    "@translation":[0,-2,0],
                    "-children":[
                      { "ProtoInstance":
                        {
                          "@name":"SliderFloat",
                          "@DEF":"SliderExample",
                          "fieldValue": [
                            {
                              "@name":"layoutDirection",
                              "@value":"horizontal"
                            },
                            {
                              "@name":"height",
                              "@value":5
                            },
                            {
                              "@name":"radius",
                              "@value":0.1
                            },
                            {
                              "@name":"barRadius",
                              "@value":0.04
                            },
                            {
                              "@name":"sliderBarColor",
                              "@value":[0.75,0.75,0.75]
                            },
                            {
                              "@name":"min",
                              "@value":0.0
                            },
                            {
                              "@name":"max",
                              "@value":24.0
                            },
                            {
                              "@name":"value",
                              "@value":12.0
                            },
                            {
                              "@name":"traceEnabled",
                              "@value":true
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "ProtoInstance":
            {
              "@name":"SingleTypeConversion",
              "@DEF":"FloatConverter",
              "fieldValue": [
                {
                  "@name":"decimalPlaces",
                  "@value":2
                }
              ]
            }
          },
          { "ROUTE":
            {
              "@fromField":"valueChanged",
              "@fromNode":"SliderExample",
              "@toField":"FloatValue",
              "@toNode":"FloatConverter"
            }
          },
          { "ROUTE":
            {
              "@fromField":"StringsResult",
              "@fromNode":"FloatConverter",
              "@toField":"set_string",
              "@toNode":"ResultString"
            }
          }
        ]
    }
  }
}