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

Method rotate

packages/melonjs/src/renderable/renderable.js:711–718  ·  view source on GitHub ↗

* Rotate this renderable by the specified angle (in radians). * When called with just an angle, rotates around the Z axis (2D rotation). * When called with an angle and a Vector3d axis, rotates around that axis in 3D. * @param {number} angle - The angle to rotate (in radians) * @param {Vecto

(angle, v)

Source from the content-addressed store, hash-verified

709 * @returns {Renderable} Reference to this object for method chaining
710 */
711 rotate(angle, v) {
712 if (angle !== 0) {
713 this.currentTransform.rotate(angle, v);
714 this.updateBounds();
715 this.isDirty = true;
716 }
717 return this;
718 }
719
720 /**
721 * scale the renderable around his anchor point. Scaling actually applies changes

Callers 4

lookAtMethod · 0.95
drawMethod · 0.45
constructorMethod · 0.45
drawMethod · 0.45

Calls 1

updateBoundsMethod · 0.95

Tested by

no test coverage detected