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

Method execute

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

Source from the content-addressed store, hash-verified

178
179export class SeededRandomExecutor implements INodeExecutor {
180 execute(node: BlueprintNode, context: unknown): ExecutionResult {
181 const ctx = context as ProcGenContext;
182 const seed = ctx.evaluateInput(node.id, 'seed', 0) as number;
183 const index = ctx.evaluateInput(node.id, 'index', 0) as number;
184
185 // Create deterministic value from seed and index
186 const rng = new SeededRandom(seed + index * 12345);
187 const value = rng.next();
188
189 return { outputs: { value } };
190 }
191}
192
193// =============================================================================

Callers

nothing calls this directly

Calls 2

nextMethod · 0.95
evaluateInputMethod · 0.65

Tested by

no test coverage detected