UNPKG

laya-coreui-es

Version:

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

25 lines (24 loc) 702 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RotateCmd = void 0; const Pool_1 = require("../../utils/Pool"); class RotateCmd { static create(angle, pivotX, pivotY) { var cmd = Pool_1.Pool.getItemByClass("RotateCmd", RotateCmd); cmd.angle = angle; cmd.pivotX = pivotX; cmd.pivotY = pivotY; return cmd; } recover() { Pool_1.Pool.recover("RotateCmd", this); } run(context, gx, gy) { context._rotate(this.angle, this.pivotX + gx, this.pivotY + gy); } get cmdID() { return RotateCmd.ID; } } exports.RotateCmd = RotateCmd; RotateCmd.ID = "Rotate";