{ "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":"HalfMoonPrototype.x3d"
          },
          {
            "@name":"description",
            "@content":"Prototype for a group of HalfMoon fish in the Kelp forest."
          },
          {
            "@name":"creator",
            "@content":"Ildeniz Duman"
          },
          {
            "@name":"translator",
            "@content":"Scott Tufts"
          },
          {
            "@name":"created",
            "@content":"1 June 1998"
          },
          {
            "@name":"modified",
            "@content":"22 February 2022"
          },
          {
            "@name":"warning",
            "@content":"Additional PositionInterpolator present but disabled."
          },
          {
            "@name":"warning",
            "@content":"Wiggle causes texture flashing. TODO: move animation to example file."
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/HalfMoonPrototype.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.3, 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":"HalfMoonPrototype.x3d"
            }
          },
          { "ProtoDeclare":
            {
              "@name":"HalfMoon",
              "@appinfo":"HalfMoon fish",
              "ProtoInterface": {
                  "field": [
                    {
                      "@name":"skinTextureUrl",
                      "@accessType":"inputOutput",
                      "@type":"MFString",
                      "@value":["HalfMoonScalesPatch.jpg","https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/HalfMoonScalesPatch.jpg"]
                    },
                    {
                      "@name":"fishScale",
                      "@accessType":"inputOutput",
                      "@type":"SFVec3f",
                      "@value":[0.3,0.25,0.25]
                    },
                    {
                      "@name":"fishColor",
                      "@accessType":"inputOutput",
                      "@type":"SFColor",
                      "@value":[0.7,0.7,0.7]
                    }
                  ]
              },
              "ProtoBody": {
                  "-children":[
                    { "Transform":
                      {
                        "@DEF":"MyHalfMoon",
                        "IS": {
                            "connect": [
                              {
                                "@nodeField":"scale",
                                "@protoField":"fishScale"
                              }
                            ]
                        },
                        "-children":[
                          { "Shape":
                            {
                              "-appearance":
                                { "Appearance":
                                  {
                                    "-material":
                                      { "Material":
                                        {
                                          "@DEF":"FishColor",
                                          "IS": {
                                              "connect": [
                                                {
                                                  "@nodeField":"diffuseColor",
                                                  "@protoField":"fishColor"
                                                }
                                              ]
                                          }
                                        }
                                      },
                                    "-texture":
                                      { "ImageTexture":
                                        {
                                          "@DEF":"FishTexture",
                                          "IS": {
                                              "connect": [
                                                {
                                                  "@nodeField":"url",
                                                  "@protoField":"skinTextureUrl"
                                                }
                                              ]
                                          }
                                        }
                                      }
                                  }
                                },
                              "-geometry":
                                { "Extrusion":
                                  {
                                    "@DEF":"Fish_Shape",
                                    "@creaseAngle":1.57,
                                    "@crossSection":[-0.1,1.0,0.1,1,0.5,0.5,0.5,-0.5,0.1,-1,-0.1,-1,-0.5,-0.5,-0.5,0.5,-0.1,1],
                                    "@scale":[0.03,0.03,0.3,0.3,0.2,0.4,0.1,0.5,0.1,0.15,0.03,0.4],
                                    "@spine":[0,1.5,0,0,1.2,0,0,0.5,0,0,0.3,0,0,0,0,0,-0.3,0]
                                  }
                                }
                            }
                          },
                          { "Shape":
                            {
                              "-appearance":
                                { "Appearance":
                                  {
                                    "@DEF":"Fin_Skin",
                                    "-material":
                                      { "Material":
                                        {
                                          "@diffuseColor":[0.5,0.5,0.5],
                                          "@transparency":0.2
                                        }
                                      }
                                  }
                                }
                            }
                          },
                          { "Transform":
                            {
                              "@translation":[1.37,0.1,0.1],
                              "-children":[
                                { "Shape":
                                  {
                                    "@DEF":"Eye",
                                    "-appearance":
                                      { "Appearance":
                                        {
                                          "-material":
                                            { "Material":
                                              {
                                                "@diffuseColor":[0.5,0.5,0.5],
                                                "@shininess":1,
                                                "@specularColor":[0.3,0.3,0.3]
                                              }
                                            }
                                        }
                                      },
                                    "-geometry":
                                      { "Sphere":
                                        {
                                          "@radius":0.04
                                        }
                                      }
                                  }
                                }
                              ]
                            }
                          },
                          { "Transform":
                            {
                              "@translation":[1.37,0.1,-0.1],
                              "-children":[
                                { "Shape":
                                  {
                                    "@USE":"Eye"
                                  }
                                }
                              ]
                            }
                          },
                          { "Transform":
                            {
                              "@scale":[2.6,1,0.7],
                              "@translation":[1.46,0,0],
                              "-children":[
                                {
                                  "#comment":"Mouth"
                                },
                                { "Shape":
                                  {
                                    "@USE":"Eye"
                                  }
                                }
                              ]
                            }
                          },
                          { "Transform":
                            {
                              "@DEF":"Left_Pectoral",
                              "@translation":[1.1,-0.15,-0.1],
                              "-children":[
                                { "Shape":
                                  {
                                    "-appearance":
                                      { "Appearance":
                                        {
                                          "@USE":"Fin_Skin"
                                        }
                                      },
                                    "-geometry":
                                      { "IndexedFaceSet":
                                        {
                                          "@coordIndex":[0,1,2,-1],
                                          "@solid":false,
                                          "-coord":
                                            { "Coordinate":
                                              {
                                                "@point":[0,0,0,0.2,0,0,-0.2,0,-0.2]
                                              }
                                            }
                                        }
                                      }
                                  }
                                }
                              ]
                            }
                          },
                          { "Transform":
                            {
                              "@DEF":"Right_Pectoral",
                              "@translation":[1.1,-0.15,0.1],
                              "-children":[
                                { "Shape":
                                  {
                                    "-appearance":
                                      { "Appearance":
                                        {
                                          "@USE":"Fin_Skin"
                                        }
                                      },
                                    "-geometry":
                                      { "IndexedFaceSet":
                                        {
                                          "@coordIndex":[0,1,2,-1],
                                          "@solid":false,
                                          "-coord":
                                            { "Coordinate":
                                              {
                                                "@point":[0,0,0,0.2,0,0,-0.2,0,0.2]
                                              }
                                            }
                                        }
                                      }
                                  }
                                }
                              ]
                            }
                          },
                          { "Group":
                            {
                              "@DEF":"AnimationGroup",
                              "-children":[
                                { "TimeSensor":
                                  {
                                    "@DEF":"Timer",
                                    "@cycleInterval":5,
                                    "@loop":true
                                  }
                                },
                                { "CoordinateInterpolator":
                                  {
                                    "@DEF":"Waggler",
                                    "@key":[0.0,0.15,0.28,0.4,0.55,0.7,0.85,1],
                                    "@keyValue":[1.5,0,0,1.2,0,0,0.5,0,0,0.3,0,0,0,0,0,-0.3,0,0,1.5,0,0,1.20,0,0,0.5,0,0.1,0.3,0,0.2,0,0,0.25,-0.3,0,0.3,1.5,0,0,1.20,0,0,0.5,0,0,0.3,0,0,0,0,0,-0.3,0,0,1.5,0,0,1.2,0,0,0.5,0,-0.1,0.3,0,-0.2,0,0,-0.25,-0.3,0,-0.3,1.5,0,0,1.2,0,0,0.5,0,0,0.3,0,0,0,0,0,-0.3,0,0,1.5,0,0,1.2,0,0,0.5,0,0.1,0.3,0,0.2,0,0,0.25,-0.3,0,0.3,1.5,0,0,1.2,0,0,0.5,0,0,0.3,0,0,0,0,0,-0.3,0,0,1.5,0,0,1.2,0,0,0.5,0,-0.1,0.3,0,-0.2,0,0,-0.25,-0.3,0,-0.3]
                                  }
                                },
                                { "OrientationInterpolator":
                                  {
                                    "@DEF":"Left_Pectoral_Rotation",
                                    "@key":[0,0.3,0.7,1],
                                    "@keyValue":[1,0,0,-0.52,1,0,0,0,1,0,0,0,1,0,0,-0.52]
                                  }
                                },
                                { "OrientationInterpolator":
                                  {
                                    "@DEF":"Right_Pectoral_Rotation",
                                    "@key":[0,0.3,0.7,1],
                                    "@keyValue":[1,0,0,-0.52,1,0,0,0,1,0,0,0,1,0,0,-0.52]
                                  }
                                },
                                {
                                  "#comment":"orbiting time"
                                },
                                { "TimeSensor":
                                  {
                                    "@DEF":"OrbitClock",
                                    "@cycleInterval":90,
                                    "@enabled":false,
                                    "@loop":true
                                  }
                                },
                                { "OrientationInterpolator":
                                  {
                                    "@DEF":"Orbit",
                                    "@key":[0.0,0.25,0.5,0.750,1],
                                    "@keyValue":[0,1,0,6.28,0,1,0,1.57,0,1,0,3.14,0,1,0,4.71,0,1,0,6.28]
                                  }
                                },
                                { "PositionInterpolator":
                                  {
                                    "@DEF":"HalfMoonPath",
                                    "@key":[0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1],
                                    "@keyValue":[15,2,0,15,0,-10,0,-1,-10,-15,0,-10,-15,2,0,-15,0,10,0,-2,10,15,0,10,15,2,0]
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"fraction_changed",
                                    "@fromNode":"Timer",
                                    "@toField":"set_fraction",
                                    "@toNode":"Waggler"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"value_changed",
                                    "@fromNode":"Waggler",
                                    "@toField":"set_spine",
                                    "@toNode":"Fish_Shape"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"fraction_changed",
                                    "@fromNode":"Timer",
                                    "@toField":"set_fraction",
                                    "@toNode":"Left_Pectoral_Rotation"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"value_changed",
                                    "@fromNode":"Left_Pectoral_Rotation",
                                    "@toField":"set_rotation",
                                    "@toNode":"Left_Pectoral"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"fraction_changed",
                                    "@fromNode":"Timer",
                                    "@toField":"set_fraction",
                                    "@toNode":"Right_Pectoral_Rotation"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"value_changed",
                                    "@fromNode":"Right_Pectoral_Rotation",
                                    "@toField":"set_rotation",
                                    "@toNode":"Right_Pectoral"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"fraction_changed",
                                    "@fromNode":"OrbitClock",
                                    "@toField":"set_fraction",
                                    "@toNode":"Orbit"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"fraction_changed",
                                    "@fromNode":"OrbitClock",
                                    "@toField":"set_fraction",
                                    "@toNode":"HalfMoonPath"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"value_changed",
                                    "@fromNode":"Orbit",
                                    "@toField":"set_rotation",
                                    "@toNode":"MyHalfMoon"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"value_changed",
                                    "@fromNode":"HalfMoonPath",
                                    "@toField":"set_translation",
                                    "@toNode":"MyHalfMoon"
                                  }
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  ]
              }
            }
          },
          {
            "#comment":"===================="
          },
          { "ProtoInstance":
            {
              "@name":"HalfMoon"
            }
          }
        ]
    }
  }
}