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

feat: Add types for VectorX iterators #475

Merged
merged 2 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,15 @@
"contributions": [
"code"
]
},
{
"login": "magnostherobot",
"name": "Tom Harley",
"avatar_url": "https://avatars.githubusercontent.com/u/24718981?v=4",
"profile": "https://github.com/magnostherobot",
"contributions": [
"code"
]
}
],
"skipCi": true,
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Mik-pe"><img src="https://avatars.githubusercontent.com/u/5653426?v=4?s=100" width="100px;" alt="Mikael Pettersson"/><br /><sub><b>Mikael Pettersson</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=Mik-pe" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/magnostherobot"><img src="https://avatars.githubusercontent.com/u/24718981?v=4?s=100" width="100px;" alt="Tom Harley"/><br /><sub><b>Tom Harley</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=Mik-pe" title="Code">💻</a></td>
</tr>
</tbody>
</table>
Expand Down
5 changes: 5 additions & 0 deletions types/three/src/math/Vector2.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,4 +448,9 @@ export class Vector2 implements Vector {
* Sets this vector's x and y from Math.random
*/
random(): this;

/**
* Iterating through a Vector2 instance will yield its components (x, y) in the corresponding order.
*/
[Symbol.iterator](): Iterator<number>;
}
5 changes: 5 additions & 0 deletions types/three/src/math/Vector3.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,9 @@ export class Vector3 implements Vector {
random(): this;

randomDirection(): this;

/**
* Iterating through a Vector3 instance will yield its components (x, y, z) in the corresponding order.
*/
[Symbol.iterator](): Iterator<number>;
}
5 changes: 5 additions & 0 deletions types/three/src/math/Vector4.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,9 @@ export class Vector4 implements Vector {
* Sets this vector's x, y, z and w from Math.random
*/
random(): this;

/**
* Iterating through a Vector4 instance will yield its components (x, y, z, w) in the corresponding order.
*/
[Symbol.iterator](): Iterator<number>;
}