rl-loadout-lib
Version:
Load Rocket League assets into three.js
22 lines • 879 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const ids_1 = require("../../utils/ids");
const spinner_model_1 = require("./spinner-model");
const wheels_model_1 = require("./wheels-model");
/**
* Create a body model object. This handles unique models that need a custom class to handle it.
* @param wheel the wheel
* @param wheelAssets downloaded models and textures
* @param paints the paint config to apply the wheel paint
* @return wheel model
*/
function createWheelsModel(wheel, wheelAssets, paints) {
switch (wheel.id) {
case ids_1.ProductID.WHEEL_SPINNER:
return new spinner_model_1.SpinnerModel(wheelAssets, wheel, paints);
default:
return new wheels_model_1.WheelsModel(wheelAssets, wheel, paints);
}
}
exports.createWheelsModel = createWheelsModel;
//# sourceMappingURL=factory.js.map