Skip to content

Commit f092101

Browse files
committed
Added in support for Phaser.Video to LoadTexture component.
1 parent 9ee0de9 commit f092101

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/gameobjects/components/LoadTexture.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ Phaser.Component.LoadTexture.prototype = {
6464
setFrame = !this.animations.loadFrameData(this.game.cache.getFrameData(key.key, Phaser.Cache.BITMAPDATA), frame);
6565
}
6666
}
67+
else if (Phaser.Video && key instanceof Phaser.Video)
68+
{
69+
// This works from a reference, which probably isn't what we need here
70+
this.setTexture(key.texture);
71+
72+
if (this.game.cache.getFrameData(key.key, Phaser.Cache.VIDEO))
73+
{
74+
setFrame = !this.animations.loadFrameData(this.game.cache.getFrameData(key.key, Phaser.Cache.VIDEO), frame);
75+
}
76+
}
6777
else if (key instanceof PIXI.Texture)
6878
{
6979
this.setTexture(key);

0 commit comments

Comments
 (0)