Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix tiledmap object texture render error #5633


Copy link

sunnylanwanjun commented Oct 28, 2019

修复object group纹理坐标不正确的问题。

@@ -224,7 +224,8 @@ let TiledObjectGroup = cc.Class({
sp = imgNode.addComponent(cc.Sprite);
sp.spriteFrame = new cc.SpriteFrame();
sp.spriteFrame.setTexture(grid.tileset.sourceImage, grid);
let rect = cc.rect(grid.x, grid.y, grid.width, grid.height);
sp.spriteFrame.setTexture(grid.tileset.sourceImage, rect);

This comment has been minimized.

Copy link

jareguo Oct 28, 2019


直接 cc.rect(grid) 就行

@jareguo jareguo merged commit e186ad9 into cocos-creator:v2.2.1-release Oct 29, 2019
1 check passed
1 check passed
ci/circleci: test Your tests passed on CircleCI!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.