{ "X3D": {
    "encoding":"UTF-8",
    "@profile":"Immersive",
    "@version":"3.0",
    "@xsd:noNamespaceSchemaLocation":"http://www.web3d.org/specifications/x3d-3.0.xsd",
    "JSON schema":"http://www.web3d.org/specifications/x3d-3.3-JSONSchema.json",
    "head": {
        "meta": [
          {
            "@name":"title",
            "@content":"Figure09.8ClickDragTouchSensorPlaneSensorWithAxes.x3d"
          },
          {
            "@name":"creator",
            "@content":"Figure 9.8, The VRML 2.0 Sourcebook, Copyright [1997] By Andrea L. Ames, David R. Nadeau, and John L. Moreland"
          },
          {
            "@name":"reference",
            "@content":"http://www.wiley.com/legacy/compbooks/vrml2sbk/ch09/09fig08.htm"
          },
          {
            "@name":"transcriber",
            "@content":"Don Brutzman"
          },
          {
            "@name":"created",
            "@content":"12 August 2000"
          },
          {
            "@name":"modified",
            "@content":"9 March 2014"
          },
          {
            "@name":"description",
            "@content":"A cube that spins when the cursor moves over it and translates when the cursor drags it, with coordinate axes superimposed to show X3D/VRML directions."
          },
          {
            "@name":"identifier",
            "@content":"http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter09-SensingViewer/Figure09.8ClickDragTouchSensorPlaneSensorWithAxes.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit"
          },
          {
            "@name":"license",
            "@content":"../../license.html"
          },
          {
            "@name":"translated",
            "@content":"19 March 2017"
          },
          {
            "@name":"generator",
            "@content":"X3dToJson.xslt, http://www.web3d.org/x3d/stylesheets/X3dToJson.html"
          },
          {
            "@name":"warning",
            "@content":"An experimental version of X3D JSON encoding is used for this scene.  Status online at http://www.web3d.org/wiki/index.php/X3D_JSON_Encoding"
          }
        ]
    },
    "Scene": {
        "-children":[
          {
            "#comment":"Click and drag to spin and move shapes. Superfluous Group nodes removed."
          },
          { "Group":
            {
              "-children":[
                { "Transform":
                  {
                    "@DEF":"ROTATING_SHAPE_TRANSFORM",
                    "-children":[
                      { "Shape":
                        {
                          "-geometry":
                            { "Box":
                              {
                                "@size":[1.414,1.414,1.414]
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@diffuseColor":[0.1,0.9,0.9],
                                      "@emissiveColor":[0.05,0.2,0.2]
                                    }
                                  }
                              }
                            }
                        }
                      }
                    ]
                  }
                },
                { "TouchSensor":
                  {
                    "@DEF":"IS_OVER_SENSOR",
                    "@description":"Touch to spin"
                  }
                },
                { "PlaneSensor":
                  {
                    "@DEF":"DRAG_SENSOR",
                    "@description":"Click to drag in plane",
                    "@maxPosition":[4,4],
                    "@minPosition":[-4,-4]
                  }
                },
                { "TimeSensor":
                  {
                    "@DEF":"CLOCK",
                    "@cycleInterval":4,
                    "@enabled":false,
                    "@loop":true
                  }
                },
                { "OrientationInterpolator":
                  {
                    "@DEF":"SPIN_PATH",
                    "@key":[0,0.5,1],
                    "@keyValue":[0,1,0,0,0,1,0,3.14,0,1,0,6.28]
                  }
                }
              ]
            }
          },
          {
            "#comment":"A small transparent box is added to indicate the virtual geometry of the PlaneSensor"
          },
          { "Transform":
            {
              "@DEF":"TRANSPARENT_BOX_TRANSFORM",
              "-children":[
                { "Shape":
                  {
                    "-geometry":
                      { "Box":
                        {
                          "@size":[8,8,0.1]
                        }
                      },
                    "-appearance":
                      { "Appearance":
                        {
                          "-material":
                            { "Material":
                              {
                                "@diffuseColor":[0.7,0.7,0.7],
                                "@transparency":0.5
                              }
                            }
                        }
                      }
                  }
                }
              ]
            }
          },
          {
            "#comment":"Adding this Inline reference to another scene superimposes X3D/VRML coordinate system axes."
          },
          { "Transform":
            {
              "@scale":[4,4,4],
              "-children":[
                { "Inline":
                  {
                    "@DEF":"CoordinateAxes",
                    "@url":["../../X3dForWebAuthors/Chapter03-Grouping/CoordinateAxes.x3d","http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter03-Grouping/CoordinateAxes.x3d","https://savage.nps.edu/Savage/Tools/Authoring/CoordinateAxes.x3d","../../X3dForWebAuthors/Chapter03-Grouping/CoordinateAxes.wrl","http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter03-Grouping/CoordinateAxes.wrl","https://savage.nps.edu/Savage/Tools/Authoring/CoordinateAxes.wrl"]
                  }
                }
              ]
            }
          },
          {
            "#comment":"Note that we are connecting a chain of behavior engines in these ROUTEs. The event types passed via each ROUTE must each match."
          },
          { "ROUTE":
            {
              "@fromField":"isOver",
              "@fromNode":"IS_OVER_SENSOR",
              "@toField":"set_enabled",
              "@toNode":"CLOCK"
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"CLOCK",
              "@toField":"set_fraction",
              "@toNode":"SPIN_PATH"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"SPIN_PATH",
              "@toField":"set_rotation",
              "@toNode":"ROTATING_SHAPE_TRANSFORM"
            }
          },
          { "ROUTE":
            {
              "@fromField":"translation_changed",
              "@fromNode":"DRAG_SENSOR",
              "@toField":"set_translation",
              "@toNode":"ROTATING_SHAPE_TRANSFORM"
            }
          }
        ]
    }
  }
}