mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 15:14:47 +00:00
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:
parent
b09fa3f10e
commit
05e3520048
2 changed files with 13 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue