import { Utils } from '../common/Utils';
import { BaseTexture } from './BaseTexture';
/**
* @class BaseStaticTexture
* The base static texture resource.
* @memberof THING
*/
class BaseStaticTexture extends BaseTexture {
/**
* The base static texture means we can not change any attributes of it in runtime(only use the initial attributes).
* @param {Object} param The initial parameters.
*/
constructor(param = {}) {
param = Object.assign({}, param); // Static image can not enable generateMipmaps.
param['generateMipmaps'] = false;
super(param);
}
// #region Accessors
/**
* Get the color format.
* @type {Number}
*/
get colorFormat() {
return super.colorFormat;
}
set colorFormat(value) {
Utils.error(`Set colorFormat failed, due to can not change it at runtime`);
}
/**
* Get the anisotropy.
* @type {Number}
*/
get anisotropy() {
return super.anisotropy;
}
set anisotropy(value) {
Utils.error(`Set anisotropy failed, due to can not change it at runtime`);
}
/**
* Get the wrap type.
* @type {ImageWrapType}
*/
get wrapType() {
return super.wrapType;
}
set wrapType(value) {
Utils.error(`Set wrapType failed, due to can not change it at runtime`);
}
/**
* Get the mappingType type.
* @type {ImageMappingType}
*/
get mappingType() {
return super.mappingType;
}
set mappingType(value) {
Utils.error(`Set mappingType failed, due to can not change it at runtime`);
}
/**
* Get the min filter type.
* @type {ImageFilterType}
*/
get minFilterType() {
return super.minFilterType;
}
set minFilterType(value) {
Utils.error(`Set minFilterType failed, due to can not change it at runtime`);
}
/**
* Get the mag filter type.
* @type {ImageFilterType}
*/
get magFilterType() {
return super.magFilterType;
}
set magFilterType(value) {
Utils.error(`Set magFilterType failed, due to can not change it at runtime`);
}
/**
* Get flipY.
* @type {Boolean}
*/
get flipY() {
return super.flipY;
}
set flipY(value) {
Utils.error(`Set flipY failed, due to can not change it at runtime`);
}
/**
* Get premultiply alpha.
* @type {Boolean}
*/
get premultiplyAlpha() {
return super.premultiplyAlpha;
}
set premultiplyAlpha(value) {
Utils.error(`Set premultiplyAlpha failed, due to can not change it at runtime`);
}
/**
* Check generate mipmaps.
* @type {Boolean}
*/
get generateMipmaps() {
return super.generateMipmaps;
}
set generateMipmaps(value) {
Utils.error(`Set generateMipmaps failed, due to can not change it at runtime`);
}
/**
* Check class type.
* @type {Boolean}
*/
get isBaseStaticTexture() {
return true;
}
// #endregion
}
export { BaseStaticTexture }