{ "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":"IntegerSequencerExample.x3d"
          },
          {
            "@name":"description",
            "@content":"This example shows how to use the IntegerSequencer prototype in an animated scenario."
          },
          {
            "@name":"creator",
            "@content":"Don Brutzman"
          },
          {
            "@name":"created",
            "@content":"13 April 2002"
          },
          {
            "@name":"modified",
            "@content":"20 October 2019"
          },
          {
            "@name":"reference",
            "@content":"https://www.web3d.org/technicalinfo/specifications/vrml97/part1/nodesRef.html#ScalarInterpolator"
          },
          {
            "@name":"reference",
            "@content":"https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoPrototypes.x3d"
          },
          {
            "@name":"subject",
            "@content":"integer sequencer"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Basic/development/IntegerSequencerExample.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"license",
            "@content":"../license.html"
          },
          {
            "@name":"translated",
            "@content":"02 September 2025"
          },
          {
            "@name":"generator",
            "@content":"X3dToJson.xslt, https://www.web3d.org/x3d/stylesheets/X3dToJson.html"
          },
          {
            "@name":"reference",
            "@content":"X3D JSON encoding: https://www.web3d.org/wiki/index.php/X3D_JSON_Encoding"
          }
        ]
    },
    "Scene": {
        "-children":[
          { "WorldInfo":
            {
              "@title":"IntegerSequencerExample.x3d"
            }
          },
          { "Background":
            {
              "@groundColor":[0.2,0.2,0.2],
              "@skyColor":[0.2,0.2,0.2]
            }
          },
          { "TimeSensor":
            {
              "@DEF":"Clock",
              "@cycleInterval":12,
              "@enabled":false,
              "@loop":true
            }
          },
          { "IntegerSequencer":
            {
              "@DEF":"IntegerSequencerInstance",
              "@key":[0,0.08333,0.1667,0.25,0.3333,0.4167,0.5,0.5833,0.6666,0.75,0.8333,0.9167,1.0],
              "@keyValue":[10,9,8,7,6,5,4,3,2,1,0,-1,10]
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"Clock",
              "@toField":"set_fraction",
              "@toNode":"IntegerSequencerInstance"
            }
          },
          { "Transform":
            {
              "@translation":[0,2,0],
              "-children":[
                { "Shape":
                  {
                    "-geometry":
                      { "Text":
                        {
                          "@string":["IntegerSequencer => Switch","touch blue text to count down"],
                          "-fontStyle":
                            { "FontStyle":
                              {
                                "@justify":["MIDDLE","MIDDLE"]
                              }
                            }
                        }
                      },
                    "-appearance":
                      { "Appearance":
                        {
                          "-material":
                            { "Material":
                              {
                                "@diffuseColor":[0.4,0.6,0.8]
                              }
                            }
                        }
                      }
                  }
                },
                { "TouchSensor":
                  {
                    "@DEF":"TouchToStart",
                    "@description":"Touch To Start"
                  }
                },
                { "ROUTE":
                  {
                    "@fromField":"touchTime",
                    "@fromNode":"TouchToStart",
                    "@toField":"set_startTime",
                    "@toNode":"Clock"
                  }
                },
                { "ROUTE":
                  {
                    "@fromField":"isOver",
                    "@fromNode":"TouchToStart",
                    "@toField":"enabled",
                    "@toNode":"Clock"
                  }
                },
                {
                  "#comment":"background box to simplify touching"
                },
                { "Transform":
                  {
                    "@translation":[0,0,-0.5],
                    "-children":[
                      { "Shape":
                        {
                          "-geometry":
                            { "Box":
                              {
                                "@size":[11,2,0.1]
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@diffuseColor":[0.2,0.2,0.2],
                                      "@transparency":0.95
                                    }
                                  }
                              }
                            }
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@translation":[-3,-2.5,0],
              "-children":[
                { "Shape":
                  {
                    "-geometry":
                      { "Text":
                        {
                          "@string":["click for","previous key","(count up)"],
                          "-fontStyle":
                            { "FontStyle":
                              {
                                "@DEF":"PreviousNextFont",
                                "@justify":["MIDDLE","MIDDLE"],
                                "@size":0.7
                              }
                            }
                        }
                      },
                    "-appearance":
                      { "Appearance":
                        {
                          "-material":
                            { "Material":
                              {
                                "@diffuseColor":[0.8,0.6,0.4]
                              }
                            }
                        }
                      }
                  }
                },
                { "TouchSensor":
                  {
                    "@DEF":"TouchPrevious",
                    "@description":"touch for previous"
                  }
                },
                { "ROUTE":
                  {
                    "@fromField":"isActive",
                    "@fromNode":"TouchPrevious",
                    "@toField":"previous",
                    "@toNode":"IntegerSequencerInstance"
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@translation":[3,-2.5,0],
              "-children":[
                { "Shape":
                  {
                    "-geometry":
                      { "Text":
                        {
                          "@string":["click for","next key","(count down)"],
                          "-fontStyle":
                            { "FontStyle":
                              {
                                "@USE":"PreviousNextFont"
                              }
                            }
                        }
                      },
                    "-appearance":
                      { "Appearance":
                        {
                          "-material":
                            { "Material":
                              {
                                "@diffuseColor":[0.8,0.6,0.4]
                              }
                            }
                        }
                      }
                  }
                },
                { "TouchSensor":
                  {
                    "@DEF":"TouchNext",
                    "@description":"touch for next"
                  }
                },
                { "ROUTE":
                  {
                    "@fromField":"isActive",
                    "@fromNode":"TouchNext",
                    "@toField":"next",
                    "@toNode":"IntegerSequencerInstance"
                  }
                }
              ]
            }
          },
          {
            "#comment":"Interesting materials from Universal Media library"
          },
          { "ExternProtoDeclare":
            {
              "@name":"ArtDeco02",
              "@url":["../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco02","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco02","../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco02","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco02"]
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"ArtDeco04",
              "@url":["../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco04","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco04","../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco04","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco04"]
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"ArtDeco05",
              "@url":["../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco05","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco05","../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco05","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco05"]
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"ArtDeco08",
              "@url":["../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco08","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco08","../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco08","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco08"]
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"ArtDeco09",
              "@url":["../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco09","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco09","../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco09","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco09"]
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"ArtDeco13",
              "@url":["../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco13","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco13","../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco13","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco13"]
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"ArtDeco18",
              "@url":["../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco18","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco18","../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco18","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco18"]
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"ArtDeco21",
              "@url":["../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco21","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco21","../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco21","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco21"]
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"ArtDeco24",
              "@url":["../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco24","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco24","../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco24","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco24"]
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"ArtDeco25",
              "@url":["../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco25","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco25","../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco25","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco25"]
            }
          },
          { "Transform":
            {
              "@translation":[0,-0.5,0],
              "-children":[
                { "Switch":
                  {
                    "@DEF":"CountDownSwitch",
                    "@whichChoice":0,
                    "-children":[
                      { "Group":
                        {
                          "-children":[
                            { "Shape":
                              {
                                "-geometry":
                                  { "Text":
                                    {
                                      "@length":[0],
                                      "@string":["child choice 0"],
                                      "-fontStyle":
                                        { "FontStyle":
                                          {
                                            "@justify":["MIDDLE","MIDDLE"]
                                          }
                                        }
                                    }
                                  },
                                "-appearance":
                                  { "Appearance":
                                    {
                                      "-material":
                                        { "ProtoInstance":
                                          {
                                            "@name":"ArtDeco02"
                                          }
                                        }
                                    }
                                  }
                              }
                            }
                          ]
                        }
                      },
                      { "Shape":
                        {
                          "-geometry":
                            { "Text":
                              {
                                "@length":[0],
                                "@string":["child choice 1"],
                                "-fontStyle":
                                  { "FontStyle":
                                    {
                                      "@justify":["MIDDLE","MIDDLE"]
                                    }
                                  }
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "ProtoInstance":
                                    {
                                      "@name":"ArtDeco09"
                                    }
                                  }
                              }
                            }
                        }
                      },
                      { "Shape":
                        {
                          "-geometry":
                            { "Text":
                              {
                                "@length":[0],
                                "@string":["child choice 2"],
                                "-fontStyle":
                                  { "FontStyle":
                                    {
                                      "@justify":["MIDDLE","MIDDLE"]
                                    }
                                  }
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "ProtoInstance":
                                    {
                                      "@name":"ArtDeco08"
                                    }
                                  }
                              }
                            }
                        }
                      },
                      { "Shape":
                        {
                          "-geometry":
                            { "Text":
                              {
                                "@length":[0],
                                "@string":["child choice 3"],
                                "-fontStyle":
                                  { "FontStyle":
                                    {
                                      "@justify":["MIDDLE","MIDDLE"]
                                    }
                                  }
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "ProtoInstance":
                                    {
                                      "@name":"ArtDeco18"
                                    }
                                  }
                              }
                            }
                        }
                      },
                      { "Shape":
                        {
                          "-geometry":
                            { "Text":
                              {
                                "@length":[0],
                                "@string":["child choice 4"],
                                "-fontStyle":
                                  { "FontStyle":
                                    {
                                      "@justify":["MIDDLE","MIDDLE"]
                                    }
                                  }
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "ProtoInstance":
                                    {
                                      "@name":"ArtDeco21"
                                    }
                                  }
                              }
                            }
                        }
                      },
                      { "Shape":
                        {
                          "-geometry":
                            { "Text":
                              {
                                "@length":[0],
                                "@string":["child choice 5"],
                                "-fontStyle":
                                  { "FontStyle":
                                    {
                                      "@justify":["MIDDLE","MIDDLE"]
                                    }
                                  }
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "ProtoInstance":
                                    {
                                      "@name":"ArtDeco24"
                                    }
                                  }
                              }
                            }
                        }
                      },
                      { "Shape":
                        {
                          "-geometry":
                            { "Text":
                              {
                                "@length":[0],
                                "@string":["child choice 6"],
                                "-fontStyle":
                                  { "FontStyle":
                                    {
                                      "@justify":["MIDDLE","MIDDLE"]
                                    }
                                  }
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "ProtoInstance":
                                    {
                                      "@name":"ArtDeco25"
                                    }
                                  }
                              }
                            }
                        }
                      },
                      { "Shape":
                        {
                          "-geometry":
                            { "Text":
                              {
                                "@length":[0],
                                "@string":["child choice 7"],
                                "-fontStyle":
                                  { "FontStyle":
                                    {
                                      "@justify":["MIDDLE","MIDDLE"]
                                    }
                                  }
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "ProtoInstance":
                                    {
                                      "@name":"ArtDeco13"
                                    }
                                  }
                              }
                            }
                        }
                      },
                      { "Shape":
                        {
                          "-geometry":
                            { "Text":
                              {
                                "@length":[0],
                                "@string":["child choice 8"],
                                "-fontStyle":
                                  { "FontStyle":
                                    {
                                      "@justify":["MIDDLE","MIDDLE"]
                                    }
                                  }
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "ProtoInstance":
                                    {
                                      "@name":"ArtDeco05"
                                    }
                                  }
                              }
                            }
                        }
                      },
                      { "Shape":
                        {
                          "-geometry":
                            { "Text":
                              {
                                "@length":[0],
                                "@string":["child choice 9"],
                                "-fontStyle":
                                  { "FontStyle":
                                    {
                                      "@justify":["MIDDLE","MIDDLE"]
                                    }
                                  }
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "ProtoInstance":
                                    {
                                      "@name":"ArtDeco04"
                                    }
                                  }
                              }
                            }
                        }
                      },
                      { "Shape":
                        {
                          "-geometry":
                            { "Text":
                              {
                                "@length":[0],
                                "@string":["child choice 10"],
                                "-fontStyle":
                                  { "FontStyle":
                                    {
                                      "@justify":["MIDDLE","MIDDLE"]
                                    }
                                  }
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "ProtoInstance":
                                    {
                                      "@name":"ArtDeco02"
                                    }
                                  }
                              }
                            }
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"IntegerSequencerInstance",
              "@toField":"whichChoice",
              "@toNode":"CountDownSwitch"
            }
          }
        ]
    }
  }
}