mirror of
https://github.com/photonstorm/phaser
synced 2024-11-28 15:41:37 +00:00
const / enum
This commit is contained in:
parent
37589ffe00
commit
9f36b5e8b4
4 changed files with 35 additions and 16 deletions
|
@ -372,7 +372,7 @@ var Texture = new Class({
|
||||||
* @method Phaser.Textures.Texture#setFilter
|
* @method Phaser.Textures.Texture#setFilter
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {(Phaser.Textures.LINEAR|Phaser.Textures.NEAREST)} filterMode - The Filter Mode.
|
* @param {(Phaser.Textures.FilterMode.LINEAR|Phaser.Textures.FilterMode.NEAREST)} filterMode - The Filter Mode.
|
||||||
*/
|
*/
|
||||||
setFilter: function (filterMode)
|
setFilter: function (filterMode)
|
||||||
{
|
{
|
||||||
|
|
|
@ -164,7 +164,7 @@ var TextureSource = new Class({
|
||||||
* @method Phaser.Textures.TextureSource#setFilter
|
* @method Phaser.Textures.TextureSource#setFilter
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {(Phaser.Textures.LINEAR|Phaser.Textures.NEAREST)} filterMode - The Filter Mode.
|
* @param {(Phaser.Textures.FilterMode.LINEAR|Phaser.Textures.FilterMode.NEAREST)} filterMode - The Filter Mode.
|
||||||
*/
|
*/
|
||||||
setFilter: function (filterMode)
|
setFilter: function (filterMode)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,23 +4,28 @@
|
||||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter Types.
|
||||||
|
*
|
||||||
|
* @name Phaser.Textures.FilterMode
|
||||||
|
* @enum {integer}
|
||||||
|
* @memberOf Phaser.Textures
|
||||||
|
* @readOnly
|
||||||
|
* @since 3.0.0
|
||||||
|
*/
|
||||||
var CONST = {
|
var CONST = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Linear filter type.
|
* Linear filter type.
|
||||||
*
|
*
|
||||||
* @name Phaser.Textures.LINEAR
|
* @name Phaser.Textures.FilterMode.LINEAR
|
||||||
* @type {integer}
|
|
||||||
* @since 3.0.0
|
|
||||||
*/
|
*/
|
||||||
LINEAR: 0,
|
LINEAR: 0,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Nearest neighbor filter type.
|
* Nearest neighbor filter type.
|
||||||
*
|
*
|
||||||
* @name Phaser.Textures.NEAREST
|
* @name Phaser.Textures.FilterMode.NEAREST
|
||||||
* @type {integer}
|
|
||||||
* @since 3.0.0
|
|
||||||
*/
|
*/
|
||||||
NEAREST: 1
|
NEAREST: 1
|
||||||
|
|
||||||
|
|
|
@ -4,24 +4,38 @@
|
||||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
var Extend = require('../utils/object/Extend');
|
||||||
|
var FilterMode = require('./const');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @namespace Phaser.Textures
|
* @namespace Phaser.Textures
|
||||||
* @property {integer} LINEAR - Linear filter type.
|
*/
|
||||||
* @property {integer} NEAREST - Nearest neighbor filter type.
|
|
||||||
|
/**
|
||||||
|
* Linear filter type.
|
||||||
|
*
|
||||||
|
* @name Phaser.Textures.LINEAR
|
||||||
|
* @constant
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Nearest Neighbor filter type.
|
||||||
|
*
|
||||||
|
* @name Phaser.Textures.NEAREST
|
||||||
|
* @constant
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Textures = {
|
var Textures = {
|
||||||
|
|
||||||
Parsers: require('./parsers'),
|
FilterMode: FilterMode,
|
||||||
|
|
||||||
Frame: require('./Frame'),
|
Frame: require('./Frame'),
|
||||||
|
Parsers: require('./parsers'),
|
||||||
Texture: require('./Texture'),
|
Texture: require('./Texture'),
|
||||||
TextureManager: require('./TextureManager'),
|
TextureManager: require('./TextureManager'),
|
||||||
TextureSource: require('./TextureSource'),
|
TextureSource: require('./TextureSource')
|
||||||
|
|
||||||
LINEAR: 0,
|
|
||||||
NEAREST: 1
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Textures = Extend(false, Textures, FilterMode);
|
||||||
|
|
||||||
module.exports = Textures;
|
module.exports = Textures;
|
||||||
|
|
Loading…
Reference in a new issue