Matter.js sprite size
I am doing physics simulation using .js stuff.
My question is, is it possible to resize the sprite? Or is this not possible using only matter.js?
This is what I have so far:
Bodies.circle(x, y, 46, {
render: {
sprite: {
texture: 'images/stone.png'
//Is there a 'width:' or 'height' property?
}
}
});
+4
Brad thiessen
source
to share
1 answer
Try it:
Bodies.circle(x, y, 46, {
render: {
sprite: {
texture: 'images/stone.png',
xScale: 2,
yScale: 2
}
}
});
Also look here in the docs .
+11
liabru
source
to share