question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RFC: Making Euler, Color, Quaternions iterable - and consequently spreadable - like Vector*

See original GitHub issue

Vectors are iterable, so they can be spread to an array like [...vector]. The same isn’t true for Euler, and users ** cough cough me right now ** might expect consistent behaviour.

I was surprised to see this missing, so I’m wondering wether there is a reason we wouldn’t make them behave in the same way. I know order might be one reason, but then again users could order before spreading.

The code itself would just be the few lines to add the feature and a test, shouldn’t take a long time, I’m more interested in why this could be a bad idea.

Have a great weekend and hugs all around!

EDIT:

  • Quaternion
  • Color

Are also candidates for this

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
LeviPesincommented, Mar 26, 2022

But there any many applications of matrices in users’ three.js-related code that are not related to the transformation properties of Object3D…

1reaction
Mugen87commented, Mar 26, 2022

Can you explain why you feel that way?

I’m in general no fan of using or promoting matrices in user related workflows. I don’t think the engine should guide users towards matrices but to the transformation properties of Object3D(position, rotation/quaternion, scale).

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found