MCPcopy Create free account
hub / github.com/esengine/esengine / execute

Method execute

packages/procgen/src/nodes/ProcGenNodes.ts:306–315  ·  view source on GitHub ↗
(node: BlueprintNode, context: unknown)

Source from the content-addressed store, hash-verified

304
305export class ShuffleArrayExecutor implements INodeExecutor {
306 execute(node: BlueprintNode, context: unknown): ExecutionResult {
307 const ctx = context as ProcGenContext;
308 const seed = ctx.evaluateInput(node.id, 'seed', 0) as number;
309 const array = ctx.evaluateInput(node.id, 'array', []) as unknown[];
310
311 const rng = new SeededRandom(seed);
312 const result = shuffle([...array], rng);
313
314 return { outputs: { result } };
315 }
316}
317
318// =============================================================================

Callers

nothing calls this directly

Calls 2

shuffleFunction · 0.90
evaluateInputMethod · 0.65

Tested by

no test coverage detected