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.

77 lines (76 loc) 3.33 kB
import type { FlowGraphAssetType } from "../../../flowGraphAssetsContext.js"; import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock.js"; import type { FlowGraphContext } from "../../../flowGraphContext.js"; import type { FlowGraphDataConnection } from "../../../flowGraphDataConnection.js"; import { FlowGraphPathConverterComponent } from "../../../flowGraphPathConverterComponent.js"; import type { IObjectAccessor } from "../../../typeDefinitions.js"; import type { IPathToObjectConverter } from "../../../../ObjectModel/objectModelInterfaces.js"; import type { Animation } from "../../../../Animations/animation.js"; import type { EasingFunction } from "../../../../Animations/easing.js"; import { FlowGraphCachedOperationBlock } from "../flowGraphCachedOperationBlock.js"; /** * Configuration for the JSON pointer parser block. */ export interface IFlowGraphJsonPointerParserBlockConfiguration extends IFlowGraphBlockConfiguration { /** * The JSON pointer to parse. */ jsonPointer: string; /** * The path converter to use to convert the path to an object accessor. */ pathConverter: IPathToObjectConverter<IObjectAccessor>; /** * Whether to output the value of the property. */ outputValue?: boolean; } /** * This block will take a JSON pointer and parse it to get the value from the JSON object. * The output is an object and a property name. * Optionally, the block can also output the value of the property. This is configurable. */ export declare class FlowGraphJsonPointerParserBlock<P extends any, O extends FlowGraphAssetType> extends FlowGraphCachedOperationBlock<P> { /** * the configuration of the block */ config: IFlowGraphJsonPointerParserBlockConfiguration; /** * Output connection: The object that contains the property. */ readonly object: FlowGraphDataConnection<O>; /** * Output connection: The property name. */ readonly propertyName: FlowGraphDataConnection<string>; /** * Output connection: A function that can be used to update the value of the property. */ readonly setterFunction: FlowGraphDataConnection<(target: O, propertyName: string, value: P, context: FlowGraphContext) => void>; /** * Output connection: A function that can be used to get the value of the property. */ readonly getterFunction: FlowGraphDataConnection<(target: O, propertyName: string, context: FlowGraphContext) => P | undefined>; /** * Output connection: A function that can be used to get the interpolation animation property info. */ readonly generateAnimationsFunction: FlowGraphDataConnection<() => (keys: any[], fps: number, easingFunction?: EasingFunction) => Animation[]>; /** * The component with the templated inputs for the provided path. */ readonly templateComponent: FlowGraphPathConverterComponent; constructor( /** * the configuration of the block */ config: IFlowGraphJsonPointerParserBlockConfiguration); _doOperation(context: FlowGraphContext): P; private _setPropertyValue; private _getPropertyValue; private _getInterpolationAnimationPropertyInfo; /** * Gets the class name of this block * @returns the class name */ getClassName(): string; }