import { UnityCreator } from "./index";
import { DTEvent } from "../common/event-emitter";
import { Meta } from "../interface/meta";
import { DTModel } from "../interface/model";
import { Component } from "../interface/component";
import { UnityModel } from "./model";
import { UnitySocket } from "./socket";
export type EventListener<A, P> = (meta: Meta<UnityCreator>, event: DTEvent<P>, params?: A) => void;
export type UnityEvent = {
    name: string;
    type: string;
    disable: () => void;
    enable: () => void;
    remove: () => void;
};
export type WebglEventCreator = (socket: UnitySocket, meta: Meta<UnityCreator>) => UnityEvent;
export type DefinedWebglEvent<P> = (params: P) => WebglEventCreator;
export type WebglEventParams = {
    event: undefined;
    object: DTModel | undefined;
    uv: {
        x: number;
        y: number;
    } | undefined;
    point: {
        x: number;
        y: number;
        z: number;
    };
    component: Component<UnityModel> | undefined;
};
/**
 * 定义Unity事件
 * @param name
 * @param listener
 */
export declare function defineUnityEvent<P extends Record<string, any>>(name: string, listener: EventListener<P, WebglEventParams>): (params?: P) => (meta: Meta<UnityCreator>) => UnityEvent;
