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.

62 lines (58 loc) 2.16 kB
import { F as FlowGraphBlock, h as defaultValueSerializationFunction } from './KHR_interactivity-CEwUaqxQ.esm.js'; import { k as getRichTypeFromValue } 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 */ /** * Block that returns a constant value. */ class FlowGraphConstantBlock extends FlowGraphBlock { constructor( /** * the configuration of the block */ config) { super(config); this.config = config; this.output = this.registerDataOutput("output", getRichTypeFromValue(config.value)); } _updateOutputs(context) { this.output.setValue(this.config.value, context); } /** * Gets the class name of this block * @returns the class name */ getClassName() { return "FlowGraphConstantBlock" /* FlowGraphBlockNames.Constant */; } /** * Serializes this block * @param serializationObject the object to serialize to * @param valueSerializeFunction the function to use to serialize the value */ serialize(serializationObject = {}, valueSerializeFunction = defaultValueSerializationFunction) { super.serialize(serializationObject); valueSerializeFunction("value", this.config.value, serializationObject.config); } } let _Registered = false; /** * Register side effects for flowGraphConstantBlock. * Safe to call multiple times; only the first call has an effect. */ function RegisterFlowGraphConstantBlock() { if (_Registered) { return; } _Registered = true; RegisterClass("FlowGraphConstantBlock" /* FlowGraphBlockNames.Constant */, FlowGraphConstantBlock); } /** * Re-exports pure implementation and applies runtime side effects. * Import flowGraphConstantBlock.pure for tree-shakeable, side-effect-free usage. */ RegisterFlowGraphConstantBlock(); export { FlowGraphConstantBlock, RegisterFlowGraphConstantBlock }; //# sourceMappingURL=flowGraphConstantBlock-PIKQO2tb.esm.js.map