import { Store } from '../stores/store'; import * as PIXI from 'pixi.js'; import type * as types from '../types/data'; export interface Style extends types.ElementStyle { } export interface IProps { style: Style; parent: PIXI.Container; offsetXY?: { x: number; y: number; }; visible: boolean; hide: boolean; lock: boolean; store: Store; animateRef?: any; relativeTime?: number | null; } /** * 数据和pixi元素进行绑定 * @param pixiElement * @param props * @param attributeNames * @returns */ export default function useSyncPixiElement(pixiElement: PIXI.Container, // 目标元素 props: IProps, // 元素props参数 {x, y, } attributeNames: types.ElementStyleType[], // 监听可变参数的名称 ['x', 'y'] element?: types.BaseElement): ((style: Style, pxElement: PIXI.Container) => void)[];