/** * Alias type for number that are floats * @ignorenaming */ export type float = number; /** * Alias type for number that are doubles. * @ignorenaming */ export type double = number; /** * Alias type for number that are integer * @ignorenaming */ export type int = number; /** * Empty */ export type Empty = []; /** * Nullable type */ export type Nullable = T | null; type _Tuple = R["length"] extends N ? R : _Tuple; /** * Creates a tuple of T with length N */ export type Tuple = _Tuple; /** * Type of vertex data array */ export type VertexData = ArrayBufferView & { length: number; }; /** * Type of shader's defines */ export type ShaderDefineType = boolean | number | string; /** * @internal */ export interface IPoint2Like { x: float; y: float; get data(): float[]; } /** * @internal */ export interface IPoint3Like extends IPoint2Like { z: float; } /** * @internal */ export interface IVector2Like { x: float; y: float; get data(): float[]; } /** * @internal */ export interface IVector3Like extends IVector2Like { z: float; } /** * @internal */ export interface IVector4Like extends IVector3Like { w: float; } /** * @internal */ export interface IQuaternionLike extends IVector3Like { w: float; } /** * @internal */ export interface IMatrix4Like { get data(): float[]; } /** * @internal */ export interface IColor3Like { r: float; g: float; b: float; } /** * @internal */ export interface IColor4Like extends IColor3Like { a: float; } /** * @internal */ export interface IRenderingFloatData { get renderingData(): Float32Array; } /** * @internal */ export interface IRenderingIntData { get renderingData(): Int32Array; } /** * Alias type for image sources */ export type ImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | OffscreenCanvas; /** * Interface for the size containing width and height */ export interface ISize { /** * Width */ width: number; /** * Height */ height: number; } /** * Type used to define a texture size (either with a number or with a rect width and height) */ export type TextureSize = number | { width: number; height: number; depth?: number; layers?: number; }; export {};