import { Object3D, WonderlandEngine } from "@wonderlandengine/api"; import { VisualElementDefaultType } from "./visual_element_types.js"; export interface VisualElementParams { myType: unknown | VisualElementDefaultType; /** If not specified it will default to `Globals.getSceneObjects().myVisualElements` */ myParent: Object3D; copyGeneric(other: Readonly, deepCopy: boolean): void; cloneGeneric(deepClone: boolean): VisualElementParams; equalsGeneric(other: Readonly): boolean; } export declare abstract class AbstractVisualElementParams> implements VisualElementParams { abstract myType: unknown | VisualElementDefaultType; myParent: Object3D; constructor(engine?: Readonly); copy(other: Readonly, deepCopy?: boolean): void; clone(deepClone?: boolean): T; equals(other: Readonly): boolean; copyGeneric(other: Readonly, deepCopy?: boolean): void; cloneGeneric(deepClone?: boolean): VisualElementParams; equalsGeneric(other: Readonly): boolean; protected abstract _copyHook(other: Readonly, deepCopy: boolean): void; protected abstract _new(): T; protected abstract _equalsHook(other: Readonly): boolean; } export interface VisualElement { update(dt: number): void; setVisible(visible: boolean): void; refresh(): void; setAutoRefresh(autoRefresh: boolean): void; getParamsGeneric(): VisualElementParams; setParamsGeneric(params: VisualElementParams): void; copyParamsGeneric(params: VisualElementParams): void; paramsUpdated(): void; clone(): VisualElement; destroy(): void; } export declare abstract class AbstractVisualElement, VisualElementParamsType extends AbstractVisualElementParams> implements VisualElement { protected _myParams: VisualElementParamsType; protected _myPrevParams: VisualElementParamsType; protected _myVisible: boolean; protected _myAutoRefresh: boolean; protected _myDirty: boolean; protected _myDestroyed: boolean; constructor(params: VisualElementParamsType); update(dt: number): void; setVisible(visible: boolean): void; refresh(): void; setAutoRefresh(autoRefresh: boolean): void; getParams(): VisualElementParamsType; setParams(params: VisualElementParamsType): void; copyParams(params: VisualElementParamsType): void; getParamsGeneric(): VisualElementParams; setParamsGeneric(params: VisualElementParams): void; copyParamsGeneric(params: VisualElementParams): void; paramsUpdated(): void; private _markDirty; clone(): VisualElementType; protected _prepare(): void; private _refresh; protected _updateHook(dt: number): void; protected _visibleChanged(): void; protected abstract _build(): void; protected abstract _refreshHook(): void; protected abstract _new(params: VisualElementParamsType): VisualElementType; protected _destroyHook(): void; destroy(): void; isDestroyed(): boolean; }