我正在用matter.js做一个物理模拟。
我的问题是,有可能改变雪碧的大小吗?或者仅仅使用matter.js是不可能的?
到目前为止,这就是我所拥有的:
Bodies.circle(x, y, 46, {
render: {
sprite: {
texture: 'images/stone.png'
//Is there a 'width:' or 'height' property?
}
}
});发布于 2015-06-06 12:02:56
试试这个:
Bodies.circle(x, y, 46, {
render: {
sprite: {
texture: 'images/stone.png',
xScale: 2,
yScale: 2
}
}
});在文档中也可以看到。
https://stackoverflow.com/questions/30678438
复制相似问题