Skip to content
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

Improve Object3D add and remove #11459

Closed
wants to merge 3 commits into from
Closed

Conversation

brianchirls
Copy link
Contributor

  • Dispatch "add" and "remove" events on parents in addition to child so new child objects can be monitored
  • Moved "added" and "removed" dispatch after children array is modified so the operation is complete before the event fires
  • Added unit test for all the above

- Dispatch "add" and "remove" events on parents in addition to child so new child objects can be monitored
- Moved "added" and "removed" dispatch after children array is modified so the operation is complete before the event fires
- Added unit test for all the above
src/core/Object3D.js Outdated Show resolved Hide resolved
@brianchirls
Copy link
Contributor Author

@mrdoob updated per your comment

@brianchirls
Copy link
Contributor Author

Bump for approval, @mrdoob. I made the changes you requested.

@Fyrestar
Copy link

Is creating an object for the event really necessary? It coult be a reused one.

@mrdoob mrdoob added this to the r95 milestone Jun 20, 2018
@mrdoob mrdoob modified the milestones: r95, r96 Jul 31, 2018
@mrdoob mrdoob modified the milestones: r96, r97 Aug 29, 2018
@mrdoob mrdoob modified the milestones: r97, r98 Sep 25, 2018
@mrdoob mrdoob modified the milestones: r98, r99 Oct 31, 2018
@mrdoob mrdoob modified the milestones: r99, r100 Nov 29, 2018
@mrdoob mrdoob modified the milestones: r100, r101 Dec 28, 2018
@mrdoob mrdoob modified the milestones: r101, r102 Jan 31, 2019
@mrdoob mrdoob modified the milestones: r102, r103 Feb 28, 2019
@mrdoob mrdoob modified the milestones: r103, r104 Mar 27, 2019
@mrdoob mrdoob modified the milestones: r104, r105 Apr 24, 2019
@mrdoob
Copy link
Owner

mrdoob commented May 30, 2019

I guess the problem with this one was that it has two changes in one. Dispatching the event after the operation is done makes sense. The other change it would be better in a different PR.

@mrdoob mrdoob removed this from the r105 milestone May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants