rl-loadout-lib
Version:
Load Rocket League assets into three.js
27 lines • 1.25 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const ids_1 = require("../../utils/ids");
const static_decal_material_1 = require("../../webgl/static-decal-material");
const berry_material_1 = require("./berry-material");
const dark_car_material_1 = require("./dark-car-material");
const eggplant_material_1 = require("./eggplant-material");
const feline_material_1 = require("./feline-material");
const grey_car_material_1 = require("./grey-car-material");
function getBodyMaterial(body) {
switch (body.id) {
case ids_1.ProductID.BODY_BERRY:
return new berry_material_1.BerryBodyMaterial();
case ids_1.ProductID.BODY_DARK_CAR:
return new dark_car_material_1.DarkCarMaterial();
case ids_1.ProductID.BODY_EGGPLANT:
return new eggplant_material_1.EggplantMaterial();
case ids_1.ProductID.BODY_FELINE:
return new feline_material_1.FelineMaterial();
case ids_1.ProductID.BODY_GREY_CAR:
return new grey_car_material_1.GreyCarMaterial();
default:
return new static_decal_material_1.StaticDecalMaterial();
}
}
exports.getBodyMaterial = getBodyMaterial;
//# sourceMappingURL=material-factory.js.map