{
"pilot25_spadie_mirror_R": {
    "information":{
        "authors":"BeamNG",
        "name":"Right Mirror",
        "value":200,
    },
    "slotType" : "pilot25_spadie_mirror_R",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["pilot25_spadie_door_mirrorstalk_a_R", ["pilot25_spadie_door_FR"]],
         ["pilot25_spadie_mirror_R", ["pilot25_spadie_mirror_R"]],
         {"deformGroup":"mirrorsignal_R_break", "deformMaterialBase":"pilot25_spadie_lights", "deformMaterialDamaged":"pilot25_spadie_lights"},
         ["pilot25_spadie_mirror_signal_R", ["pilot25_spadie_mirror_R"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound2", "deformVolume":0.2}],
         {"deformGroup":""},
    ],
    "mirrors": [
        ["mesh", "idRef:", "id1:", "id2:"],
        ["pilot25_spadie_mirror_R","mi4r","mi3r","mi2r",{"refBaseTranslation":{"x":0.085,"y":-0.034,"z":0.05},"baseRotationGlobal":{"x":0,"y":0,"z":22}}],
    ],
    "props": [
        ["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"],
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":200, "b":20, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
        },
        ["signal_R" ,         "SPOTLIGHT"        , "mi4r", "mi3r", "mi2r", {"x":0, "y":0, "z":160} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.6, "y":0.5, "z":-0.08},"flareScale":0,"lightBrightness":0.04,"deformGroup":"mirrorsignal_R_break"}],
    ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--MIRROR--
         {"selfCollision":true},
         {"collision":true},
         {"frictionCoef":1},
         {"nodeMaterial":"|NM_PLASTIC"},
         {"group":"pilot25_spadie_mirror_R"},
         {"nodeWeight":0.3},
         ["mi1r", -0.89188, -0.64512, 1.17174],
         ["mi2r", -1.08530, -0.57054, 1.16010],
         ["mi3r", -0.90263, -0.64512, 1.02041, {"selfCollision":false}],
         ["mi4r", -1.07456, -0.57054, 1.04369],
         ["mi5r", -0.93487, -0.73035, 1.09025],
         {"collision":false},
         {"selfCollision":false},
         {"group":""},
         {"nodeWeight":0.35},
         ["mi6r", -0.91337, -0.69306, 0.96220],
         ["mi7r", -0.88114, -0.69306, 1.07861],
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          //--MIRRORS--
          {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":501000,"beamDamp":20},
          {"beamDeform":9100,"beamStrength":62500},
          //r
          {"deformLimitExpansion":1.2},
          {"deformGroup":"mirrorsignal_R_break","deformationTriggerRatio":0.01},
          ["mi1r","mi2r"],
          ["mi1r","mi3r"],
          ["mi1r","mi4r"],
          ["mi1r","mi5r"],
          ["mi2r","mi3r"],
          ["mi2r","mi4r"],
          ["mi2r","mi5r"],
          ["mi3r","mi4r"],
          ["mi3r","mi5r"],
          ["mi4r","mi5r"],

          //attach
          {"deformLimitExpansion":""},
          {"beamDeform":3100,"beamStrength":4800},
          {"beamSpring":401000,"beamDamp":20},
          {"breakGroup":"mirror_R"},
          ["mi1r","mi7r"],
          ["mi2r","mi7r"],
          ["mi3r","mi7r"],
          ["mi4r","mi7r"],
          ["mi5r","mi7r"],

          ["mi1r","mi6r"],
          ["mi2r","mi6r"],
          ["mi3r","mi6r"],
          ["mi4r","mi6r"],
          ["mi5r","mi6r"],

          {"beamSpring":121000,"beamDamp":150},
          {"beamDeform":5,"deformLimitStress":5,"beamStrength":156500},
          {"deformGroup":""},
          {"breakGroupType":1},
          ["mi2r","d8r"],
          ["mi4r","d8r"],
          ["mi4r","d4r"],
          ["mi4r","d5r"],
          {"breakGroupType":0},

          ["mi2r", "d5r", {"beamSpring":0,"beamDamp":40}],
          ["mi2r", "d4r", {"beamSpring":0,"beamDamp":40}],
          ["mi2r", "d9r", {"beamSpring":0,"beamDamp":40}],
          {"breakGroup":""},
          {"deformGroup":""},
          {"deformLimitStress":""},
          {"beamDeform":44000,"beamStrength":"FLT_MAX"},
          {"beamSpring":801000,"beamDamp":20},
          {"deformGroup":"mirrorsignal_R_break","deformationTriggerRatio":0.01},
          ["mi6r","mi7r"],
          ["mi6r","d10r"],
          ["mi7r","d10r"],
          ["mi6r","d4r"],
          ["mi7r","d4r"],
          ["mi6r","d7r"],
          ["mi7r","d7r"],

          ["mi6r","d8r"],
          ["mi7r","d8r"],
          ["mi6r","d5r"],
          ["mi7r","d5r"],
          {"breakGroup":""},
          {"deformGroup":""},
          //mirror detent
          {"beamLimitSpring":0,"beamLimitDamp":0},
          {"beamType":"|BOUNDED","beamLongBound":0.04,"beamShortBound":0.04},
          {"beamPrecompression":1.0,"beamSpring":3270,"beamDamp":30,"beamDeform":10000,"beamStrength":"FLT_MAX"},
          {"breakGroup":"mirror_R"},
          ["d8r", "mi2r",{"boundZone":0.03}],
          ["d8r", "mi4r",{"boundZone":0.03}],
          {"breakGroup":""},
          {"disableTriangleBreaking":false},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.1},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //right mirror
            {"groundModel":"plastic"},
            {"group":"pilot25_spadie_mirror_R"},
            {"dragCoef":30},
            ["mi2r","mi1r","mi3r"],
            ["mi2r","mi3r","mi4r"],
            ["mi1r","mi2r","mi5r"],
            ["mi2r","mi4r","mi5r"],
            ["mi4r","mi3r","mi5r"],
            ["mi3r","mi1r","mi5r"],
            {"group":""},
    ],
},
"pilot25_spadie_mirror_L": {
    "information":{
        "authors":"BeamNG",
        "name":"Left Mirror",
        "value":200,
    },
    "slotType" : "pilot25_spadie_mirror_L",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["pilot25_spadie_door_mirrorstalk_a_L", ["pilot25_spadie_door_FL"]],
         ["pilot25_spadie_mirror_L", ["pilot25_spadie_mirror_L"]],
         {"deformGroup":"mirrorsignal_L_break", "deformMaterialBase":"pilot25_spadie_lights", "deformMaterialDamaged":"pilot25_spadie_lights"},
         ["pilot25_spadie_mirror_signal_L", ["pilot25_spadie_mirror_L"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound2", "deformVolume":0.2}],
         {"deformGroup":""},
    ],
    "mirrors": [
        ["mesh", "idRef:", "id1:", "id2:"],
        ["pilot25_spadie_mirror_L","mi4l","mi3l","mi2l",{"refBaseTranslation":{"x":-0.085,"y":-0.034,"z":0.05},"baseRotationGlobal":{"x":0,"y":0,"z":-15}}],
    ],
    "props": [
        ["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"],
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":200, "b":20, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
        },
        ["signal_L" ,         "SPOTLIGHT"        , "mi4l", "mi3l", "mi2l", {"x":0, "y":0, "z":20} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.6, "y":0.5, "z":0.08},"flareScale":0,"lightBrightness":0.04,"deformGroup":"mirrorsignal_L_break"}],
    ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],

         //--MIRROR--
         {"nodeMaterial":"|NM_PLASTIC"},
         {"selfCollision":true},
         {"collision":true},
         {"frictionCoef":1},
         {"group":"pilot25_spadie_mirror_L"},
         {"nodeWeight":0.3},
         ["mi1l", 0.89188, -0.64512, 1.17174],
         ["mi2l", 1.08530, -0.58119, 1.16010],
         ["mi3l", 0.90263, -0.64512, 1.02041, {"selfCollision":false}],
         ["mi4l", 1.07456, -0.58119, 1.04369],
         ["mi5l", 0.93487, -0.73035, 1.09025],
         {"collision":false},
         {"selfCollision":false},
         {"group":""},
         {"nodeWeight":0.35},
         ["mi6l", 0.91337, -0.69306, 0.96220],
         ["mi7l", 0.88114, -0.69306, 1.07861],
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          //--MIRRORS--
          {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":501000,"beamDamp":20},
          {"beamDeform":9100,"beamStrength":62500},
          //l
          {"deformLimitExpansion":1.2},
          {"deformGroup":"mirrorsignal_L_break","deformationTriggerRatio":0.01},
          ["mi1l","mi2l"],
          ["mi1l","mi3l"],
          ["mi1l","mi4l"],
          ["mi1l","mi5l"],
          ["mi2l","mi3l"],
          ["mi2l","mi4l"],
          ["mi2l","mi5l"],
          ["mi3l","mi4l"],
          ["mi3l","mi5l"],
          ["mi4l","mi5l"],

          //attach
          {"deformLimitExpansion":""},
          {"beamDeform":3100,"beamStrength":4800},
          {"beamSpring":401000,"beamDamp":20},
          {"breakGroup":"mirror_L"},
          ["mi1l","mi7l"],
          ["mi2l","mi7l"],
          ["mi3l","mi7l"],
          ["mi4l","mi7l"],
          ["mi5l","mi7l"],

          ["mi1l","mi6l"],
          ["mi2l","mi6l"],
          ["mi3l","mi6l"],
          ["mi4l","mi6l"],
          ["mi5l","mi6l"],

          {"beamSpring":121000,"beamDamp":150},
          {"beamDeform":5,"deformLimitStress":5,"beamStrength":156500},
          {"deformGroup":""},
          {"breakGroupType":1},
          ["mi2l","d8l"],
          ["mi4l","d8l"],
          ["mi4l","d4l"],
          ["mi4l","d5l"],
          {"breakGroupType":0},

          ["mi2l", "d5l", {"beamSpring":0,"beamDamp":40}],
          ["mi2l", "d4l", {"beamSpring":0,"beamDamp":40}],
          ["mi2l", "d9l", {"beamSpring":0,"beamDamp":40}],
          {"breakGroup":""},
          {"deformGroup":""},
          {"deformLimitStress":""},
          {"beamDeform":44000,"beamStrength":"FLT_MAX"},
          {"beamSpring":801000,"beamDamp":20},
          {"deformGroup":"mirrorsignal_L_break","deformationTriggerRatio":0.01},
          ["mi6l","mi7l"],
          ["mi6l","d10l"],
          ["mi7l","d10l"],
          ["mi6l","d4l"],
          ["mi7l","d4l"],
          ["mi6l","d7l"],
          ["mi7l","d7l"],

          ["mi6l","d8l"],
          ["mi7l","d8l"],
          ["mi6l","d5l"],
          ["mi7l","d5l"],
          {"breakGroup":""},
          {"deformGroup":""},
          //mirror detent
          {"beamLimitSpring":0,"beamLimitDamp":0},
          {"beamType":"|BOUNDED","beamLongBound":0.04,"beamShortBound":0.04},
          {"beamPrecompression":1.0,"beamSpring":3270,"beamDamp":30,"beamDeform":10000,"beamStrength":"FLT_MAX"},
          {"breakGroup":"mirror_L"},
          ["d8l", "mi2l",{"boundZone":0.03}],
          ["d8l", "mi4l",{"boundZone":0.03}],
          {"breakGroup":""},
          {"disableTriangleBreaking":false},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.1},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //left mirror
            {"groundModel":"plastic"},
            {"group":"pilot25_spadie_mirror_L"},
            {"dragCoef":30},
            ["mi1l","mi2l","mi3l"],
            ["mi3l","mi2l","mi4l"],
            ["mi2l","mi1l","mi5l"],
            ["mi4l","mi2l","mi5l"],
            ["mi3l","mi4l","mi5l"],
            ["mi1l","mi3l","mi5l"],
            {"group":""},
    ],
},
}