{
"polo17_taillight_R": {
    "information":{
        "authors":"BeamNG",
        "name":"Right Taillight",
        "value":130,
    },
    "slotType" : "polo17_taillight_R",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["polo17_taillightframe_R", ["polo17_taillight_R"]],
         {"deformGroup":"taillightglass_R_break", "deformMaterialBase":"polo17_glass", "deformMaterialDamaged":"polo17light_dmg"},
         ["polo17_taillightglass_R", ["polo17_taillight_R"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound1", "deformVolume":0.5}],
         {"deformGroup":""},
         {"deformGroup":"taillightglass_R_break", "deformMaterialBase":"polo17_glass", "deformMaterialDamaged":"polo17lightR"},
         ["polo17_taillight_R", ["polo17_taillight_R"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound1", "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":10, "b":0, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
        },
        //taillights
        ["brake" ,         "SPOTLIGHT"        , "tl4r", "tl3r", "tl1r", {"x":-30, "y":-10, "z":-30} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":-0.68, "y":0.86, "z":-0.03},"flareScale":0.06,"lightBrightness":0.08,"deformGroup":"taillightglass_R_break"}],
        ["lowhighbeam" ,   "SPOTLIGHT"        , "tl4r", "tl3r", "tl1r", {"x":-50, "y":-20, "z":-5} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":-0.68 "y":0.86, "z":-0.03},"flareScale":0.03,"lightBrightness":0.04,"lightRange":8,"deformGroup":"taillightglass_R_break"}],
        //corner
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":10,
            "lightColor":{"r":254, "g":150, "b":0, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
        },
        ["signal_R" ,         "SPOTLIGHT"        , "tl4r", "tl3r", "tl1r", {"x":-30, "y":-10, "z":-30} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":-0.9, "y":0.86, "z":-0.1},"flareScale":0.02,"lightBrightness":0.04,"deformGroup":"taillightglass_R_break"}],
        //reverse lights
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":255, "b":200, "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,
        },
    ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--taillight--
         //right
         {"selfCollision":true},
         {"collision":true},
         {"nodeMaterial":"|NM_PLASTIC"},
         {"frictionCoef":0.5},
         {"nodeWeight":0.65},
         {"group":"polo17_taillight_R"},
         ["tl1r", -0.58143, 2.14237, 0.77000],
         ["tl3r", -0.57000, 2.15473, 0.70000],
         ["tl2r", -0.76437, 1.94469, 0.78000],
         ["tl4r", -0.74151, 1.99411, 0.65000],
         {"selfCollision":false},
         ["tl5r", -0.69005, 1.89527, 0.73000],
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          //--taillight--
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":600600,"beamDamp":90},
          {"beamDeform":13350,"beamStrength":62750},
          //taillight main shape
          {"deformLimitExpansion":1.1},
          {"deformGroup":"taillightglass_R_break", "deformationTriggerRatio":0.04},
          //r
          ["tl1r","tl2r"],
          ["tl3r","tl4r"],
          ["tl1r","tl3r"],
          ["tl2r","tl4r"],

          ["tl1r","tl4r"],
          ["tl2r","tl3r"],

          ["tl1r","tl5r"],
          ["tl2r","tl5r"],
          ["tl3r","tl5r"],
          ["tl4r","tl5r"],

          //attach
          {"deformLimitExpansion":""},
          {"beamSpring":500600,"beamDamp":90},
          {"beamDeform":9150,"beamStrength":18500},
          //r
          {"breakGroup":"taillight_a_R"},
          ["tl2r","q4r"],
          ["tl5r","q4r"],
          ["tl3r","r7rr"],
          ["tl4r","q4r"],
          ["tl4r","q9r"],

          {"breakGroup":"taillight_b_R"},
          ["tl1r","r7rr"],
          ["tl5r","q9r"],
          ["tl2r","q9r"],
          ["tl5r","r7rr"],
          {"breakGroup":""},
          {"deformGroup":""},

          //taillight support beams
          {"beamType":"|SUPPORT", "beamLongBound":4},
          {"beamSpring":600600,"beamDamp":90},
          {"beamDeform":13200,"beamStrength":330000},
          ["tl2r","q8r"],
          ["tl4r","q8r"],
          ["tl2r","q3r"],
          ["tl1r","q4r"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.1},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //right taillight
            {"groundModel":"plastic"},
            {"group":"polo17_taillight_R"},
            {"dragCoef":3},
            ["tl1r","tl3r","tl4r"],
            ["tl1r","tl4r","tl2r"],
            {"group":""},
    ],
},
"polo17_taillight_L": {
    "information":{
        "authors":"BeamNG",
        "name":"Left Taillight",
        "value":130,
    },
    "slotType" : "polo17_taillight_L",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["polo17_taillightframe_L", ["polo17_taillight_L"]],
         {"deformGroup":"taillightglass_L_break", "deformMaterialBase":"polo17_glass", "deformMaterialDamaged":"polo17light_dmg"},
         ["polo17_taillightglass_L", ["polo17_taillight_L"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound2", "deformVolume":0.5}],
         {"deformGroup":""},
         {"deformGroup":"taillightglass_L_break", "deformMaterialBase":"polo17_glass", "deformMaterialDamaged":"polo17lightR"},
         ["polo17_taillight_L", ["polo17_taillight_L"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound1", "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":10, "b":0, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
        },
        //taillights
        ["brake" ,         "SPOTLIGHT"        , "tl4l", "tl3l", "tl1l", {"x":210, "y":-10, "z":30} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":-0.68, "y":0.86, "z":0.03},"flareScale":0.06,"lightBrightness":0.08,"deformGroup":"taillightglass_L_break"}],
        ["lowhighbeam" ,         "SPOTLIGHT"        , "tl4l", "tl3l", "tl1l", {"x":230, "y":-20, "z":5} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":-0.68, "y":0.86, "z":0.03},"flareScale":0.03,"lightBrightness":0.04,"lightRange":8,"deformGroup":"taillightglass_L_break"}],
        //corner
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":254, "g":150, "b":0, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
        },
        ["signal_L" ,         "SPOTLIGHT"        , "tl4l", "tl3l", "tl1l", {"x":210, "y":-10, "z":30} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":-0.9, "y":0.86, "z":0.1},"flareScale":0.02,"lightBrightness":0.04,"deformGroup":"taillightglass_L_break"}],
        //reverse lights
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":255, "b":200, "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,
        },
    ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--taillight--
         //left
         {"selfCollision":true},
         {"collision":true},
         {"nodeMaterial":"|NM_PLASTIC"},
         {"frictionCoef":0.5},
         {"nodeWeight":0.65},
         {"group":"polo17_taillight_L"},
         ["tl1l", 0.57266, 2.14185, 0.77000],
         ["tl3l", 0.56038, 2.15415, 0.70000],
         ["tl2l", 0.76911, 1.94505, 0.78000],
         ["tl4l", 0.74456, 1.99425, 0.65000],
         {"selfCollision":false},
         ["tl5l", 0.68930, 1.89585, 0.72000],
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          //--taillight--
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":600600,"beamDamp":90},
          {"beamDeform":13350,"beamStrength":128000},
          //taillight main shape
          {"deformLimitExpansion":1.1},
          {"deformGroup":"taillightglass_L_break", "deformationTriggerRatio":0.04},
          //l
          ["tl1l","tl2l"],
          ["tl3l","tl4l"],
          ["tl1l","tl3l"],
          ["tl2l","tl4l"],

          ["tl1l","tl4l"],
          ["tl2l","tl3l"],

          ["tl1l","tl5l"],
          ["tl2l","tl5l"],
          ["tl3l","tl5l"],
          ["tl4l","tl5l"],

          //attach
          {"deformLimitExpansion":""},
          {"beamSpring":500600,"beamDamp":90},
          {"beamDeform":9150,"beamStrength":18500},
          //l
          {"breakGroup":"taillight_a_L"},
          ["tl2l","q4l"],
          ["tl5l","q4l"],
          ["tl3l","r7ll"],
          ["tl4l","q4l"],
          ["tl4l","q9l"],

          {"breakGroup":"taillight_b_L"},
          ["tl1l","r7ll"],
          ["tl5l","q9l"],
          ["tl2l","q9l"],
          ["tl5l","r7ll"],
          {"breakGroup":""},
          {"deformGroup":""},

          //taillight support beams
          {"beamType":"|SUPPORT", "beamLongBound":4},
          {"beamSpring":600600,"beamDamp":90},
          {"beamDeform":13200,"beamStrength":330000},
          ["tl2l","q8l"],
          ["tl4l","q8l"],
          ["tl2l","q3l"],
          ["tl1l","q4l"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.1},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //left taillight
            {"groundModel":"plastic"},
            {"group":"polo17_taillight_L"},
            {"dragCoef":3},
            ["tl3l","tl1l","tl4l"],
            ["tl4l","tl1l","tl2l"],
            {"group":""},
    ],
},
}