UNPKG

polygonjs-engine

Version:

node-based webgl 3D engine https://polygonjs.com

36 lines (35 loc) 2.04 kB
/** * Creates LOD (Level Of Definition) * * @remarks * This nodes takes 1, 2 or 3 inputs. Depending on the distance to this object the camera is, one of those inputs will be displayed. This allows you to have low resolution objects displayed when the camera is far, and high resolution when the camera is close. */ import { TypedSopNode } from './_Base'; import { CoreGroup } from '../../../core/geometry/Group'; import { NodeParamsConfig } from '../utils/params/ParamsConfig'; declare class LODSopParamsConfig extends NodeParamsConfig { /** @param distance when switching between high res and mid res (first input and second input) */ distance0: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.FLOAT>; /** @param distance when switching between mid res and low res (second input and third input) */ distance1: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.FLOAT>; /** @param sets if the switch is done automatically */ autoUpdate: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; /** @param updates which object is displayed manually */ update: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BUTTON>; /** @param sets which camera will be used when the switch is to be done manually */ camera: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.OPERATOR_PATH>; } export declare class LodSopNode extends TypedSopNode<LODSopParamsConfig> { params_config: LODSopParamsConfig; static type(): string; static displayedInputNames(): string[]; private _lod; initializeNode(): void; private _create_LOD; cook(input_contents: CoreGroup[]): void; _add_level(core_group: CoreGroup | undefined, level: number): void; private _clear_lod; static PARAM_CALLBACK_update(node: LodSopNode): void; private _update_lod; } export {};