findOne方法应该如何正确使用? (http://wellcaffeinated.net/PhysicsJS/docs/#Physics-world-prototype-findOne)
此代码返回错误:未捕获类型错误:无法读取未定义的属性“标签”
var theBall = world.findOne([{ label: ball }];
最佳答案
我认为它不需要一个数组,而是一个对象:world.findOne({ label: ball });
关于javascript - PhysicsJS - 如何通过标签(或其他值)查找物体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35590932/