[英]Collision detection, new Function
I use the library "Sinova / Collisions" on GitHub, with Node.js.我使用 GitHub 上的库“Sinova / Collisions”和 Node.js。 https://github.com/Sinova/Collisions I need a function, to delete all data at once.
https://github.com/Sinova/Collisions我需要一个函数,一次删除所有数据。 There is a function to delete Objects one by one.
有一个功能可以一一删除对象。 But, that doesn't always work correctly.
但是,这并不总是正常工作。
All Collision saved in colArr "Array"保存在 colArr "Array" 中的所有碰撞
for(let i = 0; i < colArr.length; i++){
system.remove(colArr[i]);
}
Is there a Way to delete everything in the Library, directly?有没有办法直接删除库中的所有内容? A new Function?
新功能?
system.removeAll(); //???
I wrote to the Github-Issues a few days ago.几天前我写信给 Github-Issues。 But without Success
但没有成功
From reading the code, no such function exists, no.从阅读代码来看,不存在这样的功能,不。
If you want to start from scratch just create a new Collisions
object and work with that.如果您想从头开始,只需创建一个新的
Collisions
对象并使用它。
Of course, unless you scope it carefully, or replace it, the old one will still exist and take up memory.当然,除非你仔细调整它的范围,或者更换它,否则旧的仍然存在并占用内存。
Making a feature request to the library author is a good idea, but we can't really help you to get any traction on that.向库作者提出功能请求是一个好主意,但我们无法真正帮助您获得任何关注。 You have to be patient and wait for a response from them.
你必须耐心等待他们的回应。
var system = new Collisions();
应该解决问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.