{
"revuelto_tailgate": {
    "information":{
        "authors":"BeamNG",
        "name":"Tailgate (Carbon)",
        "value":1100,
    },
    "slotType" : "revuelto_tailgate",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["revuelto_tailgate", ["revuelto_tailgate"]],
    ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         {"frictionCoef":0.8},
         {"nodeMaterial":"|NM_PLASTIC"},
         //--TAILGATE--

         {"collision":true},
         {"selfCollision":true},
         {"nodeWeight":0.9},
         {"group":"revuelto_tailgate"},
         ["tg1rr", -0.45399, 0.66805, 1.14764],
         ["tg1r", -0.25051, 0.72952, 1.13328],
         ["tg1l", 0.25051, 0.72952, 1.13328],
         ["tg1ll", 0.45399, 0.66805, 1.14764],

         //["tg2rr", -0.61308, 0.71113, 1.02779],
         ["tg2r", -0.43453, 1.06596, 1.08379],
         ["tg2l", 0.43453, 1.06596, 1.08379],
         //["tg2ll", 0.61308, 0.71113, 1.02779],

         ["tg3r", -0.26871, 1.85988, 0.97773],
         ["tg3l", 0.26871, 1.85988, 0.97773],
         {"group":""},

         //rigidifier
         {"selfCollision":false, "collision":false},
         ["tg4", 0.00000, 1.26600, 0.85173],
    ],
    "beams": [
          ["id1:", "id2:"],
          //--TAILGATE--

          //tailgate main shape
          {"beamSpring":301000,"beamDamp":40},
          {"beamDeform":15000,"beamStrength":"FLT_MAX"},
          {"deformLimitExpansion":1.2},
          {"deformGroup":"tailgateglass_break", "deformationTriggerRatio":0.01}
          ["tg1ll", "tg1l"],
          ["tg1l", "tg1r"],
          ["tg1r", "tg1rr"],
          ["tg2ll", "tg1ll"],
          ["tg2rr", "tg1rr"],
          ["tg3r", "tg2rr"],
          ["tg3l", "tg2ll"],
          ["tg3l", "tg2l"],
          ["tg1ll", "tg2l"],
          ["tg3r", "tg2r"],
          ["tg2r", "tg1rr"],
          ["tg3l", "tg3r"],

          //surf cross
          {"deformLimitExpansion":""},
          {"beamDeform":7200,"beamStrength":85440},
          ["tg2ll", "tg2l"],
          ["tg2rr", "tg2r"],
          ["tg2r", "tg2l"],
          ["tg2l", "tg3r"],
          ["tg2r", "tg3l"],
          ["tg2r", "tg1r"],
          ["tg1l", "tg2l"],
          ["tg2l", "tg1r"],
          ["tg2r", "tg1l"],
          ["tg1ll", "tg2r"],
          ["tg1rr", "tg2l"],

          //rigids
          {"beamDeform":3720,"beamStrength":85440},
          ["tg1ll", "tg1r"],
          ["tg1rr", "tg1l"],
          ["tg2ll", "tg2r"],
          ["tg2rr", "tg2l"],
          ["tg3l", "tg1ll"],
          ["tg3r", "tg1rr"],

          //rigidifier
          {"beamDeform":3920,"beamStrength":85440},
          ["tg4", "tg3l"],
          ["tg4", "tg3r"],
          ["tg4", "tg2ll"],
          ["tg4", "tg2l"],
          ["tg4", "tg2rr"],
          ["tg4", "tg2r"],
          ["tg4", "tg1ll"],
          ["tg4", "tg1l"],
          ["tg4", "tg1rr"],
          ["tg4", "tg1r"],
          {"deformGroup":""}

          //hinge
          {"beamSpring":501000,"beamDamp":20},
          {"beamDeform":13440,"beamStrength":32040},
          {"breakGroup":"tailgatehinge_R"},
            ["tg1r", "rf4"],


          {"breakGroup":"tailgatehinge_L"},
 
            ["tg1l", "rf4"],

          //latch
          {"beamDeform":5600,"beamStrength":16020},
          {"breakGroup":"tailgatelatch"},
          ["tg3l", "tb4l"],
          ["tg3r", "tb4r"],
          ["tg3r", "tb4l"],
          ["tg3l", "tb4r"],

            ["tg3l", "rbs4ll"],
            ["tg3r", "rbs4rr"],
            ["rbs4l", "tg3l"],
            ["tg3r", "rbs4r"],
            ["tg3l", "rbs4rr"],
            ["tg3r", "rbs4ll"],
            ["tg3l", "rbs4r"],
            ["tg3r", "rbs4l"],


            ["rqs8r", "tg2rr"],
            ["rqs2r", "tg2rr"],
            ["rqs8l", "tg2ll"],
            ["rqs2l", "tg2ll"],
            ["rqs3l", "tg2ll"],
            ["rqs3r", "tg2rr"],
            ["tg2r", "rqs3r"],
            ["tg2l", "rqs3l"],
            ["tg3l", "rbs4lll"],
            ["tg3r", "rbs4rrr"],


            ["tg1r", "rf3rr"],
            ["tg1r", "rf4rr"],
            ["tg1l", "rf4ll"],
            ["tg1l", "rf3ll"],
            ["rf3rr", "tg2rr"],
            ["rf4rr", "tg1rr"],
            ["rf4ll", "tg1ll"],
            ["rf3ll", "tg2ll"],
            ["tg2ll", "rf4ll"],
            ["tg1ll", "rf3ll"],
            ["rf4rr", "tg2rr"],
            ["tg1rr", "rf3rr"],




          {"breakGroup":""},

          //damping
          {"beamDeform":33600,"beamStrength":106800},
          {"beamSpring":0,"beamDamp":10},
          ["tg3r", "tb4r", {"breakGroup":"tailgatehinge_R"}],
          ["tg3l", "tb4l", {"breakGroup":"tailgatehinge_L"}],

          //pop open
          {"breakGroupType":1},
          {"beamSpring":170,"beamDamp":250},
          {"beamDeform":3915,"beamStrength":9000},
          {"beamPrecompression":4.0},
          ["tg2ll", "tb2l", {"breakGroup":"tailgatehinge_L", "beamPrecompressionTime":0.5}],
          ["tg2rr", "tb2r", {"breakGroup":"tailgatehinge_R", "beamPrecompressionTime":0.5}],
          {"breakGroup":""},
          {"beamPrecompression":1},

          //limiter
          {"beamPrecompression":1, "beamType":"|BOUNDED", "beamLongBound":0.9, "beamShortBound":1},
          {"beamSpring":0,"beamDamp":100,"beamDeform":3000,"beamStrength":30000},
          {"beamLimitSpring":201000,"beamLimitDamp":500},
          ["tg2l", "tb3l", {"breakGroup":"tailgatehinge_L"}],
          ["tg2r", "tb3r", {"breakGroup":"tailgatehinge_R"}],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"breakGroupType":0},

          //support beams
          {"beamType":"|SUPPORT","beamLongBound":4},
          {"beamSpring":601000,"beamDamp":80},
          {"beamDeform":6720,"beamStrength":178000},
          ["tg1ll", "tb2l"],
          ["tg1rr", "tb2r"],
          ["tg2rr", "tb3r"],
          ["tg3r", "tb4r"],
          ["tg3l", "tb4l"],
          ["tg2ll", "tb3l"],
          {"beamLongBound":50},
          ["tg2ll", "tb5l"],
          ["tg3l", "tb6l"],
          ["tg3r", "tb6r"],
          ["tg1ll", "rrf6ll"],
          ["tg1rr", "rrf6rr"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.2},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //tailgate
            {"groundModel":"plastic"},
            {"dragCoef":12},
            {"group":"revuelto_tailgate"},
            ["tg2ll", "tg2l", "tg1ll"],
            ["tg2ll", "tg3l", "tg2l"],
            ["tg2r", "tg2rr", "tg1rr"],
            ["tg2r", "tg3r", "tg2rr"],
            ["tg2r", "tg2l", "tg3l"],
            ["tg3l", "tg3r", "tg2r"],
            ["tg1r", "tg2r", "tg1rr"],
            ["tg1l", "tg1ll", "tg2l"],
            ["tg2l", "tg2r", "tg1r"],
            ["tg1r", "tg1l", "tg2l"],
            {"group":""},
    ],
},
"revuelto_tailgate_painted": {
    "information":{
        "authors":"BeamNG",
        "name":"Tailgate (Painted)",
        "value":1100,
    },
    "slotType" : "revuelto_tailgate",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["revuelto_tailgate_painted", ["revuelto_tailgate"]],
    ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         {"frictionCoef":0.8},
         {"nodeMaterial":"|NM_PLASTIC"},
         //--TAILGATE--

         {"collision":true},
         {"selfCollision":true},
         {"nodeWeight":0.9},
         {"group":"revuelto_tailgate"},
         ["tg1rr", -0.45399, 0.66805, 1.14764],
         ["tg1r", -0.25051, 0.72952, 1.13328],
         ["tg1l", 0.25051, 0.72952, 1.13328],
         ["tg1ll", 0.45399, 0.66805, 1.14764],

         //["tg2rr", -0.61308, 0.71113, 1.02779],
         ["tg2r", -0.43453, 1.06596, 1.08379],
         ["tg2l", 0.43453, 1.06596, 1.08379],
         //["tg2ll", 0.61308, 0.71113, 1.02779],

         ["tg3r", -0.26871, 1.85988, 0.97773],
         ["tg3l", 0.26871, 1.85988, 0.97773],
         {"group":""},

         //rigidifier
         {"selfCollision":false, "collision":false},
         ["tg4", 0.00000, 1.26600, 0.85173],
    ],
    "beams": [
          ["id1:", "id2:"],
          //--TAILGATE--

          //tailgate main shape
          {"beamSpring":301000,"beamDamp":40},
          {"beamDeform":15000,"beamStrength":"FLT_MAX"},
          {"deformLimitExpansion":1.2},
          {"deformGroup":"tailgateglass_break", "deformationTriggerRatio":0.01}
          ["tg1ll", "tg1l"],
          ["tg1l", "tg1r"],
          ["tg1r", "tg1rr"],
          ["tg2ll", "tg1ll"],
          ["tg2rr", "tg1rr"],
          ["tg3r", "tg2rr"],
          ["tg3l", "tg2ll"],
          ["tg3l", "tg2l"],
          ["tg1ll", "tg2l"],
          ["tg3r", "tg2r"],
          ["tg2r", "tg1rr"],
          ["tg3l", "tg3r"],

          //surf cross
          {"deformLimitExpansion":""},
          {"beamDeform":7200,"beamStrength":85440},
          ["tg2ll", "tg2l"],
          ["tg2rr", "tg2r"],
          ["tg2r", "tg2l"],
          ["tg2l", "tg3r"],
          ["tg2r", "tg3l"],
          ["tg2r", "tg1r"],
          ["tg1l", "tg2l"],
          ["tg2l", "tg1r"],
          ["tg2r", "tg1l"],
          ["tg1ll", "tg2r"],
          ["tg1rr", "tg2l"],

          //rigids
          {"beamDeform":3720,"beamStrength":85440},
          ["tg1ll", "tg1r"],
          ["tg1rr", "tg1l"],
          ["tg2ll", "tg2r"],
          ["tg2rr", "tg2l"],
          ["tg3l", "tg1ll"],
          ["tg3r", "tg1rr"],

          //rigidifier
          {"beamDeform":3920,"beamStrength":85440},
          ["tg4", "tg3l"],
          ["tg4", "tg3r"],
          ["tg4", "tg2ll"],
          ["tg4", "tg2l"],
          ["tg4", "tg2rr"],
          ["tg4", "tg2r"],
          ["tg4", "tg1ll"],
          ["tg4", "tg1l"],
          ["tg4", "tg1rr"],
          ["tg4", "tg1r"],
          {"deformGroup":""}

          //hinge
          {"beamSpring":501000,"beamDamp":20},
          {"beamDeform":13440,"beamStrength":32040},
          {"breakGroup":"tailgatehinge_R"},
            ["tg1r", "rf4"],


          {"breakGroup":"tailgatehinge_L"},
 
            ["tg1l", "rf4"],

          //latch
          {"beamDeform":5600,"beamStrength":16020},
          {"breakGroup":"tailgatelatch"},
          ["tg3l", "tb4l"],
          ["tg3r", "tb4r"],
          ["tg3r", "tb4l"],
          ["tg3l", "tb4r"],

            ["tg3l", "rbs4ll"],
            ["tg3r", "rbs4rr"],
            ["rbs4l", "tg3l"],
            ["tg3r", "rbs4r"],
            ["tg3l", "rbs4rr"],
            ["tg3r", "rbs4ll"],
            ["tg3l", "rbs4r"],
            ["tg3r", "rbs4l"],


            ["rqs8r", "tg2rr"],
            ["rqs2r", "tg2rr"],
            ["rqs8l", "tg2ll"],
            ["rqs2l", "tg2ll"],
            ["rqs3l", "tg2ll"],
            ["rqs3r", "tg2rr"],
            ["tg2r", "rqs3r"],
            ["tg2l", "rqs3l"],
            ["tg3l", "rbs4lll"],
            ["tg3r", "rbs4rrr"],


            ["tg1r", "rf3rr"],
            ["tg1r", "rf4rr"],
            ["tg1l", "rf4ll"],
            ["tg1l", "rf3ll"],
            ["rf3rr", "tg2rr"],
            ["rf4rr", "tg1rr"],
            ["rf4ll", "tg1ll"],
            ["rf3ll", "tg2ll"],
            ["tg2ll", "rf4ll"],
            ["tg1ll", "rf3ll"],
            ["rf4rr", "tg2rr"],
            ["tg1rr", "rf3rr"],




          {"breakGroup":""},

          //damping
          {"beamDeform":33600,"beamStrength":106800},
          {"beamSpring":0,"beamDamp":10},
          ["tg3r", "tb4r", {"breakGroup":"tailgatehinge_R"}],
          ["tg3l", "tb4l", {"breakGroup":"tailgatehinge_L"}],

          //pop open
          {"breakGroupType":1},
          {"beamSpring":170,"beamDamp":250},
          {"beamDeform":3915,"beamStrength":9000},
          {"beamPrecompression":4.0},
          ["tg2ll", "tb2l", {"breakGroup":"tailgatehinge_L", "beamPrecompressionTime":0.5}],
          ["tg2rr", "tb2r", {"breakGroup":"tailgatehinge_R", "beamPrecompressionTime":0.5}],
          {"breakGroup":""},
          {"beamPrecompression":1},

          //limiter
          {"beamPrecompression":1, "beamType":"|BOUNDED", "beamLongBound":0.9, "beamShortBound":1},
          {"beamSpring":0,"beamDamp":100,"beamDeform":3000,"beamStrength":30000},
          {"beamLimitSpring":201000,"beamLimitDamp":500},
          ["tg2l", "tb3l", {"breakGroup":"tailgatehinge_L"}],
          ["tg2r", "tb3r", {"breakGroup":"tailgatehinge_R"}],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"breakGroupType":0},

          //support beams
          {"beamType":"|SUPPORT","beamLongBound":4},
          {"beamSpring":601000,"beamDamp":80},
          {"beamDeform":6720,"beamStrength":178000},
          ["tg1ll", "tb2l"],
          ["tg1rr", "tb2r"],
          ["tg2rr", "tb3r"],
          ["tg3r", "tb4r"],
          ["tg3l", "tb4l"],
          ["tg2ll", "tb3l"],
          {"beamLongBound":50},
          ["tg2ll", "tb5l"],
          ["tg3l", "tb6l"],
          ["tg3r", "tb6r"],
          ["tg1ll", "rrf6ll"],
          ["tg1rr", "rrf6rr"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.2},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //tailgate
            {"groundModel":"plastic"},
            {"dragCoef":12},
            {"group":"revuelto_tailgate"},
            ["tg2ll", "tg2l", "tg1ll"],
            ["tg2ll", "tg3l", "tg2l"],
            ["tg2r", "tg2rr", "tg1rr"],
            ["tg2r", "tg3r", "tg2rr"],
            ["tg2r", "tg2l", "tg3l"],
            ["tg3l", "tg3r", "tg2r"],
            ["tg1r", "tg2r", "tg1rr"],
            ["tg1l", "tg1ll", "tg2l"],
            ["tg2l", "tg2r", "tg1r"],
            ["tg1r", "tg1l", "tg2l"],
            {"group":""},
    ],
},
}