{ "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":"OrientationInterpolatorFishPrototype.x3d"
          },
          {
            "@name":"description",
            "@content":"This is a prototype for a CircleFish, which is also used by CircleFishLod. Default fish size: length is 1 m (Y-axis), max Height is 1 m (Z-axis), max Width is 10 cm (X-axis)."
          },
          {
            "@name":"creator",
            "@content":"Ildeniz Duman"
          },
          {
            "@name":"translator",
            "@content":"Scott Tufts"
          },
          {
            "@name":"created",
            "@content":"1 May 1998"
          },
          {
            "@name":"translated",
            "@content":"11 December 2001"
          },
          {
            "@name":"modified",
            "@content":"20 October 2019"
          },
          {
            "@name":"reference",
            "@content":"https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/CircleFishPrototype.x3d"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation/OrientationInterpolatorFishPrototype.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@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":"OrientationInterpolatorFishPrototype.x3d"
            }
          },
          { "ProtoDeclare":
            {
              "@name":"CircleFish",
              "ProtoInterface": {
                  "field": [
                    {
                      "@name":"skinTextureUrl",
                      "@accessType":"inputOutput",
                      "@type":"MFString"
                    },
                    {
                      "@name":"fishScale",
                      "@accessType":"inputOutput",
                      "@type":"SFVec3f",
                      "@value":[1,1,1]
                    },
                    {
                      "@name":"fishColor",
                      "@accessType":"inputOutput",
                      "@type":"SFColor",
                      "@value":[0.5,0.5,0.5]
                    },
                    {
                      "@name":"finColor",
                      "@accessType":"inputOutput",
                      "@type":"SFColor",
                      "@value":[0.5,0.5,0.5]
                    },
                    {
                      "@name":"positionKey",
                      "@accessType":"inputOutput",
                      "@type":"MFFloat",
                      "@value":[0.0,0.125,0.25,0.375,0.5,0.625,0.750,0.8751]
                    },
                    {
                      "@name":"positionKeyValue",
                      "@accessType":"inputOutput",
                      "@type":"MFVec3f",
                      "@value":[1.5,2,0,1.5,0,-1.0,0,-1,-1.0,-1.5,0,-1.0,-1.5,2,0,-1.5,0,1.0,0,-2,1.0,1.5,0,1.0,1.5,2,0]
                    },
                    {
                      "@name":"orientationKey",
                      "@accessType":"inputOutput",
                      "@type":"MFFloat",
                      "@value":[0.0,0.25,0.5,0.750,1]
                    },
                    {
                      "@name":"orientationKeyValue",
                      "@accessType":"inputOutput",
                      "@type":"MFRotation",
                      "@value":[0,1,0,0,0,1,0,-1.57,0,1,0,-3.14,0,1,0,-4.71,0,1,0,-6.28]
                    },
                    {
                      "@name":"orbitTime",
                      "@accessType":"inputOutput",
                      "@type":"SFTime",
                      "@value":90
                    }
                  ]
              },
              "ProtoBody": {
                  "-children":[
                    { "Transform":
                      {
                        "@DEF":"Way",
                        "-children":[
                          { "Transform":
                            {
                              "@rotation":[1,0,0,1.395],
                              "-children":[
                                { "Transform":
                                  {
                                    "@DEF":"FishTransform",
                                    "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":"FishBodyExtrusion",
                                                "@creaseAngle":0.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.05,0.3,0.05,0.45,0.1,0.5,0.05,0.45,0.05,0.2,0.03,0.4],
                                                "@spine":[0,1,0,0,0.8,0,0,0.6,0,0,0.5,0,0,0.3,0,0,0.2,0,0,0,0]
                                              }
                                            }
                                        }
                                      },
                                      { "Shape":
                                        {
                                          "-appearance":
                                            { "Appearance":
                                              {
                                                "@DEF":"FinSkin",
                                                "-material":
                                                  { "Material":
                                                    {
                                                      "@DEF":"FinColor",
                                                      "@transparency":0.2,
                                                      "IS": {
                                                          "connect": [
                                                            {
                                                              "@nodeField":"diffuseColor",
                                                              "@protoField":"finColor"
                                                            }
                                                          ]
                                                      }
                                                    }
                                                  }
                                              }
                                            }
                                        }
                                      },
                                      { "Transform":
                                        {
                                          "@translation":[0.015,0.8,-0.2],
                                          "-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.03
                                                    }
                                                  }
                                              }
                                            }
                                          ]
                                        }
                                      },
                                      { "Transform":
                                        {
                                          "@translation":[-0.015,0.8,-0.2],
                                          "-children":[
                                            { "Shape":
                                              {
                                                "@USE":"Eye"
                                              }
                                            }
                                          ]
                                        }
                                      },
                                      { "Transform":
                                        {
                                          "@scale":[1,1,0.7],
                                          "@translation":[0,0.98,0],
                                          "-children":[
                                            { "Shape":
                                              {
                                                "@USE":"Eye"
                                              }
                                            }
                                          ]
                                        }
                                      },
                                      { "Transform":
                                        {
                                          "@DEF":"LeftPectoral",
                                          "@translation":[0.04,0.4,0.3],
                                          "-children":[
                                            { "Shape":
                                              {
                                                "-appearance":
                                                  { "Appearance":
                                                    {
                                                      "@USE":"FinSkin"
                                                    }
                                                  },
                                                "-geometry":
                                                  { "IndexedFaceSet":
                                                    {
                                                      "@coordIndex":[0,1,2,-1],
                                                      "@solid":false,
                                                      "-coord":
                                                        { "Coordinate":
                                                          {
                                                            "@point":[0,0,0,0,0.2,0,0.2,0.1,0]
                                                          }
                                                        }
                                                    }
                                                  }
                                              }
                                            }
                                          ]
                                        }
                                      },
                                      { "Transform":
                                        {
                                          "@DEF":"RightPectoral",
                                          "@translation":[-0.04,0.4,0.3],
                                          "-children":[
                                            { "Shape":
                                              {
                                                "-appearance":
                                                  { "Appearance":
                                                    {
                                                      "@USE":"FinSkin"
                                                    }
                                                  },
                                                "-geometry":
                                                  { "IndexedFaceSet":
                                                    {
                                                      "@coordIndex":[0,1,2,-1],
                                                      "@solid":false,
                                                      "-coord":
                                                        { "Coordinate":
                                                          {
                                                            "@point":[0,0,0,0,0.2,0,-0.2,0.1,0]
                                                          }
                                                        }
                                                    }
                                                  }
                                              }
                                            }
                                          ]
                                        }
                                      }
                                    ]
                                  }
                                }
                              ]
                            }
                          },
                          { "Group":
                            {
                              "@DEF":"AnimationGroup",
                              "-children":[
                                { "TimeSensor":
                                  {
                                    "@DEF":"OrbitClock",
                                    "@loop":true,
                                    "IS": {
                                        "connect": [
                                          {
                                            "@nodeField":"cycleInterval",
                                            "@protoField":"orbitTime"
                                          }
                                        ]
                                    }
                                  }
                                },
                                { "PositionInterpolator":
                                  {
                                    "@DEF":"CirclefishPath",
                                    "IS": {
                                        "connect": [
                                          {
                                            "@nodeField":"key",
                                            "@protoField":"positionKey"
                                          },
                                          {
                                            "@nodeField":"keyValue",
                                            "@protoField":"positionKeyValue"
                                          }
                                        ]
                                    }
                                  }
                                },
                                { "OrientationInterpolator":
                                  {
                                    "@DEF":"CircleFishAngle",
                                    "IS": {
                                        "connect": [
                                          {
                                            "@nodeField":"key",
                                            "@protoField":"orientationKey"
                                          },
                                          {
                                            "@nodeField":"keyValue",
                                            "@protoField":"orientationKeyValue"
                                          }
                                        ]
                                    }
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"fraction_changed",
                                    "@fromNode":"OrbitClock",
                                    "@toField":"set_fraction",
                                    "@toNode":"CirclefishPath"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"fraction_changed",
                                    "@fromNode":"OrbitClock",
                                    "@toField":"set_fraction",
                                    "@toNode":"CircleFishAngle"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"value_changed",
                                    "@fromNode":"CirclefishPath",
                                    "@toField":"set_translation",
                                    "@toNode":"Way"
                                  }
                                },
                                { "ROUTE":
                                  {
                                    "@fromField":"value_changed",
                                    "@fromNode":"CircleFishAngle",
                                    "@toField":"set_rotation",
                                    "@toNode":"Way"
                                  }
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  ]
              }
            }
          },
          {
            "#comment":"===================="
          },
          { "ProtoInstance":
            {
              "@name":"CircleFish"
            }
          }
        ]
    }
  }
}