PhysicsJS - 如何通过标签(或其他值)找到物体
PhysicsJS - How to find a body by its label (or other value)
findOne方法应该如何正确使用? (http://wellcaffeinated.net/PhysicsJS/docs/#Physics-world-prototype-findOne)
此代码 returns 错误:未捕获类型错误:无法读取 属性 'label' of undefined
var theBall = world.findOne([{ label: ball }];
我认为它不期望一个数组而是一个对象:world.findOne({ label: ball });
findOne方法应该如何正确使用? (http://wellcaffeinated.net/PhysicsJS/docs/#Physics-world-prototype-findOne)
此代码 returns 错误:未捕获类型错误:无法读取 属性 'label' of undefined
var theBall = world.findOne([{ label: ball }];
我认为它不期望一个数组而是一个对象:world.findOne({ label: ball });