{ "X3D": {
    "encoding":"UTF-8",
    "@profile":"Immersive",
    "@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":"FishSchool.x3d"
          },
          {
            "@name":"description",
            "@content":"Fish Schooling Demo"
          },
          {
            "@name":"creator",
            "@content":"Stewart Liles, Sean Hynes"
          },
          {
            "@name":"created",
            "@content":"25 September 1998"
          },
          {
            "@name":"modified",
            "@content":"14 December 2024"
          },
          {
            "@name":"reference",
            "@content":"https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/KelpForestDesignPaperWeb3dSymposiumFebruary2002.pdf"
          },
          {
            "@name":"reference",
            "@content":"https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/Teaching3d-KelpForestCaseStudy.pdf"
          },
          {
            "@name":"accessRights",
            "@content":"All content has permissions for free use. Please provide credit to the Naval Postgraduate School (NPS) Modeling Virtual Environments and Simulation (MOVES) Institute."
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/FishSchool.x3d"
          },
          {
            "@name":"reference",
            "@content":"Audacity, https://www.audacityteam.org"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 4.0, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"license",
            "@content":"../license.html"
          },
          {
            "@name":"translated",
            "@content":"17 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":"FishSchool.x3d"
            }
          },
          { "NavigationInfo":
            {
              "@speed":5.0,
              "@type":["EXAMINE"],
              "@visibilityLimit":250.0
            }
          },
          { "Viewpoint":
            {
              "@description":"Close to School - FS",
              "@position":[0.0,1.0,75.0]
            }
          },
          { "Viewpoint":
            {
              "@description":"Nose on Glass - FS",
              "@fieldOfView":1.0,
              "@position":[0.0,1.0,30.0]
            }
          },
          { "Viewpoint":
            {
              "@description":"Fish Feeding - FS",
              "@fieldOfView":1.0,
              "@orientation":[1.0,0.0,0.0,-1.57],
              "@position":[0.0,40.0,0.0]
            }
          },
          { "Viewpoint":
            {
              "@description":"Left Side - FS",
              "@fieldOfView":1.0,
              "@orientation":[0.0,1.0,0.0,-1.57],
              "@position":[-40.0,0.0,0.0]
            }
          },
          { "Viewpoint":
            {
              "@description":"Right Side - FS",
              "@fieldOfView":1.0,
              "@orientation":[0.0,1.0,0.0,1.57],
              "@position":[40.0,0.0,0.0]
            }
          },
          { "Viewpoint":
            {
              "@description":"Middle Looking Out - FS",
              "@jump":false,
              "@orientation":[0.0,1.0,0.0,2.2],
              "@position":[0.0,0.0,0.0]
            }
          },
          { "SpotLight":
            {
              "@ambientIntensity":1.0,
              "@direction":[0.0,-1.0,0.0],
              "@location":[0.0,50.0,0.0]
            }
          },
          { "Sound":
            {
              "@location":[0,0.1,0],
              "@maxBack":50,
              "@maxFront":50,
              "@minBack":50,
              "@minFront":50,
              "-children":[
                {
                  "#comment":"updated original Sound2 as Sound3 using Audacity"
                }
              ],
              "-source":
                { "AudioClip":
                  {
                    "@description":"Sound for Fish",
                    "@loop":true,
                    "@url":["Sound3.wav","https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/Sound3.wav","Sound2.wav","https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/Sound2.wav"]
                  }
                }
            }
          },
          { "TimeSensor":
            {
              "@DEF":"GlobalClock",
              "@loop":true
            }
          },
          { "Shape":
            {
              "-appearance":
                { "Appearance":
                  {
                    "-material":
                      { "Material":
                        {
                        }
                      }
                  }
                },
              "-geometry":
                { "IndexedLineSet":
                  {
                    "@coordIndex":[0,1,2,3,0,-1,4,5,6,7,4,-1,0,4,-1,1,5,-1,2,6,-1,3,7],
                    "-coord":
                      { "Coordinate":
                        {
                          "@point":[-30.0,30.0,30.0,30.0,30.0,30.0,30.0,30.0,-30.0,-30.0,30.0,-30.0,-30.0,-30.0,30.0,30.0,-30.0,30.0,30.0,-30.0,-30.0,-30.0,-30.0,-30.0]
                        }
                      }
                  }
                }
            }
          },
          { "Fog":
            {
              "@color":[0.1,0.3,0.1],
              "@visibilityRange":70.0
            }
          },
          { "Transform":
            {
              "@DEF":"Fish0",
              "@translation":[-5.0,0.0,0.0],
              "-children":[
                { "Viewpoint":
                  {
                    "@description":"Fish 0 view",
                    "@fieldOfView":1.8,
                    "@position":[0.0,1.0,-0.5]
                  }
                },
                { "Inline":
                  {
                    "@DEF":"FishIN",
                    "@url":["Fish.x3d","https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/Fish.x3d","Fish.wrl","https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/Fish.wrl"]
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@DEF":"Fish1",
              "@translation":[-4.0,0.0,0.0],
              "-children":[
                { "Viewpoint":
                  {
                    "@description":"Fish 1 view",
                    "@fieldOfView":1.8,
                    "@position":[0.0,1.0,-0.5]
                  }
                },
                { "Inline":
                  {
                    "@USE":"FishIN"
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@DEF":"Fish2",
              "@translation":[-3.0,0.0,0.0],
              "-children":[
                { "Viewpoint":
                  {
                    "@description":"Fish 2 view",
                    "@fieldOfView":1.8,
                    "@position":[0.0,1.0,-0.5]
                  }
                },
                { "Inline":
                  {
                    "@USE":"FishIN"
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@DEF":"Fish3",
              "@translation":[-2.0,0.0,0.0],
              "-children":[
                { "Viewpoint":
                  {
                    "@description":"Fish 3 view",
                    "@fieldOfView":1.8,
                    "@position":[0.0,1.0,-0.5]
                  }
                },
                { "Inline":
                  {
                    "@USE":"FishIN"
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@DEF":"Fish4",
              "@translation":[-1.0,0.0,0.0],
              "-children":[
                { "Viewpoint":
                  {
                    "@description":"Fish 4 view",
                    "@fieldOfView":1.8,
                    "@position":[0.0,1.0,-0.5]
                  }
                },
                { "Inline":
                  {
                    "@USE":"FishIN"
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@DEF":"Fish5",
              "-children":[
                { "Viewpoint":
                  {
                    "@description":"Fish 5 view",
                    "@fieldOfView":1.8,
                    "@position":[0.0,1.0,-0.5]
                  }
                },
                { "Inline":
                  {
                    "@USE":"FishIN"
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@DEF":"Fish6",
              "@translation":[1.0,0.0,0.0],
              "-children":[
                { "Viewpoint":
                  {
                    "@description":"Fish 6 view",
                    "@fieldOfView":1.8,
                    "@position":[0.0,1.0,-0.5]
                  }
                },
                { "Inline":
                  {
                    "@USE":"FishIN"
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@DEF":"Fish7",
              "@translation":[2.0,0.0,0.0],
              "-children":[
                { "Viewpoint":
                  {
                    "@description":"Fish 7 view",
                    "@fieldOfView":1.8,
                    "@position":[0.0,1.0,-0.5]
                  }
                },
                { "Inline":
                  {
                    "@USE":"FishIN"
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@DEF":"Fish8",
              "@translation":[3.0,0.0,0.0],
              "-children":[
                { "Viewpoint":
                  {
                    "@description":"Fish 8 view",
                    "@fieldOfView":1.8,
                    "@position":[0.0,1.0,-0.5]
                  }
                },
                { "Inline":
                  {
                    "@USE":"FishIN"
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@DEF":"Fish9",
              "@translation":[4.0,0.0,0.0],
              "-children":[
                { "Viewpoint":
                  {
                    "@description":"Fish 9 view",
                    "@fieldOfView":1.8,
                    "@position":[0.0,1.0,-0.5]
                  }
                },
                { "Inline":
                  {
                    "@USE":"FishIN"
                  }
                }
              ]
            }
          },
          {
            "#comment":"Warning: VRML97-style scripting, not X3D Scene Authoring Interface (SAI)"
          },
          { "Script":
            {
              "@DEF":"BoidScript",
              "@directOutput":true,
              "@mustEvaluate":true,
              "@url":["FishSchoolCode/Demo.class","https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/FishSchoolCode/Demo.class"],
              "field": [
                {
                  "@name":"GlobalTick",
                  "@accessType":"inputOnly",
                  "@type":"SFFloat"
                },
                {
                  "@name":"B9",
                  "@accessType":"initializeOnly",
                  "@type":"SFNode",
                  "-children":[
                    { "Transform":
                      {
                        "@USE":"Fish9"
                      }
                    }
                  ]
                },
                {
                  "@name":"B8",
                  "@accessType":"initializeOnly",
                  "@type":"SFNode",
                  "-children":[
                    { "Transform":
                      {
                        "@USE":"Fish8"
                      }
                    }
                  ]
                },
                {
                  "@name":"B7",
                  "@accessType":"initializeOnly",
                  "@type":"SFNode",
                  "-children":[
                    { "Transform":
                      {
                        "@USE":"Fish7"
                      }
                    }
                  ]
                },
                {
                  "@name":"B6",
                  "@accessType":"initializeOnly",
                  "@type":"SFNode",
                  "-children":[
                    { "Transform":
                      {
                        "@USE":"Fish6"
                      }
                    }
                  ]
                },
                {
                  "@name":"B5",
                  "@accessType":"initializeOnly",
                  "@type":"SFNode",
                  "-children":[
                    { "Transform":
                      {
                        "@USE":"Fish5"
                      }
                    }
                  ]
                },
                {
                  "@name":"B4",
                  "@accessType":"initializeOnly",
                  "@type":"SFNode",
                  "-children":[
                    { "Transform":
                      {
                        "@USE":"Fish4"
                      }
                    }
                  ]
                },
                {
                  "@name":"B3",
                  "@accessType":"initializeOnly",
                  "@type":"SFNode",
                  "-children":[
                    { "Transform":
                      {
                        "@USE":"Fish3"
                      }
                    }
                  ]
                },
                {
                  "@name":"B2",
                  "@accessType":"initializeOnly",
                  "@type":"SFNode",
                  "-children":[
                    { "Transform":
                      {
                        "@USE":"Fish2"
                      }
                    }
                  ]
                },
                {
                  "@name":"B1",
                  "@accessType":"initializeOnly",
                  "@type":"SFNode",
                  "-children":[
                    { "Transform":
                      {
                        "@USE":"Fish1"
                      }
                    }
                  ]
                },
                {
                  "@name":"B0",
                  "@accessType":"initializeOnly",
                  "@type":"SFNode",
                  "-children":[
                    { "Transform":
                      {
                        "@USE":"Fish0"
                      }
                    }
                  ]
                }
              ]
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"GlobalClock",
              "@toField":"GlobalTick",
              "@toNode":"BoidScript"
            }
          }
        ]
    }
  }
}