arx-level-generator
Version:
A tool for creating Arx Fatalis maps
42 lines (41 loc) • 1.21 kB
TypeScript
import { ArxZone, ArxZoneAndPathPointType } from 'arx-convert/types';
import { BufferGeometry } from 'three';
import { Ambience } from './Ambience.js';
import { Color } from './Color.js';
import { Vector3 } from './Vector3.js';
export type ZonePoint = {
position: Vector3;
type: ArxZoneAndPathPointType;
time: number;
};
export type ZoneConstructorProps = {
name: string;
/** default value: Infinity */
height?: number;
points: ZonePoint[];
backgroundColor?: Color;
/** default value: 5600 ? */
drawDistance?: number;
/** default value: Ambience.none */
ambience?: Ambience;
};
export declare class Zone {
name: string;
height: number;
points: ZonePoint[];
backgroundColor?: Color;
drawDistance?: number;
ambience?: Ambience;
hasBackgroundColor(): this is {
backgroundColor: Color;
};
hasAmbience(): this is {
ambience: Ambience;
};
constructor(props: ZoneConstructorProps);
clone(): Zone;
static fromArxZone(zone: ArxZone): Zone;
static fromThreejsGeometry(obj: BufferGeometry, props: Omit<ZoneConstructorProps, 'points'>): Zone;
toArxZone(): ArxZone;
move(offset: Vector3): void;
}