{
"inf21tahoe_taillight_R": {
    "information":{
        "authors":"BeamNG",
        "name":"Right Taillight",
        "value":50,
    },
    "slotType" : "inf21tahoe_taillight_R",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["inf21tahoe_taillightframe_R", ["inf21tahoe_taillight_R"],[],{"pos":{"x":0.0, "y":0.0, "z":0.0}}],

         {"deformGroup":"taillight_R_break", "deformMaterialBase":"gavril_lights", "deformMaterialDamaged":"gavril_lights_dmg"},
         ["inf21tahoe_taillight_R", ["inf21tahoe_taillight_R"],[],{"pos":{"x":0.0, "y":0.0, "z":0.0}, "deformSound":"event:>Destruction>Vehicle>Glass>extglassbreaksound2", "deformVolume":0.5}],
         {"deformGroup":"taillight_R_break", "deformMaterialBase":"inf21tahoe_glass", "deformMaterialDamaged":"inf21tahoe_glass_dmg"},
         ["inf21tahoe_taillightglass_R", ["inf21tahoe_taillight_R"],[],{"pos":{"x":0.0, "y":0.0, "z":0.0}, "deformSound":"event:>Destruction>Vehicle>Glass>extglassbreaksound2", "deformVolume":0.5}],
         {"deformGroup":""},
    ],
    "props": [
        ["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"],
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":255, "b":160, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleReverseLightFlare",
            "cookieName":"art/special/BNG_light_cookie_headlight.dds"
            "texSize":512,
            "shadowSoftness":0.5,
        },
        //reverse lights
        ["reverse" ,         "SPOTLIGHT"        , "tl2r", "tl4r", "tl1r", {"x":0, "y":-30, "z":-30} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.564, "y":0.554, "z":-0.018},"flareScale":0.0,"lightBrightness":0.06,"deformGroup":"taillight_R_break"}],
        //taillights
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":50, "b":0, "a":255},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
        },
        ["brake" ,         "SPOTLIGHT"        , "tl2r", "tl4r", "tl1r", {"x":0, "y":-30, "z":-40} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.40, "y":0.4, "z":-0.015},"flareScale":0.0,"lightBrightness":0.07,"deformGroup":"taillight_R_break"}],
        ["signal_R" ,         "SPOTLIGHT"        , "tl2r", "tl4r", "tl1r", {"x":0, "y":-30, "z":-40} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.40, "y":0.6, "z":-0.015},"flareScale":0.0,"lightBrightness":0.04,"deformGroup":"taillight_R_break"}],
        ["lowhighbeam" ,         "SPOTLIGHT"        , "tl2r", "tl4r", "tl1r", {"x":0, "y":-30, "z":-40} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.40, "y":0.6, "z":-0.015},"flareScale":0.0,"lightBrightness":0.02,"lightRange":8,"deformGroup":"taillight_R_break"}],
     ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--taillight--
         //right
         {"selfCollision":true},
         {"collision":true},
         {"nodeMaterial":"|NM_PLASTIC"},
         {"frictionCoef":0.5},
         {"nodeWeight":0.376},
         {"group":"inf21tahoe_taillight_R"},
         ["tl1r", -0.88529, 2.58169, 1.25819],
         ["tl2r", -0.92296, 2.59440, 0.87897],
         ["tl3r", -0.76153, 2.63169, 1.27808],
         ["tl4r", -0.76153, 2.64440, 0.87897],
         {"selfCollision":false},
         {"nodeWeight":0.376},
         ["tl5r", -0.87225, 2.52440, 1.03727],
         {"group":""},
    ],

    "beams": [
          ["id1:", "id2:"],
          //--taillight--
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":658940,"beamDamp":18.8},
          {"beamDeform":7000,"beamStrength":42000},
          //taillight main shape
          {"deformGroup":"taillight_R_break", "deformationTriggerRatio":0.05},
          {"deformLimitExpansion":1.2},
          ["tl4r", "tl3r"],
          ["tl2r", "tl1r"],
          ["tl1r", "tl3r"],
          ["tl4r", "tl2r"],
          ["tl2r", "tl3r"],
          ["tl1r", "tl4r"],
          ["tl5r", "tl2r"],
          ["tl5r", "tl1r"],
          ["tl5r", "tl4r"],
          ["tl5r", "tl3r"],

          //attach
          {"deformLimitExpansion":""},
          {"beamSpring":470940,"beamDamp":18.8},
          {"beamDeform":2800,"beamStrength":14700},
          {"breakGroup":"taillight_a_R"},
          ["tl4r", "q10r"],
          ["tl2r", "q10r"],
          ["tl2r", "q7r"],
          ["tl4r", "q7r"]
          ["tl3r", "q3r"],
          ["tl1r", "q3r"],
          ["tl4r", "tb4r"],
          ["tb4r", "tl3r"],
          ["tl1r", "q2r"],
          ["tl2r", "q6r"],
          ["tl2r", "tb3r"],
          ["tl4r", "tb3r"],
          ["tl1r", "tb3r"],
          ["tl3r", "tb3r"],
          ["tl5r", "q6r"],
          ["tl5r", "tb4r"],
          {"breakGroup":""},
          {"deformGroup":""},

          //taillight support beams
          {"beamType":"|SUPPORT", "beamLongBound":4},
          {"beamSpring":376940,"beamDamp":18.8},
          {"beamDeform":1400,"beamStrength":231000},
          ["tl2r", "q10r"],
          ["tl4r", "q10r"],
          ["tl1r", "q3r"],
          ["tl3r", "q3r"],
          ["tb4r", "tl2r"],
          ["tb4r", "tl1r"],
          ["tl3r", "q2r"],
          ["tl1r", "q2r"],
          ["tl2r", "q6r"],
          ["tl4r", "q6r"],
          ["tl2r", "tb3r"],
          ["tl4r", "tb3r"],
          ["tl1r", "tb3r"],
          ["tl3r", "tb3r"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.2},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //right taillight
            {"groundModel":"plastic"},
            {"group":"inf21tahoe_taillight_R"},
            {"dragCoef":5},
            ["tl3r", "tl4r", "tl2r"],
            ["tl2r", "tl1r", "tl3r"],
            {"triangleType":"NONCOLLIDABLE"},
            ["tl1r", "tl2r", "tl5r"],
            ["tl5r", "tl2r", "tl4r"],
            ["tl4r", "tl3r", "tl5r"],
            ["tl1r", "tl5r", "tl3r"],
            {"triangleType":"NORMALTYPE"},
            {"group":""},
    ],
},
"inf21tahoe_taillight_L": {
    "information":{
        "authors":"BeamNG",
        "name":"Left Taillight",
        "value":50,
    },
    "slotType" : "inf21tahoe_taillight_L",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["inf21tahoe_taillightframe_L", ["inf21tahoe_taillight_L"],[],{"pos":{"x":0.0, "y":0.0, "z":0.0}}],

         {"deformGroup":"taillight_L_break", "deformMaterialBase":"gavril_lights", "deformMaterialDamaged":"gavril_lights_dmg"},
         ["inf21tahoe_taillight_L", ["inf21tahoe_taillight_L"],[],{"pos":{"x":0.0, "y":0.0, "z":0.0}, "deformSound":"event:>Destruction>Vehicle>Glass>extglassbreaksound2", "deformVolume":0.5}],
         {"deformGroup":"taillight_L_break", "deformMaterialBase":"inf21tahoe_glass", "deformMaterialDamaged":"inf21tahoe_glass_dmg"},
         ["inf21tahoe_taillightglass_L", ["inf21tahoe_taillight_L"],[],{"pos":{"x":0.0, "y":0.0, "z":0.0}, "deformSound":"event:>Destruction>Vehicle>Glass>extglassbreaksound2", "deformVolume":0.5}],
         {"deformGroup":""},
    ],
    "props": [
        ["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"],
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":255, "b":160, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleReverseLightFlare",
            "cookieName":"art/special/BNG_light_cookie_headlight.dds"
            "texSize":512,
            "shadowSoftness":0.5,
        },
        //reverse lights
        ["reverse" ,         "SPOTLIGHT"        , "tl2l", "tl4l", "tl1l", {"x":180, "y":-30, "z":30} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.508, "y":0.561	, "z":0.013},"flareScale":0.0,"lightBrightness":0.06,"deformGroup":"taillight_L_break"}],
        //taillights
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":50, "b":0, "a":255},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
        },
        ["brake" ,         "SPOTLIGHT"        , "tl2l", "tl4l", "tl1l", {"x":180, "y":-30, "z":40} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.40, "y":0.5, "z":0.015},"flareScale":0.0,"lightBrightness":0.07,"deformGroup":"taillight_L_break"}],
        ["signal_L" ,         "SPOTLIGHT"        , "tl2l", "tl4l", "tl1l", {"x":180, "y":-30, "z":40} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.40, "y":0.6, "z":0.015},"flareScale":0.0,"lightBrightness":0.04,"deformGroup":"taillight_L_break"}],
        ["lowhighbeam" ,         "SPOTLIGHT"        , "tl2l", "tl4l", "tl1l", {"x":180, "y":-30, "z":40} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.40, "y":0.6, "z":0.015},"flareScale":0.0,"lightBrightness":0.02,"lightRange":8,"deformGroup":"taillight_L_break"}],
     ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--taillight--
         //right
         {"selfCollision":true},
         {"collision":true},
         {"nodeMaterial":"|NM_PLASTIC"},
         {"frictionCoef":0.5},
         {"nodeWeight":0.376},
         {"group":"inf21tahoe_taillight_L"},
         ["tl1l", 0.88529, 2.58169, 1.25819],
         ["tl2l", 0.92296, 2.59440, 0.87897],
         ["tl3l", 0.76153, 2.63169, 1.27808],
         ["tl4l", 0.76153, 2.64440, 0.87897],
         {"selfCollision":false},
         {"nodeWeight":0.376},
         ["tl5l", 0.87225, 2.52440, 1.03727],
         {"group":""},
    ],

    "beams": [
          ["id1:", "id2:"],
          //--taillight--
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":658940,"beamDamp":18.8},
          {"beamDeform":7000,"beamStrength":42000},
          //taillight main shape
          {"deformGroup":"taillight_L_break", "deformationTriggerRatio":0.05},
          {"deformLimitExpansion":1.2},
          ["tl4l", "tl3l"],
          ["tl2l", "tl1l"],
          ["tl1l", "tl3l"],
          ["tl4l", "tl2l"],
          ["tl2l", "tl3l"],
          ["tl1l", "tl4l"],
          ["tl5l", "tl2l"],
          ["tl5l", "tl1l"],
          ["tl5l", "tl4l"],
          ["tl5l", "tl3l"],

          //attach
          {"deformLimitExpansion":""},
          {"beamSpring":470940,"beamDamp":18.8},
          {"beamDeform":2800,"beamStrength":14700},
          {"breakGroup":"taillight_a_L"},
          ["tl4l", "q10l"],
          ["tl2l", "q10l"],
          ["tl2l", "q7l"],
          ["tl4l", "q7l"]
          ["tl3l", "q3l"],
          ["tl1l", "q3l"],
          ["tl4l", "tb4l"],
          ["tb4l", "tl3l"],
          ["tl1l", "q2l"],
          ["tl2l", "q6l"],
          ["tl2l", "tb3l"],
          ["tl4l", "tb3l"],
          ["tl1l", "tb3l"],
          ["tl3l", "tb3l"],
          ["tl5l", "q6l"],
          ["tl5l", "tb4l"],
          {"breakGroup":""},
          {"deformGroup":""},

          //taillight support beams
          {"beamType":"|SUPPORT", "beamLongBound":4},
          {"beamSpring":376940,"beamDamp":18.8},
          {"beamDeform":1400,"beamStrength":231000},
          ["tl2l", "q10l"],
          ["tl4l", "q10l"],
          ["tl1l", "q3l"],
          ["tl3l", "q3l"],
          ["tb4l", "tl2l"],
          ["tb4l", "tl1l"],
          ["tl3l", "q2l"],
          ["tl1l", "q2l"],
          ["tl2l", "q6l"],
          ["tl4l", "q6l"],
          ["tl2l", "tb3l"],
          ["tl4l", "tb3l"],
          ["tl1l", "tb3l"],
          ["tl3l", "tb3l"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.2},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //right taillight
            {"groundModel":"plastic"},
            {"group":"inf21tahoe_taillight_L"},
            {"dragCoef":5},
            ["tl4l", "tl3l", "tl2l"],
            ["tl1l", "tl2l", "tl3l"],
            {"triangleType":"NONCOLLIDABLE"},
            ["tl2l", "tl1l", "tl5l"],
            ["tl2l", "tl5l", "tl4l"],
            ["tl3l", "tl4l", "tl5l"],
            ["tl5l", "tl1l", "tl3l"],
            {"triangleType":"NORMALTYPE"},
            {"group":""},
    ],
},
}
