@awayjs/graphics
Version:
AwayJS graphics classes
25 lines (24 loc) • 944 B
JavaScript
import { __extends } from "tslib";
import { ParticleStateBase } from './ParticleStateBase';
/**
* ...
*/
var ParticleUVState = /** @class */ (function (_super) {
__extends(ParticleUVState, _super);
function ParticleUVState(animator, particleUVNode) {
var _this = _super.call(this, animator, particleUVNode) || this;
_this._particleUVNode = particleUVNode;
return _this;
}
ParticleUVState.prototype.setRenderState = function (shader, renderable, animationElements, animationRegisterData) {
if (!shader.usesUVTransform) {
var index = animationRegisterData.getRegisterIndex(this._pAnimationNode, ParticleUVState.UV_INDEX);
var data = this._particleUVNode._iUvData;
shader.setVertexConst(index, data.x, data.y);
}
};
/** @private */
ParticleUVState.UV_INDEX = 0;
return ParticleUVState;
}(ParticleStateBase));
export { ParticleUVState };