{
"ARaz1_headlight_R": {
    "information":{
        "authors":"BeamNG",
        "name":"Right Headlight",
        "value":170,
    },
    "slotType" : "ARaz1_headlight_R",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["ARaz1_headlightframe_R", ["ARaz1_headlight_R"]],
         {"deformGroup":"headlightglass_R_break", "deformMaterialBase":"ARaz1_lights", "deformMaterialDamaged":""},
         ["ARaz1_headlight_R", ["ARaz1_headlight_R"]],

         {"deformGroup":"headlightglass_R_break", "deformMaterialBase":"ARaz1_lights", "deformMaterialDamaged":"ARaz1_lights_dmg"},
         ["ARaz1_signal_R", ["ARaz1_headlight_R"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound1", "deformVolume":0.4}],

         {"deformGroup":"headlightglass_R_break", "deformMaterialBase":"ARaz1_glass",  "deformMaterialDamaged":"ARaz1_glass_dmg"},
         ["ARaz1_signalglass_R", ["ARaz1_headlight_R"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound4", "deformVolume":0.5}],
         ["ARaz1_headlightglass_R", ["ARaz1_headlight_R"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound4", "deformVolume":0.5}],
         {"deformGroup":""},
    ],
    "props": [
        ["func", "mesh", "idRef:", "idX:", "idY:", "baseRotation", "rotation", "translation", "min", "max", "offset", "multiplier"],
        {
            "lightInnerAngle":0,
            "lightOuterAngle":80,
            "lightColor":{"r":255, "g":255, "b":160, "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", "he2r", "he1r", "he4r", {"x":28.038,"y":-3.772,"z":12.868}, {"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},"lightRange":50,"lightBrightness":0.5,"lightOuterAngle":70,"flareScale":0.0,"deformGroup":"headlightglass_R_break"}],
        //high beams
        ["highbeam", "SPOTLIGHT", "he2r", "he1r", "he4r", {"x":28.038,"y":-3.772,"z":12.868},  {"x":0,"y":0,"z":0}, {"x":0,"y":0,"z":0}, 0, 0, 0, 1,
        {"baseTranslation":{"x":0.72,"y":0.39,"z":0},"lightRange":80,"lightBrightness":0.7,"lightOuterAngle":80,"flareScale":0.0,"deformGroup":"headlightglass_R_break"}],
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":155, "b":0, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
            "cookieName":"art/special/BNG_light_cookie_headlight.dds"
            "texSize":512,
            "shadowSoftness":0.1,
        },
        //corner signals
        ["lowhighbeam", "SPOTLIGHT", "he4r", "he5r", "he2r", {"x":28.038,"y":-3.772,"z":12.868},   {"x":0,"y":0,"z":0}, {"x":0,"y":0,"z":0}, 0, 0, 0, 1,
        {"baseTranslation":{"x":0.34, "y":0.6, "z":0},"flareScale":0.0,"lightBrightness":0.11,"deformGroup":"headlightglass_R_break"}],

     ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--HEADLIGHT--
         //right
         {"selfCollision":false},
         {"collision":true},
         {"nodeMaterial":"|NM_PLASTIC"},
         {"frictionCoef":0.5},
         {"nodeWeight":0.3},
         {"group":"ARaz1_headlight_R"},
         ["he1r", -0.31672, -1.64331, 0.58287],
         ["he3r", -0.31766, -1.71690, 0.45074],
         ["he2r", -0.47698, -1.63861, 0.55392],
         ["he4r", -0.47699, -1.67653, 0.45074],
         ["he5r", -0.39326, -1.64117, 0.45074],
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          //--HEADLIGHT--
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":501000,"beamDamp":20},
          {"beamDeform":15000,"beamStrength":49725},
          //headlight main shape
          {"deformLimitExpansion":1.1},
          {"deformGroup":"headlightglass_R_break", "deformationTriggerRatio":0.01},
          ["he1r","he2r"],
          ["he3r","he4r"],
          ["he1r","he3r"],
          ["he2r","he4r"],
          ["he1r","he4r"],
          ["he2r","he3r"],
          ["he1r","he5r"],
          ["he2r","he5r"],
          ["he3r","he5r"],
          ["he4r","he5r"],

          //attach
          {"deformLimitExpansion":""},
          {"beamSpring":301000,"beamDamp":30},
          {"beamDeform":8995,"beamStrength":12050},
          {"breakGroup":"headlight_a_R"},
          ["he5r","f15rr"],
          ["he5r","f15r"],
          ["he2r","f15rr"],
          ["he4r","f15rr"],
          ["he4r","f19rr"],

          {"beamDeform":5000,"beamStrength":7000},
          {"breakGroup":"headlight_b_R"},
          ["he1r","f15rr"],
          ["he1r","f15r"],
          ["he3r","f15r"],
          ["he3r","f13rr"],
          {"breakGroup":""},
          {"deformGroup":""},

          //headlight support beams
          {"beamType":"|SUPPORT", "beamLongBound":8},
          {"beamSpring":301000,"beamDamp":20},
          {"beamDeform":11880,"beamStrength":297000},
          {"optional":true},
          ["he3r","h4r"],
          ["he4r","h4rr"],
          {"optional":false},
          ["he1r", "fa2r"],
          ["he2r", "fa2rr"],
          ["he5r", "fa4r"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.1},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //left headlight
            {"groundModel":"plastic"},
            {"group":"ARaz1_headlight_R"},
            {"dragCoef":5},
            ["he3r","he1r","he4r"],
            ["he4r","he1r","he2r"],
            ["he4r","he2r","he5r"],
            ["he1r","he5r","he2r"],
            ["he3r","he5r","he1r"],
            ["he4r","he5r","he3r"],
            {"group":""},
    ],
},
"ARaz1_headlight_L": {
    "information":{
        "authors":"BeamNG",
        "name":"Left Headlight",
        "value":170,
    },
    "slotType" : "ARaz1_headlight_L",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["ARaz1_headlightframe_L", ["ARaz1_headlight_L"]],
         {"deformGroup":"headlightglass_L_break", "deformMaterialBase":"ARaz1_lights", "deformMaterialDamaged":""},
         ["ARaz1_headlight_L", ["ARaz1_headlight_L"]],

         {"deformGroup":"headlightglass_L_break", "deformMaterialBase":"ARaz1_lights", "deformMaterialDamaged":"ARaz1_lights_dmg"},
         ["ARaz1_signal_L", ["ARaz1_headlight_L"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound1", "deformVolume":0.4}],

         {"deformGroup":"headlightglass_L_break", "deformMaterialBase":"ARaz1_glass",  "deformMaterialDamaged":"ARaz1_glass_dmg"},
         ["ARaz1_signalglass_L", ["ARaz1_headlight_L"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound4", "deformVolume":0.5}],
        ["ARaz1_headlightglass_L", ["ARaz1_headlight_L"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound4", "deformVolume":0.5}],
         {"deformGroup":""},
    ],
    "props": [
        ["func", "mesh", "idRef:", "idX:", "idY:", "baseRotation", "rotation", "translation", "min", "max", "offset", "multiplier"],
        {
            "lightInnerAngle":0,
            "lightOuterAngle":80,
            "lightColor":{"r":255, "g":255, "b":160, "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", "he2l", "he1l", "he4l", {"x":154.284,"y":-7.315,"z":-10.885}, {"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},"lightRange":50,"lightBrightness":0.5,"lightOuterAngle":70,"flareScale":0.0,"deformGroup":"headlightglass_L_break"}],
        //high beams
        ["highbeam", "SPOTLIGHT", "he2l", "he1l", "he4l", {"x":154.284,"y":-7.315,"z":-10.885},  {"x":0,"y":0,"z":0}, {"x":0,"y":0,"z":0}, 0, 0, 0, 1,
        {"baseTranslation":{"x":0.72,"y":0.39,"z":0},"lightRange":80,"lightBrightness":0.7,"lightOuterAngle":80,"flareScale":0.0,"deformGroup":"headlightglass_L_break"}],
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":155, "b":0, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
            "cookieName":"art/special/BNG_light_cookie_headlight.dds"
            "texSize":512,
            "shadowSoftness":0.1,
        },
        //corner signals
        ["lowhighbeam", "SPOTLIGHT", "he4l", "he5l", "he2l", {"x":154.284,"y":-7.315,"z":-10.885},   {"x":0,"y":0,"z":0}, {"x":0,"y":0,"z":0}, 0, 0, 0, 1,
        {"baseTranslation":{"x":0.34, "y":0.6, "z":0},"flareScale":0.0,"lightBrightness":0.11,"deformGroup":"headlightglass_L_break"}],
     ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--HEADLIGHT--
         //left
         {"selfCollision":false},
         {"collision":true},
         {"nodeMaterial":"|NM_PLASTIC"},
         {"frictionCoef":0.5},
         {"nodeWeight":0.3},
         {"group":"ARaz1_headlight_L"},
         ["he1l", 0.31698, -1.64331, 0.58287],
         ["he3l", 0.31733, -1.71690, 0.45074],
         ["he2l", 0.47696, -1.63861, 0.55392],
         ["he4l", 0.47697, -1.67653, 0.45074],
         ["he5l", 0.39334, -1.64117, 0.45074],
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          //--HEADLIGHT--
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":501000,"beamDamp":20},
          {"beamDeform":15000,"beamStrength":49725},
          //headlight main shape
          {"deformLimitExpansion":1.1},
          {"deformGroup":"headlightglass_L_break", "deformationTriggerRatio":0.01},
          ["he1l","he2l"],
          ["he3l","he4l"],
          ["he1l","he3l"],
          ["he2l","he4l"],
          ["he1l","he4l"],
          ["he2l","he3l"],
          ["he1l","he5l"],
          ["he2l","he5l"],
          ["he3l","he5l"],
          ["he4l","he5l"],

          //attach
          {"deformLimitExpansion":""},
          {"beamSpring":301000,"beamDamp":30},
          {"beamDeform":8995,"beamStrength":12050},
          {"breakGroup":"headlight_a_L"},
          ["he5l","f15ll"],
          ["he5l","f15l"],
          ["he2l","f15ll"],
          ["he4l","f15ll"],
          ["he4l","f19ll"],

          {"beamDeform":5000,"beamStrength":7000},
          {"breakGroup":"headlight_b_L"},
          ["he1l","f15ll"],
          ["he1l","f15l"],
          ["he3l","f15l"],
          ["he3l","f13ll"],
          {"breakGroup":""},
          {"deformGroup":""},

          //headlight support beams
          {"beamType":"|SUPPORT", "beamLongBound":8},
          {"beamSpring":301000,"beamDamp":20},
          {"beamDeform":11880,"beamStrength":297000},
          {"optional":true},
          ["he3l","h4l"],
          ["he4l","h4ll"],
          {"optional":false},
          ["he1l", "fa2l"],
          ["he2l", "fa2ll"],
          ["he5l", "fa4l"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.1},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //left headlight
            {"groundModel":"plastic"},
            {"group":"ARaz1_headlight_L"},
            {"dragCoef":5},
            ["he1l","he3l","he4l"],
            ["he1l","he4l","he2l"],
            ["he2l","he4l","he5l"],
            ["he5l","he1l","he2l"],
            ["he5l","he3l","he1l"],
            ["he5l","he4l","he3l"],
            {"group":""},
    ],
},
}
