import EventEmitter from 'eventemitter3';
import { TextureStyle } from '../TextureStyle';
import type { BindResource } from '../../../gpu/shader/BindResource';
import type { ALPHA_MODES, SCALE_MODE, TEXTURE_DIMENSIONS, TEXTURE_FORMATS, WRAP_MODE } from '../const';
import type { TextureStyleOptions } from '../TextureStyle';
export interface TextureSourceOptions<T extends Record<string, any> = any> {
    resource?: T;
    width?: number;
    height?: number;
    resolution?: number;
    format?: TEXTURE_FORMATS;
    sampleCount?: number;
    antialias?: boolean;
    dimensions?: TEXTURE_DIMENSIONS;
    mipLevelCount?: number;
    autoGenerateMipmaps?: boolean;
    alphaMode?: ALPHA_MODES;
    style?: TextureStyleOptions | TextureStyle;
}
export declare class TextureSource<T extends Record<string, any> = any> extends EventEmitter<{
    change: BindResource;
    update: TextureSource;
    unload: TextureSource;
    destroy: TextureSource;
    resize: TextureSource;
    styleChange: TextureSource;
    error: Error;
}> implements BindResource {
    protected readonly options: TextureSourceOptions<T>;
    static defaultOptions: TextureSourceOptions;
    uid: number;
    resourceType: string;
    resourceId: number;
    uploadMethodId: string;
    /** @internal */
    _resolution: number;
    pixelWidth: number;
    pixelHeight: number;
    width: number;
    height: number;
    resource: T;
    sampleCount: number;
    mipLevelCount: number;
    autoGenerateMipmaps: boolean;
    format: TEXTURE_FORMATS;
    dimension: TEXTURE_DIMENSIONS;
    alphaMode: ALPHA_MODES;
    private _style;
    antialias: boolean;
    depthStencil: boolean;
    /**
     * Has the source been destroyed?
     * @readonly
     */
    destroyed: boolean;
    /**
     * Used by automatic texture Garbage Collection, stores last GC tick when it was bound
     * @protected
     */
    touched: number;
    /**
     * Used by the batcher to build texture batches. faster to have the variable here!
     * @protected
     */
    _batchTick: number;
    /**
     * A temporary batch location for the texture batching. Here for performance reasons only!
     * @protected
     */
    _textureBindLocation: number;
    constructor(options?: TextureSourceOptions<T>);
    get source(): TextureSource;
    get style(): TextureStyle;
    set style(value: TextureStyle);
    private _onStyleChange;
    update(): void;
    /** Destroys this texture source */
    destroy(): void;
    unload(): void;
    get resourceWidth(): number;
    get resourceHeight(): number;
    get resolution(): number;
    set resolution(resolution: number);
    resize(width?: number, height?: number, resolution?: number): void;
    /** @deprecated since 8.0.0 */
    set wrapMode(value: WRAP_MODE);
    /** @deprecated since 8.0.0 */
    get wrapMode(): WRAP_MODE;
    /** @deprecated since 8.0.0 */
    set scaleMode(value: SCALE_MODE);
    /** @deprecated since 8.0.0 */
    get scaleMode(): SCALE_MODE;
}
