import type { NodeDef } from '../../NodeRegistry'; import { asEntity } from '../../values'; import { exec, obj } from '../shared'; export const Emit: NodeDef = { type: 'Emit', label: 'Emit', category: 'action', description: 'Starts a particle source over: a Burst source throws another burst, a Continuous one begins its stream again at the first particle.', inputs: [exec(), obj('source')], outputs: [exec()], params: [], run: (_ctx, inputs) => { const target = asEntity(inputs.source); if (target) target.emits = (target.emits ?? 0) + 1; return { next: 'exec' }; }, };