File tree Expand file tree Collapse file tree
src/gameobjects/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -311,7 +311,7 @@ Phaser.Component.Core.prototype = {
311311 */
312312 postUpdate : function ( ) {
313313
314- if ( this . key instanceof Phaser . BitmapData || this . key instanceof Phaser . Video )
314+ if ( this . customRender )
315315 {
316316 this . key . render ( ) ;
317317 }
Original file line number Diff line number Diff line change @@ -13,6 +13,12 @@ Phaser.Component.LoadTexture = function () {};
1313
1414Phaser . Component . LoadTexture . prototype = {
1515
16+ /**
17+ * @property {boolean } customRender - Does this texture require a custom render call? (as set by BitmapData, Video, etc)
18+ * @private
19+ */
20+ customRender : false ,
21+
1622 /**
1723 * @property {Phaser.Rectangle } _frame - Internal cache var.
1824 * @private
@@ -43,6 +49,7 @@ Phaser.Component.LoadTexture.prototype = {
4349 }
4450
4551 this . key = key ;
52+ this . customRender = false ;
4653
4754 var setFrame = true ;
4855 var smoothed = ! this . texture . baseTexture . scaleMode ;
@@ -54,6 +61,8 @@ Phaser.Component.LoadTexture.prototype = {
5461 }
5562 else if ( Phaser . BitmapData && key instanceof Phaser . BitmapData )
5663 {
64+ this . customRender = true ;
65+
5766 // This works from a reference, which probably isn't what we need here
5867 this . setTexture ( key . texture ) ;
5968
@@ -64,6 +73,8 @@ Phaser.Component.LoadTexture.prototype = {
6473 }
6574 else if ( Phaser . Video && key instanceof Phaser . Video )
6675 {
76+ this . customRender = true ;
77+
6778 // This works from a reference, which probably isn't what we need here
6879 var valid = key . texture . valid ;
6980 this . setTexture ( key . texture ) ;
You can’t perform that action at this time.
0 commit comments