{ "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":"RapierMissileSystemPrototype.x3d"
          },
          {
            "@name":"creator",
            "@content":"Oliver Tan"
          },
          {
            "@name":"created",
            "@content":"28 January 2004"
          },
          {
            "@name":"modified",
            "@content":"28 November 2019"
          },
          {
            "@name":"warning",
            "@content":"check whether size is to scale"
          },
          {
            "@name":"description",
            "@content":"Rapier missile system prototype."
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Savage/Weapons/Missiles/RapierMissileSystemPrototype.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"reference",
            "@content":"http://www.army-technology.com/projects/jernas/jernas1.html"
          },
          {
            "@name":"subject",
            "@content":"Rapier, Rapier missile, missile"
          },
          {
            "@name":"license",
            "@content":"../../license.html"
          },
          {
            "@name":"translated",
            "@content":"26 March 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":[
          {
            "#comment":"This is only a representational model. It is not created to scale."
          },
          { "WorldInfo":
            {
              "@title":"RapierMissileSystemPrototype.x3d"
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"RapierMissile",
              "@url":["RapierMissilePrototype.x3d#RapierMissile","https://www.web3d.org/x3d/content/examples/Savage/Weapons/Missiles/RapierMissilePrototype.x3d#RapierMissile","RapierMissilePrototype.wrl#RapierMissile","https://www.web3d.org/x3d/content/examples/Savage/Weapons/Missiles/RapierMissilePrototype.wrl#RapierMissile"],
              "field": [
                {
                  "@name":"rocketAppearance",
                  "@accessType":"initializeOnly",
                  "@type":"SFNode"
                }
              ]
            }
          },
          { "ProtoDeclare":
            {
              "@name":"RapierMissileSystem",
              "-children":[
                {
                  "#comment":"This is only a representational model. It is not created to scale."
                }
              ],
              "ProtoInterface": {
                  "field": [
                    {
                      "@name":"material",
                      "@accessType":"initializeOnly",
                      "@type":"SFNode",
                      "-children":[
                        { "Material":
                          {
                            "@diffuseColor":[0.3,0.6,0.9]
                          }
                        }
                      ]
                    },
                    {
                      "@name":"imageTexture",
                      "@accessType":"initializeOnly",
                      "@type":"SFNode",
                      "-children":[
                        { "ImageTexture":
                          {
                            "@url":["cammie1.jpg","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/AV8bHarrierUnitedStates/cammie1.jpg"]
                          }
                        }
                      ]
                    }
                  ]
              },
              "ProtoBody": {
                  "-children":[
                    { "Viewpoint":
                      {
                        "@description":"Rapier Missile System",
                        "@position":[0,0,3]
                      }
                    },
                    { "Viewpoint":
                      {
                        "@description":"Rapier Missile System Oblique",
                        "@orientation":[0,1,0,-1.571],
                        "@position":[-3,0.5,0]
                      }
                    },
                    { "Transform":
                      {
                        "@rotation":[0,1,0,1.57],
                        "-children":[
                          { "Transform":
                            {
                              "@rotation":[0,0,1,-1.571],
                              "-children":[
                                { "Shape":
                                  {
                                    "-appearance":
                                      { "Appearance":
                                        {
                                          "@DEF":"LauncherSkin",
                                          "IS": {
                                              "connect": [
                                                {
                                                  "@nodeField":"material",
                                                  "@protoField":"material"
                                                },
                                                {
                                                  "@nodeField":"texture",
                                                  "@protoField":"imageTexture"
                                                }
                                              ]
                                          }
                                        }
                                      }
                                  }
                                },
                                { "Transform":
                                  {
                                    "@DEF":"MissileSystem",
                                    "-children":[
                                      { "Transform":
                                        {
                                          "@rotation":[0,0,1,1.571],
                                          "-children":[
                                            { "Transform":
                                              {
                                                "@translation":[0,-0.075,0.25],
                                                "-children":[
                                                  { "Transform":
                                                    {
                                                      "@scale":[0.5,0.5,0.5],
                                                      "-children":[
                                                        { "Transform":
                                                          {
                                                            "@rotation":[0,0,1,-1.571],
                                                            "@translation":[-0.05,0.1,0],
                                                            "-children":[
                                                              { "Transform":
                                                                {
                                                                  "-children":[
                                                                    { "Shape":
                                                                      {
                                                                        "-appearance":
                                                                          { "Appearance":
                                                                            {
                                                                              "@USE":"LauncherSkin"
                                                                            }
                                                                          },
                                                                        "-geometry":
                                                                          { "Extrusion":
                                                                            {
                                                                              "@creaseAngle":3.14,
                                                                              "@crossSection":[-0.2,-1.4,-0.2,-0.3,0.05,0.2,0.1,0.2,0.1,-1.4,-0.2,-1.4],
                                                                              "@solid":false,
                                                                              "@spine":[0,0,0,0,0.1,0]
                                                                            }
                                                                          }
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "@translation":[-0.05,0.05,-0.75],
                                                                        "-children":[
                                                                          { "Shape":
                                                                            {
                                                                              "-appearance":
                                                                                { "Appearance":
                                                                                  {
                                                                                    "@USE":"LauncherSkin"
                                                                                  }
                                                                                },
                                                                              "-geometry":
                                                                                { "Cylinder":
                                                                                  {
                                                                                    "@height":0.2,
                                                                                    "@radius":0.15
                                                                                  }
                                                                                }
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "@translation":[-0.05,0.05,-1.4],
                                                                        "-children":[
                                                                          { "Shape":
                                                                            {
                                                                              "-appearance":
                                                                                { "Appearance":
                                                                                  {
                                                                                    "@USE":"LauncherSkin"
                                                                                  }
                                                                                },
                                                                              "-geometry":
                                                                                { "Cylinder":
                                                                                  {
                                                                                    "@height":0.2,
                                                                                    "@radius":0.15
                                                                                  }
                                                                                }
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "@translation":[-0.05,0.05,-0.5],
                                                                        "-children":[
                                                                          { "Shape":
                                                                            {
                                                                              "-appearance":
                                                                                { "Appearance":
                                                                                  {
                                                                                    "@USE":"LauncherSkin"
                                                                                  }
                                                                                },
                                                                              "-geometry":
                                                                                { "Cylinder":
                                                                                  {
                                                                                    "@height":0.2,
                                                                                    "@radius":0.05
                                                                                  }
                                                                                }
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  ]
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        { "Transform":
                                                          {
                                                            "@translation":[0,0.1,-0.55],
                                                            "-children":[
                                                              { "Transform":
                                                                {
                                                                  "@DEF":"MissileGripPair",
                                                                  "-children":[
                                                                    { "Transform":
                                                                      {
                                                                        "@scale":[0.49,1,0.8],
                                                                        "-children":[
                                                                          { "Transform":
                                                                            {
                                                                              "@translation":[0,0.15,-0.3],
                                                                              "-children":[
                                                                                { "Transform":
                                                                                  {
                                                                                    "@DEF":"MissileGrip",
                                                                                    "@translation":[0.2,0,0],
                                                                                    "-children":[
                                                                                      { "Transform":
                                                                                        {
                                                                                          "@rotation":[0,1,0,1.571],
                                                                                          "-children":[
                                                                                            { "Transform":
                                                                                              {
                                                                                                "@scale":[0.04,0.04,0.04],
                                                                                                "-children":[
                                                                                                  { "Transform":
                                                                                                    {
                                                                                                      "-children":[
                                                                                                        { "Transform":
                                                                                                          {
                                                                                                            "@rotation":[1,0,0,1.571],
                                                                                                            "-children":[
                                                                                                              { "Transform":
                                                                                                                {
                                                                                                                  "@DEF":"U1",
                                                                                                                  "-children":[
                                                                                                                    { "Shape":
                                                                                                                      {
                                                                                                                        "-appearance":
                                                                                                                          { "Appearance":
                                                                                                                            {
                                                                                                                              "@USE":"LauncherSkin"
                                                                                                                            }
                                                                                                                          },
                                                                                                                        "-geometry":
                                                                                                                          { "Cylinder":
                                                                                                                            {
                                                                                                                              "@height":8
                                                                                                                            }
                                                                                                                          }
                                                                                                                      }
                                                                                                                    },
                                                                                                                    { "Transform":
                                                                                                                      {
                                                                                                                        "@translation":[0,4,0],
                                                                                                                        "-children":[
                                                                                                                          { "Shape":
                                                                                                                            {
                                                                                                                              "-geometry":
                                                                                                                                { "Sphere":
                                                                                                                                  {
                                                                                                                                  }
                                                                                                                                },
                                                                                                                              "-appearance":
                                                                                                                                { "Appearance":
                                                                                                                                  {
                                                                                                                                    "@USE":"LauncherSkin"
                                                                                                                                  }
                                                                                                                                }
                                                                                                                            }
                                                                                                                          }
                                                                                                                        ]
                                                                                                                      }
                                                                                                                    },
                                                                                                                    { "Transform":
                                                                                                                      {
                                                                                                                        "@translation":[0,-4,0],
                                                                                                                        "-children":[
                                                                                                                          { "Shape":
                                                                                                                            {
                                                                                                                              "-geometry":
                                                                                                                                { "Sphere":
                                                                                                                                  {
                                                                                                                                  }
                                                                                                                                },
                                                                                                                              "-appearance":
                                                                                                                                { "Appearance":
                                                                                                                                  {
                                                                                                                                    "@USE":"LauncherSkin"
                                                                                                                                  }
                                                                                                                                }
                                                                                                                            }
                                                                                                                          }
                                                                                                                        ]
                                                                                                                      }
                                                                                                                    }
                                                                                                                  ]
                                                                                                                }
                                                                                                              }
                                                                                                            ]
                                                                                                          }
                                                                                                        },
                                                                                                        { "Transform":
                                                                                                          {
                                                                                                            "@translation":[0,0,4],
                                                                                                            "-children":[
                                                                                                              { "Transform":
                                                                                                                {
                                                                                                                  "@rotation":[0,0,1,-0.7],
                                                                                                                  "-children":[
                                                                                                                    { "Transform":
                                                                                                                      {
                                                                                                                        "@translation":[0,5,0],
                                                                                                                        "-children":[
                                                                                                                          { "Transform":
                                                                                                                            {
                                                                                                                              "-children":[
                                                                                                                                { "Shape":
                                                                                                                                  {
                                                                                                                                    "-appearance":
                                                                                                                                      { "Appearance":
                                                                                                                                        {
                                                                                                                                          "@USE":"LauncherSkin"
                                                                                                                                        }
                                                                                                                                      },
                                                                                                                                    "-geometry":
                                                                                                                                      { "Cylinder":
                                                                                                                                        {
                                                                                                                                          "@height":10
                                                                                                                                        }
                                                                                                                                      }
                                                                                                                                  }
                                                                                                                                },
                                                                                                                                { "Transform":
                                                                                                                                  {
                                                                                                                                    "@translation":[0,5,0],
                                                                                                                                    "-children":[
                                                                                                                                      { "Shape":
                                                                                                                                        {
                                                                                                                                          "-geometry":
                                                                                                                                            { "Sphere":
                                                                                                                                              {
                                                                                                                                              }
                                                                                                                                            },
                                                                                                                                          "-appearance":
                                                                                                                                            { "Appearance":
                                                                                                                                              {
                                                                                                                                                "@USE":"LauncherSkin"
                                                                                                                                              }
                                                                                                                                            }
                                                                                                                                        }
                                                                                                                                      }
                                                                                                                                    ]
                                                                                                                                  }
                                                                                                                                },
                                                                                                                                { "Transform":
                                                                                                                                  {
                                                                                                                                    "@translation":[0,-5,0],
                                                                                                                                    "-children":[
                                                                                                                                      { "Shape":
                                                                                                                                        {
                                                                                                                                          "-geometry":
                                                                                                                                            { "Sphere":
                                                                                                                                              {
                                                                                                                                              }
                                                                                                                                            },
                                                                                                                                          "-appearance":
                                                                                                                                            { "Appearance":
                                                                                                                                              {
                                                                                                                                                "@USE":"LauncherSkin"
                                                                                                                                              }
                                                                                                                                            }
                                                                                                                                        }
                                                                                                                                      }
                                                                                                                                    ]
                                                                                                                                  }
                                                                                                                                }
                                                                                                                              ]
                                                                                                                            }
                                                                                                                          }
                                                                                                                        ]
                                                                                                                      }
                                                                                                                    },
                                                                                                                    { "Transform":
                                                                                                                      {
                                                                                                                        "@translation":[0,10,0],
                                                                                                                        "-children":[
                                                                                                                          { "Transform":
                                                                                                                            {
                                                                                                                              "@translation":[0,0,-4],
                                                                                                                              "-children":[
                                                                                                                                { "Transform":
                                                                                                                                  {
                                                                                                                                    "@rotation":[1,0,0,1.571],
                                                                                                                                    "-children":[
                                                                                                                                      { "Transform":
                                                                                                                                        {
                                                                                                                                          "@scale":[1,0.8,1],
                                                                                                                                          "@translation":[0,0.2,0],
                                                                                                                                          "-children":[
                                                                                                                                            { "Transform":
                                                                                                                                              {
                                                                                                                                                "@USE":"U1"
                                                                                                                                              }
                                                                                                                                            }
                                                                                                                                          ]
                                                                                                                                        }
                                                                                                                                      }
                                                                                                                                    ]
                                                                                                                                  }
                                                                                                                                }
                                                                                                                              ]
                                                                                                                            }
                                                                                                                          }
                                                                                                                        ]
                                                                                                                      }
                                                                                                                    }
                                                                                                                  ]
                                                                                                                }
                                                                                                              }
                                                                                                            ]
                                                                                                          }
                                                                                                        }
                                                                                                      ]
                                                                                                    }
                                                                                                  }
                                                                                                ]
                                                                                              }
                                                                                            }
                                                                                          ]
                                                                                        }
                                                                                      }
                                                                                    ]
                                                                                  }
                                                                                }
                                                                              ]
                                                                            }
                                                                          },
                                                                          { "Transform":
                                                                            {
                                                                              "@rotation":[1,0,0,-1.4],
                                                                              "@translation":[0,0.15,-0.3],
                                                                              "-children":[
                                                                                { "Transform":
                                                                                  {
                                                                                    "@rotation":[0,1,0,3.142],
                                                                                    "-children":[
                                                                                      { "Transform":
                                                                                        {
                                                                                          "@USE":"MissileGrip"
                                                                                        }
                                                                                      }
                                                                                    ]
                                                                                  }
                                                                                }
                                                                              ]
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  ]
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        { "Transform":
                                                          {
                                                            "@translation":[0,0.1,-1.2],
                                                            "-children":[
                                                              { "Transform":
                                                                {
                                                                  "@USE":"MissileGripPair"
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        { "Transform":
                                                          {
                                                            "@rotation":[1,0,0,-3.142],
                                                            "@translation":[0,0.2,-0.95],
                                                            "-children":[
                                                              { "Transform":
                                                                {
                                                                  "@USE":"MissileGripPair"
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        { "Transform":
                                                          {
                                                            "@rotation":[1,0,0,-3.142],
                                                            "@translation":[0,0.2,-1.6],
                                                            "-children":[
                                                              { "Transform":
                                                                {
                                                                  "@USE":"MissileGripPair"
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  { "Transform":
                                                    {
                                                      "-children":[
                                                        { "Transform":
                                                          {
                                                            "@DEF":"TopMissile",
                                                            "-children":[
                                                              { "Transform":
                                                                {
                                                                  "@rotation":[0,1,0,-1.57],
                                                                  "@scale":[0.1,0.1,0.1],
                                                                  "@translation":[0,0.2,-0.2],
                                                                  "-children":[
                                                                    { "Transform":
                                                                      {
                                                                        "-children":[
                                                                          { "ProtoInstance":
                                                                            {
                                                                              "@name":"RapierMissile",
                                                                              "fieldValue": [
                                                                                {
                                                                                  "@name":"rocketAppearance",
                                                                                  "-children":[
                                                                                    { "Appearance":
                                                                                      {
                                                                                        "@USE":"LauncherSkin"
                                                                                      }
                                                                                    }
                                                                                  ]
                                                                                }
                                                                              ]
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              { "TouchSensor":
                                                                {
                                                                  "@DEF":"shootTopMissile",
                                                                  "@description":"touch missile to launch it"
                                                                }
                                                              },
                                                              { "PositionInterpolator":
                                                                {
                                                                  "@DEF":"topMissilePathInterpolator",
                                                                  "@key":[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1],
                                                                  "@keyValue":[0,0,1,0,0.05,2,0,0.1,3,0,0.15,4,0,0.2,5,0,0.25,6,0,0.3,7,0,0.35,8,0,0.4,9,0,0.45,10,0,0.5,11]
                                                                }
                                                              },
                                                              { "TimeSensor":
                                                                {
                                                                  "@DEF":"topMissileClock",
                                                                  "@cycleInterval":10
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"fraction_changed",
                                                                  "@fromNode":"topMissileClock",
                                                                  "@toField":"set_fraction",
                                                                  "@toNode":"topMissilePathInterpolator"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"value_changed",
                                                                  "@fromNode":"topMissilePathInterpolator",
                                                                  "@toField":"set_translation",
                                                                  "@toNode":"TopMissile"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"touchTime",
                                                                  "@fromNode":"shootTopMissile",
                                                                  "@toField":"set_startTime",
                                                                  "@toNode":"topMissileClock"
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  { "Transform":
                                                    {
                                                      "@DEF":"BottomMissile",
                                                      "-children":[
                                                        { "Transform":
                                                          {
                                                            "@rotation":[0,1,0,-1.57],
                                                            "@scale":[0.1,0.1,0.1],
                                                            "@translation":[0,-0.05,-0.15],
                                                            "-children":[
                                                              { "Transform":
                                                                {
                                                                  "-children":[
                                                                    { "ProtoInstance":
                                                                      {
                                                                        "@name":"RapierMissile",
                                                                        "fieldValue": [
                                                                          {
                                                                            "@name":"rocketAppearance",
                                                                            "-children":[
                                                                              { "Appearance":
                                                                                {
                                                                                  "@USE":"LauncherSkin"
                                                                                }
                                                                              }
                                                                            ]
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  ]
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        { "TouchSensor":
                                                          {
                                                            "@DEF":"shootBottomMissile",
                                                            "@description":"touch missile to launch it"
                                                          }
                                                        },
                                                        { "PositionInterpolator":
                                                          {
                                                            "@DEF":"bottomMissilePathInterpolator",
                                                            "@key":[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1],
                                                            "@keyValue":[0,0,1,0,0.05,2,0,0.1,3,0,0.15,4,0,0.2,5,0,0.25,6,0,0.3,7,0,0.35,8,0,0.4,9,0,0.45,10,0,0.5,11]
                                                          }
                                                        },
                                                        { "TimeSensor":
                                                          {
                                                            "@DEF":"bottomMissileClock",
                                                            "@cycleInterval":10
                                                          }
                                                        },
                                                        { "ROUTE":
                                                          {
                                                            "@fromField":"fraction_changed",
                                                            "@fromNode":"bottomMissileClock",
                                                            "@toField":"set_fraction",
                                                            "@toNode":"bottomMissilePathInterpolator"
                                                          }
                                                        },
                                                        { "ROUTE":
                                                          {
                                                            "@fromField":"value_changed",
                                                            "@fromNode":"bottomMissilePathInterpolator",
                                                            "@toField":"set_translation",
                                                            "@toNode":"BottomMissile"
                                                          }
                                                        },
                                                        { "ROUTE":
                                                          {
                                                            "@fromField":"touchTime",
                                                            "@fromNode":"shootBottomMissile",
                                                            "@toField":"set_startTime",
                                                            "@toNode":"bottomMissileClock"
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  }
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      },
                                      { "CylinderSensor":
                                        {
                                          "@DEF":"MissileSystemRotation",
                                          "@description":"Rotate the missile system.",
                                          "@maxAngle":0,
                                          "@minAngle":-1.3
                                        }
                                      },
                                      { "ROUTE":
                                        {
                                          "@fromField":"rotation_changed",
                                          "@fromNode":"MissileSystemRotation",
                                          "@toField":"rotation",
                                          "@toNode":"MissileSystem"
                                        }
                                      }
                                    ]
                                  }
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  ]
              }
            }
          },
          { "Anchor":
            {
              "@description":"RapierMissileSystemExample",
              "@url":["RapierMissileSystemExample.x3d","https://www.web3d.org/x3d/content/examples/Savage/Weapons/Missiles/RapierMissileSystemExample.x3d","RapierMissileSystemExample.wrl","https://www.web3d.org/x3d/content/examples/Savage/Weapons/Missiles/RapierMissileSystemExample.wrl"],
              "-children":[
                { "Shape":
                  {
                    "-geometry":
                      { "Text":
                        {
                          "@string":["Rapier Missile System Prototype","contains prototype definitions","Click on text to see these Appearances in","RapierMissileSystemExample"],
                          "-fontStyle":
                            { "FontStyle":
                              {
                                "@justify":["MIDDLE","MIDDLE"],
                                "@size":0.5
                              }
                            }
                        }
                      },
                    "-appearance":
                      { "Appearance":
                        {
                          "-material":
                            { "Material":
                              {
                                "@diffuseColor":[0,0.6,0.6]
                              }
                            }
                        }
                      }
                  }
                }
              ]
            }
          }
        ]
    }
  }
}