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 objectfunction any object with ._realX and realY
activefunction a function to check if the light is on or not
r1number the radius of the inner circle for gradient
r2number the radius of the outer circle for gradient
clr1string the color in the center of the circle gradient, in hex ie: '#FFFFFF'
clr2string the color on the edge of the circle gradient, in hex
blendModestring the blend mode
-
static drawCircleMap(the, x, y, r1, r2, clr1, clr2, blendMode)
-
draw a circle on the light mask
Parameters:
Name Type Description thelightMask lightmask to target
xnumber the x cord of the center of the circle
ynumber the y cord of the center of the circle
r1number the radius of the inner circle for gradient
r2number the radius of the outer circle for gradient
clr1string the color in the center of the circle gradient, in hex ie: '#FFFFFF'
clr2string the color on the edge of the circle gradient, in hex
blendModestring the blend mode
-
static formatTint(red, green, blue, gray)
-
format a tint in rpg maker format
Parameters:
Name Type Description redint greenint blueint grayint Returns:
-formatted tint obj
-
static hidePlayer(ms)
-
make the player invisible for X frames or till turned back visible
Parameters:
Name Type Description msif 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 msif 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 namestring name of file in www/data/imgs/picture to display
idint the id of the picture to create (this is like the layer number of the layer in photoshop)
xint the x to show the image at
yint -
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 xthe percentage to zoom, ie: 1 = none, .1 = 10x out 10 = 10x in.