import { IVec2, IVec3, Mat3, Mat4, Quat } from '@gglib/math'; import { Color } from './Color'; import { Texture } from './resources/Texture'; /** * @public */ export declare class Sprite { texture: Texture; color: number; readonly uv1: IVec2; readonly uv2: IVec2; readonly vertex1: IVec3; readonly vertex2: IVec3; readonly vertex3: IVec3; readonly vertex4: IVec3; reset(texture: Texture): this; /** * Set the sprite tint color * * @remarks * This will override any previously set alpha value */ tint(color: number | Color): this; /** * Sets the alpha value * * @remarks * If the sprite should receive a tint color, the `color()` must be called first. */ alpha(alpha: number): this; /** * Defines the source area in texture that is shown by this sprite * * @param x - starting x coordinate in texture * @param y - starting y cooridnate in texture * @param width - number of pixels hrizontally * @param height - number of pixels vertically * @param flipX - whether to flip texture on x axis * @param flipY - whether to flip texture on y axis */ source(x: number, y: number, width?: number, height?: number, flipX?: boolean, flipY?: boolean): this; /** * Flips x texture coordinates */ flipX(): this; /** * Flips y texture coordinates */ flipY(): this; /** * Defines the destination area in vieport where the sprite should be rendered * * @param x - the x position in pixels in viewport * @param y - the y position in pixels in viewport * @param width - the width in pixels in viewport * @param height - the height in pixels in viewport * * @remarks * This will only work if no custom projection matrix is used on the sprite batch. * When useing custom projection matrix consider the `transform*` methods instead. */ destination(x: number, y: number, width?: number, height?: number, depth?: number, angle?: number, pivotX?: number, pivotY?: number): this; transformMat4(m: Mat4): this; transformMat3(m: Mat3): this; transformQuat(q: Quat): this; } //# sourceMappingURL=Sprite.d.ts.map