Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "format"

Index

Variables

Const ABGR8888

ABGR8888: PackedFormat = defPackedFormat({type: Type.U32,size: 32,alpha: 8,channels: [{ size: 8, lane: Lane.ALPHA },{ size: 8, lane: Lane.BLUE },{ size: 8, lane: Lane.GREEN },{ size: 8, lane: Lane.RED },],fromABGR: (x) => x,toABGR: (x) => x,})

Const ALPHA8

ALPHA8: PackedFormat = defPackedFormat({type: Type.U8,size: 8,alpha: 8,channels: [{ size: 8, lane: 0 }],})

Const ARGB1555

ARGB1555: PackedFormat = defPackedFormat({type: Type.U16,size: 16,alpha: 1,channels: [{ size: 1, lane: Lane.ALPHA },{ size: 5, lane: Lane.RED },{ size: 5, lane: Lane.GREEN },{ size: 5, lane: Lane.BLUE },],})

Const ARGB4444

ARGB4444: PackedFormat = defPackedFormat({type: Type.U16,size: 16,alpha: 4,channels: [{ size: 4, lane: Lane.ALPHA },{ size: 4, lane: Lane.RED },{ size: 4, lane: Lane.GREEN },{ size: 4, lane: Lane.BLUE },],})

Const ARGB8888

ARGB8888: PackedFormat = defPackedFormat({type: Type.U32,size: 32,alpha: 8,channels: [{ size: 8, lane: Lane.ALPHA },{ size: 8, lane: Lane.RED },{ size: 8, lane: Lane.GREEN },{ size: 8, lane: Lane.BLUE },],})

Const BGR888

BGR888: PackedFormat = defPackedFormat({type: Type.U32,size: 24,channels: [{ size: 8, lane: Lane.BLUE },{ size: 8, lane: Lane.GREEN },{ size: 8, lane: Lane.RED },],fromABGR: (x) => x & 0xffffff,toABGR: (x) => 0xff000000 | x,})

Const FLOAT_GRAY

FLOAT_GRAY: FloatFormat = defFloatFormat({gray: true,channels: [Lane.RED],})

Const FLOAT_GRAY_ALPHA

FLOAT_GRAY_ALPHA: FloatFormat = defFloatFormat({gray: true,alpha: true,channels: [Lane.RED, Lane.ALPHA],})

Const FLOAT_RGB

FLOAT_RGB: FloatFormat = defFloatFormat({channels: [Lane.RED, Lane.GREEN, Lane.BLUE],})

Const FLOAT_RGBA

FLOAT_RGBA: FloatFormat = defFloatFormat({alpha: true,channels: [Lane.RED, Lane.GREEN, Lane.BLUE, Lane.ALPHA],})

Const GRAY16

GRAY16: PackedFormat = defPackedFormat({type: Type.U16,size: 16,channels: [{ size: 16, lane: Lane.RED }],fromABGR: (x) => ((luminanceABGR(x) + 0.5) | 0) * 0x0101,toABGR: (x) => (0xff000000 | ((x >>> 8) * 0x010101)) >>> 0,})

Const GRAY8

GRAY8: PackedFormat = defPackedFormat({type: Type.U8,size: 8,channels: [{ size: 8, lane: Lane.RED }],fromABGR: (x) => luminanceABGR(x),toABGR: (x) => (0xff000000 | ((x & 0xff) * 0x010101)) >>> 0,})

Const GRAY_ALPHA16

GRAY_ALPHA16: PackedFormat = defPackedFormat({type: Type.U32,size: 32,channels: [{ size: 8, lane: Lane.ALPHA },{ size: 16, lane: Lane.RED },],fromABGR: (x) =>(((luminanceABGR(x) + 0.5) | 0) * 0x0101) |(((x >>> 8) & 0xff0000) * 0x0101),toABGR: (x) => ((x & 0xff000000) | (((x >>> 8) & 0xff) * 0x010101)) >>> 0,})

Const GRAY_ALPHA8

GRAY_ALPHA8: PackedFormat = defPackedFormat({type: Type.U16,size: 16,alpha: 8,channels: [{ size: 8, lane: Lane.ALPHA },{ size: 8, lane: Lane.RED },],fromABGR: (x) => luminanceABGR(x) | ((x >>> 16) & 0xff00),toABGR: (x) => (((x & 0xff00) << 16) | ((x & 0xff) * 0x010101)) >>> 0,})

Const RGB565

RGB565: PackedFormat = defPackedFormat({type: Type.U16,size: 16,channels: [{ size: 5, lane: Lane.RED },{ size: 6, lane: Lane.GREEN },{ size: 5, lane: Lane.BLUE },],})

Const RGB888

RGB888: PackedFormat = defPackedFormat({type: Type.U32,size: 24,channels: [{ size: 8, lane: Lane.RED },{ size: 8, lane: Lane.GREEN },{ size: 8, lane: Lane.BLUE },],})

Functions

Const defChannel

Const defFloatFormat

Const defPackedFormat

Generated using TypeDoc