I'm looking for some help. I am not sure my speed, handling, acceleration values in the bottom method arguments are not being affected or using the update values that are being added to within the case-switch. I want speed to take the changes applied in the switch then the updated variable to be pushed in the methods below. I hope I'm making sense. My values always stay at 10
const addAttributes = (_element) => {let selectedElement = _element.layer;
var speed = 10;
var handling = 10;
var acceleration = 10;
switch (_element.layer.name) {
case "1_grill":
speed = speed + 100;
case "Fiber1":
handling = handling + 25;
speed = speed + 25;
case "yellow_headlights": // asset name without #
acceleration = acceleration + 35;
}
attributesList.push({
trait_type: "Handling",
Value: handling,})
attributesList.push({
trait_type: "Speed",
Value: speed,})
attributesList.push({
trait_type: "Acceleration",
Value: acceleration,})