UNPKG

@polygonjs/polygonjs

Version:

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

67 lines (66 loc) 3.51 kB
/** * Allows to create particle systems that will run on the GPU using gl nodes. * * @remarks * TBD * * */ import { Object3D } from 'three'; import { Constructor, valueof } from '../../../types/GlobalTypes'; import { TypedSopNode } from './_Base'; import { NodeContext } from '../../poly/NodeContext'; import { CoreGroup } from '../../../core/geometry/Group'; import { CoreParticlesController } from '../../../core/particles/CoreParticlesController'; import { GlNodeChildrenMap } from '../../poly/registers/nodes/Gl'; import { BaseGlNodeType } from '../gl/_Base'; 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/ParticlesPersistedConfig'; import { NodeCreateOptions } from '../utils/hierarchy/ChildrenController'; import { SopType } from '../../poly/registers/nodes/types/Sop'; import { GlAssemblerController } from '../gl/code/Controller'; import { ShaderAssemblerParticles } from '../gl/code/assemblers/particles/Particles'; declare class ParticlesSystemGpuSopParamsConfig extends NodeParamsConfig { /** @param group to assign the material to */ group: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>; /** @param data type used by the solver */ dataType: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>; /** @param number of frames to run before scene plays */ preRollFramesCount: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>; /** @param material used to render the particles */ material: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.NODE_PATH>; } export declare class ParticlesSystemGpuSopNode extends TypedSopNode<ParticlesSystemGpuSopParamsConfig> { paramsConfig: ParticlesSystemGpuSopParamsConfig; static type(): SopType; dispose(): void; assemblerController(): GlAssemblerController<ShaderAssemblerParticles> | undefined; usedAssembler(): Readonly<AssemblerName.GL_PARTICLES>; protected _assemblerController: GlAssemblerController<ShaderAssemblerParticles> | undefined; private _createAssemblerController; readonly persisted_config: ParticlesPersistedConfig; private _particlesGlobalsHandler; private _shadersByName; shadersByName(): Map<ShaderName, string>; static requireWebGL2(): boolean; protected _childrenControllerContext: NodeContext; initializeNode(): void; createNode<S extends keyof GlNodeChildrenMap>(node_class: S, options?: NodeCreateOptions): GlNodeChildrenMap[S]; createNode<K extends valueof<GlNodeChildrenMap>>(node_class: Constructor<K>, options?: NodeCreateOptions): K; children(): BaseGlNodeType[]; nodesByType<K extends keyof GlNodeChildrenMap>(type: K): GlNodeChildrenMap[K][]; childrenAllowed(): boolean; sceneReadonly(): boolean; private _operation; cook(inputCoreGroups: CoreGroup[]): Promise<void>; updateObjectOnAdd(object: Object3D): void; compileIfRequired(): void; run_assembler(): void; private _setShaderNames; init_with_persisted_config(): void; initCoreParticlesControllerFromPersistedConfig(coreParticlesController: CoreParticlesController): void; private _findExportNodes; } export {};