UNPKG

@dcl/ecs

Version:
25 lines (24 loc) 1.36 kB
import { IEngine, LastWriteWinElementSetComponentDefinition } from '../../engine'; import { PBParticleSystem, PBParticleSystem_BlendMode, PBParticleSystem_PlaybackState, PBParticleSystem_Point, PBParticleSystem_Sphere, PBParticleSystem_Cone, PBParticleSystem_Box } from '../generated/index.gen'; export { PBParticleSystem_BlendMode as ParticleSystemBlendMode, PBParticleSystem_PlaybackState as ParticleSystemPlaybackState }; /** * @public */ export interface ParticleSystemHelper { /** Emit from a single point */ Point: (point?: PBParticleSystem_Point) => PBParticleSystem['shape']; /** Emit from the surface or volume of a sphere */ Sphere: (sphere?: PBParticleSystem_Sphere) => PBParticleSystem['shape']; /** Emit from the base of a cone, projecting outward */ Cone: (cone?: PBParticleSystem_Cone) => PBParticleSystem['shape']; /** Emit from the surface or volume of a box */ Box: (box?: PBParticleSystem_Box) => PBParticleSystem['shape']; } /** * @public */ export interface ParticleSystemComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBParticleSystem> { /** Helpers for constructing emitter shapes */ Shape: ParticleSystemHelper; } export declare function defineParticleSystemComponent(engine: Pick<IEngine, 'defineComponentFromSchema'>): ParticleSystemComponentDefinitionExtended;