UNPKG

arx-convert

Version:

Converts various Arx Fatalis formats to JSON or YAML and back

40 lines (39 loc) 1.7 kB
import { BinaryIO } from '../common/BinaryIO.js'; import type { ArxRotation, ArxVector3 } from '../common/types.js'; /** * @see https://github.com/arx/ArxLibertatis/blob/1.2.1/src/scene/LevelFormat.h#L193 */ export type ArxInteractiveObject = { name: string; position: ArxVector3; orientation: ArxRotation; /** * Number at the end of entity ids: like the `56` in `goblin_base_0056`. * The number should be between 0 and 9999. No info on whether the game can handle identifiers larger than 4 digits. */ identifier: number; }; export declare class InteractiveObject { static readFrom(binary: BinaryIO<ArrayBufferLike>): ArxInteractiveObject; static accumulateFrom(interactiveObject: ArxInteractiveObject): ArrayBuffer; /** * from: `\\\\ARKANESERVER\\PUBLIC\\ARX\\GRAPH\\OBJ3D\\INTERACTIVE\\ITEMS\\PROVISIONS\\PIE\\PIE.teo` * to: `items/provisions/pie` * * from: `C:\\ARX\\Graph\\Obj3D\\Interactive\\System\\Marker\\Marker.teo` * to: `system/marker` * * If the last folder in the path and filename differs, like `...\\ITEMS\\PROVISIONS\\MUSHROOM\\FOOD_MUSHROOM.teo` * then it should keep the full path, but change the extension to `.asl` */ static toRelativePath(filePath: string): string; /** * from: `items/provisions/pie` * to: `c:\\arx\\graph\\obj3d\\interactive\\items\\provisions\\pie\\pie.teo` * * If the path also has a file specified with extension, like `items/provisions/mushroom/food_mushroom.asl` * then keep the file part too, but change the extension to `.teo` */ static toAbsolutePath(filePath: string): string; static sizeOf(): number; }