arx-level-generator
Version:
A tool for creating Arx Fatalis maps
28 lines (27 loc) • 1.12 kB
TypeScript
import { QuadrupleOf } from 'arx-convert/utils';
import { Group, Object3D } from 'three';
import { ArxMap } from '../../ArxMap.js';
import { DONT_QUADIFY, QUADIFY } from '../../Polygons.js';
import { Vector3 } from '../../Vector3.js';
import { TextureOrMaterial } from '../../types.js';
export type TextureDefinition = {
texture: TextureOrMaterial;
fitX: boolean;
fitY: boolean;
isRemoved: boolean;
};
export type RoomTextures = {
wall: TextureDefinition | QuadrupleOf<TextureDefinition>;
floor: TextureDefinition;
ceiling: TextureDefinition;
};
export type RoomProps = {
textures: RoomTextures;
/**
* default value is 50
*/
tileSize?: number;
};
export declare const createRoomMesh: (size: Vector3, { textures: { wall, floor, ceiling }, tileSize }: RoomProps) => Group<import("three").Object3DEventMap>;
export declare const createArxMapFromMesh: (mesh: Object3D, tryToQuadify?: typeof QUADIFY | typeof DONT_QUADIFY) => ArxMap;
export declare const createRoom: (dimensions: Vector3, props: RoomProps, tryToQuadify?: typeof QUADIFY | typeof DONT_QUADIFY) => ArxMap;