Skip to content

Cannon.Misc.ComplexRadialGradient

y-lohse edited this page Dec 30, 2012 · 2 revisions

ComplexRadialGradient extends Gradient and inherits all its properties and functions. Only additional properties and functions are described here.

The complex radial gradient allows you to create a radial gradient who's 0 offset point is not necessarily the center of the gradient.

Properties

inner:Cannon.Math.Point2D

Center of the inner circle.

innerRadius:Float

The radius of the inner circle.

outer:Cannon.Math.Point2D

Center of the inner circle.

outerRadius:Float

The radius of the outer circle.

Functions

__construct:RadialGradient

Parameters

  • outerRadius:Float
  • outerX:Float
  • outerY:Float
  • innerRadius:Float
  • innerX:Float
  • innerY:Float

Description

Creates a new complex radial gradient. The gradients color stop at offset 0 will be at the center of the inner circle, and the colors will spread towards the outer circle.