Members
-
texture to use for sprites (defaults to PIXI.Texture.WHITE)
Methods
-
arc (x0, y0, radius, start, end, tint, alpha)Pixelate
-
draw arc
Name Type Description x0
number x-start
y0
number y-start
radius
number radius
start
number angle (radians)
end
number angle (radians)
tint
number alpha
number Returns:
Type Description Pixelate -
circle (x0, y0, radius, tint, alpha)Pixelate
-
draw a pixelated circle from https://en.wikipedia.org/wiki/Midpoint_circle_algorithm
Name Type Description x0
number y0
number radius
number tint
number optional alpha
number optional Returns:
Type Description Pixelate -
draw and fill circle
Name Type Description x
number center
y
number center
radius
number tint
number alpha
number -
clear ()Pixelate
-
clear all graphics
Returns:
Type Description Pixelate -
ellipse (xc, yc, rx, ry, tint, alpha)Pixelate
-
draw a pixelated ellipse from http://cfetch.blogspot.tw/2014/01/wap-to-draw-ellipse-using-midpoint.html
Name Type Description xc
number center
yc
number center
rx
number radius x-axis
ry
number radius y-axis
tint
number alpha
number Returns:
Type Description Pixelate -
ellipseFill (xc, yc, rx, ry, tint)Pixelate
-
draw and fill ellipse
Name Type Description xc
number x-center
yc
number y-center
rx
number radius x-axis
ry
number radius y-axis
tint
number Returns:
Type Description Pixelate -
empties cache of old sprites
-
line (x0, y0, x1, y1, tint, alpha, lineWidth, lineDirection)Pixelate
-
draw a pixelated line between two points and move cursor to the second point
Name Type Description x0
number y0
number x1
number y1
number tint
number optional alpha
number optional lineWidth
number optional lineDirection
LineDirection optional Returns:
Type Description Pixelate -
lineStyle (width, tint, alpha, direction)Pixelate
-
set linestyle for pixelated layer NOTE: width only works for line() for now
Name Type Default Description width
number tint
number 0xffffff optional alpha
number 1 optional direction
LineDirection up optional (up, center, down)
Returns:
Type Description Pixelate -
lineTo (x, y)Pixelate
-
draw a pixelated line from the cursor position to this position
Name Type Description x
number y
number Returns:
Type Description Pixelate -
moveTo (x, y)Pixelate
-
move cursor to this location
Name Type Description x
number y
number Returns:
Type Description Pixelate -
point (x, y, tint, alpha)Pixelate
-
add a point using lineStyle or provided tint and alpha
Name Type Description x
number y
number tint
number optional alpha
number optional Returns:
Type Description Pixelate -
draw a list of points
Name Type Description points
Array.<number> | Array.<PIXI.Point> | Array.<PIXI.PointLike> tint
number alpha
number -
polygon (vertices, tint, alpha)Pixelate
-
draw a pixelated polygon
Name Type Description vertices
Array.<number> tint
number alpha
number Returns:
Type Description Pixelate -
polygonFill (vertices, tint, alpha)Pixelate
-
draw and fill pixelated polygon
Name Type Description vertices
Array.<number> tint
number alpha
number Returns:
Type Description Pixelate -
rect (x, y, width, height, tint, alpha)Pixelate
-
draw the outline of a rect
Name Type Description x
number y
number width
number height
number tint
number alpha
number Returns:
Type Description Pixelate -
rectFill (x, y, width, height, tint, alpha)Pixelate
-
draw and fill rectangle
Name Type Description x
number y
number width
number height
number tint
number optional alpha
number optional Returns:
Type Description Pixelate