{
"fullsize_headlight_R": {
    "information":{
        "authors":"BeamNG",
        "name":"Right Headlight",
        "value":70,
    }
    "slotType" : "fullsize_headlight_R",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["fullsize_headlightframe_R", ["fullsize_headlight_R"]],
         {"deformGroup":"headlightglass_R_break", "deformMaterialBase":"fullsize_glass", "deformMaterialDamaged":"fullsize_glass_dmg"}
         ["fullsize_headlightglass_R", ["fullsize_headlight_R"],[]{"deformSound":"GlassBreakSound3", "deformVolume":0.5}],
         {"deformGroup":"headlightglass_R_break", "deformMaterialBase":"fullsize_lights", "deformMaterialDamaged":"fullsize_lights_dmg"}
         ["fullsize_headlight_R", ["fullsize_headlight_R"]],
         {"deformGroup":""},
    ],
    "props": [
        ["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"]
        {
            "lightInnerAngle":0
            "lightOuterAngle":120
            "lightBrightness":0.2
            "lightRange":60
            "lightColor":{"r":255, "g":255, "b":200, "a":255}
            "lightAttenuation":{"x":0, "y":1, "z":1}
            "lightCastShadows":true
            "flareName":"vehicleHeadLightFlare"
            "flareScale":0.15
            "cookieName":"art/special/BNG_light_cookie_headlight.png"
            "texSize":512
            "shadowSoftness":0.5
        }
        //low beams
        ["lowbeam"    , "SPOTLIGHT"        , "he4r", "he3r", "he2r", {"x":200, "y":0, "z":-10} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.3, "y":0.4, "z":-0.0},"deformGroup":"headlightglass_R_break"}],
        //high beams
        ["highbeam" ,         "SPOTLIGHT"        , "he4r", "he3r", "he2r", {"x":200, "y":0, "z":-10} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.55, "y":0.4, "z":-0.0},"lightRange":100,"lightBrightness":0.4,
            "flareScale":0.2,"deformGroup":"headlightglass_R_break"}],
        //dim parking light
        ["parking" ,         "SPOTLIGHT"        , "he4r", "he3r", "he2r", {"x":200, "y":0, "z":-10} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.85, "y":0.4, "z":-0.0},"lightRange":40,"lightBrightness":0.1,"deformGroup":"headlightglass_R_break"}],
    ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--HEADLIGHT--
         //right
         {"selfCollision":true}
         {"collision":true}
         {"nodeMaterial":"|NM_GLASS"},
         {"frictionCoef":0.5},
         {"nodeWeight":1.2},
         {"group":"fullsize_headlight_R"},
         ["he1r", -0.46, -2.29, 0.74],
         ["he3r", -0.49, -2.30, 0.62],
         {"nodeMaterial":"|NM_PLASTIC"},
         ["he2r", -0.78, -2.20, 0.74],
         ["he4r", -0.78, -2.20, 0.62],
         ["he5r", -0.62, -2.06, 0.67{"selfCollision":false}],
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          //--HEADLIGHT--
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":900750,"beamDamp":124.1},
          {"beamDeform":16020,"beamStrength":81575},
          //headlight main shape
          {"deformGroup":"headlightglass_R_break", "deformationTriggerRatio":0.1}
          ["he1r","he2r"],
          ["he3r","he4r"],
          ["he1r","he3r"],
          ["he2r","he4r"],

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

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

          //attach
          {"disableTriangleBreaking":true}
          {"beamSpring":900750,"beamDamp":124.1},
          {"beamDeform":13140,"beamStrength":24425},
          {"breakGroup":"headlight_a_R"},
          ["he5r","f15rr"],
          ["he5r","f15r"],
          ["he2r","f15rr"],
          ["he4r","f15rr"],

          {"breakGroup":"headlight_b_R"},
          ["he1r","f15r"],
          ["he3r","f15r"],
          ["he3r","f13rr"],
          {"breakGroup":""},
          {"deformGroup":""}

          //headlight support beams
          {"beamType":"|SUPPORT", "beamLongBound":4},
          {"beamSpring":750750,"beamDamp":109.5},
          {"beamDeform":15840,"beamStrength":429000},
          {"optional":true},
          ["he2r","h4"],
          ["he4r","h5"],
          ["he3r","h4r"],
          {"optional":false},

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

          //inter part triangle breaking triggers
          {"beamType":"|SUPPORT", "beamLongBound":1.5},
          {"beamSpring":0,"beamDamp":0},
          {"beamDeform":1000,"beamStrength":1000},
          {"optional":true}
          {"breakGroup":"headlight_hood_R"},
          ["he5r","h4r"],
          {"breakGroup":"headlight_bumper_R"},
          ["he5r","fb1rr"],
          {"breakGroup":""},
          {"disableTriangleBreaking":false}
          {"optional":false}
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //right headlight
            {"groundModel":"plastic"},
            {"group":"fullsize_headlight_R"},
            {"dragCoef":4},
            ["he3r","he1r","he4r"],
            ["he4r","he1r","he2r"],
            ["he4r","he2r","he5r"],
            ["he1r","he5r","he2r"],
            ["he3r","he5r","he1r"],
            ["he4r","he5r","he3r"],

            //gap
            {"dragCoef":0},
            //{"breakGroup":"headlight_bumper_R"},
            //{"optional":true}
            //["fb1r", "he3r", "fb1rr"],
            //["he4r", "fb1rr", "he3r"],
            //{"breakGroup":["headlight_bumper_R","headlight_hood_R"]},
            //["he3r", "fb1r", "h5r"],
            //{"breakGroup":"headlight_hood_R"},
            //["h5r", "h4r", "he3r"],
            //["he3r", "h4r", "he1r"],
            //["he1r", "h4r", "he2r"],
            //["h4rr", "he2r", "h4r"],
            //{"optional":false}
            //{"breakGroup":""},
            //{"group":""},
    ],
}
"fullsize_headlight_L": {
    "information":{
        "authors":"BeamNG",
        "name":"Left Headlight",
        "value":70,
    }
    "slotType" : "fullsize_headlight_L",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["fullsize_headlightframe_L", ["fullsize_headlight_L"]],
         {"deformGroup":"headlightglass_L_break", "deformMaterialBase":"fullsize_glass", "deformMaterialDamaged":"fullsize_glass_dmg"}
         ["fullsize_headlightglass_L", ["fullsize_headlight_L"],[]{"deformSound":"GlassBreakSound4", "deformVolume":0.5}],
         {"deformGroup":"headlightglass_L_break", "deformMaterialBase":"fullsize_lights", "deformMaterialDamaged":"fullsize_lights_dmg"}
         ["fullsize_headlight_L", ["fullsize_headlight_L"]],
         {"deformGroup":""},
    ],
    "props": [
        ["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"]
        {
            "lightInnerAngle":0
            "lightOuterAngle":120
            "lightBrightness":0.4
            "lightRange":60
            "lightColor":{"r":255, "g":255, "b":200, "a":255}
            "lightAttenuation":{"x":0, "y":1, "z":1}
            "lightCastShadows":true
            "flareName":"vehicleHeadLightFlare"
            "flareScale":0.15
            "cookieName":"art/special/BNG_light_cookie_headlight.png"
            "texSize":512
            "shadowSoftness":0.5
        }
        //low beams angled right slightly to avoid blinding oncoming traffic
        ["lowbeam"    , "SPOTLIGHT"        , "he4l", "he3l", "he2l", {"x":-20, "y":15, "z":-10} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.3, "y":0.4, "z":0.0},"lightOuterAngle":75,"deformGroup":"headlightglass_L_break"}],
        //high beams
        ["highbeam" ,         "SPOTLIGHT"        , "he4l", "he3l", "he2l", {"x":-20, "y":0, "z":10} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.55, "y":0.4, "z":0.0},"lightRange":100,"lightBrightness":0.4,
            "flareScale":0.2,"deformGroup":"headlightglass_L_break"}],
        //dim parking light
        ["parking" ,         "SPOTLIGHT"        , "he4l", "he3l", "he2l", {"x":-20, "y":0, "z":10} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.85, "y":0.4, "z":0.0},"lightRange":40,"lightBrightness":0.2,"deformGroup":"headlightglass_L_break"}],
    ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--HEADLIGHT--
         //left
         {"selfCollision":true}
         {"collision":true}
         {"nodeMaterial":"|NM_GLASS"},
         {"frictionCoef":0.5},
         {"nodeWeight":1.2},
         {"group":"fullsize_headlight_L"},
         ["he1l", 0.46, -2.29, 0.74],
         ["he3l", 0.49, -2.30, 0.62],
         {"nodeMaterial":"|NM_PLASTIC"},
         ["he2l", 0.78, -2.20, 0.74],
         ["he4l", 0.78, -2.20, 0.62],
         ["he5l", 0.62, -2.06, 0.67{"selfCollision":false}],
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          //--HEADLIGHT--
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":900750,"beamDamp":124.1},
          {"beamDeform":16020,"beamStrength":81575},
          //headlight main shape
          {"deformGroup":"headlightglass_L_break", "deformationTriggerRatio":0.1}
          ["he1l","he2l"],
          ["he3l","he4l"],
          ["he1l","he3l"],
          ["he2l","he4l"],

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

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

          //attach
          {"disableTriangleBreaking":true}
          {"beamSpring":900750,"beamDamp":124.1},
          {"beamDeform":13140,"beamStrength":24425},
          {"breakGroup":"headlight_a_L"},
          ["he5l","f15ll"],
          ["he5l","f15l"],
          ["he2l","f15ll"],
          ["he4l","f15ll"],

          {"breakGroup":"headlight_b_L"},
          ["he1l","f15l"],
          ["he3l","f15l"],
          ["he3l","f13ll"],
          {"breakGroup":""},
          {"deformGroup":""}

          //headlight support beams
          {"beamType":"|SUPPORT", "beamLongBound":4},
          {"beamSpring":750750,"beamDamp":109.5},
          {"beamDeform":15840,"beamStrength":429000},
          {"optional":true},
          ["he2l","h4"],
          ["he4l","h5"],
          ["he3l","h4l"],
          {"optional":false},

          ["he1l","f10ll"],
          ["he3l","f6l"],

          ["he2l","f6l"],
          ["he4l","f10ll"],

          //inter part triangle breaking triggers
          {"beamType":"|SUPPORT", "beamLongBound":1.5},
          {"beamSpring":0,"beamDamp":0},
          {"beamDeform":1000,"beamStrength":1000},
          {"optional":true}
          {"breakGroup":"headlight_hood_L"},
          ["he5l","h4l"],
          {"breakGroup":"headlight_bumper_L"},
          ["he5l","fb1ll"],
          {"breakGroup":""},
          {"disableTriangleBreaking":false}
          {"optional":false}
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //left headlight
            {"groundModel":"plastic"},
            {"group":"fullsize_headlight_L"},
            {"dragCoef":4},
            ["he1l","he3l","he4l"],
            ["he1l","he4l","he2l"],
            ["he2l","he4l","he5l"],
            ["he5l","he1l","he2l"],
            ["he5l","he3l","he1l"],
            ["he5l","he4l","he3l"],

            //gap
            {"dragCoef":0},
            //{"breakGroup":"headlight_bumper_L"},
            //{"optional":true}
            //["he3l", "fb1l", "fb1ll"],
            //["fb1ll", "he4l", "he3l"],
            //{"breakGroup":["headlight_bumper_L","headlight_hood_L"]},
            //["fb1l", "he3l", "h5l"],
            //{"breakGroup":"headlight_hood_L"},
            //["h4l", "h5l", "he3l"],
            //["h4l", "he3l", "he1l"],
            //["h4l", "he1l", "he2l"],
            //["he2l", "h4ll", "h4l"],
            //{"optional":false}
            //{"breakGroup":""},
            //{"group":""},
    ],
}
}