UNPKG

@awayjs/stage

Version:
34 lines 1.62 kB
import { BitmapImage2D } from '../image/BitmapImage2D'; import { BitmapImageCube } from '../image/BitmapImageCube'; import { Image2D } from '../image/Image2D'; import { ImageSampler } from '../image/ImageSampler'; import { IImageFactory } from '../factories/IImageFactory'; import { ImageCube } from '../image'; export declare class ImageUtils { private static CANVAS; private static CONTEXT; static MAX_SIZE: number; private static _defaultImage2DFactory; private static _defaultImageCubeFactory; private static _defaultImageSamplerFactory; private static _defaultFactory; private static _defaultImageSampler; private static _defaultImage2D; private static _defaultImageCube; private static getImageBuffer; /** * */ static imageToBitmapImage2D(img: HTMLImageElement | ImageBitmap, factory: IImageFactory, powerOfTwo?: boolean): BitmapImage2D; static isImage2DValid(image2D: Image2D): boolean; static isHTMLImageElementValid(image: HTMLImageElement): boolean; static isDimensionValid(d: number, powerOfTwo?: boolean): boolean; static isPowerOfTwo(value: number): boolean; static getBestPowerOf2(value: number): number; static getDefaultImage2D(): Image2D; static getDefaultImageCube(): ImageCube; static getDefaultImageSampler(): ImageSampler; static registerDefaults(defaultImage2DFactory?: () => BitmapImage2D, defaultImageCubeFactory?: () => BitmapImageCube, defaultImageSamplerFactory?: () => ImageSampler, defaultFactory?: () => IImageFactory): void; } export default ImageUtils; //# sourceMappingURL=ImageUtils.d.ts.map