@awayjs/renderer
Version:
Renderer for AwayJS
59 lines (58 loc) • 1.72 kB
JavaScript
import { __extends } from "tslib";
import { AssetBase } from '@awayjs/core';
// import { MethodEvent } from '../events/MethodEvent';
/**
*
*/
var TextureBase = /** @class */ (function (_super) {
__extends(TextureBase, _super);
/**
*
*/
function TextureBase() {
var _this = _super.call(this) || this;
_this._numImages = 0;
_this._images = new Array();
_this._samplers = new Array();
return _this;
}
Object.defineProperty(TextureBase.prototype, "mappingMode", {
get: function () {
return this._mappingMode;
},
set: function (value) {
if (this._mappingMode == value)
return;
this._mappingMode = value;
},
enumerable: false,
configurable: true
});
TextureBase.prototype.getNumImages = function () {
return this._numImages;
};
TextureBase.prototype.setNumImages = function (value) {
if (this._numImages == value)
return;
this._numImages = value;
this._images.length = value;
this._samplers.length = value;
this.invalidate();
};
TextureBase.prototype.getImageAt = function (index) {
return this._images[index];
};
TextureBase.prototype.setImageAt = function (image, index) {
this._images[index] = image;
this.invalidate();
};
TextureBase.prototype.getSamplerAt = function (index) {
return this._samplers[index];
};
TextureBase.prototype.setSamplerAt = function (sampler, index) {
this._samplers[index] = sampler;
this.invalidate();
};
return TextureBase;
}(AssetBase));
export { TextureBase };