import { LanguageModel } from "./LanguageModel"; export interface ILanguageModelOptions { [prop: string]: any; } interface ILanguageModelSubclass { new (options: ILanguageModelOptions): T; } export interface ILanguageModelConfig extends ILanguageModelOptions { Model: ILanguageModelSubclass; } export interface IOperation { key: string; text: string; /** * To mark that is this item disabled, * we just add a `data-disabled` attribute to the menu item, * user should implement the funtion */ disabled: boolean; } export interface IOperationBoxConfig { hide?: boolean; perationBoxClassName?: string; operationList?: IOperation[]; } export interface IModelConfig { position: [number, number, number]; rotation: [number, number, number]; helloActionName: string; idleActionName: string; helloContent: string; } /** * Configs for the scene of the assistant robot's 3d model. * To see all default value's, look at MODEL_SCENE_CONFIG */ export interface IModelSceneConfig { backgroundColor: number; backgroundAlpha: number; camera: { fov: number; near: number; far: number; position: [number, number, number]; lookAt: [number, number, number]; }; /** * config of the ambient light in the scene. * the light globally illuminates all objects in the scene equally. */ ambientLight: { color: number; intensity: number; }; /** * config of the directional light in the scene. * A light that gets emitted in a specific direction */ directionalLight: { color: number; intensity: number; position: [number, number, number]; }; } /** * config for the 3d render part. */ export type TRobotModelConfig = Partial & { modelConfig?: Partial; modelUrl?: string; }; export interface IUserDetectorConfig { /** * The path to where the files of the face detect model are located. * If your user can not get the public one, the files can be download from there:https://github.com/ymrdf/assistant-robot/tree/main/example/public/face_detection */ solutionPath?: string; } export interface IAssistantRobotConfig { className: string; languageModel: ILanguageModelConfig; operationBox: IOperationBoxConfig; robotModel: TRobotModelConfig; userDetector: IUserDetectorConfig; } export type TCallback = () => void; export type TEventListenFunc = (...args: any[]) => void; export interface IActionConfig { loop?: boolean; weight?: number; timeScale?: number; repetitions?: number; } export {};