API

Interface IGLTFToFlowGraphMappingObject

Describes how one KHR_interactivity configuration or socket property maps to FlowGraph.

The same contract is used for fixed sockets, wildcard sockets, configuration validation, defaulting, and multi-block routing during strict graph lowering.

interface IGLTFToFlowGraphMappingObject {
    allowedSignatures?: readonly (
        | "float"
        | "bool"
        | "int"
        | "float2"
        | "float3"
        | "float4"
        | "float2x2"
        | "float3x3"
        | "float4x4"
        | "ref"
        | "custom"
    )[];
    allowedValues?: readonly (string | number | boolean)[];
    compatibilityOnly?: boolean;
    configurationGroup?: string;
    configurationType?: "string" | "bool" | "int" | "int[]";
    convertConnectedTimeToFrames?: boolean;
    dataTransformer?: (
        data: any,
        parser: InteractivityGraphToFlowGraphParser,
    ) => any;
    debugLogTemplate?: boolean;
    defaultValue?: any;
    flowGraphType?: string;
    generatesCaseInputValueSockets?: boolean;
    generatesInputFlowSockets?: boolean;
    generatesInputValueSockets?: boolean;
    generatesOutputFlowSockets?: boolean;
    gltfType?: string;
    indexSource?: "nodes" | "types" | "variables" | "events" | "assetNodes";
    inOptions?: boolean;
    invalidUsesDefault?: boolean;
    isArray?: boolean;
    isVariable?: boolean;
    maximum?: number;
    minimum?: number;
    minItems?: number;
    name: string;
    pointerTemplate?: boolean;
    required?: boolean;
    toBlock?: any;
    typeSourceInput?: string;
    uniqueValues?: boolean;
    validationOnly?: boolean;
}
Index
allowedSignatures?: readonly (
    | "float"
    | "bool"
    | "int"
    | "float2"
    | "float3"
    | "float4"
    | "float2x2"
    | "float3x3"
    | "float4x4"
    | "ref"
    | "custom"
)[]

Allowed KHR type signatures for a type-index configuration.

allowedValues?: readonly (string | number | boolean)[]

Allowed literal values for this configuration property.

compatibilityOnly?: boolean

Whether this socket mapping exists only for pre-ratification compatibility input.

configurationGroup?: string

Properties in the same group fall back to their defaults together when any member is missing or invalid.

configurationType?: "string" | "bool" | "int" | "int[]"

KHR configuration value type used by canonical validation.

convertConnectedTimeToFrames?: boolean

When the input value comes from a connection (an upstream node output) rather than a literal, the parse-time dataTransformer cannot run. If this is true, the importer inserts a runtime multiply block that scales the connected value by the animation target fps, converting a KHR animation time (seconds) into Babylon animation frames. Literal values keep using the dataTransformer. Used by animation/start / animation/stopAt time inputs, which may be fed by a pointer/get (e.g. the read-only maxTime animation pointer).

dataTransformer?: (
    data: any,
    parser: InteractivityGraphToFlowGraphParser,
) => any

A function that transforms the data from the glTF to the FlowGraph block.

debugLogTemplate?: boolean

Whether a string configuration value is a debug/log message template.

defaultValue?: any

Used in configuration values. If defined, this will be the default value, if no value is provided.

flowGraphType?: string

The type of the property in the FlowGraph block. If not defined it equals the glTF type.

generatesCaseInputValueSockets?: boolean

Whether integer case values generate required input value sockets.

generatesInputFlowSockets?: boolean

Whether this configuration value generates numbered input flow sockets.

generatesInputValueSockets?: boolean

Whether the configured indices generate required input value sockets.

generatesOutputFlowSockets?: boolean

Whether this configuration array generates output flow sockets.

gltfType?: string

The type of the property in the glTF specs. If not provided will be inferred.

indexSource?: "nodes" | "types" | "variables" | "events" | "assetNodes"

Graph array referenced by an integer configuration value.

inOptions?: boolean

If the property is in the options passed to the constructor of the block.

invalidUsesDefault?: boolean

Whether an invalid value falls back to the operation's default configuration.

isArray?: boolean

If the property can contain multiple values.

isVariable?: boolean

If the property is an index to a value. if defined this will be the name of the array to find the object in.

maximum?: number

Inclusive maximum for an integer configuration value.

minimum?: number

Inclusive minimum for an integer configuration value.

minItems?: number

Minimum number of values required for an array configuration.

name: string

The name of the property in the FlowGraph block.

pointerTemplate?: boolean

Whether this string configuration generates JSON Pointer Template sockets.

required?: boolean

Whether an operation without a complete default configuration requires this property.

toBlock?: any

the name of the class type this value will be mapped to. This is used if we generate more than one block for a single glTF node. Defaults to the first block in the mapping.

typeSourceInput?: string

Input socket whose effective type determines this output socket type.

uniqueValues?: boolean

Whether duplicate array values are removed from the effective configuration.

validationOnly?: boolean

Whether this configuration entry exists only for canonical validation.