{ "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":"NonLethalNetLauncherPrototype.x3d"
          },
          {
            "@name":"description",
            "@content":"Simple model that depicts small boat launched net entanglement system."
          },
          {
            "@name":"creator",
            "@content":"James Harney"
          },
          {
            "@name":"created",
            "@content":"14 March 2002"
          },
          {
            "@name":"modified",
            "@content":"28 November 2019"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Savage/Weapons/Guns/NonLethalNetLauncherPrototype.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@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":[
          { "WorldInfo":
            {
              "@title":"NonLethalNetLauncherPrototype.x3d"
            }
          },
          { "NavigationInfo":
            {
              "@speed":10
            }
          },
          { "ProtoDeclare":
            {
              "@name":"NetLauncher",
              "@appinfo":"Nonlethal Net Launcher to repel boarders",
              "ProtoInterface": {
                  "field": [
                    {
                      "@name":"startLaunchToStbd",
                      "@accessType":"inputOnly",
                      "@type":"SFTime"
                    },
                    {
                      "@name":"startLaunchToPort",
                      "@accessType":"inputOnly",
                      "@type":"SFTime"
                    },
                    {
                      "@name":"netTranslation",
                      "@accessType":"outputOnly",
                      "@type":"SFVec3f"
                    },
                    {
                      "@name":"netScale",
                      "@accessType":"outputOnly",
                      "@type":"SFVec3f"
                    },
                    {
                      "@name":"netOrientation",
                      "@accessType":"outputOnly",
                      "@type":"SFRotation"
                    },
                    {
                      "@name":"nettingScale",
                      "@accessType":"outputOnly",
                      "@type":"SFVec3f"
                    }
                  ]
              },
              "ProtoBody": {
                  "-children":[
                    { "Group":
                      {
                        "-children":[
                          { "Background":
                            {
                              "@groundAngle":[1.309,1.570796],
                              "@groundColor":[0.1,0.1,0,0.4,0.25,0.2,0.6,0.6,0.6],
                              "@skyAngle":[1.309,1.571],
                              "@skyColor":[0,0.2,0.7,0,0.5,1,1,1,1]
                            }
                          },
                          {
                            "#comment":"Note that the term stbd refers to the position of the launcher tube and is 180 the direction of launch"
                          },
                          { "Transform":
                            {
                              "-children":[
                                { "Viewpoint":
                                  {
                                    "@DEF":"STBD",
                                    "@description":"Net Launcher stbd View",
                                    "@jump":false,
                                    "@orientation":[1,0,0,-0.2],
                                    "@position":[0,5,12]
                                  }
                                },
                                { "Viewpoint":
                                  {
                                    "@DEF":"FRONT",
                                    "@description":"Net Launcher Front View",
                                    "@orientation":[0,1,0,1.57],
                                    "@position":[12,3,0]
                                  }
                                },
                                { "Viewpoint":
                                  {
                                    "@DEF":"PORT",
                                    "@description":"Net Launcher Port View",
                                    "@jump":false,
                                    "@orientation":[0,1,0,3.14],
                                    "@position":[0,3,-12]
                                  }
                                },
                                { "Viewpoint":
                                  {
                                    "@DEF":"REAR",
                                    "@description":"Net Launcher Rear View",
                                    "@orientation":[0,1,0,-1.57],
                                    "@position":[-12,3,0]
                                  }
                                }
                              ]
                            }
                          },
                          { "TimeSensor":
                            {
                              "@DEF":"NetPositClock",
                              "@cycleInterval":3,
                              "IS": {
                                  "connect": [
                                    {
                                      "@nodeField":"startTime",
                                      "@protoField":"startLaunchToStbd"
                                    }
                                  ]
                              }
                            }
                          },
                          { "TimeSensor":
                            {
                              "@DEF":"NetPositClockStbd",
                              "@cycleInterval":3,
                              "IS": {
                                  "connect": [
                                    {
                                      "@nodeField":"startTime",
                                      "@protoField":"startLaunchToPort"
                                    }
                                  ]
                              }
                            }
                          },
                          { "PositionInterpolator":
                            {
                              "@DEF":"NetPositInterp",
                              "@key":[0,0.5,1],
                              "@keyValue":[0,0,0,0,25,10,0,7.5,21],
                              "IS": {
                                  "connect": [
                                    {
                                      "@nodeField":"value_changed",
                                      "@protoField":"netTranslation"
                                    }
                                  ]
                              }
                            }
                          },
                          { "PositionInterpolator":
                            {
                              "@DEF":"NetPositInterpStbd",
                              "@key":[0,0.5,1],
                              "@keyValue":[0,0,0,0,25,-10,0,7.5,-21]
                            }
                          },
                          { "PositionInterpolator":
                            {
                              "@DEF":"NetPositScale",
                              "@key":[0.1,1.0],
                              "@keyValue":[1,1,1,1,8,1]
                            }
                          },
                          { "PositionInterpolator":
                            {
                              "@DEF":"NetPositScaleStbd",
                              "@key":[0.1,1.0],
                              "@keyValue":[1,1,1,1,8,1]
                            }
                          },
                          { "PositionInterpolator":
                            {
                              "@DEF":"NettingScale",
                              "@key":[0.3,1],
                              "@keyValue":[0.01,0.01,0.01,1,2,1]
                            }
                          },
                          { "PositionInterpolator":
                            {
                              "@DEF":"NettingScaleStbd",
                              "@key":[0.3,1],
                              "@keyValue":[0.01,0.01,0.01,1,2,1]
                            }
                          },
                          { "OrientationInterpolator":
                            {
                              "@DEF":"NetOrientInterp",
                              "@key":[0,0.5,0.9,1],
                              "@keyValue":[1,0,0,0,1,0,0,0.78,1,0,0,1,1,0,0,0.78]
                            }
                          },
                          { "OrientationInterpolator":
                            {
                              "@DEF":"NetOrientInterpStbd",
                              "@key":[0,0.5,0.9,1],
                              "@keyValue":[1,0,0,0,1,0,0,-0.78,1,0,0,-1,1,0,0,-0.78]
                            }
                          },
                          { "Transform":
                            {
                              "@DEF":"TubeTransform",
                              "-children":[
                                { "Transform":
                                  {
                                    "@DEF":"PortTubeTransform",
                                    "@rotation":[1,0,0,0.78],
                                    "-children":[
                                      { "Shape":
                                        {
                                          "-appearance":
                                            { "Appearance":
                                              {
                                                "-material":
                                                  { "Material":
                                                    {
                                                      "@diffuseColor":[0.9,0.9,0.9],
                                                      "@shininess":1
                                                    }
                                                  }
                                              }
                                            },
                                          "-geometry":
                                            { "Cylinder":
                                              {
                                                "@height":1.5,
                                                "@radius":0.15
                                              }
                                            }
                                        }
                                      },
                                      { "Transform":
                                        {
                                          "@rotation":[1,0,0,1.57],
                                          "@translation":[0,-0.75,0],
                                          "-children":[
                                            { "Shape":
                                              {
                                                "-geometry":
                                                  { "Box":
                                                    {
                                                      "@size":[0.5,0.5,0.01]
                                                    }
                                                  },
                                                "-appearance":
                                                  { "Appearance":
                                                    {
                                                      "-material":
                                                        { "Material":
                                                          {
                                                            "@diffuseColor":[0.9,0.9,0.9],
                                                            "@shininess":1
                                                          }
                                                        }
                                                    }
                                                  }
                                              }
                                            }
                                          ]
                                        }
                                      },
                                      { "Transform":
                                        {
                                          "@DEF":"NetTransform",
                                          "IS": {
                                              "connect": [
                                                {
                                                  "@nodeField":"scale",
                                                  "@protoField":"netScale"
                                                },
                                                {
                                                  "@nodeField":"rotation",
                                                  "@protoField":"netOrientation"
                                                }
                                              ]
                                          },
                                          "-children":[
                                            { "Transform":
                                              {
                                                "@DEF":"NettingTransform",
                                                "@rotation":[0,1,0,1.57],
                                                "@scale":[0.01,0.01,0.01],
                                                "@translation":[0,0,1],
                                                "IS": {
                                                    "connect": [
                                                      {
                                                        "@nodeField":"scale",
                                                        "@protoField":"nettingScale"
                                                      }
                                                    ]
                                                }
                                              }
                                            }
                                          ]
                                        }
                                      }
                                    ]
                                  }
                                },
                                { "Transform":
                                  {
                                    "@DEF":"StbdTubeTransform",
                                    "@translation":[-0.3,0,0],
                                    "-children":[
                                      { "Transform":
                                        {
                                          "@rotation":[1,0,0,-0.78],
                                          "-children":[
                                            { "Shape":
                                              {
                                                "-appearance":
                                                  { "Appearance":
                                                    {
                                                      "-material":
                                                        { "Material":
                                                          {
                                                            "@diffuseColor":[0.9,0.9,0.9],
                                                            "@shininess":1
                                                          }
                                                        }
                                                    }
                                                  },
                                                "-geometry":
                                                  { "Cylinder":
                                                    {
                                                      "@height":1.5,
                                                      "@radius":0.15
                                                    }
                                                  }
                                              }
                                            },
                                            { "Transform":
                                              {
                                                "@rotation":[1,0,0,-1.57],
                                                "@translation":[0,-0.75,0],
                                                "-children":[
                                                  { "Shape":
                                                    {
                                                      "-appearance":
                                                        { "Appearance":
                                                          {
                                                            "-material":
                                                              { "Material":
                                                                {
                                                                  "@diffuseColor":[0.9,0.9,0.9],
                                                                  "@shininess":1
                                                                }
                                                              }
                                                          }
                                                        },
                                                      "-geometry":
                                                        { "Box":
                                                          {
                                                            "@size":[0.5,0.5,0.01]
                                                          }
                                                        }
                                                    }
                                                  }
                                                ]
                                              }
                                            },
                                            { "Transform":
                                              {
                                                "@DEF":"NetTransformStbd",
                                                "-children":[
                                                  { "Shape":
                                                    {
                                                      "-appearance":
                                                        { "Appearance":
                                                          {
                                                            "-material":
                                                              { "Material":
                                                                {
                                                                  "@diffuseColor":[1,0,0],
                                                                  "@shininess":1
                                                                }
                                                              }
                                                          }
                                                        },
                                                      "-geometry":
                                                        { "Cylinder":
                                                          {
                                                            "@height":1.4,
                                                            "@radius":0.12
                                                          }
                                                        }
                                                    }
                                                  },
                                                  { "Transform":
                                                    {
                                                      "@DEF":"NettingTransformStbd",
                                                      "@rotation":[0,1,0,1.57],
                                                      "@scale":[0.01,0.01,0.01],
                                                      "@translation":[0,0,-1],
                                                      "-children":[
                                                        { "Shape":
                                                          {
                                                            "@DEF":"NETTING",
                                                            "-appearance":
                                                              { "Appearance":
                                                                {
                                                                  "-material":
                                                                    { "Material":
                                                                      {
                                                                      }
                                                                    },
                                                                  "-texture":
                                                                    { "ImageTexture":
                                                                      {
                                                                        "@DEF":"grill",
                                                                        "@url":["grill.png","../../Weapons/Guns/grill.png","../../../Weapons/Guns/grill.png","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter18-TextureMapping/grill.png"]
                                                                      }
                                                                    },
                                                                  "-textureTransform":
                                                                    { "TextureTransform":
                                                                      {
                                                                        "@center":[0.5,0.5],
                                                                        "@scale":[32,8]
                                                                      }
                                                                    }
                                                                }
                                                              },
                                                            "-geometry":
                                                              { "IndexedFaceSet":
                                                                {
                                                                  "@DEF":"Screen",
                                                                  "@coordIndex":[0,1,2,3],
                                                                  "@solid":false,
                                                                  "@texCoordIndex":[0,1,2,3],
                                                                  "-coord":
                                                                    { "Coordinate":
                                                                      {
                                                                        "@point":[-1,-0.4,0.1,1,-0.4,0.1,1,0.4,0.1,-1,0.4,0.1]
                                                                      }
                                                                    },
                                                                  "-texCoord":
                                                                    { "TextureCoordinate":
                                                                      {
                                                                        "@point":[0,0,1,0,1,1,0,1]
                                                                      }
                                                                    }
                                                                }
                                                              }
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  }
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      }
                                    ]
                                  }
                                },
                                { "Transform":
                                  {
                                    "@translation":[-0.2,-0.75,0],
                                    "-children":[
                                      { "Shape":
                                        {
                                          "-geometry":
                                            { "Box":
                                              {
                                                "@size":[1.5,0.2,1.5]
                                              }
                                            },
                                          "-appearance":
                                            { "Appearance":
                                              {
                                                "-material":
                                                  { "Material":
                                                    {
                                                      "@diffuseColor":[0.4,0.4,0.4],
                                                      "@shininess":1
                                                    }
                                                  }
                                              }
                                            }
                                        }
                                      }
                                    ]
                                  }
                                }
                              ]
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fraction_changed",
                              "@fromNode":"NetPositClock",
                              "@toField":"set_fraction",
                              "@toNode":"NetPositInterp"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fraction_changed",
                              "@fromNode":"NetPositClock",
                              "@toField":"set_fraction",
                              "@toNode":"NetOrientInterp"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fraction_changed",
                              "@fromNode":"NetPositClock",
                              "@toField":"set_fraction",
                              "@toNode":"NetPositScale"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fraction_changed",
                              "@fromNode":"NetPositClock",
                              "@toField":"set_fraction",
                              "@toNode":"NettingScale"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fraction_changed",
                              "@fromNode":"NetPositClockStbd",
                              "@toField":"set_fraction",
                              "@toNode":"NetPositScaleStbd"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fraction_changed",
                              "@fromNode":"NetPositClockStbd",
                              "@toField":"set_fraction",
                              "@toNode":"NetPositInterpStbd"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fraction_changed",
                              "@fromNode":"NetPositClockStbd",
                              "@toField":"set_fraction",
                              "@toNode":"NetOrientInterpStbd"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fraction_changed",
                              "@fromNode":"NetPositClockStbd",
                              "@toField":"set_fraction",
                              "@toNode":"NettingScaleStbd"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"value_changed",
                              "@fromNode":"NetPositInterp",
                              "@toField":"set_translation",
                              "@toNode":"NetTransform"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"value_changed",
                              "@fromNode":"NetOrientInterp",
                              "@toField":"set_rotation",
                              "@toNode":"NetTransform"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"value_changed",
                              "@fromNode":"NetPositScale",
                              "@toField":"scale",
                              "@toNode":"NetTransform"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"value_changed",
                              "@fromNode":"NettingScale",
                              "@toField":"set_scale",
                              "@toNode":"NettingTransform"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"value_changed",
                              "@fromNode":"NettingScaleStbd",
                              "@toField":"set_scale",
                              "@toNode":"NettingTransformStbd"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"value_changed",
                              "@fromNode":"NetPositInterpStbd",
                              "@toField":"set_translation",
                              "@toNode":"NetTransformStbd"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"value_changed",
                              "@fromNode":"NetOrientInterpStbd",
                              "@toField":"set_rotation",
                              "@toNode":"NetTransformStbd"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"value_changed",
                              "@fromNode":"NetPositScaleStbd",
                              "@toField":"scale",
                              "@toNode":"NetTransformStbd"
                            }
                          }
                        ]
                      }
                    }
                  ]
              }
            }
          },
          { "ProtoInstance":
            {
              "@name":"NetLauncher",
              "@DEF":"myLauncher"
            }
          },
          { "TouchSensor":
            {
              "@DEF":"myTouch",
              "@description":"touch to activate"
            }
          },
          { "ROUTE":
            {
              "@fromField":"touchTime",
              "@fromNode":"myTouch",
              "@toField":"startLaunchToStbd",
              "@toNode":"myLauncher"
            }
          },
          { "Transform":
            {
              "@translation":[0,-1,0],
              "-children":[
                { "Shape":
                  {
                    "@DEF":"TestWater",
                    "-appearance":
                      { "Appearance":
                        {
                          "-material":
                            { "Material":
                              {
                                "@diffuseColor":[0,0,1]
                              }
                            }
                        }
                      },
                    "-geometry":
                      { "Box":
                        {
                          "@size":[150,0.1,150]
                        }
                      }
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@rotation":[1,0,0,0.78],
              "-children":[
                { "Transform":
                  {
                    "@DEF":"FinalNetTransform",
                    "@scale":[0.01,0.01,0.01],
                    "-children":[
                      { "Shape":
                        {
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@diffuseColor":[1,0,0],
                                      "@shininess":1
                                    }
                                  }
                              }
                            },
                          "-geometry":
                            { "Cylinder":
                              {
                                "@height":1.4,
                                "@radius":0.12
                              }
                            }
                        }
                      },
                      { "Transform":
                        {
                          "@DEF":"FinalNettingTransform",
                          "@rotation":[0,1,0,1.57],
                          "@scale":[0.01,0.01,0.01],
                          "@translation":[0,0,1],
                          "-children":[
                            {
                              "#comment":"note can't DEF/USE nodes from within ProtoDeclare to parent scene"
                            },
                            { "Shape":
                              {
                                "@DEF":"FinalNETTING",
                                "-appearance":
                                  { "Appearance":
                                    {
                                      "-material":
                                        { "Material":
                                          {
                                          }
                                        },
                                      "-texture":
                                        { "ImageTexture":
                                          {
                                            "@url":["grill.png","../../../Weapons/Guns/grill.png","../../Weapons/Guns/grill.png","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter18-TextureMapping/grill.png"]
                                          }
                                        },
                                      "-textureTransform":
                                        { "TextureTransform":
                                          {
                                            "@center":[0.5,0.5],
                                            "@scale":[32,8]
                                          }
                                        }
                                    }
                                  },
                                "-geometry":
                                  { "IndexedFaceSet":
                                    {
                                      "@DEF":"FinalScreen",
                                      "@coordIndex":[0,1,2,3],
                                      "@solid":false,
                                      "@texCoordIndex":[0,1,2,3],
                                      "-coord":
                                        { "Coordinate":
                                          {
                                            "@point":[-1,-0.4,0.1,1,-0.4,0.1,1,0.4,0.1,-1,0.4,0.1]
                                          }
                                        },
                                      "-texCoord":
                                        { "TextureCoordinate":
                                          {
                                            "@point":[0,0,1,0,1,1,0,1]
                                          }
                                        }
                                    }
                                  }
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "ROUTE":
            {
              "@fromField":"netTranslation",
              "@fromNode":"myLauncher",
              "@toField":"set_translation",
              "@toNode":"FinalNetTransform"
            }
          },
          { "ROUTE":
            {
              "@fromField":"netScale",
              "@fromNode":"myLauncher",
              "@toField":"set_scale",
              "@toNode":"FinalNetTransform"
            }
          },
          { "ROUTE":
            {
              "@fromField":"nettingScale",
              "@fromNode":"myLauncher",
              "@toField":"set_scale",
              "@toNode":"FinalNettingTransform"
            }
          },
          { "ROUTE":
            {
              "@fromField":"netOrientation",
              "@fromNode":"myLauncher",
              "@toField":"set_rotation",
              "@toNode":"FinalNetTransform"
            }
          }
        ]
    }
  }
}