* Scale the Spine object around its anchor point. * @param {number} x - a number representing the abscissa of the scaling vector. * @param {number} [y=x] - a number representing the ordinate of the scaling vector. * @returns {Spine} Reference to this object for method chaining
(x, y = x)
| 302 | * @returns {Spine} Reference to this object for method chaining |
| 303 | */ |
| 304 | scale(x, y = x) { |
| 305 | if (this.isWebGL) { |
| 306 | // WebGL: SpineBatcher ignores currentTransform, scale through root bone |
| 307 | this.root.pose.scaleX *= x; |
| 308 | this.root.pose.scaleY *= y; |
| 309 | } |
| 310 | // Canvas: scale through currentTransform only (applied by preDraw), |
| 311 | // which scales both region bone transforms and mesh world vertices uniformly |
| 312 | return super.scale(x, y); |
| 313 | } |
| 314 | |
| 315 | /** |
| 316 | * Update the bounding box for this spine object. |
no outgoing calls
no test coverage detected