@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
79 lines • 1.65 kB
TypeScript
export class ThreeLightCache {
/**
*
* @type {Map<LightType, Light[]>}
* @private
*/
private __used;
/**
*
* @type {Map<LightType, Light[]>}
* @private
*/
private __available;
/**
*
* @type {null}
* @private
*/
private __scene;
/**
*
* @param {LightType} type
* @returns {Light[]}
* @private
*/
private __getUsed;
/**
*
* @param {LightType} type
* @returns {Light[]}
* @private
*/
private __getAvailable;
/**
*
* @param {LightType} type
* @returns {Light}
* @private
*/
private __create;
/**
*
* @param {Scene} scene Three.js scene
*/
attach(scene: Scene): void;
detach(): void;
/**
*
* @param {function(light:(Light|Object3D)):*} visitor
* @param {*} [thisArg]
* @private
*/
private __traverseAllLight;
/**
*
* @param {LightType} type
* @returns {Light}
*/
obtain(type: LightType): Light;
/**
*
* @param {Light} light
*/
release(light: Light): boolean;
/**
*
* @param {LightType} type
* @returns {number}
*/
countTotalByType(type: LightType): number;
/**
* Pre-allocate up to specified number of lights of a given type. If number of allocated light already matches or exceeds that count, nothing will happen
* @param {LightType} type
* @param {number} count
*/
reserve(type: LightType, count: number): void;
}
import { LightType } from "../LightType.js";
//# sourceMappingURL=ThreeLightCache.d.ts.map