The ScaleMode Component has been removed from every Game Object, and along with it the scaleMode property and setScaleMode method. These did nothing anyway as they were not hooked to the render pipeline and scale mode should be set on the texture, not the Game Object. Fix #4413

This commit is contained in:
Richard Davey 2019-03-24 23:07:27 +00:00
parent a85e6283ec
commit e017691c68
22 changed files with 1 additions and 96 deletions

View file

@ -66,6 +66,7 @@ Notes:
* The return from the `ScenePlugin.add` method has changed. Previously, it would return the ScenePlugin, but now it returns a reference to the Scene that was added to the Scene Manager, keeping it in-line with all other `add` methods in the API. Fix #4359 (thanks @BigZaphod)
* The `PluginManager.installScenePlugin` method has a new optional boolean parameter `fromLoader` which controls if the plugin is coming in from the result of a Loader operation or not. If it is, it no longer throws a console warning if the plugin already exists. This fixes an issue where if you return to a Scene that loads a Scene Plugin it would throw a warning and then not install the plugin to the Scene.
* The Scale Manager has a new event `FULLSCREEN_FAILED` which is fired if you try to enter fullscreen mode, but the browser rejects it for some reason.
* The `ScaleMode` Component has been removed from every Game Object, and along with it the `scaleMode` property and `setScaleMode` method. These did nothing anyway as they were not hooked to the render pipeline and scale mode should be set on the texture, not the Game Object. Fix #4413 (thanks @jcyuan)
### Bug Fixes

View file

