Class Rotate
Extends
Group.
Rotate's a group around a given pivot point.
Defined in: Rotate.js.
// Simple Example - rotating an image 45 deg. Rotate({ x: 25, y: 20.5, angle: toRadians(45), content: [ Graphic({ url: "./images/beetleship.png" }) ] })
Constructor Attributes | Constructor Name and Description |
---|---|
Rotate(_details)
|
- Fields borrowed from class SceneContent:
- details
Method Attributes | Method Name and Description |
---|---|
rotate(_angle)
Sets this rotation's angle to the given amount.
|
|
rotateBy(_dangle)
Rotates this group by the given amount.
|
- Methods borrowed from class Group:
- addContent, getContent, updateGroup
- Methods borrowed from class SceneContent:
- draw, extend, getBounds, getName, getParent, getScene, getStage, isActive, isVisible, load, loadBase, moveBy, moveTo, setActive, setSize, setVisible, update, updateBase
Class Detail
Rotate(_details)
- Parameters:
- {Object} _details
- A JSON Object describing the rotation of a group
of content. The object may have these properties:
Property Required Default angle no 0 (Radians) pivot no The middle of this group, based on cumulative bounds.
Method Detail
rotate(_angle)
Sets this rotation's angle to the given amount.
- Parameters:
- _angle
- The angle this Rotation group starts at.
rotateBy(_dangle)
Rotates this group by the given amount. This method simply adds the
given delta angle to the starting angle.
- Parameters:
- _dangle
- The amount to rotate this group by.