UNPKG

@babylonjs/viewer

Version:

The Babylon Viewer aims to simplify a specific but common Babylon.js use case: loading, viewing, and interacting with a 3D model.

35 lines (32 loc) 1.23 kB
import { h as RichTypeBoolean } from './declarationMapper-rcGCdcDP.esm.js'; import { k as FlowGraphExecutionBlock } from './KHR_interactivity-Bmb38TjL.esm.js'; import { R as RegisterClass } from './index-FzOfPXLV.esm.js'; import './objectModelMapping-CJnQ6at_.esm.js'; /** * A block that evaluates a condition and activates one of two branches. */ class FlowGraphBranchBlock extends FlowGraphExecutionBlock { constructor(config) { super(config); this.condition = this.registerDataInput("condition", RichTypeBoolean); this.onTrue = this._registerSignalOutput("onTrue"); this.onFalse = this._registerSignalOutput("onFalse"); } _execute(context) { if (this.condition.getValue(context)) { this.onTrue._activateSignal(context); } else { this.onFalse._activateSignal(context); } } /** * @returns class name of the block. */ getClassName() { return "FlowGraphBranchBlock" /* FlowGraphBlockNames.Branch */; } } RegisterClass("FlowGraphBranchBlock" /* FlowGraphBlockNames.Branch */, FlowGraphBranchBlock); export { FlowGraphBranchBlock }; //# sourceMappingURL=flowGraphBranchBlock-NyHoQZNw.esm.js.map