UNPKG

@xeokit/xeokit-convert

Version:

JavaScript utilities to create .XKT files

118 lines (117 loc) 2.77 kB
export class XKTTexture { /** * @private */ private constructor(); /** * Unique ID of this XKTTexture in {@link XKTModel#textures}. * * @type {Number} */ textureId: number; /** * Index of this XKTTexture in {@link XKTModel#texturesList}; * * @type {Number} */ textureIndex: number; /** * Texture image data. * * @type {Buffer} */ imageData: Buffer; /** * Which material channel this texture is applied to, as determined by its {@link XKTTextureSet}s. * * @type {Number} */ channel: number; /** * Width of this XKTTexture. * * @type {Number} */ width: number; /** * Height of this XKTTexture. * * @type {Number} */ height: number; /** * Texture file source. * * @type {String} */ src: string; /** * Whether this XKTTexture is to be compressed. * * @type {Boolean} */ compressed: boolean; /** * Media type of this XKTTexture. * * Supported values are {@link GIFMediaType}, {@link PNGMediaType} and {@link JPEGMediaType}. * * Ignored for compressed textures. * * @type {Number} */ mediaType: number; /** * How the texture is sampled when a texel covers less than one pixel. Supported values * are {@link LinearMipmapLinearFilter}, {@link LinearMipMapNearestFilter}, * {@link NearestMipMapNearestFilter}, {@link NearestMipMapLinearFilter} * and {@link LinearMipMapLinearFilter}. * * Ignored for compressed textures. * * @type {Number} */ minFilter: number; /** * How the texture is sampled when a texel covers more than one pixel. Supported values * are {@link LinearFilter} and {@link NearestFilter}. * * Ignored for compressed textures. * * @type {Number} */ magFilter: number; /** * S wrapping mode. * * Supported values are {@link ClampToEdgeWrapping}, * {@link MirroredRepeatWrapping} and {@link RepeatWrapping}. * * Ignored for compressed textures. * * @type {Number} */ wrapS: number; /** * T wrapping mode. * * Supported values are {@link ClampToEdgeWrapping}, * {@link MirroredRepeatWrapping} and {@link RepeatWrapping}. * * Ignored for compressed textures. * * @type {Number} */ wrapT: number; /** * R wrapping mode. * * Ignored for compressed textures. * * Supported values are {@link ClampToEdgeWrapping}, * {@link MirroredRepeatWrapping} and {@link RepeatWrapping}. * * @type {*|number} */ wrapR: any | number; }