UNPKG

rl-loadout-lib

Version:

Load Rocket League assets into three.js

35 lines 1.77 kB
import { BodyModel } from '../3d/body/body-model'; import { PaintConfig } from '../model/paint-config'; import { WheelsModel } from '../3d/wheel/wheels-model'; import { RocketConfig } from '../model/rocket-config'; import { Body } from '../model/body'; import { Wheel } from '../model/wheel'; /** * Helper class to load items by their in game item ID. */ export declare class RocketAssetManager { readonly config: RocketConfig; private readonly rlService; private readonly textureLoader; private readonly modelLoader; constructor(config: RocketConfig); /** * Completely load a car body model. This calls {@link BodyModel.load} on the body model, do **not** call it again. * @param id in-game product id of the body * @param paintConfig color configuration * @param fallback if the body does not exist in the backend, fallback to this body, e.g.: {@link Body.DEFAULT} * @param decalId in-game product id of the decal, no decal is applied if undefined * @throws Error the body could not be found and there is no fallback * @returns the loaded body model */ loadBody(id: number, paintConfig: PaintConfig, fallback?: Body, decalId?: number): Promise<BodyModel>; /** * Completely load a car wheel model. This calls {@link WheelsModel.load} on the wheel model, do **not** call it again. * @param id in-game product id of the wheels * @param paintConfig color configuration * @param fallback if the wheel does not exist in the backend, fallback to this wheel, e.g.: {@link Wheel.DEFAULT} * @returns the loaded wheels model */ loadWheel(id: number, paintConfig: PaintConfig, fallback?: Wheel): Promise<WheelsModel>; } //# sourceMappingURL=rocket-asset-manager.d.ts.map