@ -45,7 +45,6 @@ var Render = require('./BitmapTextRender');
* @extends Phaser.GameObjects.Components.Mask
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Texture
* @extends Phaser.GameObjects.Components.Tint
@ -71,7 +70,6 @@ var BitmapText = new Class({
Components.Mask,
Components.Origin,
Components.Pipeline,
Components.ScaleMode,
Components.ScrollFactor,
Components.Texture,
Components.Tint,

View file

@ -46,7 +46,6 @@ var List = require('../../structs/List');
* @extends Phaser.GameObjects.Components.Depth
* @extends Phaser.GameObjects.Components.Mask
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Size
* @extends Phaser.GameObjects.Components.Texture
@ -69,7 +68,6 @@ var Blitter = new Class({
Components.Depth,
Components.Mask,
Components.Pipeline,
Components.ScaleMode,
Components.ScrollFactor,
Components.Size,
Components.Texture,

View file

@ -1,65 +0,0 @@
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var ScaleModes = require('../../renderer/ScaleModes');
/**
* Provides methods used for getting and setting the scale of a Game Object.
*
* @namespace Phaser.GameObjects.Components.ScaleMode
* @since 3.0.0
*/
var ScaleMode = {
_scaleMode: ScaleModes.DEFAULT,
/**
* The Scale Mode being used by this Game Object.
* Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`.
*
* @name Phaser.GameObjects.Components.ScaleMode#scaleMode
* @type {Phaser.ScaleModes}
* @since 3.0.0
*/
scaleMode: {
get: function ()
{
return this._scaleMode;
},
set: function (value)
{
if (value === ScaleModes.LINEAR || value === ScaleModes.NEAREST)
{
this._scaleMode = value;
}
}
},
/**
* Sets the Scale Mode being used by this Game Object.
* Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`.
*
* @method Phaser.GameObjects.Components.ScaleMode#setScaleMode
* @since 3.0.0
*
* @param {Phaser.ScaleModes} value - The Scale Mode to be used by this Game Object.
*
* @return {this} This Game Object instance.
*/
setScaleMode: function (value)
{
this.scaleMode = value;
return this;
}
};
module.exports = ScaleMode;

View file

@ -21,7 +21,6 @@ module.exports = {
Mask: require('./Mask'),
Origin: require('./Origin'),
Pipeline: require('./Pipeline'),
ScaleMode: require('./ScaleMode'),
ScrollFactor: require('./ScrollFactor'),
Size: require('./Size'),
Texture: require('./Texture'),

View file

@ -38,7 +38,6 @@ var ExternRender = require('./ExternRender');
* @extends Phaser.GameObjects.Components.Depth
* @extends Phaser.GameObjects.Components.Flip
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Size
* @extends Phaser.GameObjects.Components.Texture
@ -58,7 +57,6 @@ var Extern = new Class({
Components.Depth,
Components.Flip,
Components.Origin,
Components.ScaleMode,
Components.ScrollFactor,
Components.Size,
Components.Texture,

View file

@ -32,7 +32,6 @@ var ImageRender = require('./ImageRender');
* @extends Phaser.GameObjects.Components.Mask
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Size
* @extends Phaser.GameObjects.Components.TextureCrop
@ -59,7 +58,6 @@ var Image = new Class({
Components.Mask,
Components.Origin,
Components.Pipeline,
Components.ScaleMode,
Components.ScrollFactor,
Components.Size,
Components.TextureCrop,

View file

@ -26,7 +26,6 @@ var NOOP = require('../../utils/NOOP');
* @extends Phaser.GameObjects.Components.GetBounds
* @extends Phaser.GameObjects.Components.Mask
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.Size
* @extends Phaser.GameObjects.Components.Texture
* @extends Phaser.GameObjects.Components.Transform
@ -53,7 +52,6 @@ var Mesh = new Class({
Components.GetBounds,
Components.Mask,
Components.Pipeline,
Components.ScaleMode,
Components.Size,
Components.Texture,
Components.Transform,

View file

@ -44,7 +44,6 @@ var UUID = require('../../utils/string/UUID');
* @extends Phaser.GameObjects.Components.Mask
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Tint
* @extends Phaser.GameObjects.Components.Transform
@ -71,7 +70,6 @@ var RenderTexture = new Class({
Components.Mask,
Components.Origin,
Components.Pipeline,
Components.ScaleMode,
Components.ScrollFactor,
Components.Tint,
Components.Transform,

View file

@ -28,7 +28,6 @@ var Line = require('../../geom/line/Line');
* @extends Phaser.GameObjects.Components.Mask
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Transform
* @extends Phaser.GameObjects.Components.Visible
@ -50,7 +49,6 @@ var Shape = new Class({
Components.Mask,
Components.Origin,
Components.Pipeline,
Components.ScaleMode,
Components.ScrollFactor,
Components.Transform,
Components.Visible

View file

@ -35,7 +35,6 @@ var SpriteRender = require('./SpriteRender');
* @extends Phaser.GameObjects.Components.Mask
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Size
* @extends Phaser.GameObjects.Components.TextureCrop
@ -62,7 +61,6 @@ var Sprite = new Class({
Components.Mask,
Components.Origin,
Components.Pipeline,
Components.ScaleMode,
Components.ScrollFactor,
Components.Size,
Components.TextureCrop,

View file

@ -72,7 +72,6 @@ var TextStyle = require('../TextStyle');
* @extends Phaser.GameObjects.Components.Mask
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Tint
* @extends Phaser.GameObjects.Components.Transform
@ -99,7 +98,6 @@ var Text = new Class({
Components.Mask,
Components.Origin,
Components.Pipeline,
Components.ScaleMode,
Components.ScrollFactor,
Components.Tint,
Components.Transform,

View file

@ -56,7 +56,6 @@ var _FLAG = 8; // 1000
* @extends Phaser.GameObjects.Components.Mask
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Tint
* @extends Phaser.GameObjects.Components.Transform
@ -85,7 +84,6 @@ var TileSprite = new Class({
Components.Mask,
Components.Origin,
Components.Pipeline,
Components.ScaleMode,
Components.ScrollFactor,
Components.Tint,
Components.Transform,

View file

@ -36,7 +36,6 @@ var RectangleContains = require('../../geom/rectangle/Contains');
* @extends Phaser.GameObjects.Components.Depth
* @extends Phaser.GameObjects.Components.GetBounds
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.Transform
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Visible
@ -55,7 +54,6 @@ var Zone = new Class({
Components.Depth,
Components.GetBounds,
Components.Origin,
Components.ScaleMode,
Components.Transform,
Components.ScrollFactor,
Components.Visible

View file

@ -40,7 +40,6 @@ var Image = require('../../gameobjects/image/Image');
* @extends Phaser.GameObjects.Components.GetBounds
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Size
* @extends Phaser.GameObjects.Components.Texture

View file

@ -41,7 +41,6 @@ var Sprite = require('../../gameobjects/sprite/Sprite');
* @extends Phaser.GameObjects.Components.GetBounds
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Size
* @extends Phaser.GameObjects.Components.Texture

View file

@ -42,7 +42,6 @@ var Image = require('../../gameobjects/image/Image');
* @extends Phaser.GameObjects.Components.GetBounds
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Size
* @extends Phaser.GameObjects.Components.Texture

View file

@ -45,7 +45,6 @@ var Sprite = require('../../gameobjects/sprite/Sprite');
* @extends Phaser.GameObjects.Components.GetBounds
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Size
* @extends Phaser.GameObjects.Components.Texture

View file

@ -46,7 +46,6 @@ var Vector2 = require('../../math/Vector2');
* @extends Phaser.GameObjects.Components.GetBounds
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Size
* @extends Phaser.GameObjects.Components.Texture

View file

@ -50,7 +50,6 @@ var Vector2 = require('../../math/Vector2');
* @extends Phaser.GameObjects.Components.GetBounds
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Size
* @extends Phaser.GameObjects.Components.Texture

View file

@ -35,7 +35,6 @@ var TilemapComponents = require('../components');
* @extends Phaser.GameObjects.Components.GetBounds
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Transform
* @extends Phaser.GameObjects.Components.Visible

View file

@ -37,7 +37,6 @@ var Utils = require('../../renderer/webgl/Utils');
* @extends Phaser.GameObjects.Components.GetBounds
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.Transform
* @extends Phaser.GameObjects.Components.Visible
* @extends Phaser.GameObjects.Components.ScrollFactor