From e5324825ec27b0e9a414bbf9b4ee636727743d91 Mon Sep 17 00:00:00 2001 From: shBLOCK <50770712+shBLOCK@users.noreply.github.com> Date: Fri, 5 Apr 2024 14:57:55 +0800 Subject: [PATCH] Update README.md --- README.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 0286060..fe33d17 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,33 @@ -# GdMath: a fast math library for game development +# GdMath: a lightning fast spatial math library for gamedev [![Codegen](https://github.com/shBLOCK/GdMath/actions/workflows/codegen.yml/badge.svg)](https://github.com/shBLOCK/GdMath/actions/workflows/codegen.yml) [![Tests](https://github.com/shBLOCK/GdMath/actions/workflows/tests.yml/badge.svg)](https://github.com/shBLOCK/GdMath/actions/workflows/tests.yml) [![Release](https://github.com/shBLOCK/GdMath/actions/workflows/release.yml/badge.svg)](https://github.com/shBLOCK/GdMath/actions/workflows/release.yml) ## Main features -- 100% Cython implementation (~30x speedup from pure python on average) - - Codegen based +- Pure Cython implementation (~30x speedup from pure python on average) + - Based on custom code generation - Linear Algebra - [Vector](https://github.com/shBLOCK/GdMath/wiki#vectors) - - Pythonic and GLSL-like + - Pythonic and GLSL-like API - Operators +, -, *, /, @(dot), ^(cross), |(distance) ... - - Fast swizzling (e.g. `Vec3(1, 2, 3).zxy`) + - Fast (compile time) swizzling (e.g. `Vec3(1, 2, 3).zxy`) - Flexible constructor (e.g. `Vec3(Vec2(1, 2), 3)`) - Iterating and unpacking (e.g. `x, y, z = Vec3(1, 2, 3)`) - Transform - [Transform2D](https://github.com/shBLOCK/GdMath/wiki#transform2d) & [Transform3D](https://github.com/shBLOCK/GdMath/wiki#transform3d) - - Godot and GLSL like api + - Pythonic and GLSL-like API - Stubs for better IDE support Please refer to the [wiki](https://github.com/shBLOCK/GdMath/wiki) for more details ## Implementation details -**This library uses code generation.** -Every swizzle pattern and constructor are implemented as individual methods and properties (For performance reasons). -As a result, code generation is required so that I don't have to maintain 50,000+ lines of code by hand... -Besides, it also has the convenience that vector classes of every dimension and type (e.g. Vec2 Vec3 Vec2i Vec3i) are generated from the same template, so a lot of repetitive code is avoided. +- **Codegen!** + Custom code generation is used throughout this library. + Every swizzle pattern and constructor are implemented as individual methods and properties (For performance reasons). + As a result, code generation is required so that I don't have to maintain 50,000+ lines of code by hand... + Besides, it also handles vector classes of every dimension and type (e.g. Vec2 Vec3 Vec2i Vec3i) are generated from the same template, so a lot of repetitive code is avoided. + There's also a stub generator. ## Notes -- This library was initially inspired by [Godot](https://godotengine.org/)'s math library. (pun intended) -- FYI, when I was coding this, I didn't know about `Cython.Tempita` until it's too late. It'd probably be a lot easier if I knew it from the beginning and don't have to write as much codegen by myself... But I'd still need to do things like overloading by myself anyway, so it's not a big deal. \ No newline at end of file +- This library was initially inspired by [Godot](https://godotengine.org/)'s math library. Pun intended :) \ No newline at end of file