# Two.Shape
Extends: Two.Element
The foundational transformation object for the Two.js scenegraph.
# renderer
Two.Shape.renderer
Object access to store relevant renderer specific variables. Warning: manipulating this object can create unintended consequences.
# position
Two.Shape.position
The x and y value for where the shape is placed relative to its parent.
# rotation
Two.Shape.rotation
The value in Number for how much the shape is rotated relative to its parent.
# skewX
Two.Shape.skewX
The value in Number for how much the shape is skewed relative to its parent.
Skew the shape by an angle in the x axis direction.
# skewY
Two.Shape.skewY
The value in Number for how much the shape is skewed relative to its parent.
Skew the shape by an angle in the y axis direction.
# addTo
Two.Shape.addTo
Argument | Description |
---|---|
group | The parent the shape adds itself to. |
Convenience method to add itself to the scenegraph.
# clone
Two.Shape.clone
Returns: Two.Shape
Argument | Description |
---|---|
parent | Optional argument to automatically add the shape to a scenegraph. |
Create a new Two.Shape with the same values as the current shape.
← Two.Element Two.Path →