-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object3D: Add removeAll or clear. #20414
Comments
Sounds good to me. I thing I would prefer something like this: clear: function () {
while ( this.children.length > 0 ) {
const object = this.children.pop();
object.parent = null;
object.dispatchEvent( _removedEvent );
}
return this;
} |
|
If a user referenced |
Then what about |
I think that works 👍 |
Would you like to do a PR with the new method? |
In order to get this issue closed, I've filed a PR 😇 . |
is this gonna added soon or removed forever? |
#20478 was merged but there are some considerations about the method name. I guess this should be solved before the next release so expect to have this method with |
I'd like to have removeAll or clear method in Object3D.
remove
find child within children withindexOf
and remove it usingsplice
which becomes bottleneck when there are a lot of children objects and I need to remove them all which I am experiencing now.So i suggest to add
removeAll
method.The text was updated successfully, but these errors were encountered: