casual-simulation / casualos

Casual Open Simulation for the Web
https://ab1.bot
MIT License
48 stars 8 forks source link

Add Matrix4 and Matrix3 classes #428

Open KallynGowdy opened 4 months ago

KallynGowdy commented 4 months ago

Currently, CasualOS does not have generalized matrix math handling. Ideally, there would be at least two different classes for this: Matrix3 (for 3x3 matrices) and Matrix4 (for 4x4 ones). They should support all common matrix operations (transpose, multiply, invert, etc.) in addition to ones that make working with the other specialized classes (Vectors and Rotations) easier (transforming directions, convert rotation to matrix, compose matrix from position rotation and scale, etc.).