API

Class InteractivityGraphToFlowGraphParser

Parses a KHR_interactivity graph definition (the raw glTF JSON object) into the serialized FlowGraph form consumed by ParseFlowGraphAsync.

The class walks the interactivity types, declarations, variables, events and nodes in order and emits an ISerializedFlowGraph via serializeToFlowGraph.

Index
_animationTargetFps: number = 60
  • get arrays(): {
        events: InteractivityEvent[];
        mappings: {
            declaration: IKHRInteractivityDeclarationModel;
            flowGraphMapping: IGLTFToFlowGraphMapping;
            fullOperationName: string;
        }[];
        nodes: { blocks: ISerializedFlowGraphBlock[]; fullOperationName: string }[];
        staticVariables: { type: FlowGraphTypes; value: any[] }[];
        types: {
            elementType: "string" | "number" | "boolean" | "any";
            flowGraphType: FlowGraphTypes;
            length: number;
        }[];
    }

    Returns {
        events: InteractivityEvent[];
        mappings: {
            declaration: IKHRInteractivityDeclarationModel;
            flowGraphMapping: IGLTFToFlowGraphMapping;
            fullOperationName: string;
        }[];
        nodes: { blocks: ISerializedFlowGraphBlock[]; fullOperationName: string }[];
        staticVariables: { type: FlowGraphTypes; value: any[] }[];
        types: {
            elementType: "string" | "number" | "boolean" | "any";
            flowGraphType: FlowGraphTypes;
            length: number;
        }[];
    }