/** * ParticleTrait.ts * * Declarative particle attachment for HoloScript+ nodes. * Allows any node to emit particles via the trait system. * * @trait particles */ import { ParticleSystem, EmitterConfig } from './ParticleSystem'; export interface HSPlusNode { id?: string; properties?: Record; } export interface TraitHandler { name: string; defaultConfig: TConfig; onAttach(node: HSPlusNode, config: TConfig, context: unknown): void; onDetach(node: HSPlusNode, config: TConfig, context: unknown): void; onUpdate(node: HSPlusNode, config: TConfig, context: unknown, delta: number): void; } export interface ParticleTraitConfig { /** Preset name (key from ParticlePresets) */ preset?: string; /** Custom emitter config (overrides preset) */ emitter?: Partial; /** Affectors to apply */ affectors?: string[]; /** Whether to follow the node's position */ followNode: boolean; /** Whether to auto-start emitting on attach */ autoStart: boolean; } export declare const particleTraitHandler: TraitHandler; /** * Get the ParticleSystem for a given node (for external control). */ export declare function getNodeParticleSystem(nodeId: string): ParticleSystem | undefined; //# sourceMappingURL=ParticleTrait.d.ts.map