polygonjs-engine
Version:
node-based webgl 3D engine https://polygonjs.com
74 lines (73 loc) • 4.41 kB
TypeScript
/**
* Allows to create particle systems that will run on the GPU using gl nodes.
*
* @remarks
* TBD
*
*
*/
import { Constructor, valueof } from '../../../types/GlobalTypes';
import { TypedSopNode } from './_Base';
import { NodeContext } from '../../poly/NodeContext';
import { CoreGroup } from '../../../core/geometry/Group';
import { GlNodeChildrenMap } from '../../poly/registers/nodes/Gl';
import { BaseGlNodeType } from '../gl/_Base';
import { ParticlesSystemGpuRenderController } from './utils/ParticlesSystemGPU/RenderController';
import { ParticlesSystemGpuComputeController } from './utils/ParticlesSystemGPU/GPUComputeController';
import { NodeParamsConfig } from '../utils/params/ParamsConfig';
import { ShaderName } from '../utils/shaders/ShaderName';
import { AssemblerName } from '../../poly/registers/assemblers/_BaseRegister';
import { ParticlesPersistedConfig } from '../gl/code/assemblers/particles/PersistedConfig';
import { ParamsInitData } from '../utils/io/IOController';
declare class ParticlesSystemGpuSopParamsConfig extends NodeParamsConfig {
/** @param frame the particles simulation starts */
startFrame: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.FLOAT>;
/** @param auto sets the resolution of the textures used by the GPU shaders */
autoTexturesSize: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>;
/** @param max texture size. This is important to set a limit, as some systems may not handle large textures for particle sims */
maxTexturesSize: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.VECTOR2>;
/** @param sets the texture size manually */
texturesSize: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.VECTOR2>;
/** @param data type used by the solver */
dataType: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>;
/** @param resets the sim */
reset: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BUTTON>;
/** @param material used to render the particles */
material: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.OPERATOR_PATH>;
}
export declare class ParticlesSystemGpuSopNode extends TypedSopNode<ParticlesSystemGpuSopParamsConfig> {
params_config: ParticlesSystemGpuSopParamsConfig;
static type(): string;
dispose(): void;
get assemblerController(): import("../gl/code/Controller").GlAssemblerController<import("../gl/code/assemblers/particles/Particles").ShaderAssemblerParticles> | undefined;
usedAssembler(): Readonly<AssemblerName.GL_PARTICLES>;
protected _assembler_controller: import("../gl/code/Controller").GlAssemblerController<import("../gl/code/assemblers/particles/Particles").ShaderAssemblerParticles> | undefined;
private _create_assembler_controller;
readonly persisted_config: ParticlesPersistedConfig;
private globals_handler;
private _shaders_by_name;
shaders_by_name(): Map<ShaderName, string>;
readonly gpu_controller: ParticlesSystemGpuComputeController;
readonly render_controller: ParticlesSystemGpuRenderController;
static require_webgl2(): boolean;
static PARAM_CALLBACK_reset(node: ParticlesSystemGpuSopNode): void;
PARAM_CALLBACK_reset(): void;
static displayedInputNames(): string[];
private _reset_material_if_dirty_bound;
protected _children_controller_context: NodeContext;
initializeNode(): void;
createNode<S extends keyof GlNodeChildrenMap>(node_class: S, params_init_value_overrides?: ParamsInitData): GlNodeChildrenMap[S];
createNode<K extends valueof<GlNodeChildrenMap>>(node_class: Constructor<K>, params_init_value_overrides?: ParamsInitData): K;
children(): BaseGlNodeType[];
nodesByType<K extends keyof GlNodeChildrenMap>(type: K): GlNodeChildrenMap[K][];
childrenAllowed(): boolean;
_reset_material_if_dirty(): Promise<void>;
is_on_frame_start(): boolean;
cook(input_contents: CoreGroup[]): Promise<void>;
compile_if_required(): Promise<void>;
run_assembler(): Promise<void>;
private _set_shader_names;
init_with_persisted_config(): void;
private _find_export_nodes;
}
export {};