-
-
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: Added getObjectsByProperty() #25006
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
renamed object to childResult inline if statement
Mugen87
changed the title
Get multiple child objects by property
Object3D: Get multiple child objects by property.
Nov 23, 2022
Mugen87
reviewed
Nov 24, 2022
mrdoob
changed the title
Object3D: Get multiple child objects by property.
Object3D: Added getObjectsByProperty()
Dec 21, 2022
0b5vr
added a commit
to three-types/three-ts-types
that referenced
this pull request
Dec 27, 2022
- add `Object3D.getObjectsByProperty()` - add doc comment of `Object3D.getObjectByProperty()` See: mrdoob/three.js#25006
joshuaellis
added a commit
to three-types/three-ts-types
that referenced
this pull request
Jan 3, 2023
* docs: update constructor doc comment of geometries See: mrdoob/three.js#25086 * docs: update doc comment of the constructor of BufferAttribute See: mrdoob/three.js#25046 the `normalized` was already optional in the typedef * feat: add TwoPassDoubleSide See: mrdoob/three.js#25165 also add doc comment of Side * feat: add `Mesh.getVertexPosition()` - add `Mesh.getVertexPosition()` - add doc comment of `SceneUtils.reduceVertices` See: mrdoob/three.js#25049 * feat: add `Object3D.getObjectsByProperty()` - add `Object3D.getObjectsByProperty()` - add doc comment of `Object3D.getObjectByProperty()` See: mrdoob/three.js#25006 * docs: add a doc comment of `PointLight.castShadow` See: mrdoob/three.js#25136 * feat (GLTFLoader): add loadNode hook See: mrdoob/three.js#25077 * feat (Nodes): New features and revisions - add three new nodes: `CacheNode`, `StackNode`, and `SpecularMIPLevelNode` - add `NodeCache` - add `getDefaultUV()` to `CubeTextureNode` and `TextureNode` - add `isGlobal()` to `Node` - add `cache` and `globalCache` to `NodeBuilder` - add missing `flowsData` to `NodeBuilder` - add `hasDependencies` to `TempNode` - add `maxMipLevel` and `cache` to `ShaderNodeBaseElements` - replace `maxMipLevel` -> `specularMIPLevel` of `ShaderNodeElements` - change constructor type and texture type of `MaxMipLevelNode` - add `SpecularMIPLevelNode` * feat (Nodes): add FogExp2 node Co-authored-by: Josh <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
A clear and concise description of what the problem was and how this pull request solves it.
Problem:
Sometimes, as it's common when using a 3D engine, a programmer would want to select all Objects with a property,
The function that would allow to do so, doesn't currently exists in Three.js, so developers will need to re-implement this basic function each time they want to do so.
Solution:
A recursive version of the
Object3D.getObjectByProperty()
function, namedgetAllObjectsByProperty
that gives all matching objects, instead of just the first.
Updated documentation ✔
Linting✔
Test passed✔