-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
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
Matrix3/Matrix4: Refactored .applyToBuffer() #10355
Conversation
|
||
Multiplies (applies) the upper 3x3 matrix of this matrix to every 3D vector in the [page:ArrayBuffer buffer]. | ||
Multiplies (applies) the upper 3x3 matrix of this matrix to every 3D vector in the [page:BufferAttribute attribute]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
upper 3x3 ? Also, what is the use case for this method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed that part of the sentence. The following commit originally added the methods 1b6effb.
Default is the last element in the array.<br /><br /> | ||
[page:BufferAttribute attribute] - An attribute of floats that represent 3D vectors.<br /> | ||
[page:Number offset] - (optional) index in the attribute of the first vector. Default is 0.<br /> | ||
[page:Number count] - (optional) index in the attribute of the last vector. Default is the last element in the attribute.<br /><br /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
count
is a quantity, not an index.
[page:Number offset] - (optional) index in the array of the first vector's x component. Default is 0.<br /> | ||
[page:Number length] - (optional) index in the array of the last vector's z component. | ||
Default is the last element in the array.<br /><br /> | ||
[page:BufferAttribute attribute] - An attribute of floats that represent 3D vectors.<br /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method only makes sense with certain buffer attributes, right? -- even though it is generically-named.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't think of a better name than . applyToBufferAttribute()
. Any suggestions?
Um, looks like these methods are not used in the entire repo so far... |
Right. What is the use case? And why |
I think the original author added these parameters ( |
Let's see what others think... |
Feel free to remove what's not needed 👍 |
We need these methods if we want to make |
Why not start with this simplified approach? |
That seems reasonable to me. Can you remove |
Thanks! |
Was this really necessary...? Breaking my stuff as I upgrade to r84. I just pasted it back in though and rebuilt. So this was taken out to make the code 0.1% smaller? A noble pursuit, I suppose. |
@unphased Is not only about the size. It's also about the API, documentation, user support, etc. Sorry that I broke your code. |
This PR renames
.applyToBuffer()
to. applyToBufferAttribute()
. Besides, the methods now supportInterleavedBufferAttribute
.