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.

30 lines (29 loc) 1.22 kB
import { FlowGraphAsyncExecutionBlock } from "./flowGraphAsyncExecutionBlock.js"; import type { FlowGraphContext } from "./flowGraphContext.js"; import { FlowGraphEventType } from "./flowGraphEventType.js"; /** * A type of block that listens to an event observable and activates * its output signal when the event is triggered. */ export declare abstract class FlowGraphEventBlock extends FlowGraphAsyncExecutionBlock { /** * the priority of initialization of this block. * For example, scene start should have a negative priority because it should be initialized last. */ initPriority: number; /** * The type of the event */ readonly type: FlowGraphEventType; /** * @internal */ _execute(context: FlowGraphContext): void; /** * Execute the event. This function should be called by the flow graph when the event is triggered. * @param context the context in which the event is executed * @param payload the payload of the event * @returns a boolean indicating if the event should stop propagation. if false, the event will stop propagating. */ abstract _executeEvent(context: FlowGraphContext, payload: any): boolean; }