@openhps/core
Version:
Open Hybrid Positioning System - Core component
47 lines (44 loc) • 1.31 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.CompressedCubeTexture = void 0;
var _constants = require("../constants.js");
var _CompressedTexture = require("./CompressedTexture.js");
/**
* Creates a cube texture based on data in compressed form.
*
* These texture are usually loaded with {@link CompressedTextureLoader}.
*
* @augments CompressedTexture
*/
class CompressedCubeTexture extends _CompressedTexture.CompressedTexture {
/**
* Constructs a new compressed texture.
*
* @param {Array<CompressedTexture>} images - An array of compressed textures.
* @param {number} [format=RGBAFormat] - The texture format.
* @param {number} [type=UnsignedByteType] - The texture type.
*/
constructor(images, format, type) {
super(undefined, images[0].width, images[0].height, format, type, _constants.CubeReflectionMapping);
/**
* This flag can be used for type testing.
*
* @type {boolean}
* @readonly
* @default true
*/
this.isCompressedCubeTexture = true;
/**
* This flag can be used for type testing.
*
* @type {boolean}
* @readonly
* @default true
*/
this.isCubeTexture = true;
this.image = images;
}
}
exports.CompressedCubeTexture = CompressedCubeTexture;