UNPKG

laya-coreui-es

Version:

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

22 lines (21 loc) 599 B
import { Pool } from "../../utils/Pool"; export class ScaleCmd { static create(scaleX, scaleY, pivotX, pivotY) { var cmd = Pool.getItemByClass("ScaleCmd", ScaleCmd); cmd.scaleX = scaleX; cmd.scaleY = scaleY; cmd.pivotX = pivotX; cmd.pivotY = pivotY; return cmd; } recover() { Pool.recover("ScaleCmd", this); } run(context, gx, gy) { context._scale(this.scaleX, this.scaleY, this.pivotX + gx, this.pivotY + gy); } get cmdID() { return ScaleCmd.ID; } } ScaleCmd.ID = "Scale";