game-maker / suite (push) Failing after 4m22s
The asset type `particles` is placeable and carries a graph at the same time — `behavior` was the blueprint. Because a continuous emitter gives birth to particle n at time n/rate, the whole field is a function of the clock rather than of the frames: no ring-buffer bookkeeping, exact time jumps, reproducibility as a measurable property. compile.ts follows compileShader's frame but emits JS closures into a Float64Array instead of GLSL, and without eval; a node with two consumers is evaluated once. Drawing is one Pixi ParticleContainer per source, so one draw call. Collision, wind and braking in flight are out for good — that is the price of the formula model, not an omission. The tab count goes from nine to ten, which is exactly the case #84 was built for one day earlier: at 1280 px the row no longer holds every tab, so guard 14b now asks for hidden.length > 0 instead of === 0.
20 lines
606 B
TypeScript
20 lines
606 B
TypeScript
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' };
|
|
},
|
|
};
|