CG.Translate Class
CG.Translate moving a object
Item Index
Methods
draw
()
init
()
Returns:
:
initBezier
(
This
-
options
Parameters:
-
options
Object
Returns:
This:
Example:
var t = new CG.Translate()
t.initBezier({
object: spr1,
steps: 10,
startPoint: new CG.Point(320, 160),
endPoint: new CG.Point(0, 10),
control1: new CG.Point(340, 180),
control2: new CG.Point(0, 0)
})
initOval
(
This
-
options
Options: object {object} centerpoint {CG.Point} radius1 {number} radius {number} startangle {number} rotation {number}
Parameters:
-
options
Object
Returns:
This:
Example:
var t = new CG.Translate()
t.initOval({
object: spr1,
centerPoint: new CG.Point(320, 160),
radius1: 50,
radius2: 50,
startangle: 90,
rotation: 5
})
initTween
(
This
-
options
Options: object {object} steps {number} startpoint {CG.Point} endpoint {CG.Point}
Parameters:
-
options
Object
Returns:
This: