laya-coreui-es
Version:
laya核心库、ui库es版本,剔除了媒体、TTF等功能。基于 LayaAir-release_2.12.0 修改
28 lines (27 loc) • 842 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DrawTexturesCmd = void 0;
const Pool_1 = require("../../utils/Pool");
class DrawTexturesCmd {
static create(texture, pos) {
var cmd = Pool_1.Pool.getItemByClass("DrawTexturesCmd", DrawTexturesCmd);
cmd.texture = texture;
texture._addReference();
cmd.pos = pos;
return cmd;
}
recover() {
this.texture._removeReference();
this.texture = null;
this.pos = null;
Pool_1.Pool.recover("DrawTexturesCmd", this);
}
run(context, gx, gy) {
context.drawTextures(this.texture, this.pos, gx, gy);
}
get cmdID() {
return DrawTexturesCmd.ID;
}
}
exports.DrawTexturesCmd = DrawTexturesCmd;
DrawTexturesCmd.ID = "DrawTextures";