{
"xc90_taillight_R_usdm": {
    "information":{
        "authors":"BeamNG",  
        "name":"USDM Right Taillight",
        "value":110,
    },
    "slotType" : "xc90_taillight_R",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],

         {"deformGroup":"taillightglass_R_break", "deformMaterialBase":"xc90_glass", "deformMaterialDamaged":"xc90_glass_dmg"},
         ["xc90_taillightglass_R", ["xc90_taillight_R"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>extglassbreaksound1", "deformVolume":0.3}],

         {"deformGroup":"taillightglass_R_break", "deformMaterialBase":"xc90_lights", "deformMaterialDamaged":"xc90_lights"},
         ["xc90_taillight_R", ["xc90_taillight_R"]],
         ["xc90_taillight_R2", ["xc90_taillight_R"]],
         ["xc90_taillight_R3", ["xc90_taillight_R"]],
         ["xc90_taillight_R4", ["xc90_taillight_R"]],
         ["xc90_taillight_R5_usdm", ["xc90_taillight_R"]],
         {"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
        ["brakelights" ,         "SPOTLIGHT"        , "tl3r", "tl2r", "tl1r", {"x":-40, "y":0, "z":-20} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":-0.15, "y":0.75, "z":0.01},"flareScale":0.041,"lightBrightness":0.06,"deformGroup":"taillightglass_R_break"}],
        ["lowhighbeam" ,         "SPOTLIGHT"        , "tl3r", "tl2r", "tl1r", {"x":-40, "y":0, "z":-20} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.07, "y":0.35, "z":0.01},"flareScale":0.03,"lightBrightness":0.04,"lightRange":8,"deformGroup":"taillightglass_R_break"}],
        ["fog" ,         "SPOTLIGHT"        , "tl3r", "tl2r", "tl1r", {"x":-40, "y":0, "z":-20} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.4, "y":0.13, "z":0.01},"flareScale":0.03,"lightBrightness":0.08,"lightRange":8,"deformGroup":"taillightglass_R_break"}],
		{"lightColor":{"r":255, "g":255, "b":255, "a":255},}
		["reverse" ,         "SPOTLIGHT"        , "tl3r", "tl2r", "tl1r", {"x":-40, "y":0, "z":-20} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":-0.05, "y":0.6, "z":0.01},"flareScale":0.03,"lightBrightness":0.04,"lightRange":8,"deformGroup":"taillightglass_R_break"}],
		{"lightColor":{"r":255, "g":10, "b":0, "a":255},}
		["signal_R" ,         "SPOTLIGHT"        , "tl3r", "tl2r", "tl1r", {"x":-40, "y":0, "z":-20} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.07, "y":0.45, "z":0.01},"flareScale":0.03,"lightBrightness":0.04,"lightRange":8,"deformGroup":"taillightglass_R_break"}],
     ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--taillight--
         //right
         {"selfCollision":true},
         {"collision":true},
         {"nodeMaterial":"|NM_PLASTIC"},
         {"frictionCoef":0.5},
         {"nodeWeight":0.4},
         {"group":"xc90_taillight_R"},
         ["tl1r", -0.64693, 2.45765, 1.14639],
         ["tl2r", -0.66257, 2.49455, 0.84419],
         ["tl3r", -0.85907, 2.26263, 0.84391],
         ["tl4r", -0.83934, 2.29487, 1.10063],
         ["tl6r", -0.65085, 2.06138, 1.50539],
         {"selfCollision":false},
         {"nodeWeight":0.4},
         ["tl5r", -0.75438, 2.18375, 1.05860],
         {"group":""},
    ],

    "beams": [
          ["id1:", "id2:"],
          //--taillight--
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":701000,"beamDamp":20},
          {"beamDeform":10000,"beamStrength":60000},
          //taillight main shape
          {"deformGroup":"taillightglass_R_break", "deformationTriggerRatio":0.05},
          {"deformLimitExpansion":1.2},
          ["tl1r", "tl2r"],
          ["tl2r", "tl3r"],
          ["tl3r", "tl4r"],
          ["tl4r", "tl1r"],
          ["tl1r", "tl3r"],
          ["tl5r", "tl2r"],
          ["tl5r", "tl3r"],
          ["tl5r", "tl4r"],
          ["tl5r", "tl1r"],

          ["tl6r", "tl1r"],
          ["tl6r", "tl4r"],
          ["tl6r", "tl5r"],

          //attach
          {"deformLimitExpansion":""},
          {"beamSpring":501000,"beamDamp":20},
          {"beamDeform":4000,"beamStrength":12000},
          {"breakGroup":"taillight_a_R"},
          ["tl1r", "q3r"],
          ["tl1r", "r4rr"],
          ["tl1r", "q2r"],
          ["tl1r", "q6r"],
          ["tl1r", "r3rr"],

          ["tl3r", "q3r"],
          ["tl3r", "r4rr"],
          ["tl3r", "q2r"],
          ["tl3r", "q6r"],
          ["tl3r", "r3rr"],

          ["tl4r", "q5r"],
          ["tl4r", "q6r"],
          ["tl4r", "q2r"],
          ["tl4r", "r3rr"],
          ["tl4r", "r4rr"],
          ["tl4r", "q1r"],
          {"breakGroup":""},
          {"deformGroup":""},

          //taillight support beams
          {"beamType":"|SUPPORT", "beamLongBound":4},
          {"beamSpring":401000,"beamDamp":20},
          {"beamDeform":5000,"beamStrength":330000},
          ["tl3r", "q3r"],
          ["tl2r", "q3r"],
          ["tl4r", "q2r"],
          ["tl4r", "q5r"],
          ["tl4r", "q7r"],
          ["tl4r", "q1r"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.2},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //right taillight
            {"groundModel":"plastic"},
            {"group":"xc90_taillight_R"},
            {"dragCoef":5},
            ["tl1r", "tl2r", "tl3r"],
            ["tl1r", "tl3r", "tl4r"],

            ["tl6r", "tl1r", "tl4r"],




            {"triangleType":"NONCOLLIDABLE"},
            ["tl1r", "tl5r", "tl2r"],
            ["tl5r", "tl3r", "tl2r"],
            ["tl5r", "tl4r", "tl3r"],
            ["tl1r", "tl4r", "tl5r"],

            ["tl5r", "tl6r", "tl4r"],
            ["tl6r", "tl5r", "tl1r"],

            {"triangleType":"NORMALTYPE"},
            {"group":""},
    ],
},
"xc90_taillight_L_usdm": {
    "information":{
        "authors":"BeamNG",
        "name":"USDM Left Taillight",
        "value":110,
    },
    "slotType" : "xc90_taillight_L",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],

         {"deformGroup":"taillightglass_L_break", "deformMaterialBase":"xc90_glass", "deformMaterialDamaged":"xc90_glass_dmg"},
         ["xc90_taillightglass_L", ["xc90_taillight_L"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>extglassbreaksound1", "deformVolume":0.3}],

         {"deformGroup":"taillightglass_L_break", "deformMaterialBase":"xc90_lights", "deformMaterialDamaged":"xc90_lights"},
         ["xc90_taillight_L", ["xc90_taillight_L"]],
         ["xc90_taillight_L2", ["xc90_taillight_L"]],
         ["xc90_taillight_L3", ["xc90_taillight_L"]],
         ["xc90_taillight_L4", ["xc90_taillight_L"]],
         ["xc90_taillight_L5_usdm", ["xc90_taillight_L"]],
         {"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
        ["brakelights" ,         "SPOTLIGHT"        , "tl3l", "tl2l", "tl1l", {"x":-40, "y":0, "z":200} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":-0.15, "y":0.75, "z":-0.01},"flareScale":0.041,"lightBrightness":0.06,"deformGroup":"taillightglass_L_break"}],
        ["lowhighbeam" ,         "SPOTLIGHT"        , "tl3l", "tl2l", "tl1l", {"x":-40, "y":0, "z":200} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.07, "y":0.35, "z":-0.01},"flareScale":0.03,"lightBrightness":0.04,"lightRange":8,"deformGroup":"taillightglass_L_break"}],
        ["fog" ,         "SPOTLIGHT"        , "tl3l", "tl2l", "tl1l", {"x":-40, "y":0, "z":200} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.4, "y":0.13, "z":-0.01},"flareScale":0.03,"lightBrightness":0.08,"lightRange":8,"deformGroup":"taillightglass_L_break"}],
		{"lightColor":{"r":255, "g":255, "b":255, "a":255},}
		["reverse" ,         "SPOTLIGHT"        , "tl3l", "tl2l", "tl1l", {"x":-40, "y":0, "z":200} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":-0.05, "y":0.6, "z":-0.01},"flareScale":0.03,"lightBrightness":0.04,"lightRange":8,"deformGroup":"taillightglass_L_break"}],
		{"lightColor":{"r":255, "g":10, "b":0, "a":255},}
		["signal_L" ,         "SPOTLIGHT"        , "tl3l", "tl2l", "tl1l", {"x":-40, "y":0, "z":200} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.07, "y":0.45, "z":-0.01},"flareScale":0.03,"lightBrightness":0.04,"lightRange":8,"deformGroup":"taillightglass_L_break"}],		
     ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--taillight--
         //left
         {"selfCollision":true},
         {"collision":true},
         {"nodeMaterial":"|NM_PLASTIC"},
         {"frictionCoef":0.5},
         {"nodeWeight":0.4},
         {"group":"xc90_taillight_L"},
         ["tl1l", 0.64693, 2.45765, 1.14639],
         ["tl2l", 0.66257, 2.49455, 0.84419],
         ["tl3l", 0.85907, 2.26263, 0.84391],
         ["tl4l", 0.83934, 2.29487, 1.10063],
         ["tl6l", 0.65085, 2.06138, 1.50539],
         {"selfCollision":false},
         {"nodeWeight":0.4},
         ["tl5l", 0.75438, 2.18375, 1.05860],
         {"group":""},
    ],

    "beams": [
          ["id1:", "id2:"],
          //--taillight--
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":701000,"beamDamp":20},
          {"beamDeform":10000,"beamStrength":60000},
          //taillight main shape
          {"deformGroup":"taillightglass_L_break", "deformationTriggerRatio":0.05},
          {"deformLimitExpansion":1.2},
          ["tl1l", "tl2l"],
          ["tl2l", "tl3l"],
          ["tl3l", "tl4l"],
          ["tl4l", "tl1l"],
          ["tl1l", "tl3l"],
          ["tl5l", "tl2l"],
          ["tl5l", "tl3l"],
          ["tl5l", "tl4l"],
          ["tl5l", "tl1l"],

          //attach
          {"deformLimitExpansion":""},
          {"beamSpring":501000,"beamDamp":20},
          {"beamDeform":4000,"beamStrength":12000},
          {"breakGroup":"taillight_a_L"},
          ["tl1l", "q3l"],
          ["tl1l", "r4ll"],
          ["tl1l", "q2l"],
          ["tl1l", "q6l"],
          ["tl1l", "r3ll"],
		  	  
		  ["tl6l", "tl1l"],
          ["tl6l", "tl4l"],
          ["tl6l", "tl5l"],

          ["tl3l", "q3l"],
          ["tl3l", "r4ll"],
          ["tl3l", "q2l"],
          ["tl3l", "q6l"],
          ["tl3l", "r3ll"],

          ["tl4l", "q5l"],
          ["tl4l", "q6l"],
          ["tl4l", "q2l"],
          ["tl4l", "r3ll"],
          ["tl4l", "r4ll"],
          ["tl4l", "q1l"],
          {"breakGroup":""},
          {"deformGroup":""},

          //taillight support beams
          {"beamType":"|SUPPORT", "beamLongBound":4},
          {"beamSpring":401000,"beamDamp":20},
          {"beamDeform":5000,"beamStrength":330000},
          ["tl3l", "q3l"],
          ["tl2l", "q3l"],
          ["tl4l", "q2l"],
          ["tl4l", "q5l"],
          ["tl4l", "q7l"],
          ["tl4l", "q1l"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.2},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //right taillight
            {"groundModel":"plastic"},
            {"group":"xc90_taillight_L"},
            {"dragCoef":5},
            ["tl2l", "tl1l", "tl3l"],
            ["tl3l", "tl1l", "tl4l"],
			
            ["tl1l", "tl6l", "tl4l"],
			
            {"triangleType":"NONCOLLIDABLE"},
            ["tl5l", "tl1l", "tl2l"],
            ["tl3l", "tl5l", "tl2l"],
            ["tl4l", "tl5l", "tl3l"],
            ["tl4l", "tl1l", "tl5l"],
			
			["tl6l", "tl5l", "tl4l"],
            ["tl6l", "tl1l", "tl5l"],
			
            {"triangleType":"NORMALTYPE"},
            {"group":""},
    ],
},
}