@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
82 lines (71 loc) • 2.18 kB
JavaScript
import { passThrough } from "../../../../core/function/passThrough.js";
import { compare_three_objects } from "../../three/compare_three_objects.js";
import { IncrementalDeltaSet } from "../visibility/IncrementalDeltaSet.js";
import { RenderLayerState } from "./RenderLayerState.js";
export class RenderLayer {
/**
*
* @type {RenderLayerState}
*/
state = new RenderLayerState();
/**
*
* @type {String|null}
*/
name = null;
/**
* Layer is managed externally, visibility will not be updated in the rendering engine
* @deprecated
* @type {boolean}
*/
managed = false;
/**
*
* @type {function(*): Object3D}
*/
extractRenderable = passThrough;
/**
* @deprecated use CameraView's visible set instead
* Contains visible elements across all views, if element is in at least one view - it will be here
* @deprecated
* @type {IncrementalDeltaSet<THREE.Object3D>}
*/
visibleSet = new IncrementalDeltaSet(compare_three_objects);
/**
* @deprecated
* @returns {boolean}
*/
get visible() {
return this.state.visible;
}
/**
* @deprecated
* @param {boolean} v
*/
set visible(v) {
this.state.visible = v;
}
/**
* Compute near and far clipping planes for a camera given a frustum.
* Note: near plane is frustum.planes[4], far plane is frustum.planes[5]
* @deprecated
* @param {Frustum} frustum
* @param {number} near
* @param {number} far
* @param {function(near:number, far:number)} callback
* @param [thisArg]
*/
computeNearFarClippingPlanes(frustum, near, far, callback, thisArg) {
throw new Error('deprecated');
}
/**
* @deprecated
* @param {THREE.Object3D[]} destination
* @param {number} destination_offset
* @param {CameraView} view
* @returns {number} Number of records added to destination
*/
buildVisibleSet(destination, destination_offset, view) {
throw new Error('deprecated');
}
}