0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-27 09:50:52 -05:00

added support for sprite scale in RenderPixi, closes #54

This commit is contained in:
liabru 2014-12-28 18:23:48 +00:00
parent 4746eb9348
commit 8dea1666f7

View file

@ -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],