import { Side } from 'three';

export interface IOptions {
  name?: string;
  data: Record<string, any> | (() => Promise<Record<string, any>>);
  // 标注碰撞检测
  poiCollision?: boolean;
  // icon: any
  // scale?: number
  // renderOrder: number
  // position: Vector3
}

/**
 * @desc 统一配置对象的 name 属性
 */
export enum OBJECT_NAME {
  level = 'level',
  floor = 'floor',
  park = 'park',
  parkBorder = 'parkBorder',
  pillar = 'pillar',
  machine = 'machine',
  connector = 'connector'
}

export type IType =
  | 'floor'
  | 'park'
  | 'parkBorder'
  | 'pillar'
  | 'machine'
  | 'connector';

export interface IObjectBaseConfig {
  name: IType;
  material:
    | 'MeshBasicMaterial'
    | 'MeshLambertMaterial'
    | 'SpriteMaterial'
    | 'LineBasicMaterial'
    | 'LineMaterial';
  depth?: number;
  color?: string;
  renderOrder?: number;
  depthTest?: boolean;
  depthWrite?: boolean;
  opacity?: number;
  transparent?: boolean;
  side?: Side;
}

export enum ICONNECTOR {
  zhiti = 1,
  futi,
  louti,
  churukou
}
