@awayjs/graphics
Version:
AwayJS graphics classes
29 lines • 1.03 kB
TypeScript
import { Point, Rectangle } from '@awayjs/core';
import { BitmapImage2D } from '@awayjs/stage';
import { GradientFillStyle } from '../draw/fills/GradientFillStyle';
import { IMaterial } from '@awayjs/renderer';
export interface ITextureAtlasEntry {
material?: IMaterial;
bitmap?: BitmapImage2D;
colorPos?: Point;
uvRectangle?: Rectangle;
}
export declare class TextureAtlas {
private static _allTextureAtlas;
private static _allGradients;
private static _allColors;
static clearAllMaterials(): void;
static getTextureForColor(color: number, alpha: number): ITextureAtlasEntry;
static getTextureForGradient(gradient: GradientFillStyle): any;
availableRows: number;
gradientRow: number;
colorRow: number;
colorPosition: number;
bitmap: BitmapImage2D;
constructor();
fitGradient(): boolean;
fitColor(): boolean;
addGradient(gradient: GradientFillStyle): number;
addColor(color: number, alpha?: number): Point;
}
//# sourceMappingURL=TextureAtlas.d.ts.map