mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-23 09:26:51 -05:00
added support for sprite scale in RenderPixi, closes #54
This commit is contained in:
parent
4746eb9348
commit
8dea1666f7
1 changed files with 3 additions and 1 deletions
|
@ -314,6 +314,8 @@ var RenderPixi = {};
|
|||
sprite.position.x = body.position.x;
|
||||
sprite.position.y = body.position.y;
|
||||
sprite.rotation = body.angle;
|
||||
sprite.scale.x = bodyRender.sprite.xScale || 1;
|
||||
sprite.scale.y = bodyRender.sprite.yScale || 1;
|
||||
} else {
|
||||
var primitiveId = 'b-' + body.id,
|
||||
primitive = render.primitives[primitiveId],
|
||||
|
@ -426,4 +428,4 @@ var RenderPixi = {};
|
|||
return texture;
|
||||
};
|
||||
|
||||
})();
|
||||
})();
|
||||
|
|
Loading…
Reference in a new issue