UNPKG

@babylonjs/core

Version:

Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.

62 lines (61 loc) 2.29 kB
import type { FlowGraphSignalConnection } from "../../../flowGraphSignalConnection.js"; import type { FlowGraphDataConnection } from "../../../flowGraphDataConnection.js"; import { FlowGraphExecutionBlockWithOutSignal } from "../../../flowGraphExecutionBlockWithOutSignal.js"; import type { FlowGraphContext } from "../../../flowGraphContext.js"; import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock.js"; import type { FlowGraphNumber } from "../../../utils.js"; import { FlowGraphInteger } from "../../../CustomTypes/flowGraphInteger.js"; /** * Configuration for the For Loop block. */ export interface IFlowGraphForLoopBlockConfiguration extends IFlowGraphBlockConfiguration { /** * The initial index of the loop. * if not set will default to 0 */ initialIndex?: FlowGraphNumber; } /** * Block that executes an action in a loop. */ export declare class FlowGraphForLoopBlock extends FlowGraphExecutionBlockWithOutSignal { /** * The maximum number of iterations allowed for the loop. * If the loop exceeds this number, it will stop. This number is configurable to avoid infinite loops. */ static MaxLoopIterations: number; /** * Input connection: The start index of the loop. */ readonly startIndex: FlowGraphDataConnection<FlowGraphNumber>; /** * Input connection: The end index of the loop. */ readonly endIndex: FlowGraphDataConnection<FlowGraphNumber>; /** * Input connection: The step of the loop. */ readonly step: FlowGraphDataConnection<number>; /** * Output connection: The current index of the loop. */ readonly index: FlowGraphDataConnection<FlowGraphInteger>; /** * Output connection: The signal that is activated when the loop body is executed. */ readonly executionFlow: FlowGraphSignalConnection; /** * Output connection: The completed signal. Triggered when condition is false. * No out signal is available. */ readonly completed: FlowGraphSignalConnection; constructor(config?: IFlowGraphForLoopBlockConfiguration); /** * @internal */ _execute(context: FlowGraphContext): void; /** * @returns class name of the block. */ getClassName(): string; }