@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.
50 lines (46 loc) • 1.8 kB
JavaScript
import { c as FlowGraphExecutionBlockWithOutSignal } from './KHR_interactivity-CEwUaqxQ.esm.js';
import { R as RichTypeAny } from './declarationMapper-CqO08-WM.esm.js';
import { u as RegisterClass } from './index-MZPybX0H.esm.js';
import './objectModelMapping-De5EKNEZ.esm.js';
import './spotLight.pure-CRdZC6Ci.esm.js';
/** This file must only contain pure code and pure imports */
/**
* @experimental
* Block that pauses a running animation
*/
class FlowGraphPauseAnimationBlock extends FlowGraphExecutionBlockWithOutSignal {
constructor(config) {
super(config);
this.animationToPause = this.registerDataInput("animationToPause", RichTypeAny);
}
_execute(context) {
const animationToPauseValue = this.animationToPause.getValue(context);
animationToPauseValue.pause();
this.out._activateSignal(context);
}
/**
* @returns class name of the block.
*/
getClassName() {
return "FlowGraphPauseAnimationBlock" /* FlowGraphBlockNames.PauseAnimation */;
}
}
let _Registered = false;
/**
* Register side effects for flowGraphPauseAnimationBlock.
* Safe to call multiple times; only the first call has an effect.
*/
function RegisterFlowGraphPauseAnimationBlock() {
if (_Registered) {
return;
}
_Registered = true;
RegisterClass("FlowGraphPauseAnimationBlock" /* FlowGraphBlockNames.PauseAnimation */, FlowGraphPauseAnimationBlock);
}
/**
* Re-exports pure implementation and applies runtime side effects.
* Import flowGraphPauseAnimationBlock.pure for tree-shakeable, side-effect-free usage.
*/
RegisterFlowGraphPauseAnimationBlock();
export { FlowGraphPauseAnimationBlock, RegisterFlowGraphPauseAnimationBlock };
//# sourceMappingURL=flowGraphPauseAnimationBlock-BKJk9rBC.esm.js.map