Skip to content

Commit 38868d6

Browse files
committed
Fixed Pixel Field.
1 parent 519c121 commit 38868d6

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

src/gameobjects/pixelfield/PixelField.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,14 @@
1515
* @param {number} [x=0] - The x coordinate of the Image. The coordinate is relative to any parent container this Image may be in.
1616
* @param {number} [y=0] - The y coordinate of the Image. The coordinate is relative to any parent container this Image may be in.
1717
*/
18-
Phaser.GameObject.PixelField = function (game, x, y, pixelSize)
18+
Phaser.GameObject.PixelField = function (state, x, y, pixelSize)
1919
{
2020
if (pixelSize === undefined) { pixelSize = 1; }
2121

22-
this.game = game;
23-
24-
var _texture = game.textures.get('__DEFAULT');
22+
var _texture = state.game.textures.get('__DEFAULT');
2523
var _frame = new Phaser.TextureFrame(_texture, 'pixel', 0, 0, 0, pixelSize, pixelSize);
2624

27-
Phaser.GameObject.call(this, game, x, y, _texture, _frame);
25+
Phaser.GameObject.call(this, state, x, y, _texture, _frame);
2826

2927
/**
3028
* @property {number} type - The const type of this object.

src/gameobjects/pixelfield/PixelFieldWebGLRenderer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ Phaser.Renderer.WebGL.GameObjects.PixelField = {
44
Phaser.GameObject.PixelField.prototype
55
],
66

7-
render: function (renderer, src)
7+
render: function (renderer, src, interpolationPercentage)
88
{
99
var pixel;
10-
var verts = src.transform.glVertextData;
10+
var verts = src.transform.getVertexData(interpolationPercentage);
1111

1212
for (var i = 0; i < src.list.length; i++)
1313
{

0 commit comments

Comments
 (0)