API

Interface IFlowGraphMatrix<VectorType>

Interface representing a generic flow graph matrix.

BREAKING (since the KHR_interactivity work): FlowGraphMatrix2D and FlowGraphMatrix3D now store their elements in column-major order, matching core Matrix and the glTF/KHR_interactivity convention. Previous releases stored them row-major. This changes the result of building a matrix from a flat array (fromArray/set), of transformVector/transformVectorToRef, and of multiply/multiplyToRef (which now computes this * other rather than other * this). There is no compile error — graphs that relied on the old ordering or operand order get silently different numbers, so any code constructing these from raw arrays should be re-checked.

interface IFlowGraphMatrix<VectorType> {
    m: number[];
    add(other: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;
    addToRef(
        other: IFlowGraphMatrix<VectorType>,
        result: IFlowGraphMatrix<VectorType>,
    ): IFlowGraphMatrix<VectorType>;
    asArray(): number[];
    determinant(): number;
    divide(other: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;
    divideToRef(
        other: IFlowGraphMatrix<VectorType>,
        result: IFlowGraphMatrix<VectorType>,
    ): IFlowGraphMatrix<VectorType>;
    equals(other: IFlowGraphMatrix<VectorType>, epsilon?: number): boolean;
    fromArray(array: number[]): IFlowGraphMatrix<VectorType>;
    getClassName(): string;
    inverse(): IFlowGraphMatrix<VectorType>;
    multiply(other: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;
    multiplyToRef(
        other: IFlowGraphMatrix<VectorType>,
        result: IFlowGraphMatrix<VectorType>,
    ): IFlowGraphMatrix<VectorType>;
    subtract(other: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;
    subtractToRef(
        other: IFlowGraphMatrix<VectorType>,
        result: IFlowGraphMatrix<VectorType>,
    ): IFlowGraphMatrix<VectorType>;
    toArray(emptyArray: number[]): number[];
    transformVector(v: VectorType): VectorType;
    transformVectorToRef(v: VectorType, result: VectorType): VectorType;
    transpose(): IFlowGraphMatrix<VectorType>;
}

Type Parameters

  • VectorType

Implemented by

Index
m: number[]

The matrix elements stored in column-major order.