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

Conversation

magnostherobot
Copy link
Contributor

Why

The threejs Vector classes can be iterated (and therefore spread in function calls). It would be nice to enable this functionality in TypeScript projects that use three.

What

This PR adds [Symbol.iterator]() method type declarations in the Vector2, Vector3, and Vector4 classes.

Checklist

  • Checked the target branch (current goes master, next goes dev)
  • Added myself to contributors table
  • Ready to be merged

I am unable to add myself as a contributor to the repo using the instructions in the contribution guidelines - I get an API rate limit exceeded error :s

The doc-comments in this PR are copied from threejs documentation, from the commit that added iterators to the vector classes: mrdoob/three.js@fbdb745

Doc-comments are copied from threejs documentation, from the commit that
added iterators to the vector classes:

mrdoob/three.js@fbdb745
@Methuselah96
Copy link
Contributor

Thanks for the PR, is the PR ready to review besides the missing addition to the contributors table?

@Methuselah96
Copy link
Contributor

@joshuaellis Any ideas on what's going wrong with the script to add a contributor?

@joshuaellis
Copy link
Member

Not off the top of my head, i'll look today.

@magnostherobot
Copy link
Contributor Author

Hi,

is the PR ready to review besides the missing addition to the contributors table?

I think so :) It's a very small addition, so should be straightforward to review.

@Methuselah96 Methuselah96 marked this pull request as ready for review June 29, 2023 12:21
@Methuselah96 Methuselah96 merged commit b9e3d10 into three-types:master Jun 29, 2023
1 check passed
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.

3 participants