The api for screen effects. IE: filters, screen shake, etc...
Methods
-
static addLightObject(object, active, r1, r2, clr1, clr2, blendMode)
-
add a game object to the list of tracked lights
Parameters:
Name Type Description object
function any object with ._realX and realY
active
function a function to check if the light is on or not
r1
number the radius of the inner circle for gradient
r2
number the radius of the outer circle for gradient
clr1
string the color in the center of the circle gradient, in hex ie: '#FFFFFF'
clr2
string the color on the edge of the circle gradient, in hex
blendMode
string the blend mode
-
static drawCircleMap(the, x, y, r1, r2, clr1, clr2, blendMode)
-
draw a circle on the light mask
Parameters:
Name Type Description the
lightMask lightmask to target
x
number the x cord of the center of the circle
y
number the y cord of the center of the circle
r1
number the radius of the inner circle for gradient
r2
number the radius of the outer circle for gradient
clr1
string the color in the center of the circle gradient, in hex ie: '#FFFFFF'
clr2
string the color on the edge of the circle gradient, in hex
blendMode
string the blend mode
-
static formatTint(red, green, blue, gray)
-
format a tint in rpg maker format
Parameters:
Name Type Description red
int green
int blue
int gray
int Returns:
-formatted tint obj
-
static hidePlayer(ms)
-
make the player invisible for X frames or till turned back visible
Parameters:
Name Type Description ms
if provided turn the player inviable for this many milliseconds, else just leave them invisible till turned visible by something else
-
static lockPlayer(ms)
-
lock player controls for x milliseconds or till turned back on
Parameters:
Name Type Description ms
if provided the player will be unable to act for this many milliseconds, else unable to act till reenabled elsewhere
-
static showImage(name, id, x, y)
-
displays www/data/imgs/picture/name
Parameters:
Name Type Description name
string name of file in www/data/imgs/picture to display
id
int the id of the picture to create (this is like the layer number of the layer in photoshop)
x
int the x to show the image at
y
int -
static showPlayer()
-
make the player visible again if they were invisible
-
static unlockPlayer()
-
allow the player to input and stuff again
-
static zoom(x)
-
a function to zoom in or out focused on the charecter in the middle of the screen
Parameters:
Name Type Description x
the percentage to zoom, ie: 1 = none, .1 = 10x out 10 = 10x in.