UNPKG

@awayjs/renderer

Version:
38 lines (37 loc) 1.17 kB
import { __extends } from "tslib"; import { EventBase } from '@awayjs/core'; var MaterialEvent = /** @class */ (function (_super) { __extends(MaterialEvent, _super); /** * Create a new GraphicsEvent * @param type The event type. * @param dataType An optional data type of the vertex data being updated. */ function MaterialEvent(type, material) { var _this = _super.call(this, type) || this; _this._material = material; return _this; } Object.defineProperty(MaterialEvent.prototype, "material", { /** * The material of the renderable. */ get: function () { return this._material; }, enumerable: false, configurable: true }); /** * Clones the event. * * @return An exact duplicate of the current object. */ MaterialEvent.prototype.clone = function () { return new MaterialEvent(this.type, this._material); }; MaterialEvent.INVALIDATE_TEXTURES = 'invalidateTextures'; MaterialEvent.INVALIDATE_PASSES = 'invalidatePasses'; return MaterialEvent; }(EventBase)); export { MaterialEvent };