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

Object3d: Add optional target to getObjectsByProperty(). #27225

Merged
merged 4 commits into from
Nov 22, 2023
Merged

Object3d: Add optional target to getObjectsByProperty(). #27225

merged 4 commits into from
Nov 22, 2023

Conversation

agargaro
Copy link
Contributor

@agargaro agargaro commented Nov 21, 2023

Fix #27223

Description

getObjectsByProperty performance improvement

Copy link

github-actions bot commented Nov 21, 2023

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
668.4 kB (165.9 kB) 668.3 kB (165.9 kB) -41 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Filesize dev Filesize PR Diff
449.4 kB (108.9 kB) 449.3 kB (108.9 kB) -41 B
@Mugen87 Mugen87 added this to the r159 milestone Nov 21, 2023
@Mugen87
Copy link
Collaborator

Mugen87 commented Nov 21, 2023

The documentation of Object3D.getObjectsByProperty() should be updated to reflect the new parameter:

https://threejs.org/docs/index.html#api/en/core/Object3D.getObjectsByProperty

@agargaro
Copy link
Contributor Author

agargaro commented Nov 21, 2023

I copied the description from here:

https://threejs.org/docs/#api/en/core/Raycaster.intersectObjects

Now is:

image

Is it ok or should I edit it?
Is it ok if I only edit the english one?

I also updated the code, adding the children variable.

@Mugen87
Copy link
Collaborator

Mugen87 commented Nov 21, 2023

Is it ok or should I edit it?

Description sounds good that way, imo.

Is it ok if I only edit the english one?

It would be ideal to copy over the changes to the other pages. The English text can be translated at a later point.

@Mugen87 Mugen87 changed the title Object3d: getObjectsByProperty improvement Nov 21, 2023
@agargaro
Copy link
Contributor Author

I've updated the other pages with the english texts and translated the Italian one.

@Mugen87 Mugen87 merged commit 4d04229 into mrdoob:dev Nov 22, 2023
12 checks passed
AdaRoseCannon pushed a commit to AdaRoseCannon/three.js that referenced this pull request Jan 15, 2024
)

* getObjectsByProperty improved

* Update doc

* Update doc pages

* Removed empty space
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants