API Docs for: 0.1.0
Show:

CG.Translate Class

Extends CG.Class
Module: CG

CG.Translate moving a object

Methods

init

()

Returns:

:

initBezier

(
  • options
)
This

Parameters:

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

(
  • options
)
This

Options: object {object} centerpoint {CG.Point} radius1 {number} radius {number} startangle {number} rotation {number}

Parameters:

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

(
  • options
)
This

Options: object {object} steps {number} startpoint {CG.Point} endpoint {CG.Point}

Parameters:

Returns:

This:

reset

()

update

()