The Mesh.setAlpha method has been restored, even though it's empty and does nothing, to prevent runtime errors when adding a Mesh or Quad object to a Container. Fix #4338 #4343

This commit is contained in:
Richard Davey 2019-02-06 23:36:05 +00:00
parent b09fa3f10e
commit 05e3520048
2 changed files with 13 additions and 1 deletions

View file

@ -2,7 +2,9 @@
## Version 3.17.0 - Togusa - in development
### Bug Fixes
* The `Mesh.setAlpha` method has been restored, even though it's empty and does nothing, to prevent runtime errors when adding a Mesh or Quad object to a Container. Fix #4338 #4343 (thanks @pfdtravalmatic @charmingny)

View file

@ -8,6 +8,7 @@ var Class = require('../../utils/Class');
var Components = require('../components');
var GameObject = require('../GameObject');
var MeshRender = require('./MeshRender');
var NOOP = require('../../utils/NOOP');
/**
* @classdesc
@ -152,7 +153,16 @@ var Mesh = new Class({
this.setPosition(x, y);
this.setSizeToFrame();
this.initPipeline();
}
},
/**
* This method is left intentionally empty and does not do anything.
* It is retained to allow a Mesh or Quad to be added to a Container.
*
* @method Phaser.GameObjects.Mesh#setAlpha
* @since 3.17.0
*/
setAlpha: NOOP
});