UNPKG

arx-convert

Version:

Converts various Arx Fatalis formats to JSON or YAML and back

33 lines (32 loc) 1.19 kB
import { BinaryIO } from '../common/BinaryIO.js'; import type { ArxRotation, ArxVector3 } from '../common/types.js'; import type { ArxDLF } from './DLF.js'; /** * @see https://github.com/arx/ArxLibertatis/blob/1.2.1/src/scene/LevelFormat.h#L58 */ export type ArxDlfHeader = { lastModifiedBy: string; /** * unix timestamp in seconds */ lastModifiedAt: number; player: { /** * Position of the player where it gets teleported to upon entering the level when no entity is specified as teleport target */ position: ArxVector3; /** * The orientation of the player upon entering a level, specified in degrees. Only "b" is used which turns the player around its Y axis as all other rotations on other axis gets reset by the player animations. */ orientation: ArxRotation; }; numberOfInteractiveObjects: number; numberOfFogs: number; numberOfPolygonsInFTS: number; numberOfZonesAndPaths: number; }; export declare class DlfHeader { static readFrom(binary: BinaryIO<ArrayBufferLike>): ArxDlfHeader; static accumulateFrom(json: ArxDLF): ArrayBuffer; static sizeOf(): number; }