rl-loadout-lib
Version:
Load Rocket League assets into three.js
56 lines • 1.71 kB
TypeScript
import { Object3D, Scene, Texture } from 'three';
import { ObjectAssets } from '../loader/object-assets';
/**
* Abstract 3D model object, that loads gltf models.
*/
export declare abstract class AbstractObject {
/**
* THREE scene that contains this object.
*/
scene: Scene;
protected constructor(assets?: ObjectAssets);
protected handleScene(scene: Scene): void;
private validate;
protected abstract handleModel(scene: Scene): any;
/**
* Add the model to a scene.
* @param scene THREE scene
*/
addToScene(scene: Scene): void;
/**
* Remove the model from a scene.
* @param scene THREE scene
*/
removeFromScene(scene: Scene): void;
/**
* Set the environment map to all objects in this scene
* @param envMap environment map texture
*/
setEnvMap(envMap: Texture): void;
/**
* Set the position and rotation of the anchor to this object.
* @param anchor the anchor object
*/
applyAnchor(anchor: Object3D): void;
/**
* Dispose of the object.
*/
dispose(): void;
/**
* Set the visibility of the object.
* @param visible visibility of the object
*/
visible(visible: boolean): void;
protected copy(other: AbstractObject): void;
/**
* Make a deep copy of the object;
*/
abstract clone(): any;
}
/**
* Executes the callback on this object's material and all descendants' materials.
* @param object Object3D object to traverse through
* @param callback this will be called on all the materials
*/
export declare function traverseMaterials(object: any, callback: (mat: any) => void): void;
//# sourceMappingURL=object.d.ts.map