{ "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":"DuttonVillage.x3d"
          },
          {
            "@name":"creator",
            "@content":"LT Allen Dutton"
          },
          {
            "@name":"modified",
            "@content":"20 October 2019"
          },
          {
            "@name":"description",
            "@content":"Primitive village. Move mouse over the hut roofs to see a demonstration of sensors and interpolators"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/DuttonVillage.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"license",
            "@content":"../license.html"
          },
          {
            "@name":"translated",
            "@content":"20 April 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":"DuttonVillage.x3d"
            }
          },
          { "Viewpoint":
            {
              "@description":"View from 80m away",
              "@orientation":[-1,0,0,0.5],
              "@position":[0,60,100]
            }
          },
          { "Viewpoint":
            {
              "@description":"Default viewpoint at (0 0 10) is way too close!! That is a bad place to be, provide a replacement viewpoint instead."
            }
          },
          { "Background":
            {
              "@skyColor":[0,0,0.7]
            }
          },
          { "DirectionalLight":
            {
              "@color":[1,1,0.8],
              "@direction":[0,-1,0],
              "@intensity":0.5
            }
          },
          { "Group":
            {
              "-children":[
                { "Transform":
                  {
                    "@translation":[0,-3.5,0],
                    "-children":[
                      { "Shape":
                        {
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@diffuseColor":[0,0.7,0]
                                    }
                                  },
                                "-texture":
                                  { "ImageTexture":
                                    {
                                      "@url":["grass.jpg","https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/grass.jpg"]
                                    }
                                  },
                                "-textureTransform":
                                  { "TextureTransform":
                                    {
                                      "@scale":[20,20]
                                    }
                                  }
                              }
                            },
                          "-geometry":
                            { "Box":
                              {
                                "@size":[160,1,160]
                              }
                            }
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Group":
            {
              "-children":[
                { "Transform":
                  {
                    "@rotation":[0,1,0,2.7],
                    "@scale":[0.01,0.01,0.01],
                    "@translation":[5,12.3,30],
                    "-children":[
                      { "Inline":
                        {
                          "@url":["AllenDutton.x3d","https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/AllenDutton.x3d","AllenDutton.wrl","https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/AllenDutton.wrl"]
                        }
                      }
                    ]
                  }
                },
                { "Transform":
                  {
                    "@translation":[5,0,30],
                    "-children":[
                      { "Shape":
                        {
                          "-geometry":
                            { "Box":
                              {
                                "@size":[5,5,5]
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@diffuseColor":[0.5,0.5,0.5]
                                    }
                                  }
                              }
                            }
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Group":
            {
              "@DEF":"HUT",
              "-children":[
                { "Shape":
                  {
                    "-appearance":
                      { "Appearance":
                        {
                          "-material":
                            { "Material":
                              {
                                "@DEF":"BROWN",
                                "@diffuseColor":[0.5,0.4,0.3]
                              }
                            },
                          "-texture":
                            { "ImageTexture":
                              {
                                "@url":["wood.gif","https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/grass.jpg"]
                              }
                            },
                          "-textureTransform":
                            { "TextureTransform":
                              {
                                "@rotation":1.57079,
                                "@scale":[1.0,4.0]
                              }
                            }
                        }
                      },
                    "-geometry":
                      { "Cylinder":
                        {
                          "@bottom":false,
                          "@height":6,
                          "@radius":4,
                          "@top":false
                        }
                      }
                  }
                },
                { "Transform":
                  {
                    "@DEF":"ROOF_TRANSFORM",
                    "@translation":[0,4,0],
                    "-children":[
                      { "Shape":
                        {
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@DEF":"YELLOW",
                                      "@diffuseColor":[0.8,0.8,0]
                                    }
                                  },
                                "-texture":
                                  { "ImageTexture":
                                    {
                                      "@url":["straw.jpg","https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/grass.jpg"]
                                    }
                                  }
                              }
                            },
                          "-geometry":
                            { "Cone":
                              {
                                "@bottomRadius":6,
                                "@height":4
                              }
                            }
                        }
                      },
                      { "TouchSensor":
                        {
                          "@DEF":"MyTouchSensor"
                        }
                      }
                    ]
                  }
                },
                { "TimeSensor":
                  {
                    "@DEF":"CLOCK",
                    "@cycleInterval":4,
                    "@enabled":false,
                    "@loop":true
                  }
                },
                { "OrientationInterpolator":
                  {
                    "@DEF":"RoofRotateInterpolator",
                    "@key":[0.0,0.50,1.0],
                    "@keyValue":[0.0,1.0,0.0,0.0,0.0,1.0,0.0,3.14,0.0,1.0,0.0,6.28]
                  }
                },
                { "PositionInterpolator":
                  {
                    "@DEF":"RoofTranslateInterpolator",
                    "@key":[0.0,0.5,1.0],
                    "@keyValue":[0.0,4.0,0.0,0.0,8.0,0.0,0.0,4.0,0.0]
                  }
                }
              ]
            }
          },
          { "Group":
            {
              "@DEF":"CONE_TREE",
              "-children":[
                { "Transform":
                  {
                    "@translation":[10,0,0],
                    "-children":[
                      { "Shape":
                        {
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@USE":"BROWN"
                                    }
                                  },
                                "-texture":
                                  { "ImageTexture":
                                    {
                                      "@DEF":"wood",
                                      "@url":["wood.jpg","https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/wood.jpg"]
                                    }
                                  }
                              }
                            },
                          "-geometry":
                            { "Cylinder":
                              {
                                "@bottom":false,
                                "@height":6,
                                "@radius":0.5,
                                "@top":false
                              }
                            }
                        }
                      }
                    ]
                  }
                },
                { "Transform":
                  {
                    "@translation":[10,3,0],
                    "-children":[
                      { "Shape":
                        {
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@diffuseColor":[0,0.3,0]
                                    }
                                  },
                                "-texture":
                                  { "ImageTexture":
                                    {
                                      "@url":["leaves.jpg","https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/leaves.jpg"]
                                    }
                                  }
                              }
                            },
                          "-geometry":
                            { "Cone":
                              {
                                "@bottomRadius":2,
                                "@height":6
                              }
                            }
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Group":
            {
              "@DEF":"SPHERE_TREE",
              "-children":[
                { "Transform":
                  {
                    "@translation":[-30,0,-3],
                    "-children":[
                      { "Shape":
                        {
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@USE":"BROWN"
                                    }
                                  },
                                "-texture":
                                  { "ImageTexture":
                                    {
                                      "@USE":"wood"
                                    }
                                  }
                              }
                            },
                          "-geometry":
                            { "Cylinder":
                              {
                                "@bottom":false,
                                "@height":6,
                                "@radius":0.5,
                                "@top":false
                              }
                            }
                        }
                      }
                    ]
                  }
                },
                { "Transform":
                  {
                    "@translation":[-30,6,-3],
                    "-children":[
                      { "Shape":
                        {
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@diffuseColor":[0,0.3,0]
                                    }
                                  },
                                "-texture":
                                  { "ImageTexture":
                                    {
                                      "@url":["leaves.jpg","https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/leaves.jpg"]
                                    }
                                  }
                              }
                            },
                          "-geometry":
                            { "Sphere":
                              {
                                "@radius":3.5
                              }
                            }
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Group":
            {
              "-children":[
                { "Transform":
                  {
                    "@scale":[0.8,1,0.8],
                    "@translation":[-45,0,10],
                    "-children":[
                      { "Group":
                        {
                          "@USE":"HUT"
                        }
                      },
                      { "Transform":
                        {
                          "@translation":[0,11,0],
                          "-children":[
                            { "Shape":
                              {
                                "-geometry":
                                  { "Text":
                                    {
                                      "@string":["Visitor's","Center"],
                                      "-fontStyle":
                                        { "FontStyle":
                                          {
                                            "@justify":["MIDDLE","MIDDLE"],
                                            "@size":5.0,
                                            "@style":"BOLDITALIC"
                                          }
                                        }
                                    }
                                  },
                                "-appearance":
                                  { "Appearance":
                                    {
                                      "-material":
                                        { "Material":
                                          {
                                            "@diffuseColor":[0.8,0.1,0.4]
                                          }
                                        }
                                    }
                                  }
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Group":
            {
              "-children":[
                { "Transform":
                  {
                    "@scale":[1.5,1,1.5],
                    "@translation":[30,0,20],
                    "-children":[
                      { "Group":
                        {
                          "@USE":"HUT"
                        }
                      },
                      { "Transform":
                        {
                          "@translation":[1,8,0],
                          "-children":[
                            { "Shape":
                              {
                                "-geometry":
                                  { "Text":
                                    {
                                      "@string":["Chief's Hut"],
                                      "-fontStyle":
                                        { "FontStyle":
                                          {
                                            "@justify":["MIDDLE","MIDDLE"],
                                            "@size":4.0,
                                            "@style":"BOLD"
                                          }
                                        }
                                    }
                                  },
                                "-appearance":
                                  { "Appearance":
                                    {
                                      "-material":
                                        { "Material":
                                          {
                                            "@diffuseColor":[0.8,0.1,0.4]
                                          }
                                        }
                                    }
                                  }
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Group":
            {
              "-children":[
                { "Transform":
                  {
                    "@scale":[0.5,1,0.5],
                    "@translation":[-10,0,20],
                    "-children":[
                      { "Group":
                        {
                          "@USE":"HUT"
                        }
                      },
                      { "Transform":
                        {
                          "@translation":[0,24,0],
                          "-children":[
                            { "Shape":
                              {
                                "-geometry":
                                  { "Text":
                                    {
                                      "@string":["Outhouse"],
                                      "-fontStyle":
                                        { "FontStyle":
                                          {
                                            "@family":["SANS"],
                                            "@horizontal":false,
                                            "@justify":["MIDDLE","MIDDLE"],
                                            "@size":5.0,
                                            "@style":"BOLD"
                                          }
                                        }
                                    }
                                  },
                                "-appearance":
                                  { "Appearance":
                                    {
                                      "-material":
                                        { "Material":
                                          {
                                            "@diffuseColor":[0.8,0.1,0.4]
                                          }
                                        }
                                    }
                                  }
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Group":
            {
              "-children":[
                { "Transform":
                  {
                    "@scale":[0.5,1.0,0.5],
                    "@translation":[30,0,30],
                    "-children":[
                      { "Group":
                        {
                          "@USE":"SPHERE_TREE"
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Group":
            {
              "-children":[
                { "Transform":
                  {
                    "@scale":[2,1.0,2],
                    "@translation":[-45,0,30],
                    "-children":[
                      { "Group":
                        {
                          "@USE":"CONE_TREE"
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "ROUTE":
            {
              "@fromField":"isOver",
              "@fromNode":"MyTouchSensor",
              "@toField":"set_enabled",
              "@toNode":"CLOCK"
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"CLOCK",
              "@toField":"set_fraction",
              "@toNode":"RoofRotateInterpolator"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"RoofRotateInterpolator",
              "@toField":"set_rotation",
              "@toNode":"ROOF_TRANSFORM"
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"CLOCK",
              "@toField":"set_fraction",
              "@toNode":"RoofTranslateInterpolator"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"RoofTranslateInterpolator",
              "@toField":"set_translation",
              "@toNode":"ROOF_TRANSFORM"
            }
          }
        ]
    }
  }
}