MCPcopy Create free account
hub / github.com/melonjs/melonJS / scale

Method scale

packages/melonjs/src/renderable/renderable.js:731–736  ·  view source on GitHub ↗

* scale the renderable around his anchor point. Scaling actually applies changes * to the currentTransform member which is used by the renderer to scale the object * when rendering. It does not scale the object itself. For example if the renderable * is an image, the image.width and image.h

(x, y = x, z = 1)

Source from the content-addressed store, hash-verified

729 * @returns {Renderable} Reference to this object for method chaining
730 */
731 scale(x, y = x, z = 1) {
732 this.currentTransform.scale(x, y, z);
733 this.updateBounds();
734 this.isDirty = true;
735 return this;
736 }
737
738 /**
739 * scale the renderable around his anchor point

Callers 3

scaleVMethod · 0.95
preDrawMethod · 0.45
drawMethod · 0.45

Calls 1

updateBoundsMethod · 0.95

Tested by

no test coverage detected