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.

56 lines (52 loc) 2.39 kB
import { c as FlowGraphExecutionBlockWithOutSignal } from './KHR_interactivity-CnR665Qq.esm.js'; import { b as RichTypeString, a as RichTypeBoolean } from './declarationMapper-mPOKbCS_.esm.js'; import { u as RegisterClass } from './index-HyNDfLMI.esm.js'; import './objectModelMapping-OlchA9xj.esm.js'; import './spotLight.pure-C65PiYTZ.esm.js'; /** This file must only contain pure code and pure imports */ /** * Stops the propagation of an in-flight custom event. * * When activated it asks the coordinator to skip the remaining handler nodes of * the currently-dispatching event referenced by the `event` input, then activates * its `out` flow. If the `event` input is not a valid, currently-dispatching event * reference, activating this block only fires `out` with no other effect. */ class FlowGraphStopEventPropagationBlock extends FlowGraphExecutionBlockWithOutSignal { constructor(config) { super(config); this.event = this.registerDataInput("event", RichTypeString); this.stopImmediate = this.registerDataInput("stopImmediate", RichTypeBoolean, false); } _execute(context) { const event = this.event.getValue(context); const stopImmediate = this.stopImmediate.getValue(context); context.configuration.coordinator.stopEventPropagation(event, stopImmediate); this.out._activateSignal(context); } /** * @returns class name of the block. */ getClassName() { return "FlowGraphStopEventPropagationBlock" /* FlowGraphBlockNames.StopEventPropagation */; } } let _Registered = false; /** * Register side effects for flowGraphStopEventPropagationBlock. * Safe to call multiple times; only the first call has an effect. */ function RegisterFlowGraphStopEventPropagationBlock() { if (_Registered) { return; } _Registered = true; RegisterClass("FlowGraphStopEventPropagationBlock" /* FlowGraphBlockNames.StopEventPropagation */, FlowGraphStopEventPropagationBlock); } /** * Re-exports pure implementation and applies runtime side effects. * Import flowGraphStopEventPropagationBlock.pure for tree-shakeable, side-effect-free usage. */ RegisterFlowGraphStopEventPropagationBlock(); export { FlowGraphStopEventPropagationBlock, RegisterFlowGraphStopEventPropagationBlock }; //# sourceMappingURL=flowGraphStopEventPropagationBlock-DOU1mIhZ.esm.js.map