{
"revuelto_headlight_R": {
    "information":{
        "authors":"BeamNG",
        "name":"Right Headlight",
        "value":350,
    },
    "slotType" : "revuelto_headlight_R",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         {"deformGroup":"headlightglass_R_break", "deformMaterialBase":"revuelto_glass", "deformMaterialDamaged":"revuelto_glass_dmg"},
         ["revuelto_headlightglass_R", ["revuelto_body", "revuelto_chassis"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound1", "deformVolume":0.5}],
         {"deformGroup":"headlightglass_R_break", "deformMaterialBase":"revuelto_carbon", "deformMaterialDamaged":"revuelto_carbon"},
         ["revuelto_hl_R", ["revuelto_body", "revuelto_chassis"]],
         {"deformGroup":"headlightglass_R_break", "deformMaterialBase":"revuelto_details", "deformMaterialDamaged":"revuelto_details"},
         ["revuelto_hl_R1", ["revuelto_body", "revuelto_chassis"]],
         {"deformGroup":""},
    ],
    "props": [
        ["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"],
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightColor":{"r":235, "g":235, "b":255, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":true,
            "flareName":"vehicleHeadLightFlare",
            "cookieName":"art/special/BNG_light_cookie_headlight.dds"
            "texSize":512,
            "shadowSoftness":0.5,
        },
        //low beams
        ["lowbeam"    , "SPOTLIGHT"        , "he4r", "he3r", "he2r", {"x":220, "y":0, "z":20} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.37, "y":0.45, "z":0.07},"lightRange":50,"lightBrightness":0.4,"flareScale":0.0,"deformGroup":"headlightglass_R_break"}],
        //high beams
        ["highbeam" ,         "SPOTLIGHT"        , "he4r", "he3r", "he2r", {"x":210, "y":0, "z":30} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.37, "y":0.45, "z":0.07},"lightRange":80,"lightBrightness":0.8,"flareScale":0.0,"deformGroup":"headlightglass_R_break"}],
        //signal
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":255, "b":0, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
        },
        //["lowhighbeam"    , "SPOTLIGHT"        , "he4r", "he3r", "he2r", {"x":210, "y":-30, "z":30} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.1, "y":0.5, "z":-0.0},"deformGroup":"headlightglass_R_break"}],
        ["signal_R"    , "SPOTLIGHT"        , "he4r", "he3r", "he2r", {"x":210, "y":-30, "z":30} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.1, "y":0.5, "z":-0.0},"flareScale":0.0,"lightBrightness":0.04,"deformGroup":"headlightglass_R_break"}],
     ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--HEADLIGHT--
         //right
         {"selfCollision":true},
         {"collision":true},
         {"nodeMaterial":"|NM_PLASTIC"},
         {"frictionCoef":0.5},
         {"nodeWeight":0.95},
         {"group":"revuelto_headlight_R"},
         ["he1r", -0.64557, -2.15019, 0.58671],
         ["he3r", -0.62182, -2.14362, 0.54474],
         ["he2r", -0.83238, -1.85269, 0.67565],
         ["he4r", -0.82061, -2.06826, 0.57255],
         {"selfCollision":false},
         ["he5r", -0.70876, -1.89789, 0.55560],
         {"group":""},
    ],

    "beams": [
          ["id1:", "id2:"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          //--HEADLIGHT--
          {"beamSpring":550550,"beamDamp":75},
          {"beamDeform":13350,"beamStrength":62750},
          //headlight main shape
          {"deformGroup":"headlightglass_R_break", "deformationTriggerRatio":0.1},
          {"deformLimitExpansion":1.1},
          //r
          ["he1r","he2r"],
          ["he3r","he4r"],
          ["he1r","he3r"],
          ["he2r","he4r"],

          ["he1r","he4r"],
          ["he2r","he3r"],

          ["he1r","he5r"],
          ["he2r","he5r"],
          ["he3r","he5r"],
          ["he4r","he5r"],
          //attach
          {"beamSpring":550550,"beamDamp":75},
          {"beamDeform":7950,"beamStrength":19000},
          {"deformLimitExpansion":""},
          //r
          {"breakGroup":"headlight_a_R"},
          ["he5r","f15rr"],
          ["he3r","f15r"],
          ["he4r","f15rr"],
          ["he2r","f14rr"],

            ["he4r", "fx1r"],
            ["he2r", "f13rr"],
            ["he1r", "fx3r"],
            ["he3r", "bbf2r"],
            ["he1r", "bbf2r"],
            ["he3r", "fx3r"],
            ["he3r", "fx1r"],


          {"beamDeform":7950,"beamStrength":17000},
          {"breakGroup":"headlight_b_R"},
          ["he1r","f15r"],
          ["he5r","f15r"],
          ["he2r","f15rr"],
          ["he3r","f13rr"],

            ["he3r", "fbs1rr"],
            ["he3r", "fbs4rrr"],
            ["he3r", "fbs3r"],
            ["he4r", "fbs4rrr"],
            ["he4r", "fbs1rr"],
            ["he4r", "fbs3r"],

          {"breakGroup":""},
          {"deformGroup":""},

          //headlight support beams
          {"beamType":"|SUPPORT", "beamLongBound":4},
          {"beamSpring":550550,"beamDamp":75},
          {"beamDeform":13200,"beamStrength":330000},
          {"optional":true},
          //["he3r","h4r"],
          //["he3r","h3rr"],
          //["he2r","h3r"],
          ["he4r","fe9r"],
          ["he2r","fe10r"],
          ["he4r","fb1r"],
          ["he3r","fb1rr"],

          ["he3r","f15r"],
          ["he2r","f14rr"],
          {"optional":false},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.1},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //right headlight
            {"groundModel":"plastic"},
            {"dragCoef":3},
            {"group":"revuelto_headlight_R"},
        {"triangleType":"NONCOLLIDABLE"},
            ["he3r","he1r","he4r"],
            ["he4r","he1r","he2r"],
            ["he4r","he2r","he5r"],
            ["he1r","he5r","he2r"],
            ["he3r","he5r","he1r"],
            ["he4r","he5r","he3r"],
        {"triangleType":"NORMALTYPE"},
            {"group":""},
    ],
},
"revuelto_headlight_L": {
    "information":{
        "authors":"BeamNG",
        "name":"Left Headlight",
        "value":350,
    },
    "slotType" : "revuelto_headlight_L",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         {"deformGroup":"headlightglass_L_break", "deformMaterialBase":"revuelto_glass", "deformMaterialDamaged":"revuelto_glass_dmg"},
         ["revuelto_headlightglass_L", ["revuelto_body", "revuelto_chassis"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound1", "deformVolume":0.5}],
         {"deformGroup":"headlightglass_L_break", "deformMaterialBase":"revuelto_carbon", "deformMaterialDamaged":"revuelto_carbon"},
         ["revuelto_hl_L", ["revuelto_body", "revuelto_chassis"]],
         {"deformGroup":"headlightglass_L_break", "deformMaterialBase":"revuelto_details", "deformMaterialDamaged":"revuelto_details"},
         ["revuelto_hl_L1", ["revuelto_body", "revuelto_chassis"]],
         {"deformGroup":""},
    ],
    "props": [
        ["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"],
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightColor":{"r":235, "g":235, "b":255, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":true,
            "flareName":"vehicleHeadLightFlare",
            "cookieName":"art/special/BNG_light_cookie_headlight.dds"
            "texSize":512,
            "shadowSoftness":0.5,
        },
        //low beams angled right slightly to avoid blinding oncoming traffic
        ["lowbeam"    , "SPOTLIGHT"        , "he4l", "he3l", "he2l", {"x":-30, "y":0, "z":-45} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.37, "y":0.45, "z":-0.07},"lightRange":50,"lightBrightness":0.4,"flareScale":0.0,"deformGroup":"headlightglass_L_break"}],
        //high beams
        ["highbeam" ,         "SPOTLIGHT"        , "he4l", "he3l", "he2l", {"x":-30, "y":0, "z":-30} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.37, "y":0.45, "z":-0.07},"lightRange":80,"lightBrightness":0.8,"flareScale":0.0,"deformGroup":"headlightglass_L_break"}],
        //signal
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":255, "b":0, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
        },
        //["lowhighbeam"    , "SPOTLIGHT"        , "he4l", "he3l", "he2l", {"x":-30, "y":0, "z":-30} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.1, "y":0.5, "z":-0.0},"deformGroup":"headlightglass_L_break"}],
        ["signal_L"    , "SPOTLIGHT"        , "he4l", "he3l", "he2l", {"x":-30, "y":0, "z":-30} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.1, "y":0.5, "z":-0.0},"flareScale":0.0,"lightBrightness":0.04,"deformGroup":"headlightglass_L_break"}],
     ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--HEADLIGHT--
         //left
         {"selfCollision":true},
         {"collision":true},
         {"nodeMaterial":"|NM_PLASTIC"},
         {"frictionCoef":0.5},
         {"nodeWeight":0.95},
         {"group":"revuelto_headlight_L"},
         ["he1l", 0.64557, -2.15019, 0.58671],
         ["he3l", 0.62182, -2.14362, 0.54474],
         ["he2l", 0.83238, -1.85269, 0.67565],
         ["he4l", 0.82061, -2.06826, 0.57255],
         {"selfCollision":false},
         ["he5l", 0.70876, -1.89789, 0.55560],
         {"group":""},

    ],
    "beams": [
          ["id1:", "id2:"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          //--HEADLIGHT--
          {"beamSpring":550550,"beamDamp":75},
          {"beamDeform":13350,"beamStrength":128000},
          //headlight main shape
          {"deformGroup":"headlightglass_L_break", "deformationTriggerRatio":0.1},
          {"deformLimitExpansion":1.1},
          //l
          ["he1l","he2l"],
          ["he3l","he4l"],
          ["he1l","he3l"],
          ["he2l","he4l"],

          ["he1l","he4l"],
          ["he2l","he3l"],

          ["he1l","he5l"],
          ["he2l","he5l"],
          ["he3l","he5l"],
          ["he4l","he5l"],
          //attach
          {"beamSpring":550550,"beamDamp":75},
          {"beamDeform":7950,"beamStrength":19000},
          {"deformLimitExpansion":""},
          //l
          {"breakGroup":"headlight_a_L"},
          ["he5l","f15ll"],
          ["he3l","f15l"],
          ["he4l","f15ll"],
          ["he2l","f14ll"],


            ["he4l", "fx1l"],
            ["he2l", "f13ll"],
            ["he1l", "fx3l"],
            ["he3l", "bbf2l"],
            ["he1l", "bbf2l"],
            ["he3l", "fx3l"],
            ["he3l", "fx1l"],

          {"beamDeform":7950,"beamStrength":17000},
          {"breakGroup":"headlight_b_L"},
          ["he1l","f15l"],
          ["he5l","f15l"],
          ["he2l","f15ll"],
          ["he3l","f13ll"],

            ["he3l", "fbs1ll"],
            ["he3l", "fbs4lll"],
            ["he3l", "fbs3l"],
            ["he4l", "fbs4lll"],
            ["he4l", "fbs1ll"],
            ["he4l", "fbs3l"],

          {"breakGroup":""},
          {"deformGroup":""},

          //headlight support beams
          {"beamType":"|SUPPORT", "beamLongBound":4},
          {"beamSpring":550550,"beamDamp":75},
          {"beamDeform":13200,"beamStrength":330000},
          {"optional":true},
          //["he3l","h4l"],
          //["he3l","h3ll"],
          //["he2l","h3l"],
          ["he4l","fe9l"],
          ["he2l","fe10l"],
          ["he4l","fb1l"],
          ["he3l","fb1ll"],

          ["he3l","f15l"],
          ["he2l","f14ll"],
          {"optional":false},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.1},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //left headlight
            {"groundModel":"plastic"},
            {"group":"revuelto_headlight_L"},
        {"triangleType":"NONCOLLIDABLE"},
            {"dragCoef":3},
            ["he1l","he3l","he4l"],
            ["he1l","he4l","he2l"],
            ["he2l","he4l","he5l"],
            ["he5l","he1l","he2l"],
            ["he5l","he3l","he1l"],
            ["he5l","he4l","he3l"],
        {"triangleType":"NORMALTYPE"},
            {"group":""},
    ],
},
}