Permalink
Browse files

Fix bottom part of PanelSprite rendered by PixiJS and cocos2d-JS

  • Loading branch information...
1 parent 276850b commit cd34cbe9347f782ead8f59ff5aeca58b521ac131 @4ian committed Jan 7, 2017
@@ -108,7 +108,7 @@ gdjs.PanelSpriteRuntimeObjectCocosRenderer.prototype._updateLocalPositions = fun
this._borderSprites[5].setPositionY(0);
this._borderSprites[6].setPositionX(obj._lBorder);
- this._borderSprites[6].setPositionY(0);
+ this._borderSprites[6].setPositionY(1); //FIXME: 1 pixel is somewhat needed for pixel perfect alignment
this._borderSprites[7].setPositionX(obj._width - obj._rBorder);
this._borderSprites[7].setPositionY(0);
@@ -80,7 +80,7 @@ gdjs.PanelSpriteRuntimeObjectPixiRenderer.prototype._updateLocalPositions = func
this._borderSprites[5].position.y = obj._height - this._borderSprites[5].height - extraPixels * 2;
this._borderSprites[6].position.x = obj._lBorder;
- this._borderSprites[6].position.y = obj._height - obj._bBorder - extraPixels * 2;
+ this._borderSprites[6].position.y = obj._height - obj._bBorder - extraPixels * 3; //FIXME: 1 more extra pixel is somewhat needed for pixel perfect alignment
this._borderSprites[7].position.x = obj._width - this._borderSprites[7].width - extraPixels * 2;
this._borderSprites[7].position.y = obj._height - this._borderSprites[7].height - extraPixels * 2;

0 comments on commit cd34cbe

Please sign in to comment.