Skip to content

Conversation

@holomorfo
Copy link

@holomorfo holomorfo commented Feb 3, 2025

Addresses #6765

@limzykenneth @davepagurek: Please review my changes.

Changes:

This PR updates the MatrixNumJs implementation to match the latest Matrix API interface, the most noticeable changes are the following:

  • Replace the mat3 and mat4 definitions for a generic matrix and sqDimention to keep track of a single generic square matrix.
  • Create getters for mat3 and mat4 so its still accessible to all the existing calls in the library.
  • Create generic invert, transpose and rotate to match the generic Matrix API.
  • No update on unit tests was necessary because the goal is to make it 100% compatible to the existing calls.
  • Added a missing set dimension in the Matrix.set method.
  • Added benchmark for 3x3 and 4x4 multiplication where it clearly shows that that the gl implementation is much faster than the NumJs

Since the NumJs implementation I understand is still in testing process wanted to ask if we should merge the numjs package.json dependency, or should this be kept in another branch? I have updated the package and lock files to make sure everything works, but please let me know what you think would be best. Thanks

Analysis

image

PR Checklist

@holomorfo holomorfo marked this pull request as ready for review February 3, 2025 02:53
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.

1 participant