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.x = body.position.x;
|
||||||
sprite.position.y = body.position.y;
|
sprite.position.y = body.position.y;
|
||||||
sprite.rotation = body.angle;
|
sprite.rotation = body.angle;
|
||||||
|
sprite.scale.x = bodyRender.sprite.xScale || 1;
|
||||||
|
sprite.scale.y = bodyRender.sprite.yScale || 1;
|
||||||
} else {
|
} else {
|
||||||
var primitiveId = 'b-' + body.id,
|
var primitiveId = 'b-' + body.id,
|
||||||
primitive = render.primitives[primitiveId],
|
primitive = render.primitives[primitiveId],
|
||||||
|
|
Loading…
Reference in a new issue