2023-02-13 21:21:18 +00:00
|
|
|
/**
|
|
|
|
* @author Richard Davey <rich@photonstorm.com>
|
|
|
|
* @copyright 2013-2023 Photon Storm Ltd.
|
|
|
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
|
|
|
*/
|
|
|
|
|
|
|
|
var BaseFX = require('./BaseFX');
|
2023-02-16 23:49:14 +00:00
|
|
|
var Class = require('../utils/Class');
|
2023-02-13 21:21:18 +00:00
|
|
|
var FX_CONST = require('./const');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @classdesc
|
|
|
|
*
|
|
|
|
* @class Vignette
|
2023-02-16 23:49:14 +00:00
|
|
|
* @extends Phaser.FX.BaseFX
|
|
|
|
* @memberof Phaser.FX
|
2023-02-13 21:21:18 +00:00
|
|
|
* @constructor
|
|
|
|
* @since 3.60.0
|
|
|
|
*
|
|
|
|
* @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.
|
|
|
|
*/
|
|
|
|
var Vignette = new Class({
|
|
|
|
|
|
|
|
Extends: BaseFX,
|
|
|
|
|
|
|
|
initialize:
|
|
|
|
|
2023-02-16 18:50:42 +00:00
|
|
|
function Vignette (gameObject, x, y, radius, strength)
|
2023-02-13 21:21:18 +00:00
|
|
|
{
|
2023-02-16 18:50:42 +00:00
|
|
|
if (x === undefined) { x = 0.5; }
|
|
|
|
if (y === undefined) { y = 0.5; }
|
|
|
|
if (radius === undefined) { radius = 0.5; }
|
|
|
|
if (strength === undefined) { strength = 0.5; }
|
|
|
|
|
2023-02-13 21:21:18 +00:00
|
|
|
BaseFX.call(this, FX_CONST.VIGNETTE, gameObject);
|
|
|
|
|
2023-02-16 18:50:42 +00:00
|
|
|
this.x = x;
|
|
|
|
this.y = y;
|
|
|
|
this.radius = radius;
|
|
|
|
this.strength = strength;
|
2023-02-13 21:21:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = Vignette;
|