pixi.js
Version:
<p align="center"> <a href="https://pixijs.com" target="_blank" rel="noopener noreferrer"> <img height="150" src="https://files.pixijs.download/branding/pixijs-logo-transparent-dark.svg?v=1" alt="PixiJS logo"> </a> </p> <br/> <p align="center">
26 lines (25 loc) • 948 B
TypeScript
import { TextureSource } from './TextureSource';
import type { ExtensionMetadata } from '../../../../../extensions/Extensions';
import type { TypedArray } from '../../buffer/Buffer';
import type { TextureSourceOptions } from './TextureSource';
/**
* Options for creating a BufferImageSource.
* @category rendering
* @advanced
*/
export interface BufferSourceOptions extends TextureSourceOptions<TypedArray | ArrayBuffer> {
width: number;
height: number;
}
/**
* A texture source that uses a TypedArray or ArrayBuffer as its resource.
* It automatically determines the format based on the type of TypedArray provided.
* @category rendering
* @advanced
*/
export declare class BufferImageSource extends TextureSource<TypedArray | ArrayBuffer> {
static extension: ExtensionMetadata;
uploadMethodId: string;
constructor(options: BufferSourceOptions);
static test(resource: any): resource is TypedArray | ArrayBuffer;
}