(node: BlueprintNode, context: unknown)
| 178 | |
| 179 | export 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 | // ============================================================================= |
nothing calls this directly
no test coverage detected