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(). #690

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion types/three/src/core/Object3D.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,10 @@ export class Object3D<TEventMap extends Object3DEventMap = Object3DEventMap> ext
* and returns the first with a property that matches the value given.
* @param name The property name to search for.
* @param value Value of the given property.
* @param optionalTarget target to set the result. Otherwise a new Array is instantiated. If set, you must clear
* this array prior to each call (i.e., array.length = 0;).
*/
getObjectsByProperty(name: string, value: any): Object3D[];
getObjectsByProperty(name: string, value: any, optionalTarget?: Object3D[]): Object3D[];

/**
* Returns a vector representing the position of the object in world space.
Expand Down