{ "X3D": {
    "encoding":"UTF-8",
    "@profile":"Interactive",
    "@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":"IntegerTriggerPumpHouse.x3d"
          },
          {
            "@name":"description",
            "@content":"An IntegerTrigger node controls the display of colored cones near the pump house."
          },
          {
            "@name":"creator",
            "@content":"Todd Gagnon and Mark A. Boyd"
          },
          {
            "@name":"translator",
            "@content":"Xeena VRML importer, X3D-Edit 3.1, https://www.web3d.org/x3d/content/README.X3D-Edit.html"
          },
          {
            "@name":"created",
            "@content":"8 June 1998"
          },
          {
            "@name":"translated",
            "@content":"20 December 2002"
          },
          {
            "@name":"modified",
            "@content":"20 October 2019"
          },
          {
            "@name":"warning",
            "@content":"needs debugging"
          },
          {
            "@name":"reference",
            "@content":"KelpTank.x3d"
          },
          {
            "@name":"reference",
            "@content":"https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/PumpHouse.x3d"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter09EventUtilitiesScripting/IntegerTriggerPumpHouse.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"generator",
            "@content":"Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html"
          },
          {
            "@name":"license",
            "@content":"../license.html"
          },
          {
            "@name":"translated",
            "@content":"31 August 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":"IntegerTriggerPumpHouse.x3d"
            }
          },
          { "Background":
            {
              "@skyColor":[1,1,1]
            }
          },
          { "Viewpoint":
            {
              "@description":"Book View",
              "@orientation":[-0.969,0.239,0.056,0.13],
              "@position":[1.66,1.34,5.95]
            }
          },
          { "Group":
            {
              "-children":[
                { "Transform":
                  {
                    "@scale":[0.91,0.6,0.3],
                    "@translation":[0.8,-0.65,0.5],
                    "-children":[
                      { "Shape":
                        {
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@diffuseColor":[0.749,0.694,0.651]
                                    }
                                  }
                              }
                            },
                          "-geometry":
                            { "Cylinder":
                              {
                                "@bottom":false,
                                "@top":false
                              }
                            }
                        }
                      }
                    ]
                  }
                },
                { "Group":
                  {
                    "-children":[
                      { "Shape":
                        {
                          "-appearance":
                            { "Appearance":
                              {
                                "@DEF":"PumpHouseAppearance",
                                "-material":
                                  { "Material":
                                    {
                                      "@diffuseColor":[0.82,0.78,0.74]
                                    }
                                  }
                              }
                            },
                          "-geometry":
                            { "IndexedFaceSet":
                              {
                                "@coordIndex":[0,1,5,4,-1,5,1,2,6,-1,6,2,3,7,-1,3,0,4,7,-1,1,12,13,2,-1,2,13,14,-1,12,15,16,13,-1,15,0,3,16,-1,16,3,17,-1,9,5,6,10,-1,8,9,10,11,-1,4,8,11,7,-1,4,5,9,8,-1,11,10,6,7,-1,3,2,14,17,-1,13,16,17,14,-1],
                                "-coord":
                                  { "Coordinate":
                                    {
                                      "@point":[0.0,0.0,0.0,2.0,0.0,0.0,2.0,1.75,0.0,0.0,1.75,0.0,0.625,0.75,0.0,1.0,0.75,0.0,1.0,1.6,0.0,0.625,1.6,0.0,0.625,0.75,-0.65,1.0,0.75,-0.65,1.0,1.6,-0.65,0.625,1.6,-0.65,2.0,0.0,-2.7,2.0,1.75,-2.7,2.0,2.5,-1.0,0.0,0.0,-2.7,0.0,1.75,-2.7,0.0,2.5,-1.0]
                                    }
                                  }
                              }
                            }
                        }
                      },
                      { "TouchSensor":
                        {
                          "@DEF":"PumpTouched",
                          "@description":"touch to activate"
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Group":
            {
              "-children":[
                { "Transform":
                  {
                    "@scale":[0.5,0.5,0.5],
                    "@translation":[1.0,1.1,-1.5],
                    "-children":[
                      { "Transform":
                        {
                          "@DEF":"PistonTransform",
                          "-children":[
                            { "Transform":
                              {
                                "@scale":[1.8,1.2,0.6],
                                "@translation":[0.0,-0.2,0.0],
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "-material":
                                              { "Material":
                                                {
                                                  "@diffuseColor":[0.427,0.427,0.42]
                                                }
                                              }
                                          }
                                        },
                                      "-geometry":
                                        { "Cylinder":
                                          {
                                            "@height":1.0,
                                            "@radius":0.98
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Transform":
                              {
                                "@DEF":"CylinderRod",
                                "@rotation":[0.0,0.0,-1.0,0.523599],
                                "@translation":[-0.25,0.75,0.0],
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"PumpHouseAppearance"
                                          }
                                        },
                                      "-geometry":
                                        { "Cylinder":
                                          {
                                            "@height":1.0,
                                            "@radius":0.1
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Transform":
                              {
                                "@rotation":[0.0,0.0,1.0,1.047198],
                                "@translation":[1.0,0.6,0.0],
                                "-children":[
                                  { "Transform":
                                    {
                                      "@USE":"CylinderRod"
                                    }
                                  }
                                ]
                              }
                            },
                            { "Transform":
                              {
                                "@translation":[0.0,1.2,0.0],
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"PumpHouseAppearance"
                                          }
                                        },
                                      "-geometry":
                                        { "Sphere":
                                          {
                                            "@radius":0.15
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Transform":
                              {
                                "@DEF":"RockerArm1",
                                "@center":[0.0,-0.4,0.0],
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"PumpHouseAppearance"
                                          }
                                        },
                                      "-geometry":
                                        { "Cylinder":
                                          {
                                            "@height":1.8,
                                            "@radius":0.1
                                          }
                                        }
                                    }
                                  },
                                  { "Transform":
                                    {
                                      "@translation":[0.0,0.95,0.0],
                                      "-children":[
                                        { "Shape":
                                          {
                                            "-appearance":
                                              { "Appearance":
                                                {
                                                  "@USE":"PumpHouseAppearance"
                                                }
                                              },
                                            "-geometry":
                                              { "Sphere":
                                                {
                                                  "@radius":0.15
                                                }
                                              }
                                          }
                                        }
                                      ]
                                    }
                                  },
                                  { "PositionInterpolator":
                                    {
                                      "@DEF":"Rocker1Path",
                                      "@key":[0.0,0.3,0.32,0.5,0.75,1.0],
                                      "@keyValue":[0.0,2.0,-0.25,0.0,1.8,-0.35,0.0,1.8,-0.35,0.0,2.0,-0.25,0.0,2.0,-0.12,0.0,2.0,-0.25]
                                    }
                                  },
                                  { "OrientationInterpolator":
                                    {
                                      "@DEF":"Rocker1Rotation",
                                      "@key":[0.0,0.3,0.32,0.5,0.75,1.0],
                                      "@keyValue":[-1.0,0.0,0.0,0.523599,-1.0,0.0,0.0,1.0471976,-1.0,0.0,0.0,1.0471976,-1.0,0.0,0.0,0.523599,-1.0,0.0,0.0,0.2617994,-1.0,0.0,0.0,0.523599]
                                    }
                                  }
                                ]
                              }
                            },
                            { "Transform":
                              {
                                "@DEF":"RockerArm2",
                                "@center":[0.0,0.7,0.0],
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"PumpHouseAppearance"
                                          }
                                        },
                                      "-geometry":
                                        { "Cylinder":
                                          {
                                            "@height":1.8,
                                            "@radius":0.1
                                          }
                                        }
                                    }
                                  },
                                  { "Transform":
                                    {
                                      "@translation":[0.0,-0.95,0.0],
                                      "-children":[
                                        { "Shape":
                                          {
                                            "-appearance":
                                              { "Appearance":
                                                {
                                                  "@USE":"PumpHouseAppearance"
                                                }
                                              },
                                            "-geometry":
                                              { "Sphere":
                                                {
                                                  "@radius":0.15
                                                }
                                              }
                                          }
                                        }
                                      ]
                                    }
                                  },
                                  { "PositionInterpolator":
                                    {
                                      "@DEF":"Rocker2Path",
                                      "@key":[0.0,0.3,0.32,0.5,0.75,1.0],
                                      "@keyValue":[0.0,1.95,-1.0,0.0,1.2,-1.6,0.0,1.2,-1.6,0.0,1.95,-1.0,0.0,2.2,-0.65,0.0,1.95,-1.0]
                                    }
                                  },
                                  { "OrientationInterpolator":
                                    {
                                      "@DEF":"Rocker2Rotation",
                                      "@key":[0.0,0.3,0.32,0.5,0.75,1.0],
                                      "@keyValue":[1.0,0.0,0.0,0.523599,1.0,0.0,0.0,0.4,1.0,0.0,0.0,0.4,1.0,0.0,0.0,0.523599,1.0,0.0,0.0,1.570796,1.0,0.0,0.0,0.523599]
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      { "TimeSensor":
                        {
                          "@DEF":"PistonClock",
                          "@cycleInterval":5.5,
                          "@loop":true
                        }
                      },
                      { "PositionInterpolator":
                        {
                          "@DEF":"PistonPath",
                          "@key":[0.0,0.3,0.32,0.5,0.75,1.0],
                          "@keyValue":[-0.4,-2.3,4.0,-0.4,-1.5,4.0,-0.4,-1.5,4.0,-0.4,-2.3,4.0,-0.4,-3.3,4.0,-0.4,-2.3,4.0]
                        }
                      },
                      { "TimeSensor":
                        {
                          "@DEF":"Timer",
                          "@cycleInterval":2,
                          "@loop":true,
                          "@startTime":1
                        }
                      },
                      { "OrientationInterpolator":
                        {
                          "@DEF":"Rotator",
                          "@key":[0,0.33,0.67,1],
                          "@keyValue":[0,0,1,0,0,0,1,2,0,0,1,4,0,0,1,6.28]
                        }
                      },
                      { "IntegerTrigger":
                        {
                          "@DEF":"Filter1",
                          "@integerKey":1
                        }
                      },
                      { "IntegerTrigger":
                        {
                          "@DEF":"Filter2",
                          "@integerKey":2
                        }
                      },
                      { "IntegerTrigger":
                        {
                          "@DEF":"Filter3",
                          "@integerKey":0
                        }
                      },
                      { "Transform":
                        {
                          "@translation":[3,2,4],
                          "-children":[
                            { "Transform":
                              {
                                "@DEF":"EyeCandy",
                                "-children":[
                                  { "Switch":
                                    {
                                      "@DEF":"Switcher",
                                      "@whichChoice":0,
                                      "-children":[
                                        { "Transform":
                                          {
                                            "@rotation":[0,0,1,3.14],
                                            "@translation":[0,-1.5,0.5],
                                            "-children":[
                                              { "Shape":
                                                {
                                                  "-appearance":
                                                    { "Appearance":
                                                      {
                                                        "-material":
                                                          { "Material":
                                                            {
                                                              "@diffuseColor":[1,0,0]
                                                            }
                                                          }
                                                      }
                                                    },
                                                  "-geometry":
                                                    { "Cone":
                                                      {
                                                        "@DEF":"b1",
                                                        "@bottomRadius":0.5,
                                                        "@height":1
                                                      }
                                                    }
                                                }
                                              },
                                              { "TouchSensor":
                                                {
                                                  "@DEF":"Touch1",
                                                  "@description":"touch to activate"
                                                }
                                              }
                                            ]
                                          }
                                        },
                                        { "Transform":
                                          {
                                            "@rotation":[0,0,1,-1.05],
                                            "@translation":[1.3,0.75,0],
                                            "-children":[
                                              { "Shape":
                                                {
                                                  "-appearance":
                                                    { "Appearance":
                                                      {
                                                        "-material":
                                                          { "Material":
                                                            {
                                                              "@diffuseColor":[0,1,1]
                                                            }
                                                          }
                                                      }
                                                    },
                                                  "-geometry":
                                                    { "Cone":
                                                      {
                                                        "@USE":"b1"
                                                      }
                                                    }
                                                }
                                              },
                                              { "TouchSensor":
                                                {
                                                  "@DEF":"Touch2",
                                                  "@description":"touch to activate"
                                                }
                                              }
                                            ]
                                          }
                                        },
                                        { "Transform":
                                          {
                                            "@rotation":[0,0,1,1.05],
                                            "@translation":[-1.3,0.75,-0.5],
                                            "-children":[
                                              { "Shape":
                                                {
                                                  "-appearance":
                                                    { "Appearance":
                                                      {
                                                        "-material":
                                                          { "Material":
                                                            {
                                                              "@diffuseColor":[1,1,0]
                                                            }
                                                          }
                                                      }
                                                    },
                                                  "-geometry":
                                                    { "Cone":
                                                      {
                                                        "@USE":"b1"
                                                      }
                                                    }
                                                }
                                              },
                                              { "TouchSensor":
                                                {
                                                  "@DEF":"Touch3",
                                                  "@description":"touch to activate"
                                                }
                                              }
                                            ]
                                          }
                                        }
                                      ]
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "ROUTE":
            {
              "@fromField":"isActive",
              "@fromNode":"Touch1",
              "@toField":"set_boolean",
              "@toNode":"Filter1"
            }
          },
          { "ROUTE":
            {
              "@fromField":"isActive",
              "@fromNode":"Touch2",
              "@toField":"set_boolean",
              "@toNode":"Filter2"
            }
          },
          { "ROUTE":
            {
              "@fromField":"isActive",
              "@fromNode":"Touch3",
              "@toField":"set_boolean",
              "@toNode":"Filter3"
            }
          },
          { "ROUTE":
            {
              "@fromField":"triggerValue",
              "@fromNode":"Filter1",
              "@toField":"whichChoice",
              "@toNode":"Switcher"
            }
          },
          { "ROUTE":
            {
              "@fromField":"triggerValue",
              "@fromNode":"Filter2",
              "@toField":"whichChoice",
              "@toNode":"Switcher"
            }
          },
          { "ROUTE":
            {
              "@fromField":"triggerValue",
              "@fromNode":"Filter3",
              "@toField":"whichChoice",
              "@toNode":"Switcher"
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"Timer",
              "@toField":"set_fraction",
              "@toNode":"Rotator"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"Rotator",
              "@toField":"rotation",
              "@toNode":"EyeCandy"
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"PistonClock",
              "@toField":"set_fraction",
              "@toNode":"PistonPath"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"PistonPath",
              "@toField":"set_translation",
              "@toNode":"PistonTransform"
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"PistonClock",
              "@toField":"set_fraction",
              "@toNode":"Rocker1Path"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"Rocker1Path",
              "@toField":"set_translation",
              "@toNode":"RockerArm1"
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"PistonClock",
              "@toField":"set_fraction",
              "@toNode":"Rocker1Rotation"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"Rocker1Rotation",
              "@toField":"set_rotation",
              "@toNode":"RockerArm1"
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"PistonClock",
              "@toField":"set_fraction",
              "@toNode":"Rocker2Path"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"Rocker2Path",
              "@toField":"set_translation",
              "@toNode":"RockerArm2"
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"PistonClock",
              "@toField":"set_fraction",
              "@toNode":"Rocker2Rotation"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"Rocker2Rotation",
              "@toField":"set_rotation",
              "@toNode":"RockerArm2"
            }
          }
        ]
    }
  }
}