/** This file must only contain pure code and pure imports */ import { Vector2, Vector3, Vector4, Matrix, Quaternion } from "../Maths/math.vector.pure.js"; import { Color3, Color4 } from "../Maths/math.color.pure.js"; import { FlowGraphInteger } from "./CustomTypes/flowGraphInteger.pure.js"; import { FlowGraphMatrix2D, FlowGraphMatrix3D } from "./CustomTypes/flowGraphMatrix.js"; /** * The types supported by the flow graph. */ export declare enum FlowGraphTypes { Any = "any", String = "string", Number = "number", Boolean = "boolean", Object = "object", Integer = "FlowGraphInteger", Vector2 = "Vector2", Vector3 = "Vector3", Vector4 = "Vector4", Quaternion = "Quaternion", Matrix = "Matrix", Matrix2D = "Matrix2D", Matrix3D = "Matrix3D", Color3 = "Color3", Color4 = "Color4" } /** * A rich type represents extra information about a type, * such as its name and a default value constructor. */ export declare class RichType { /** * The name given to the type. */ typeName: string; /** * The default value of the type. */ defaultValue: T; /** * [-1] The ANIMATIONTYPE of the type, if available */ animationType: number; /** * A function that can be used to transform a value of any type into a value of this rich type. * This can be used, for example, between vector4 and quaternion. */ typeTransformer: (value: any) => T; constructor( /** * The name given to the type. */ typeName: string, /** * The default value of the type. */ defaultValue: T, /** * [-1] The ANIMATIONTYPE of the type, if available */ animationType?: number); /** * Serializes this rich type into a serialization object. * @param serializationObject the object to serialize to */ serialize(serializationObject: any): void; } export declare const RichTypeAny: RichType; export declare const RichTypeString: RichType; export declare const RichTypeNumber: RichType; export declare const RichTypeBoolean: RichType; export declare const RichTypeVector2: RichType; export declare const RichTypeVector3: RichType; export declare const RichTypeVector4: RichType; export declare const RichTypeMatrix: RichType; export declare const RichTypeMatrix2D: RichType; export declare const RichTypeMatrix3D: RichType; export declare const RichTypeColor3: RichType; export declare const RichTypeColor4: RichType; export declare const RichTypeQuaternion: RichType; export declare const RichTypeFlowGraphInteger: RichType; /** * Given a value, try to deduce its rich type. * @param value the value to deduce the rich type from * @returns the value's rich type, or RichTypeAny if the type could not be deduced. */ export declare function getRichTypeFromValue(value: T): RichType; /** * Given a flow graph type, return the rich type that corresponds to it. * @param flowGraphType the flow graph type * @returns the rich type that corresponds to the flow graph type */ export declare function getRichTypeByFlowGraphType(flowGraphType?: string): RichType; /** * get the animation type for a given flow graph type * @param flowGraphType the flow graph type * @returns the animation type for this flow graph type */ export declare function getAnimationTypeByFlowGraphType(flowGraphType: FlowGraphTypes): number; /** * Given an animation type, return the rich type that corresponds to it. * @param animationType the animation type * @returns the rich type that corresponds to the animation type */ export declare function getRichTypeByAnimationType(animationType: number): RichType; /** * Register side effects for flowGraphRichTypes. * Safe to call multiple times; only the first call has an effect. */ export declare function RegisterFlowGraphRichTypes(): void;