arx-level-generator
Version:
A tool for creating Arx Fatalis maps
50 lines (49 loc) • 1.71 kB
TypeScript
import { ArxAction } from 'arx-convert/types';
import { Expand } from 'arx-convert/utils';
import { Mesh } from 'three';
import { Polygons } from './Polygons.js';
import { Settings } from './Settings.js';
type EntityModelConstructorProps = {
filename: string;
/**
* default value is "./" (relative to the assets folder)
*/
sourcePath?: string;
actionPoints?: ArxAction[];
};
export declare class EntityModel {
static targetPath: string;
filename: string;
sourcePath: string;
originIdx: number;
mesh?: Mesh | Polygons;
actionPoints: ArxAction[];
constructor(props: EntityModelConstructorProps);
/**
* props.originIdx is optional, its default value is 0
*
* use `@tools/mesh/getLowestPolygonIdx` to get the index of the lowest point of a mesh
*/
static fromThreeJsObj(threeJsObj: Mesh, props: Expand<EntityModelConstructorProps & {
originIdx?: number;
}>): EntityModel;
/**
* props.originIdx is optional, its default value is 0
*
* use `@tools/mesh/getLowestPolygonIdx` to get the index of the lowest point of a mesh
*/
static fromPolygons(polygons: Polygons, props: Expand<EntityModelConstructorProps & {
originIdx?: number;
}>): EntityModel;
clone(): EntityModel;
/**
* targetName is the folder relative to EntityModel.targetPath without the filename,
* for example `items/quest_item/mirror`
*/
exportSourceAndTarget(settings: Settings, targetName: string, exportJsonFiles?: boolean, prettify?: boolean): Promise<Record<string, string>>;
/**
* this method assumes that this.mesh is defined
*/
private generateFtl;
}
export {};