Skip to content

Minor fixes to various toArray function docs #7578

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

Merged
merged 1 commit into from
Apr 17, 2025
Merged

Conversation

willeastcott
Copy link
Contributor

  • Allow Color#toArray to take typed array as well as generic array to bring it in line with the Vec classes.
  • Remove references to color components from vector classes.

I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

@willeastcott willeastcott added bug docs Documentation related labels Apr 16, 2025
@willeastcott willeastcott self-assigned this Apr 16, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the documentation for the toArray functions across vector and color classes to better reflect their behaviors and accepted input types.

  • Updates language in Vec2, Vec3, and Vec4 to replace "color components" with "vector's number components".
  • Updates Color toArray documentation to allow typed arrays and clarify that the output is an array of numbers.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/core/math/vec4.js Updated documentation to reflect that the array contains vector numbers instead of color components.
src/core/math/vec3.js Similar documentation update for clarity in what components are included.
src/core/math/vec2.js Updated doc comments to ensure consistency with other vector classes.
src/core/math/color.js Removed outdated language regarding color components and allowed typed arrays.

@willeastcott willeastcott merged commit a1ce997 into main Apr 17, 2025
7 checks passed
@willeastcott willeastcott deleted the toarray-tweaks branch April 17, 2025 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug docs Documentation related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants