arx-convert
Version:
Converts various Arx Fatalis formats to JSON or YAML and back
28 lines (27 loc) • 818 B
TypeScript
import { BinaryIO } from '../common/BinaryIO.js';
import type { ArxVector3, TripleOf } from '../common/types.js';
/** @see https://github.com/arx/ArxLibertatis/blob/1.2.1/src/graphics/data/FTLFormat.h#L105 */
export declare enum ArxFaceType {
Flat = 0,
Text = 1,
DoubleSided = 2
}
/**
* the default value of transval is 0
*
* @see https://github.com/arx/ArxLibertatis/blob/1.2.1/src/graphics/data/FTLFormat.h#L103
*/
export type ArxFace = {
faceType: ArxFaceType;
vertexIdx: TripleOf<number>;
textureIdx: number;
u: TripleOf<number>;
v: TripleOf<number>;
transval?: number;
norm: ArxVector3;
};
export declare class Face {
static readFrom(binary: BinaryIO<ArrayBufferLike>): ArxFace;
static accumulateFrom(face: ArxFace): ArrayBuffer;
static sizeOf(): number;
}