UNPKG

laya-coreui-es

Version:

laya核心库、ui库es版本,剔除了媒体、TTF等功能。基于 LayaAir-release_2.12.0 修改

33 lines (32 loc) 1.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FillTextureCmd = void 0; const Pool_1 = require("../../utils/Pool"); class FillTextureCmd { static create(texture, x, y, width, height, type, offset, other) { var cmd = Pool_1.Pool.getItemByClass("FillTextureCmd", FillTextureCmd); cmd.texture = texture; cmd.x = x; cmd.y = y; cmd.width = width; cmd.height = height; cmd.type = type; cmd.offset = offset; cmd.other = other; return cmd; } recover() { this.texture = null; this.offset = null; this.other = null; Pool_1.Pool.recover("FillTextureCmd", this); } run(context, gx, gy) { context.fillTexture(this.texture, this.x + gx, this.y + gy, this.width, this.height, this.type, this.offset, this.other); } get cmdID() { return FillTextureCmd.ID; } } exports.FillTextureCmd = FillTextureCmd; FillTextureCmd.ID = "FillTexture";