diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d7179ffa..24d914a0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,8 +15,7 @@ So make sure that you followed [the rules](#contributing-rules) - PDM: We are using pdm for our main interaction with the library. - pyproject.toml: Pythons way for setting up a project. A replacement for setup.py - pygame-ce: Used for windowing and events -- PyOpenGL: Used for rendering everything -- pillow (PIL): Used for loading images for PyOpenGL +- FusionGL (ctypes): Used for rendering everything. Its a custom wrapper around OpenGL for python - pymunk: Will be used for physics - black: We are using black to format code @@ -27,11 +26,11 @@ pip install --user pdm ``` PDM will manage everything for us, like virtual enviorments, packages and scripts. -Then, fork [the repository](https://github.com/fusionengine-org/fusion-engine) to your profile. +Then, fork [the repository](https://github.com/fusionengine-org/fusion) to your profile. Then, clone your forked github repository: ```bash -git clone https://github.com/_your_username_/fusion-engine.git +git clone https://github.com/your_username_/fusion.git cd fusion-engine ``` Then, change the branch to the dev branch to follow rule #1: diff --git a/README.md b/README.md index 492977ab..d46cc21a 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ PyPI - License PyPI - Status PyPI - Downloads -GitHub contributors -Lines of code +GitHub contributors +Lines of code

@@ -29,7 +29,6 @@ rendering graphics, and handling user input. It is and engine to create games fa ## πŸ’Ύ Installation ### ➑️ Using PyPi - To install our package, run this: ```bash @@ -39,7 +38,6 @@ To install our package, run this: Our PyPI package is at this [link]() ### πŸͺ² Install from source/devel - if you want to install the package from source and get the latest changes then you do it like this: ```bash @@ -49,7 +47,7 @@ if you want to install the package from source and get the latest changes then y ``` ### πŸƒβ€β™‚οΈ Run example -The examples are located [here](https://github.com/fusionengine-org/fusion-engine/tree/main/src/fusionengine/examples) +The examples are located [here](https://github.com/fusionengine-org/fusion/tree/main/src/fusionengine/examples) If you want to run the example, then follow these instructions: 1. First, make sure you have fusion engine installed. @@ -60,7 +58,6 @@ If you want to run the example, then follow these instructions: For other examples, you can modify the command to run the other example. Just change the number of the example. ## πŸ‘₯ Community - We have a discord server at this [link](). Need to contact us? Just #dimkauzh in discord and he will try to react as fast as possible @@ -75,35 +72,29 @@ Are you exited to start with fusion engine but you dont know where to start? The ## πŸ“― Coming features - We are working hard to implement very basic and complex stuff so our engine becomes more rigid. To see our changelog and todo list, please go [to our docs]() πŸ’‘ - If you have more ideas, please tell us them in our [discord server]() or create an issue! ## πŸͺͺ License - See [Licence here](LICENCE.md) ## πŸ—„οΈ About - This project began May 1, 2023. The original project began in C, but it's entirely rewritten in Python for it's big userbase and ease of use (productivity). This is actually also my EuroPython 2023 project. But after some time, the community has grown, and fusion had a lot of big releases. It was becoming a big project with a giant codebase. ### ⭐ Star History - - + - - - Star History Chart + + + Star History Chart ### πŸ‡ΊπŸ‡¦ Ukraine - We as fusion team support Ukraine and we hope it will win. Fusion engine is dedicated to Ukraine fighting the Russian invasion. πŸ‡ΊπŸ‡¦ Please support Ukraine! πŸ‡ΊπŸ‡¦ ## πŸš€ About Me - A 13-year-old game developer with much passion about game development. So I made this project to grow my programming skills and just make a tool that I can use for myself or a tool for other people to help them develop games. diff --git a/docs/changelog/v5.md b/docs/changelog/v5.md index 98e894e5..355fcd37 100644 --- a/docs/changelog/v5.md +++ b/docs/changelog/v5.md @@ -32,3 +32,31 @@ - [x] Added support for SpriteSheets - [x] Draw function gets frames argument +## V5.2 +- [x] Custom OpenGL (FusionGL) + - [x] Using Ctypes + - [x] Ported all functions + +- [x] Removal of PIL + - [x] Moved image system to pygame instead of PIL + +- [x] Removal of 4 dependencies + - [x] PyOpenGL + - [x] PyOpenGL-Accelerate + - [x] PIllow (PIL) + - [x] Pymunk + +- [x] Entities + - [x] Deprecated + - [x] New entities called Nodes + +- [x] Node + - [x] Some new features + - [x] Moved features from entity system (and fixed them) + +## V5.3 +- [ ] State Machine + - [ ] Custom states + - [ ] Easy to use + + diff --git a/docs/index.md b/docs/index.md index 2d0582d3..f65853fd 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,7 +5,7 @@ hide: ---

- logo + logo

@@ -15,8 +15,8 @@ hide: PyPI - License PyPI - Status PyPI - Downloads -GitHub contributors -Lines of code +GitHub contributors +Lines of code

diff --git a/docs/tutorials/character.md b/docs/tutorials/character.md index 67ed0e17..376af45a 100644 --- a/docs/tutorials/character.md +++ b/docs/tutorials/character.md @@ -1,7 +1,31 @@ ---- -hide: - - navigation ---- +# Basic Moving Character Tutorial +This is a tutorial how to build a basic moving character using fusion-engine. We wil be using the new Node system introduced in V5.2 to make everything easier. +We are going to make a small moving character. The character is gonna be a node with the fusion icon as image. + +## Setting up +First, make sure you have the latest version of Fusion installed (V5.2 and later). Without this it won't work, as we will be using a feature introduced in that version. +If you want have fusion yet setup, then go back to [the setup tutorial](setup.md) + +## Basic things +First, lets get the basic things setup, like a window and a loop. + +First, we import `fusionengine` as `fusion`: +```python +import fusionengine as fusion +``` + +Then we create a window where all drawing will take place: +```python +window = fusion.Window("Basic Character - Fusion Engine", 800, 600) +``` + +After the window is done, we can create the loop: +```python +@window.loop +def loop(): + ... # Our code is gonna go here +``` +Thats it! We have a basic window and loop setup! + +## Getting the Node setup -# Platformer tutorial -This is a tutorial how to build a basic platformer using fusion-engine diff --git a/docs/wiki/animation.md b/docs/wiki/animation.md index 800ea0d4..aa65b84c 100644 --- a/docs/wiki/animation.md +++ b/docs/wiki/animation.md @@ -6,13 +6,13 @@ If you want to draw a animation, then you can do it this way ### Loading the animations To load the animation, run ```python -my_anim = fusion.Animation(your_window: Window, your_images: tuple | Spritesheet) +my_anim = fusion.Animation(your_window: Window, your_images: tuple | Spritesheet, frames: int) ``` ### Drawing animation To draw it then, run: ```python -my_anim.draw(frames: int) +my_anim.draw() ``` The frames specify the number of frames to draw each time. It can be as low as you like, or as high as you like, depending on the speed of the animation that you want. @@ -22,7 +22,7 @@ First, create your spritesheet. You can do it this way: ```python spr = fusion.SpriteSheet(fusion.DEBUGIMAGE, 100, 100) ``` -This will cut down your spritesheet in 100x100 pixels images. Then it will be places inside `spr.frames` as `Image` objects. The images are cut from corner down-left to down-right. Then it goes a row higher and cuts futher. +This will cut down your spritesheet in 100x100 pixels images. Then it will be places inside `spr.frames` as `Image` objects. The images are cut from corner up-left to up-right. Then it goes a row lower and cuts futher. Then, set the size of each image and then set the coordinates. (This is required or else they will be automatically set to 0) Set the size: @@ -35,4 +35,4 @@ Then, set the coordinates: ```python spr.frame_pos(50, 50) ``` -This will set the X-axis and Y-axis to 50. \ No newline at end of file +This will set the X-axis and Y-axis to 50. diff --git a/docs/wiki/external.md b/docs/wiki/external.md index 96375663..088601d9 100644 --- a/docs/wiki/external.md +++ b/docs/wiki/external.md @@ -1,14 +1,12 @@ # External tools -## Using PyOpenGL -If you cant find some function you need in this engine, the you could use PyOpenGL as the engine is build on PyOpenGL. You can import the PyOpenGL library or use the build in wrapper functions like this: -```python -import fusionengine.backend.gl as gl -``` -Keep in mind that this will not have all functions you mind need as the wrapper only has functions that fusion requires. If you want, you can import PyOpenGL by yourself. +## Using OpenGL +Fusion is build on its own custom OpenGL binding using CTypes (FusionGL). If you want to use GL for yourself, you can try to use our own wrapper, but keep in mind that our own implementation only has the functions we need. Use it like this: `fusionengine.fusiongl` + +If you want to use PyOpenGL, you should be able to do that without any problems. ### Where to put code -All the rendering code should be placed inside the while loop, and fusion should render it for you. +All the rendering code should be placed inside the while loop, and fusion should render it for you. Do not clear the screen as that will be automatically done for you. ### Warning This is not tested. It may not work or work as expected. If you find any bugs, please create a issue on github. Thank you. @@ -27,4 +25,4 @@ You need to modify our loop to support codon, so you need to change it to this: while your_window.running(): ... # Your own loop thing ``` -You may reconise this type of while loop from the main wiki as your second option. \ No newline at end of file +You may reconise this type of while loop from the main wiki as your second option. diff --git a/docs/wiki/extra.md b/docs/wiki/extra.md index 5bfae3f4..6b5edde8 100644 --- a/docs/wiki/extra.md +++ b/docs/wiki/extra.md @@ -4,8 +4,21 @@ If you tried using our engine you may have encountered this message being printed to terminal: ```bash -Fusion Engine 5.0.0 (PyOpenGL 3.1.7, Pygame-ce 2.4.0, Python 3.11.7) +Fusion Engine 5.0.0 (FusionGL 1.0.0, Pygame-ce 2.4.0, Python 3.11.7) Welcome to Fusion Engine! Check out our website at https://fusion-engine.tech/ ``` -To disable this behavior, you just give the main class when initting this argument, set your "FUSION_HIDE_PROMPT" enviorment variable to "no". \ No newline at end of file +To disable this behavior, you just give the main class when initting this argument, set your "FUSION_HIDE_PROMPT" enviorment variable to "no" or anything else. +Or you can set the message variable to False: +```python +import fusionengine as fusion + +fusion.message = False +``` + +## GL support +If you are using a OS that isn't officially being supported by Fusion and it still works, you can disable this warning: +```bash +Your platform could not be resolved. Defaulting to OpenGL as GL. Rever to the documentation to learn about how to remove this warning. +``` +To disable this behavior, you just give the main class when initting this argument, set your "FUSION_HIDE_GL_PROMPT" enviorment variable to "no" or anything else. diff --git a/docs/wiki/node.md b/docs/wiki/node.md new file mode 100644 index 00000000..f86d5d28 --- /dev/null +++ b/docs/wiki/node.md @@ -0,0 +1,74 @@ +# Node and Scenes + +## Node +If you want a player or an enemy or some moving object in your game, you can use an Node, thats an object that +helps you manage things in your game: + +```python +# x y w h +your_node = fusion.Node(window, 100, 100, 50, 50) +``` + +### Get Cordinates +If you want to get the cordinates, then there are a few ways to do it. + +#### As a tuple +If you want to get the Cordinates as a tuple, then do the following: +```python +my_cor = your_node.get_coord_tuple() +``` + +#### As a Vector2D +If you want to get the Cordinates as a Vector2D, then do the following: +```python +my_cor = your_node.get_coord_vec2() +``` + +### Loading a Rect +If you plan on having the main shape of your Node a rect, or just having a rect connected to the size and position of youe Node, +then you can load the rect using this way: +```python +your_node.load_rect(fusion.BLACK) +``` + +### Loading an Image +If you just want a static image on your Node or just a image on the size and position of your Node then use this. + +```python +your_node.load_image("image_path") +``` + +### Animations with a Node +Fusion has some build-in features into Node system to make animations more easy, here are some ways to use it. + +#### Animation object +If you want to load a object of Animation, then you can do it like this: +```python +your_node.load_animation(animation: Animation) +``` +#### Load frames +First of all, you need to load frames, and you can do this using this way: +```python +your_node.load_animation(images: tuple) +``` + +#### Setting current frame +You can set the current frame with this function +```python +your_node.set_frame(frame: int) +``` + +#### Getting current frame +To get the current frame, run: +```python +my_frame_var = your_node.get_frame() +``` + +### Drawing everything +If you want to draw everything, in the same order as you loaded it, you can do that this way: +```python +my_node.update() +``` + +## Scene manager +See in [this example](https://github.com/dimkauzh/fusion-engine/blob/main/examples/example4.py) how to use the scene manager. diff --git a/docs/wiki/rendering.md b/docs/wiki/rendering.md index ebc0dc46..8b6573ee 100644 --- a/docs/wiki/rendering.md +++ b/docs/wiki/rendering.md @@ -62,7 +62,7 @@ You first need to create a variable with your image and image data: your_image = fusion.Image(window, fusion.DEBUGIMAGE, 100, 100, 400, 400) ``` -`fusion.DEBUGIMAGE` is an image that is included with the engine, so you can use it freely. You can pass your own image path or a Pillow (PIL) image. +`fusion.DEBUGIMAGE` is an image that is included with the engine, so you can use it freely. You can pass your own image path or a Pygame image/surface. Then you need to render it (In the best situation this will happen in your loop): ```python diff --git a/docs/wiki/scene.md b/docs/wiki/scene.md deleted file mode 100644 index 2b32abb3..00000000 --- a/docs/wiki/scene.md +++ /dev/null @@ -1,69 +0,0 @@ -# Scenes and Entities - -## Scene manager -See in [this example](https://github.com/dimkauzh/fusion-engine/blob/main/examples/example5.py) how to use the scene manager. - -## Entities - -If you want a player or an enemy or some moving object in your game, you can use an entity, thats an object that -helps you manage things in your game: - -```python -# x y w h -your_entity = fusion.Entity(window, 100, 100, 50, 50) -``` - -### Draw rect with entity - -If you want to draw a rectangle that is basically in your entity, then you do it like this: - -```python -your_entity.load_rect(fusion.BLACK) -``` -Then you can draw it with: - -```python -your_entity.draw_rect() -``` - -### Draw image with entity - -If you want to draw a image on your entity, then you do this: - -```python -your_entity.load_image("image_path") -``` - -Then you can draw it with: - -```python -your_entity.draw_image() -``` - -### Custom animations with entities -Fusion has some build-in features into entity system to make animations more easy, here are some ways to use it - -#### Load frames -First of all, you need to load frames, and you can do this using this way: -```python -your_entity.load_animation(images: tuple) -``` - -#### Setting current frame -You can set the current frame with this function -```python -your_entity.set_frame(frame: int) -``` - -#### Getting current frame -To get the current frame, run: -```python -my_frame_var = your_entity.get_frame() -``` - -#### Drawing current frame -To draw current frame, use this function -```python -your_entity.draw_animation() -``` - diff --git a/docs/wiki/v5-moving.md b/docs/wiki/v5-moving.md index 24682565..9cf5e2ee 100644 --- a/docs/wiki/v5-moving.md +++ b/docs/wiki/v5-moving.md @@ -50,7 +50,7 @@ This function has been renamed to draw_image. ### pygame-gui You can no longer use pygame-gui with fusion. Instead, you can use build in UI library ### pygame-ce -You can no longer use your own drawing code in pygame-ce with fusion, as fusion moved to PyOpenGL for rendering purposes. If you want to know how to use PyOpenGL with fusion, go to the external page of the wiki. +You can no longer use your own drawing code in pygame-ce with fusion, as fusion moved to custom OpenGL bindings called FusionGL for rendering purposes. If you want to know how to use PyOpenGL with fusion, go to the external page of the wiki. ## Buttons Making button is now different than before. Now you don't pass a rect, instead you pass all of this: diff --git a/mkdocs.yml b/mkdocs.yml index 7497e96d..4930af60 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,8 +1,8 @@ site_name: Fusion Engine Documentation site_description: A custom open-source game engine on OpenGL and Python, it’s written in pure Python! It’s easy and fast! -repo_name: fusion-engine -repo_url: https://github.com/fusionengine-org/fusion-engine +repo_name: fusionengine-org/fusion +repo_url: https://github.com/fusionengine-org/fusion nav: - Home: 'index.md' @@ -15,7 +15,7 @@ nav: - Events and Keys: 'wiki/events-keys.md' - Color and colortools: 'wiki/color.md' - Managing sounds and music: 'wiki/music.md' - - Scenes and entities: 'wiki/scene.md' + - Nodes and Scenes: 'wiki/node.md' - Storage system: 'wiki/storage.md' - Animations and Spritesheets: 'wiki/animation.md' - UI module: 'wiki/ui.md' @@ -27,7 +27,6 @@ nav: - Tutorials: - Setting up Fusion Engine: 'tutorials/setup.md' - Basics of Fusion Engine: 'tutorials/basics.md' - - Small moving character: 'tutorials/character.md' - Changelog: diff --git a/pdm.lock b/pdm.lock index b0f2035a..1468d08c 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "lint"] strategy = ["cross_platform", "inherit_metadata"] lock_version = "4.4.1" -content_hash = "sha256:cc4d603dd0304e55df666f1afcaad35f5d876b5b730467c1eca7c7924bcaf7c8" +content_hash = "sha256:051e0d5524684fc292d112b1522451e93a63660c91dc4b9db354ecf8b5e43f99" [[package]] name = "babel" @@ -13,6 +13,9 @@ version = "2.14.0" requires_python = ">=3.7" summary = "Internationalization utilities" groups = ["lint"] +dependencies = [ + "pytz>=2015.7; python_version < \"3.9\"", +] files = [ {file = "Babel-2.14.0-py3-none-any.whl", hash = "sha256:efb1a25b7118e67ce3a259bed20545c29cb68be8ad2c784c83689981b7a57287"}, {file = "Babel-2.14.0.tar.gz", hash = "sha256:6919867db036398ba21eb5c7a0f6b28ab8cbc3ae7a73a44ebe34ae74a4e7d363"}, @@ -20,7 +23,7 @@ files = [ [[package]] name = "black" -version = "23.12.1" +version = "24.1.1" requires_python = ">=3.8" summary = "The uncompromising code formatter." groups = ["lint"] @@ -34,24 +37,28 @@ dependencies = [ "typing-extensions>=4.0.1; python_version < \"3.11\"", ] files = [ - {file = "black-23.12.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e0aaf6041986767a5e0ce663c7a2f0e9eaf21e6ff87a5f95cbf3675bfd4c41d2"}, - {file = "black-23.12.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c88b3711d12905b74206227109272673edce0cb29f27e1385f33b0163c414bba"}, - {file = "black-23.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a920b569dc6b3472513ba6ddea21f440d4b4c699494d2e972a1753cdc25df7b0"}, - {file = "black-23.12.1-cp310-cp310-win_amd64.whl", hash = "sha256:3fa4be75ef2a6b96ea8d92b1587dd8cb3a35c7e3d51f0738ced0781c3aa3a5a3"}, - {file = "black-23.12.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8d4df77958a622f9b5a4c96edb4b8c0034f8434032ab11077ec6c56ae9f384ba"}, - {file = "black-23.12.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:602cfb1196dc692424c70b6507593a2b29aac0547c1be9a1d1365f0d964c353b"}, - {file = "black-23.12.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c4352800f14be5b4864016882cdba10755bd50805c95f728011bcb47a4afd59"}, - {file = "black-23.12.1-cp311-cp311-win_amd64.whl", hash = "sha256:0808494f2b2df923ffc5723ed3c7b096bd76341f6213989759287611e9837d50"}, - {file = "black-23.12.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:25e57fd232a6d6ff3f4478a6fd0580838e47c93c83eaf1ccc92d4faf27112c4e"}, - {file = "black-23.12.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2d9e13db441c509a3763a7a3d9a49ccc1b4e974a47be4e08ade2a228876500ec"}, - {file = "black-23.12.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d1bd9c210f8b109b1762ec9fd36592fdd528485aadb3f5849b2740ef17e674e"}, - {file = "black-23.12.1-cp312-cp312-win_amd64.whl", hash = "sha256:ae76c22bde5cbb6bfd211ec343ded2163bba7883c7bc77f6b756a1049436fbb9"}, - {file = "black-23.12.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3e1b38b3135fd4c025c28c55ddfc236b05af657828a8a6abe5deec419a0b7055"}, - {file = "black-23.12.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4f0031eaa7b921db76decd73636ef3a12c942ed367d8c3841a0739412b260a54"}, - {file = "black-23.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97e56155c6b737854e60a9ab1c598ff2533d57e7506d97af5481141671abf3ea"}, - {file = "black-23.12.1-cp39-cp39-win_amd64.whl", hash = "sha256:dd15245c8b68fe2b6bd0f32c1556509d11bb33aec9b5d0866dd8e2ed3dba09c2"}, - {file = "black-23.12.1-py3-none-any.whl", hash = "sha256:78baad24af0f033958cad29731e27363183e140962595def56423e626f4bee3e"}, - {file = "black-23.12.1.tar.gz", hash = "sha256:4ce3ef14ebe8d9509188014d96af1c456a910d5b5cbf434a09fef7e024b3d0d5"}, + {file = "black-24.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2588021038bd5ada078de606f2a804cadd0a3cc6a79cb3e9bb3a8bf581325a4c"}, + {file = "black-24.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1a95915c98d6e32ca43809d46d932e2abc5f1f7d582ffbe65a5b4d1588af7445"}, + {file = "black-24.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2fa6a0e965779c8f2afb286f9ef798df770ba2b6cee063c650b96adec22c056a"}, + {file = "black-24.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:5242ecd9e990aeb995b6d03dc3b2d112d4a78f2083e5a8e86d566340ae80fec4"}, + {file = "black-24.1.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fc1ec9aa6f4d98d022101e015261c056ddebe3da6a8ccfc2c792cbe0349d48b7"}, + {file = "black-24.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0269dfdea12442022e88043d2910429bed717b2d04523867a85dacce535916b8"}, + {file = "black-24.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b3d64db762eae4a5ce04b6e3dd745dcca0fb9560eb931a5be97472e38652a161"}, + {file = "black-24.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:5d7b06ea8816cbd4becfe5f70accae953c53c0e53aa98730ceccb0395520ee5d"}, + {file = "black-24.1.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:e2c8dfa14677f90d976f68e0c923947ae68fa3961d61ee30976c388adc0b02c8"}, + {file = "black-24.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a21725862d0e855ae05da1dd25e3825ed712eaaccef6b03017fe0853a01aa45e"}, + {file = "black-24.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:07204d078e25327aad9ed2c64790d681238686bce254c910de640c7cc4fc3aa6"}, + {file = "black-24.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:a83fe522d9698d8f9a101b860b1ee154c1d25f8a82ceb807d319f085b2627c5b"}, + {file = "black-24.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:08b34e85170d368c37ca7bf81cf67ac863c9d1963b2c1780c39102187ec8dd62"}, + {file = "black-24.1.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7258c27115c1e3b5de9ac6c4f9957e3ee2c02c0b39222a24dc7aa03ba0e986f5"}, + {file = "black-24.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40657e1b78212d582a0edecafef133cf1dd02e6677f539b669db4746150d38f6"}, + {file = "black-24.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:e298d588744efda02379521a19639ebcd314fba7a49be22136204d7ed1782717"}, + {file = "black-24.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:34afe9da5056aa123b8bfda1664bfe6fb4e9c6f311d8e4a6eb089da9a9173bf9"}, + {file = "black-24.1.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:854c06fb86fd854140f37fb24dbf10621f5dab9e3b0c29a690ba595e3d543024"}, + {file = "black-24.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3897ae5a21ca132efa219c029cce5e6bfc9c3d34ed7e892113d199c0b1b444a2"}, + {file = "black-24.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:ecba2a15dfb2d97105be74bbfe5128bc5e9fa8477d8c46766505c1dda5883aac"}, + {file = "black-24.1.1-py3-none-any.whl", hash = "sha256:5cdc2e2195212208fbcae579b931407c1fa9997584f0a415421748aeafff1168"}, + {file = "black-24.1.1.tar.gz", hash = "sha256:48b5760dcbfe5cf97fd4fba23946681f3a81514c6ab8a45b50da67ac8fbc6c7b"}, ] [[package]] @@ -65,70 +72,6 @@ files = [ {file = "certifi-2023.11.17.tar.gz", hash = "sha256:9b469f3a900bf28dc19b8cfbf8019bf47f7fdd1a65a1d4ffb98fc14166beb4d1"}, ] -[[package]] -name = "cffi" -version = "1.16.0" -requires_python = ">=3.8" -summary = "Foreign Function Interface for Python calling C code." -groups = ["default"] -dependencies = [ - "pycparser", -] -files = [ - {file = "cffi-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6b3d6606d369fc1da4fd8c357d026317fbb9c9b75d36dc16e90e84c26854b088"}, - {file = "cffi-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ac0f5edd2360eea2f1daa9e26a41db02dd4b0451b48f7c318e217ee092a213e9"}, - {file = "cffi-1.16.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7e61e3e4fa664a8588aa25c883eab612a188c725755afff6289454d6362b9673"}, - {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a72e8961a86d19bdb45851d8f1f08b041ea37d2bd8d4fd19903bc3083d80c896"}, - {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5b50bf3f55561dac5438f8e70bfcdfd74543fd60df5fa5f62d94e5867deca684"}, - {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7651c50c8c5ef7bdb41108b7b8c5a83013bfaa8a935590c5d74627c047a583c7"}, - {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4108df7fe9b707191e55f33efbcb2d81928e10cea45527879a4749cbe472614"}, - {file = "cffi-1.16.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:32c68ef735dbe5857c810328cb2481e24722a59a2003018885514d4c09af9743"}, - {file = "cffi-1.16.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:673739cb539f8cdaa07d92d02efa93c9ccf87e345b9a0b556e3ecc666718468d"}, - {file = "cffi-1.16.0-cp310-cp310-win32.whl", hash = "sha256:9f90389693731ff1f659e55c7d1640e2ec43ff725cc61b04b2f9c6d8d017df6a"}, - {file = "cffi-1.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:e6024675e67af929088fda399b2094574609396b1decb609c55fa58b028a32a1"}, - {file = "cffi-1.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b84834d0cf97e7d27dd5b7f3aca7b6e9263c56308ab9dc8aae9784abb774d404"}, - {file = "cffi-1.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b8ebc27c014c59692bb2664c7d13ce7a6e9a629be20e54e7271fa696ff2b417"}, - {file = "cffi-1.16.0-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ee07e47c12890ef248766a6e55bd38ebfb2bb8edd4142d56db91b21ea68b7627"}, - {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8a9d3ebe49f084ad71f9269834ceccbf398253c9fac910c4fd7053ff1386936"}, - {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e70f54f1796669ef691ca07d046cd81a29cb4deb1e5f942003f401c0c4a2695d"}, - {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5bf44d66cdf9e893637896c7faa22298baebcd18d1ddb6d2626a6e39793a1d56"}, - {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b78010e7b97fef4bee1e896df8a4bbb6712b7f05b7ef630f9d1da00f6444d2e"}, - {file = "cffi-1.16.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c6a164aa47843fb1b01e941d385aab7215563bb8816d80ff3a363a9f8448a8dc"}, - {file = "cffi-1.16.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e09f3ff613345df5e8c3667da1d918f9149bd623cd9070c983c013792a9a62eb"}, - {file = "cffi-1.16.0-cp311-cp311-win32.whl", hash = "sha256:2c56b361916f390cd758a57f2e16233eb4f64bcbeee88a4881ea90fca14dc6ab"}, - {file = "cffi-1.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:db8e577c19c0fda0beb7e0d4e09e0ba74b1e4c092e0e40bfa12fe05b6f6d75ba"}, - {file = "cffi-1.16.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:fa3a0128b152627161ce47201262d3140edb5a5c3da88d73a1b790a959126956"}, - {file = "cffi-1.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:68e7c44931cc171c54ccb702482e9fc723192e88d25a0e133edd7aff8fcd1f6e"}, - {file = "cffi-1.16.0-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:abd808f9c129ba2beda4cfc53bde801e5bcf9d6e0f22f095e45327c038bfe68e"}, - {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88e2b3c14bdb32e440be531ade29d3c50a1a59cd4e51b1dd8b0865c54ea5d2e2"}, - {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fcc8eb6d5902bb1cf6dc4f187ee3ea80a1eba0a89aba40a5cb20a5087d961357"}, - {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b7be2d771cdba2942e13215c4e340bfd76398e9227ad10402a8767ab1865d2e6"}, - {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e715596e683d2ce000574bae5d07bd522c781a822866c20495e52520564f0969"}, - {file = "cffi-1.16.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:2d92b25dbf6cae33f65005baf472d2c245c050b1ce709cc4588cdcdd5495b520"}, - {file = "cffi-1.16.0-cp312-cp312-win32.whl", hash = "sha256:b2ca4e77f9f47c55c194982e10f058db063937845bb2b7a86c84a6cfe0aefa8b"}, - {file = "cffi-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:68678abf380b42ce21a5f2abde8efee05c114c2fdb2e9eef2efdb0257fba1235"}, - {file = "cffi-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0c9ef6ff37e974b73c25eecc13952c55bceed9112be2d9d938ded8e856138bcc"}, - {file = "cffi-1.16.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a09582f178759ee8128d9270cd1344154fd473bb77d94ce0aeb2a93ebf0feaf0"}, - {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e760191dd42581e023a68b758769e2da259b5d52e3103c6060ddc02c9edb8d7b"}, - {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:80876338e19c951fdfed6198e70bc88f1c9758b94578d5a7c4c91a87af3cf31c"}, - {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a6a14b17d7e17fa0d207ac08642c8820f84f25ce17a442fd15e27ea18d67c59b"}, - {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6602bc8dc6f3a9e02b6c22c4fc1e47aa50f8f8e6d3f78a5e16ac33ef5fefa324"}, - {file = "cffi-1.16.0-cp38-cp38-win32.whl", hash = "sha256:131fd094d1065b19540c3d72594260f118b231090295d8c34e19a7bbcf2e860a"}, - {file = "cffi-1.16.0-cp38-cp38-win_amd64.whl", hash = "sha256:31d13b0f99e0836b7ff893d37af07366ebc90b678b6664c955b54561fc36ef36"}, - {file = "cffi-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:582215a0e9adbe0e379761260553ba11c58943e4bbe9c36430c4ca6ac74b15ed"}, - {file = "cffi-1.16.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b29ebffcf550f9da55bec9e02ad430c992a87e5f512cd63388abb76f1036d8d2"}, - {file = "cffi-1.16.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dc9b18bf40cc75f66f40a7379f6a9513244fe33c0e8aa72e2d56b0196a7ef872"}, - {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cb4a35b3642fc5c005a6755a5d17c6c8b6bcb6981baf81cea8bfbc8903e8ba8"}, - {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b86851a328eedc692acf81fb05444bdf1891747c25af7529e39ddafaf68a4f3f"}, - {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c0f31130ebc2d37cdd8e44605fb5fa7ad59049298b3f745c74fa74c62fbfcfc4"}, - {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f8e709127c6c77446a8c0a8c8bf3c8ee706a06cd44b1e827c3e6a2ee6b8c098"}, - {file = "cffi-1.16.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:748dcd1e3d3d7cd5443ef03ce8685043294ad6bd7c02a38d1bd367cfd968e000"}, - {file = "cffi-1.16.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8895613bcc094d4a1b2dbe179d88d7fb4a15cee43c052e8885783fac397d91fe"}, - {file = "cffi-1.16.0-cp39-cp39-win32.whl", hash = "sha256:ed86a35631f7bfbb28e108dd96773b9d5a6ce4811cf6ea468bb6a359b256b1e4"}, - {file = "cffi-1.16.0-cp39-cp39-win_amd64.whl", hash = "sha256:3686dffb02459559c74dd3d81748269ffb0eb027c39a6fc99502de37d501faa8"}, - {file = "cffi-1.16.0.tar.gz", hash = "sha256:bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25e02cc0"}, -] - [[package]] name = "charset-normalizer" version = "3.3.2" @@ -407,7 +350,7 @@ files = [ [[package]] name = "mkdocs-material" -version = "9.5.4" +version = "9.5.7" requires_python = ">=3.8" summary = "Documentation that simply works" groups = ["lint"] @@ -425,8 +368,8 @@ dependencies = [ "requests~=2.26", ] files = [ - {file = "mkdocs_material-9.5.4-py3-none-any.whl", hash = "sha256:efd7cc8ae03296d728da9bd38f4db8b07ab61f9738a0cbd0dfaf2a15a50e7343"}, - {file = "mkdocs_material-9.5.4.tar.gz", hash = "sha256:3d196ee67fad16b2df1a458d650a8ac1890294eaae368d26cee71bc24ad41c40"}, + {file = "mkdocs_material-9.5.7-py3-none-any.whl", hash = "sha256:0be8ce8bcfebb52bae9b00cf9b851df45b8a92d629afcfd7f2c09b2dfa155ea3"}, + {file = "mkdocs_material-9.5.7.tar.gz", hash = "sha256:16110292575d88a338d2961f3cb665cf12943ff8829e551a9b364f24019e46af"}, ] [[package]] @@ -451,51 +394,6 @@ files = [ {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, ] -[[package]] -name = "numpy" -version = "1.26.3" -requires_python = ">=3.9" -summary = "Fundamental package for array computing in Python" -groups = ["default"] -files = [ - {file = "numpy-1.26.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:806dd64230dbbfaca8a27faa64e2f414bf1c6622ab78cc4264f7f5f028fee3bf"}, - {file = "numpy-1.26.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02f98011ba4ab17f46f80f7f8f1c291ee7d855fcef0a5a98db80767a468c85cd"}, - {file = "numpy-1.26.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d45b3ec2faed4baca41c76617fcdcfa4f684ff7a151ce6fc78ad3b6e85af0a6"}, - {file = "numpy-1.26.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bdd2b45bf079d9ad90377048e2747a0c82351989a2165821f0c96831b4a2a54b"}, - {file = "numpy-1.26.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:211ddd1e94817ed2d175b60b6374120244a4dd2287f4ece45d49228b4d529178"}, - {file = "numpy-1.26.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b1240f767f69d7c4c8a29adde2310b871153df9b26b5cb2b54a561ac85146485"}, - {file = "numpy-1.26.3-cp310-cp310-win32.whl", hash = "sha256:21a9484e75ad018974a2fdaa216524d64ed4212e418e0a551a2d83403b0531d3"}, - {file = "numpy-1.26.3-cp310-cp310-win_amd64.whl", hash = "sha256:9e1591f6ae98bcfac2a4bbf9221c0b92ab49762228f38287f6eeb5f3f55905ce"}, - {file = "numpy-1.26.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b831295e5472954104ecb46cd98c08b98b49c69fdb7040483aff799a755a7374"}, - {file = "numpy-1.26.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9e87562b91f68dd8b1c39149d0323b42e0082db7ddb8e934ab4c292094d575d6"}, - {file = "numpy-1.26.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c66d6fec467e8c0f975818c1796d25c53521124b7cfb760114be0abad53a0a2"}, - {file = "numpy-1.26.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f25e2811a9c932e43943a2615e65fc487a0b6b49218899e62e426e7f0a57eeda"}, - {file = "numpy-1.26.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:af36e0aa45e25c9f57bf684b1175e59ea05d9a7d3e8e87b7ae1a1da246f2767e"}, - {file = "numpy-1.26.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:51c7f1b344f302067b02e0f5b5d2daa9ed4a721cf49f070280ac202738ea7f00"}, - {file = "numpy-1.26.3-cp311-cp311-win32.whl", hash = "sha256:7ca4f24341df071877849eb2034948459ce3a07915c2734f1abb4018d9c49d7b"}, - {file = "numpy-1.26.3-cp311-cp311-win_amd64.whl", hash = "sha256:39763aee6dfdd4878032361b30b2b12593fb445ddb66bbac802e2113eb8a6ac4"}, - {file = "numpy-1.26.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:a7081fd19a6d573e1a05e600c82a1c421011db7935ed0d5c483e9dd96b99cf13"}, - {file = "numpy-1.26.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:12c70ac274b32bc00c7f61b515126c9205323703abb99cd41836e8125ea0043e"}, - {file = "numpy-1.26.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f784e13e598e9594750b2ef6729bcd5a47f6cfe4a12cca13def35e06d8163e3"}, - {file = "numpy-1.26.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f24750ef94d56ce6e33e4019a8a4d68cfdb1ef661a52cdaee628a56d2437419"}, - {file = "numpy-1.26.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:77810ef29e0fb1d289d225cabb9ee6cf4d11978a00bb99f7f8ec2132a84e0166"}, - {file = "numpy-1.26.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8ed07a90f5450d99dad60d3799f9c03c6566709bd53b497eb9ccad9a55867f36"}, - {file = "numpy-1.26.3-cp312-cp312-win32.whl", hash = "sha256:f73497e8c38295aaa4741bdfa4fda1a5aedda5473074369eca10626835445511"}, - {file = "numpy-1.26.3-cp312-cp312-win_amd64.whl", hash = "sha256:da4b0c6c699a0ad73c810736303f7fbae483bcb012e38d7eb06a5e3b432c981b"}, - {file = "numpy-1.26.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1666f634cb3c80ccbd77ec97bc17337718f56d6658acf5d3b906ca03e90ce87f"}, - {file = "numpy-1.26.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:18c3319a7d39b2c6a9e3bb75aab2304ab79a811ac0168a671a62e6346c29b03f"}, - {file = "numpy-1.26.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b7e807d6888da0db6e7e75838444d62495e2b588b99e90dd80c3459594e857b"}, - {file = "numpy-1.26.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4d362e17bcb0011738c2d83e0a65ea8ce627057b2fdda37678f4374a382a137"}, - {file = "numpy-1.26.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b8c275f0ae90069496068c714387b4a0eba5d531aace269559ff2b43655edd58"}, - {file = "numpy-1.26.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:cc0743f0302b94f397a4a65a660d4cd24267439eb16493fb3caad2e4389bccbb"}, - {file = "numpy-1.26.3-cp39-cp39-win32.whl", hash = "sha256:9bc6d1a7f8cedd519c4b7b1156d98e051b726bf160715b769106661d567b3f03"}, - {file = "numpy-1.26.3-cp39-cp39-win_amd64.whl", hash = "sha256:867e3644e208c8922a3be26fc6bbf112a035f50f0a86497f98f228c50c607bb2"}, - {file = "numpy-1.26.3-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:3c67423b3703f8fbd90f5adaa37f85b5794d3366948efe9a5190a5f3a83fc34e"}, - {file = "numpy-1.26.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:46f47ee566d98849323f01b349d58f2557f02167ee301e5e28809a8c0e27a2d0"}, - {file = "numpy-1.26.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a8474703bffc65ca15853d5fd4d06b18138ae90c17c8d12169968e998e448bb5"}, - {file = "numpy-1.26.3.tar.gz", hash = "sha256:697df43e2b6310ecc9d95f05d5ef20eacc09c7c4ecc9da3f235d39e71b7da1e4"}, -] - [[package]] name = "packaging" version = "23.2" @@ -527,73 +425,6 @@ files = [ {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, ] -[[package]] -name = "pillow" -version = "10.2.0" -requires_python = ">=3.8" -summary = "Python Imaging Library (Fork)" -groups = ["default"] -files = [ - {file = "pillow-10.2.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:7823bdd049099efa16e4246bdf15e5a13dbb18a51b68fa06d6c1d4d8b99a796e"}, - {file = "pillow-10.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:83b2021f2ade7d1ed556bc50a399127d7fb245e725aa0113ebd05cfe88aaf588"}, - {file = "pillow-10.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fad5ff2f13d69b7e74ce5b4ecd12cc0ec530fcee76356cac6742785ff71c452"}, - {file = "pillow-10.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da2b52b37dad6d9ec64e653637a096905b258d2fc2b984c41ae7d08b938a67e4"}, - {file = "pillow-10.2.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:47c0995fc4e7f79b5cfcab1fc437ff2890b770440f7696a3ba065ee0fd496563"}, - {file = "pillow-10.2.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:322bdf3c9b556e9ffb18f93462e5f749d3444ce081290352c6070d014c93feb2"}, - {file = "pillow-10.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:51f1a1bffc50e2e9492e87d8e09a17c5eea8409cda8d3f277eb6edc82813c17c"}, - {file = "pillow-10.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:69ffdd6120a4737710a9eee73e1d2e37db89b620f702754b8f6e62594471dee0"}, - {file = "pillow-10.2.0-cp310-cp310-win32.whl", hash = "sha256:c6dafac9e0f2b3c78df97e79af707cdc5ef8e88208d686a4847bab8266870023"}, - {file = "pillow-10.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:aebb6044806f2e16ecc07b2a2637ee1ef67a11840a66752751714a0d924adf72"}, - {file = "pillow-10.2.0-cp310-cp310-win_arm64.whl", hash = "sha256:7049e301399273a0136ff39b84c3678e314f2158f50f517bc50285fb5ec847ad"}, - {file = "pillow-10.2.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:35bb52c37f256f662abdfa49d2dfa6ce5d93281d323a9af377a120e89a9eafb5"}, - {file = "pillow-10.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9c23f307202661071d94b5e384e1e1dc7dfb972a28a2310e4ee16103e66ddb67"}, - {file = "pillow-10.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:773efe0603db30c281521a7c0214cad7836c03b8ccff897beae9b47c0b657d61"}, - {file = "pillow-10.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11fa2e5984b949b0dd6d7a94d967743d87c577ff0b83392f17cb3990d0d2fd6e"}, - {file = "pillow-10.2.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:716d30ed977be8b37d3ef185fecb9e5a1d62d110dfbdcd1e2a122ab46fddb03f"}, - {file = "pillow-10.2.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:a086c2af425c5f62a65e12fbf385f7c9fcb8f107d0849dba5839461a129cf311"}, - {file = "pillow-10.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:c8de2789052ed501dd829e9cae8d3dcce7acb4777ea4a479c14521c942d395b1"}, - {file = "pillow-10.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:609448742444d9290fd687940ac0b57fb35e6fd92bdb65386e08e99af60bf757"}, - {file = "pillow-10.2.0-cp311-cp311-win32.whl", hash = "sha256:823ef7a27cf86df6597fa0671066c1b596f69eba53efa3d1e1cb8b30f3533068"}, - {file = "pillow-10.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:1da3b2703afd040cf65ec97efea81cfba59cdbed9c11d8efc5ab09df9509fc56"}, - {file = "pillow-10.2.0-cp311-cp311-win_arm64.whl", hash = "sha256:edca80cbfb2b68d7b56930b84a0e45ae1694aeba0541f798e908a49d66b837f1"}, - {file = "pillow-10.2.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:1b5e1b74d1bd1b78bc3477528919414874748dd363e6272efd5abf7654e68bef"}, - {file = "pillow-10.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0eae2073305f451d8ecacb5474997c08569fb4eb4ac231ffa4ad7d342fdc25ac"}, - {file = "pillow-10.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b7c2286c23cd350b80d2fc9d424fc797575fb16f854b831d16fd47ceec078f2c"}, - {file = "pillow-10.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e23412b5c41e58cec602f1135c57dfcf15482013ce6e5f093a86db69646a5aa"}, - {file = "pillow-10.2.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:52a50aa3fb3acb9cf7213573ef55d31d6eca37f5709c69e6858fe3bc04a5c2a2"}, - {file = "pillow-10.2.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:127cee571038f252a552760076407f9cff79761c3d436a12af6000cd182a9d04"}, - {file = "pillow-10.2.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:8d12251f02d69d8310b046e82572ed486685c38f02176bd08baf216746eb947f"}, - {file = "pillow-10.2.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:54f1852cd531aa981bc0965b7d609f5f6cc8ce8c41b1139f6ed6b3c54ab82bfb"}, - {file = "pillow-10.2.0-cp312-cp312-win32.whl", hash = "sha256:257d8788df5ca62c980314053197f4d46eefedf4e6175bc9412f14412ec4ea2f"}, - {file = "pillow-10.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:154e939c5f0053a383de4fd3d3da48d9427a7e985f58af8e94d0b3c9fcfcf4f9"}, - {file = "pillow-10.2.0-cp312-cp312-win_arm64.whl", hash = "sha256:f379abd2f1e3dddb2b61bc67977a6b5a0a3f7485538bcc6f39ec76163891ee48"}, - {file = "pillow-10.2.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:b792a349405fbc0163190fde0dc7b3fef3c9268292586cf5645598b48e63dc67"}, - {file = "pillow-10.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c570f24be1e468e3f0ce7ef56a89a60f0e05b30a3669a459e419c6eac2c35364"}, - {file = "pillow-10.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8ecd059fdaf60c1963c58ceb8997b32e9dc1b911f5da5307aab614f1ce5c2fb"}, - {file = "pillow-10.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c365fd1703040de1ec284b176d6af5abe21b427cb3a5ff68e0759e1e313a5e7e"}, - {file = "pillow-10.2.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:70c61d4c475835a19b3a5aa42492409878bbca7438554a1f89d20d58a7c75c01"}, - {file = "pillow-10.2.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:b6f491cdf80ae540738859d9766783e3b3c8e5bd37f5dfa0b76abdecc5081f13"}, - {file = "pillow-10.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9d189550615b4948f45252d7f005e53c2040cea1af5b60d6f79491a6e147eef7"}, - {file = "pillow-10.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:49d9ba1ed0ef3e061088cd1e7538a0759aab559e2e0a80a36f9fd9d8c0c21591"}, - {file = "pillow-10.2.0-cp39-cp39-win32.whl", hash = "sha256:babf5acfede515f176833ed6028754cbcd0d206f7f614ea3447d67c33be12516"}, - {file = "pillow-10.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:0304004f8067386b477d20a518b50f3fa658a28d44e4116970abfcd94fac34a8"}, - {file = "pillow-10.2.0-cp39-cp39-win_arm64.whl", hash = "sha256:0fb3e7fc88a14eacd303e90481ad983fd5b69c761e9e6ef94c983f91025da869"}, - {file = "pillow-10.2.0-pp310-pypy310_pp73-macosx_10_10_x86_64.whl", hash = "sha256:322209c642aabdd6207517e9739c704dc9f9db943015535783239022002f054a"}, - {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3eedd52442c0a5ff4f887fab0c1c0bb164d8635b32c894bc1faf4c618dd89df2"}, - {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cb28c753fd5eb3dd859b4ee95de66cc62af91bcff5db5f2571d32a520baf1f04"}, - {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:33870dc4653c5017bf4c8873e5488d8f8d5f8935e2f1fb9a2208c47cdd66efd2"}, - {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:3c31822339516fb3c82d03f30e22b1d038da87ef27b6a78c9549888f8ceda39a"}, - {file = "pillow-10.2.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:a2b56ba36e05f973d450582fb015594aaa78834fefe8dfb8fcd79b93e64ba4c6"}, - {file = "pillow-10.2.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:d8e6aeb9201e655354b3ad049cb77d19813ad4ece0df1249d3c793de3774f8c7"}, - {file = "pillow-10.2.0-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:2247178effb34a77c11c0e8ac355c7a741ceca0a732b27bf11e747bbc950722f"}, - {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:15587643b9e5eb26c48e49a7b33659790d28f190fc514a322d55da2fb5c2950e"}, - {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753cd8f2086b2b80180d9b3010dd4ed147efc167c90d3bf593fe2af21265e5a5"}, - {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:7c8f97e8e7a9009bcacbe3766a36175056c12f9a44e6e6f2d5caad06dcfbf03b"}, - {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:d1b35bcd6c5543b9cb547dee3150c93008f8dd0f1fef78fc0cd2b141c5baf58a"}, - {file = "pillow-10.2.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:fe4c15f6c9285dc54ce6553a3ce908ed37c8f3825b5a51a15c91442bb955b868"}, - {file = "pillow-10.2.0.tar.gz", hash = "sha256:e87f0b2c78157e12d7686b27d63c070fd65d994e8ddae6f328e0dcf4a0cd007e"}, -] - [[package]] name = "platformdirs" version = "4.1.0" @@ -605,17 +436,6 @@ files = [ {file = "platformdirs-4.1.0.tar.gz", hash = "sha256:906d548203468492d432bcb294d4bc2fff751bf84971fbb2c10918cc206ee420"}, ] -[[package]] -name = "pycparser" -version = "2.21" -requires_python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -summary = "C parser in Python" -groups = ["default"] -files = [ - {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, - {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, -] - [[package]] name = "pygame-ce" version = "2.4.0" @@ -645,6 +465,13 @@ files = [ {file = "pygame_ce-2.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:60bb12fdfad5f64becd0efbea82911de3d552090a068c472b3a820057bb1e251"}, {file = "pygame_ce-2.4.0-cp312-cp312-win32.whl", hash = "sha256:a29f928a7be8168a132d082a8875bee45cf5c2b282c4502fc09810bb0d509636"}, {file = "pygame_ce-2.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:5bf059a78880c882123627dab28d86acf6abccf90474f6be30b2b13de408e138"}, + {file = "pygame_ce-2.4.0-cp38-cp38-macosx_10_11_x86_64.whl", hash = "sha256:643f433d3b219b626c9af4930a42a107ef8ac4889e2764efd52ad9226b0b49d7"}, + {file = "pygame_ce-2.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9faa2b3d884706527b26e3a6e7d6187a05c588a0a2ec69fd25d492ee5b63e03f"}, + {file = "pygame_ce-2.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:024cd290b11d1bb6df7583233c7911a7567d67eb0bd42c0090a747415548ee2c"}, + {file = "pygame_ce-2.4.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ec7e1bebec921f65b7cfabe17bff4cf8d70dd7103331112d44a6e2fe70771332"}, + {file = "pygame_ce-2.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:632c37761b85c0518b720d2c4fba6b486ffc80b7badc0737da369f495bca5d8b"}, + {file = "pygame_ce-2.4.0-cp38-cp38-win32.whl", hash = "sha256:f96fdd100a9c54640c6e0d1233a19135225a2b4d35e9462db9ebcb1915019b26"}, + {file = "pygame_ce-2.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:bec8b4be887ec6bfbb198a17e42f1c62840c29c66b3c22434721bd3ea50a9165"}, {file = "pygame_ce-2.4.0-cp39-cp39-macosx_10_11_x86_64.whl", hash = "sha256:aacffbe44dbac82b0c31a0fbdcc4853087c8c409bc243bc1d054450d8cf9dbec"}, {file = "pygame_ce-2.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:305017897717656cc2eba1027e6a722a702023cae30a87815a91528c9ece0a8a"}, {file = "pygame_ce-2.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e46d7208c360a4700a7297adae4309809b6306a801daf9ea0a67b16d59d40f5"}, @@ -695,99 +522,6 @@ files = [ {file = "pymdown_extensions-10.7.tar.gz", hash = "sha256:c0d64d5cf62566f59e6b2b690a4095c931107c250a8c8e1351c1de5f6b036deb"}, ] -[[package]] -name = "pymunk" -version = "6.6.0" -requires_python = ">=3.7" -summary = "Pymunk is a easy-to-use pythonic 2d physics library" -groups = ["default"] -dependencies = [ - "cffi>=1.15.0", -] -files = [ - {file = "pymunk-6.6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6da50dd97683337a290110d594fad07a75153d2d837b570ef972478d739c33f8"}, - {file = "pymunk-6.6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:bcd7d16a2b4d51d45d6780a701f65c8d5b36fdf545c3f4738910da41e2a9c4ee"}, - {file = "pymunk-6.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:32c91a783b645267518588515acdc3ff315135297eef39386d488c4ff2a7c139"}, - {file = "pymunk-6.6.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:74694f92f46fe54e2c033b598b2c38185f456711888955aa3f67003692a3ef91"}, - {file = "pymunk-6.6.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fe011afb3f7594a679ba35dc7a44e12c8c8aacb55e58d54f14bfe8b82959695c"}, - {file = "pymunk-6.6.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:60e5cc6e33f7e880418f75a7d6b5ac3eed47396bbe7c68ca47c389de3b5d1d3a"}, - {file = "pymunk-6.6.0-cp310-cp310-win32.whl", hash = "sha256:10518074e33d4fe723bce795f705ad3e850ecec9987559ec3fa072a6539c47ad"}, - {file = "pymunk-6.6.0-cp310-cp310-win_amd64.whl", hash = "sha256:5b163b28f9500df1bb5e123e2dba2d1f255e63be6ca098544936a93c05022a43"}, - {file = "pymunk-6.6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8322594fc68858bfc0142f2f7a100cfb4edb85678a75983ce2fc58ed763afb96"}, - {file = "pymunk-6.6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4c1d0be60b781d1b8bb11303b25936d01cdef7ccfcc3a68b0c2fd689f63ac11c"}, - {file = "pymunk-6.6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9462200c47f3eb344373077dc01384cb16355a982ce0e33571201f3b7ee44487"}, - {file = "pymunk-6.6.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ede46cc44432b1316a402129fc225743f7e9f502d0d055790eab877627ddfd98"}, - {file = "pymunk-6.6.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:3582cd67d6ac16f122d2b7100e0b00d9b55f97a0a7e21336df885166e2bffdc3"}, - {file = "pymunk-6.6.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e4247ede965df39d2fd7ae25e9360762cce61f4d39b95af91d29c1c556c80777"}, - {file = "pymunk-6.6.0-cp311-cp311-win32.whl", hash = "sha256:a77f9bb634ab216ac8991f73aa68b4dadfd6690e8cb17627a6646dc8fecd6126"}, - {file = "pymunk-6.6.0-cp311-cp311-win_amd64.whl", hash = "sha256:2f579e8c5498b3e8c0686841f1f5e3adf1bdd32b339ee36001ebae19bbafc008"}, - {file = "pymunk-6.6.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ad6ca584a9ea1d6a1536ae158350d73dbbdc637f302a86019b7fb299120439c4"}, - {file = "pymunk-6.6.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b86be4ecfb86d4af26c3dd2e390884305c3b8604e5df8550fbb2968d3ac78411"}, - {file = "pymunk-6.6.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:68006cfb71351b6f23a81f541a2eca56596e69977e051e46cfe93a5ffdc410ef"}, - {file = "pymunk-6.6.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:361d2fa43e65aa5e47dcb50e6b058b3814e19cbdb5bf062d2da78c2b3bdba192"}, - {file = "pymunk-6.6.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:a3c35975f4172b024e0bb1be6f57f1048dcb469a8cf257c30123d11a9fe57e2a"}, - {file = "pymunk-6.6.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:35a57546294656b5bb989e08426a4926e26a17726aef35daf34c2703ee54c0e9"}, - {file = "pymunk-6.6.0-cp312-cp312-win32.whl", hash = "sha256:a68480440b60bf5acf3a7a8db1eb571e13ed425d5b693a20020f2efa9cc09592"}, - {file = "pymunk-6.6.0-cp312-cp312-win_amd64.whl", hash = "sha256:f7ed11a1e2a306e4213d88a1879ae0fb7c2c983a890fa1b35ed26b9392213c02"}, - {file = "pymunk-6.6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ed23f05a65687750cba4d6cde045147d28eee84e44cd33829b79601dc655adf3"}, - {file = "pymunk-6.6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b2c23f2f182f91944c4ba5cfd6f652e873e6e8b113506c3eca255df5e6c79b6e"}, - {file = "pymunk-6.6.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c51b6de5869dcb103467d8ac75f62a1a9f43faa18bf12e37e89247b2d5554a61"}, - {file = "pymunk-6.6.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5b44c4420b43cfdfedd2278e3beb60970a9a9564f1272c7cc74090931268ab43"}, - {file = "pymunk-6.6.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:4b8d9c14275fd4853ae863e38bec8a7ae4c7aef4417550ff74fc9f68f120fa00"}, - {file = "pymunk-6.6.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:31631a91bf29dde9c4a5f1283056cb91d451fe352f35a440c5cb668b0de19ad5"}, - {file = "pymunk-6.6.0-cp39-cp39-win32.whl", hash = "sha256:832d83570d0781e2bcba555b0974e9a5f9ee592079dfd3b183a493cf0ceaac7f"}, - {file = "pymunk-6.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:88625cca15c90dc8c0c1b55113f0ff19a8e6601ac0981804d317660c0afde9e2"}, - {file = "pymunk-6.6.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:8e27a8c7b762d43e91f18c320ad849c113dead500184d151aa14bd11a62c2c47"}, - {file = "pymunk-6.6.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aad898ca45546f084b0d88f73c771e3de0d19acc65f1171a9dbdba171945a915"}, - {file = "pymunk-6.6.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:45f537c79e817330753e6ed220b3ff46b5b983266d5b85ce7c1381a77b33d1f3"}, - {file = "pymunk-6.6.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:609341ff1329e59ee7a67b622973064c213111e87916981bc45838f38981ba47"}, - {file = "pymunk-6.6.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:345b99d19cb848359fbefcaba54a5f1bcc8dd05b084563d693ca4d0622aa1079"}, - {file = "pymunk-6.6.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f33c418b758e06960fa28e0434c14818c0d9755f431045db05cc93e646df9b22"}, - {file = "pymunk-6.6.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:59991310cb1a6f201878e9519cbb36ff746f825c9fac49fa76cf8c85b64bf7ad"}, - {file = "pymunk-6.6.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:c7513caf1add221cfa1228c12e14e0997a7212e583a59f517b68e72b1f02e08f"}, - {file = "pymunk-6.6.0.tar.gz", hash = "sha256:89be7b6ba237e313c440edfb99612de59bf119e43976d5c76802907cb7a3911c"}, -] - -[[package]] -name = "pyopengl" -version = "3.1.7" -summary = "Standard OpenGL bindings for Python" -groups = ["default"] -files = [ - {file = "PyOpenGL-3.1.7-py3-none-any.whl", hash = "sha256:a6ab19cf290df6101aaf7470843a9c46207789855746399d0af92521a0a92b7a"}, - {file = "PyOpenGL-3.1.7.tar.gz", hash = "sha256:eef31a3888e6984fd4d8e6c9961b184c9813ca82604d37fe3da80eb000a76c86"}, -] - -[[package]] -name = "pyopengl-accelerate" -version = "3.1.7" -summary = "Acceleration code for PyOpenGL" -groups = ["default"] -files = [ - {file = "PyOpenGL-accelerate-3.1.7.tar.gz", hash = "sha256:2b123621273a939f7fd2ec227541e399f9b5d4e815d69ae0bdb1b6c70a293680"}, - {file = "PyOpenGL_accelerate-3.1.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f2143cf1073c1377111873ec53b67cb9a75a546a101d8292670d0ffe40eca50d"}, - {file = "PyOpenGL_accelerate-3.1.7-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8a5c76bfe6dead3ee79619e2ba143650a70c462ffcff150bbefc29e792410f58"}, - {file = "PyOpenGL_accelerate-3.1.7-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b055975515fed03e9b84a348950cad3cba0441d5a5dcd264877d58e0d239019c"}, - {file = "PyOpenGL_accelerate-3.1.7-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:ccb73afacc8e0ed4fc68ff9ab3042e4c6bce3ce0587ec9d34dee18c4f032575e"}, - {file = "PyOpenGL_accelerate-3.1.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cf4ef5135069add79345bc954b12da1a4c3708ed99e3fd4c9b512cf5dc5767a0"}, - {file = "PyOpenGL_accelerate-3.1.7-cp310-cp310-win32.whl", hash = "sha256:c2636803fcbcb0767b1febd28153fd169a732577430cc9d2ab60ce322aaa1097"}, - {file = "PyOpenGL_accelerate-3.1.7-cp310-cp310-win_amd64.whl", hash = "sha256:ab8b7c7b4bab48b8fbd52481b2618ae382ea66952008c2a0e8908dfca5caa61d"}, - {file = "PyOpenGL_accelerate-3.1.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ad8e2d186878946e5c4896d1c241af6b5f8cd87433e46741d29c3fdea6eba2c5"}, - {file = "PyOpenGL_accelerate-3.1.7-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c1b2b93d25e9ec8475416ed18c27a0231f29dffe0b524d827276802534a3cde"}, - {file = "PyOpenGL_accelerate-3.1.7-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ed4efe15eedc79415ee192a9ca8bec04f19c7e313444ac50e50ea26c80606ce2"}, - {file = "PyOpenGL_accelerate-3.1.7-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:e8b41f94a185c71d4c2658e9ee1a6f14e555e8b83bd4e18e6367d66da6a39242"}, - {file = "PyOpenGL_accelerate-3.1.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:71b8a862ab85e02b7f88d935045be25ebc4104c3676263f0b90a91a520b66bd5"}, - {file = "PyOpenGL_accelerate-3.1.7-cp311-cp311-win32.whl", hash = "sha256:67b9f9d86ed5a928ebf93ace86dd8a4959388e04e89e115075575bbbe72c6546"}, - {file = "PyOpenGL_accelerate-3.1.7-cp311-cp311-win_amd64.whl", hash = "sha256:d3678b03e2cb41f87c84411313c441466497b7b829678ad5801944820f986cb7"}, - {file = "PyOpenGL_accelerate-3.1.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f7fcc0fb7a59082ecfde3bab9306c4f3153dcbf457a91d264e759178cea9ab97"}, - {file = "PyOpenGL_accelerate-3.1.7-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ea0f3cdcec32ebd2a8abfd81bcb30a126ebe1a645ddffaa61366474e993a19d"}, - {file = "PyOpenGL_accelerate-3.1.7-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dbd24c2830780912aebcfc2cb886ac68a669cfe2889074c5a0299f2d0dd78587"}, - {file = "PyOpenGL_accelerate-3.1.7-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:3468783d40906ef933ebd3516be4ee3636d474e4d31c40bd33ca504669ba5f6f"}, - {file = "PyOpenGL_accelerate-3.1.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:eb3e737d364476379db8919375fe3eb9c284beaaa5aeb62f0f343286a5ecaff9"}, - {file = "PyOpenGL_accelerate-3.1.7-cp39-cp39-win32.whl", hash = "sha256:3cdbaf28f6da023b1ddd85894088a525bc1088680782ab973a322d8701bfd685"}, - {file = "PyOpenGL_accelerate-3.1.7-cp39-cp39-win_amd64.whl", hash = "sha256:948bef39594f1142f38e21cf985d4f41a530dac65f07e3c6f04f02c94c3f15a8"}, -] - [[package]] name = "python-dateutil" version = "2.8.2" @@ -802,6 +536,17 @@ files = [ {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, ] +[[package]] +name = "pytz" +version = "2023.4" +summary = "World timezone definitions, modern and historical" +groups = ["lint"] +marker = "python_version < \"3.9\"" +files = [ + {file = "pytz-2023.4-py2.py3-none-any.whl", hash = "sha256:f90ef520d95e7c46951105338d918664ebfd6f1d995bd7d153127ce90efafa6a"}, + {file = "pytz-2023.4.tar.gz", hash = "sha256:31d4583c4ed539cd037956140d695e42c033a19e984bfce9964a3f7d59bc2b40"}, +] + [[package]] name = "pyyaml" version = "6.0.1" diff --git a/pyproject.toml b/pyproject.toml index ef4c0279..cbec9135 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,16 +47,13 @@ classifiers = [ ] dependencies = [ "pygame-ce>=2.4.0", - "pymunk>=6.6.0", - "pyopengl>=3.1.7", - "pillow>=10.2.0", - "numpy>=1.24.0", - "PyOpenGL-accelerate>=3.1.7", ] -includes = ["**/*.png", "**/*.ttf"] [tool.pdm] -distribution = "true" +distribution = true + +[tool.pdm.options] +includes = ["**/*.png", "**/*.ttf"] [tool.pdm.build] package-dir = "src" diff --git a/src/fusionengine/__init__.py b/src/fusionengine/__init__.py index c3b3e668..325a7556 100644 --- a/src/fusionengine/__init__.py +++ b/src/fusionengine/__init__.py @@ -1,8 +1,10 @@ -__author__ = "Dimkauzh" -__version__ = "5.1.0" +__author__ = "Fusion Engine Team" +__version__ = "5.2.0" import sys import os +import warnings +import platform os.environ["PYGAME_HIDE_SUPPORT_PROMPT"] = "hide" @@ -22,6 +24,9 @@ # Entity from fusionengine.engine.entity import * +# Node +from fusionengine.engine.node import * + # Storage from fusionengine.engine.storage import * @@ -46,18 +51,23 @@ from fusionengine.engine.animation import * from fusionengine.engine.spritesheets import * +# GL +import fusionengine.fusiongl as gl import pygame as pg -import OpenGL message = True - -if os.environ.get("FUSION_HIDE_PROMPT") is None: +if os.environ.get("FUSION_HIDE_PROMPT") is None or not message: python_version = sys.version.split()[0] print( - f"Fusion Engine {__version__} (PyOpenGL {OpenGL.__version__}, Pygame-ce {pg.version.ver}, Python {python_version})" + f"Fusion Engine {__version__} (FusionGL {gl.__version__}, Pygame-ce {pg.version.ver}, Python {python_version})" ) print( "Welcome to Fusion Engine! Check out our website at https://fusion-engine.tech/" ) + +if platform.system().lower() == "linux": + warnings.filterwarnings( + "ignore", message="PyGame seems to be running through X11 on top of wayland" + ) diff --git a/src/fusionengine/backend/gl.py b/src/fusionengine/backend/gl.py deleted file mode 100644 index 9b822bc1..00000000 --- a/src/fusionengine/backend/gl.py +++ /dev/null @@ -1,306 +0,0 @@ -import OpenGL.GL as gl -from OpenGL.constant import FloatConstant, IntConstant - -LINES = gl.GL_LINES -QUADS = gl.GL_QUADS -POINTS = gl.GL_POINTS - -SRC_ALPHA = gl.GL_SRC_ALPHA -ONE_MINUS_SRC_ALPHA = gl.GL_ONE_MINUS_SRC_ALPHA - -BLEND = gl.GL_BLEND -TEXTURE_2D = gl.GL_TEXTURE_2D -RGBA = gl.GL_RGBA -UNSIGNED_BYTE = gl.GL_UNSIGNED_BYTE - -TEXTURE_WRAP_S = gl.GL_TEXTURE_WRAP_S -TEXTURE_WRAP_T = gl.GL_TEXTURE_WRAP_T -TEXTURE_MIN_FILTER = gl.GL_TEXTURE_MIN_FILTER -TEXTURE_MAG_FILTER = gl.GL_TEXTURE_MAG_FILTER -CLAMP_TO_EDGE = gl.GL_CLAMP_TO_EDGE - -NEAREST = gl.GL_NEAREST -REPEAT = gl.GL_REPEAT -LINEAR_MIPMAP_LINEAR = gl.GL_LINEAR_MIPMAP_LINEAR -LINEAR = gl.GL_LINEAR - -COLOR_BUFFER_BIT = gl.GL_COLOR_BUFFER_BIT -DEPTH_BUFFER_BIT = gl.GL_DEPTH_BUFFER_BIT - -PROJECTION = gl.GL_PROJECTION -MODELVIEW = gl.GL_MODELVIEW - - -def Vertex2f(x, y): - """ - Set a vertex on the screen. - - Args: - x: x coordinate of the vertex - y: Y coordinate of the vertex - """ - gl.glVertex2f(x, y) - - -def Begin(mode): - """ - Begin drawing. - - Args: - mode: The mode of drawing - """ - gl.glBegin(mode) - - -def End(): - """ - End drawing. - """ - gl.glEnd() - - -def Color4f(r, g, b, a): - """ - Set the color of the next vertex. - - Args: - r: The red value of the color - g: The green value of the color - b: The blue value of the color - a: The alpha value of the color - """ - gl.glColor4f(r / 255, g / 255, b / 255, a / 255) - - -def ClearColor(r, g, b, a): - """ - Set the background color. - - Args: - r: The red value of the color - g: The green value of the color - b: The blue value of the color - a: The alpha value of the color - """ - gl.glClearColor(r / 255, g / 255, b / 255, a / 255) - - -def LineWidth(width): - """ - Set the width of the lines. - - Args: - width: The width of the lines - """ - gl.glLineWidth(width) - - -def GenTextures(n): - """ - Generate a texture. - - Args: - n: The amount of textures to generate - - Returns: - int: The texture id - """ - return gl.glGenTextures(n) - - -def BindTexture(target, texture): - """ - Bind a texture. - - Args: - target: The target of the texture - texture: The texture id - """ - gl.glBindTexture(target, texture) - - -def TexImage2D( - target, level, internalformat, width, height, border, format, type, pixels -): - """ - Set the image of a texture. - - Args: - target: The target of the texture - level: The level of the texture - internalformat: The internal format of the texture - width: The width of the texture - height: The height of the texture - border: The border of the texture - format: The format of the texture - type: The type of the texture - pixels: The pixels of the texture - """ - gl.glTexImage2D( - target, level, internalformat, width, height, border, format, type, pixels - ) - - -def GenerateMipmap(target): - """ - Generate mipmaps. - - Args: - target: The target of the texture - """ - gl.glGenerateMipmap(target) - - -def TexParameteri(target, pname, param): - """ - Set the parameters of a texture. - - Args: - target: The target of the texture - pname: The name of the parameter - param: The value of the parameter - """ - gl.glTexParameteri(target, pname, param) - - -def TexParameterf(target, pname, param): - """ - Set the parameters of a texture. - - Args: - target: The target of the texture - pname: The name of the parameter - param: The value of the parameter - """ - gl.glTexParameterf(target, pname, param) - - -def Clear(buffer_mask): - """ - Clear the screen. - - Args: - target: The target of the clear - """ - gl.glClear(buffer_mask) - - -def ViewPort(x, y, width, height): - """ - Set viewport. - - Args: - x: x - y: y - width: width - height: height - """ - gl.glViewport(x, y, width, height) - - -def Ortho(left, right, bottom, top, near, far): - """ - Set up an orthographic projection matrix. - - Args: - left: Coordinate of the left clipping plane. - right: Coordinate of the right clipping plane. - bottom: Coordinate of the bottom clipping plane. - top: Coordinate of the top clipping plane. - near: Distance to the near clipping plane. - far: Distance to the far clipping plane. - """ - gl.glOrtho(left, right, bottom, top, near, far) - - -def MatrixMode(mode): - """ - Set the current matrix mode. - - Args: - mode: The matrix mode to set (e.g., GL_MODELVIEW, GL_PROJECTION). - """ - gl.glMatrixMode(mode) - - -def LoadIdentity(): - """ - Replace the current matrix with the identity matrix. - """ - gl.glLoadIdentity() - - -def TexCoord2f(x, y): - """ - Set the texture coordinates. - - Args: - x: x coordinate of the texture - y: y coordinate of the texture - """ - gl.glTexCoord2f(x, y) - - -def Enable(cap): - """ - Enable a capability. - - Args: - cap: The capability to enable - """ - gl.glEnable(cap) - - -def BlendFunc(sfactor, dfactor): - """ - Set the pixel blending factors. - - Args: - sfactor: The source blending factor - dfactor: The destination blending factor - """ - gl.glBlendFunc(sfactor, dfactor) - - -def RasterPos2d(sfactor, dfactor): - """ - Set the pixel blending factors. - - Args: - sfactor: The source blending factor - dfactor: The destination blending factor - """ - gl.glRasterPos2d(sfactor, dfactor) - - -def DrawPixels(width, height, format, type, pixels): - """ - Draw pixels. - - Args: - width: The width of the pixels - height: The height of the pixels - format: The format of the pixels - type: The type of the pixels - pixels: The pixels - """ - gl.glDrawPixels(width, height, format, type, pixels) - - -def TexParameter(target, pname, param): - """ - Set the parameters of a texture. - - Args: - target: The target of the texture - pname: The name of the parameter - param: The value of the parameter - """ - gl.glTexParameter(target, pname, param) - - -def Flush(): - """ - Flush all commands. - """ - gl.glFlush() diff --git a/src/fusionengine/engine/animation.py b/src/fusionengine/engine/animation.py index 1e747bac..d82df224 100644 --- a/src/fusionengine/engine/animation.py +++ b/src/fusionengine/engine/animation.py @@ -3,7 +3,9 @@ class Animation: - def __init__(self, window: Window, images: tuple | SpriteSheet) -> None: + def __init__( + self, window: Window, images: tuple | SpriteSheet, speed: float + ) -> None: """ The class to create an Animation. @@ -14,6 +16,7 @@ def __init__(self, window: Window, images: tuple | SpriteSheet) -> None: """ self.frame = 0 self.prev_frame = 0 + self.speed = speed if isinstance(images, SpriteSheet): self.frames = images.frames @@ -24,7 +27,7 @@ def __init__(self, window: Window, images: tuple | SpriteSheet) -> None: self.window = window - def play(self, speed: float) -> None: + def play(self) -> None: """ Draw the animation you made before """ @@ -38,7 +41,7 @@ def play(self, speed: float) -> None: self.frames[int(self.frame)].draw() self.prev_frame = self.frame - self.frame += speed + self.frame += self.speed if self.frame >= len(self.frames): self.frame = 0 diff --git a/src/fusionengine/engine/draw.py b/src/fusionengine/engine/draw.py index 3030608c..3b3b9aae 100644 --- a/src/fusionengine/engine/draw.py +++ b/src/fusionengine/engine/draw.py @@ -1,6 +1,6 @@ from fusionengine.engine.window import Window from fusionengine.engine.color import Color -import fusionengine.backend.gl as gl +import fusionengine.fusiongl as gl import pygame as pg diff --git a/src/fusionengine/engine/image.py b/src/fusionengine/engine/image.py index dc7b662e..5b12443a 100644 --- a/src/fusionengine/engine/image.py +++ b/src/fusionengine/engine/image.py @@ -1,15 +1,12 @@ -from fusionengine.engine.window import Window -from fusionengine.engine.shape import Rect -import fusionengine.backend.gl as gl +import fusionengine.fusiongl as gl import pygame as pg -from PIL import Image as Imager class Image: def __init__( self, - image_path: str | Imager.Image, + image_path: str | pg.Surface, x: int, y: int, width: int, @@ -19,7 +16,7 @@ def __init__( Opens an image. Can be later rendered with draw method. Args: - image_path (str or Pillow Image): The path to the image | Pillow Image + image_path (str or Pygame Surface): The path to the image | Pygame Surface x (int): X coordinate of the image y (int): Y coordinate of the image width (int): Width of the image (scaling allowed) @@ -32,26 +29,24 @@ def __init__( self.height = height if isinstance(image_path, str): - self.image = Imager.open(str(image_path)) - elif isinstance(image_path, Imager.Image): + self.image = pg.image.load(image_path) + elif isinstance(image_path, pg.Surface): self.image = image_path else: raise ValueError("Invalid image_path type") - image_data = self.image.tobytes("raw", "RGBA", 0, -1) - self.texture = gl.GenTextures(1) gl.BindTexture(gl.TEXTURE_2D, self.texture) gl.TexImage2D( gl.TEXTURE_2D, 0, gl.RGBA, - self.image.width, - self.image.height, + self.image.get_width(), + self.image.get_height(), 0, gl.RGBA, gl.UNSIGNED_BYTE, - image_data, + pg.image.tostring(self.image, "RGBA"), ) gl.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE) @@ -59,7 +54,16 @@ def __init__( gl.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR) gl.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR) - def crop(self, left: int, right: int, top: int, bottom: int) -> "Image": + def get_image_size(self): + """ + Returns the size of the image itself (not the set size). + + Returns: + tuple: (width, height) + """ + return self.image.get_width(), self.image.get_height() + + def crop(self, x: int, y: int, width: int, height: int) -> "Image": """ Crop the image based on the specified boundaries. @@ -72,13 +76,8 @@ def crop(self, left: int, right: int, top: int, bottom: int) -> "Image": Returns: Image: A new Image object representing the cropped image. """ - return Image( - self.image.crop((left, right, top, bottom)), - self.x, - self.y, - self.width, - self.height, - ) + cropped_surface = self.image.subsurface((x, y, width, height)) + return Image(cropped_surface, self.x, self.y, self.width, self.height) def draw(self) -> None: """ diff --git a/src/fusionengine/engine/node.py b/src/fusionengine/engine/node.py new file mode 100644 index 00000000..85d034f9 --- /dev/null +++ b/src/fusionengine/engine/node.py @@ -0,0 +1,95 @@ +from fusionengine.engine.window import Window +from fusionengine.engine.shape import Rect +from fusionengine.engine.image import Image +from fusionengine.engine.vector import Vector2D +from fusionengine.engine.animation import Animation +from fusionengine.engine.color import Color + + +class Node: + def __init__(self, window: Window, x: int, y: int, width: int, height: int): + self.x = x + self.y = y + self.width = width + self.height = height + self.window = window + self.frame = 0 + self.to_draw = [] + + def get_coord_tuple(self) -> tuple[int, int]: + """ + Returns the coordinates of the node as a tuple. + + Returns: + A tuple containing the x and y coordinates of the node. + """ + return self.x, self.y + + def get_coord_vec2(self) -> Vector2D: + """ + Returns the coordinates of the node as a Vector2D object. + + Returns: + Vector2D: The coordinates of the node. + """ + return Vector2D(self.x, self.y) + + def set_frame(self, frame: int) -> None: + """ + Sets the frame of the previously loaded images (as a animation). + + Args: + frame (int): The frame of the animation + """ + self.frame = frame + + def get_frame(self) -> int: + """ + Gets the frame of the previously loaded images (as a animation). + + Returns: + int: The frame of the animation + """ + return self.frame + + def load_image(self, image_path: str) -> None: + """ + Gives the entity an image and laters draws it on the screen. + + Args: + image_path (str): The path to the image + """ + self.to_draw.append(Image(image_path, self.x, self.y, self.width, self.height)) + + def load_animation(self, images: tuple | Animation) -> None: + """ + Loads images that can be later used as a animation. + + Args: + images (tuple): A tuple of images + """ + self.to_draw.append(images) + + def load_rect(self, color: Color) -> None: + """ + Gives the entity a rectangle and later draws it on the screen. + + Args: + color (tuple): The color of the rectangle + """ + self.to_draw.append(Rect(self.x, self.y, self.width, self.height, color)) + + def update(self): + """ + Update method for the node. + This method is called to update the state of the node and to draw everything. + """ + for draw in self.to_draw: + if isinstance(draw, tuple): + draw[self.frame].draw() + elif isinstance(draw, Animation): + draw.play() + else: + draw.draw() + + self.to_draw = [] diff --git a/src/fusionengine/engine/spritesheets.py b/src/fusionengine/engine/spritesheets.py index 60e5d12f..3c8bd5cd 100644 --- a/src/fusionengine/engine/spritesheets.py +++ b/src/fusionengine/engine/spritesheets.py @@ -1,5 +1,4 @@ from fusionengine.engine.image import Image -from PIL import Image as Imager class SpriteSheet: @@ -12,7 +11,7 @@ def __init__(self, image_path: str, sprite_width: int, sprite_height: int): sprite_width (int): Width of each sprite frame. sprite_height (int): Height of each sprite frame. """ - self.sprite_sheet = Imager.open(image_path).convert("RGBA") + self.sprite_sheet = Image(image_path, 0, 0, 0, 0) self.sprite_width = sprite_width self.sprite_height = sprite_height self.frames = self.get_frames() @@ -27,17 +26,17 @@ def get_frames(self) -> list: list: List of Image objects representing individual frames. """ frames = [] - columns = self.sprite_sheet.width // self.sprite_width - rows = self.sprite_sheet.height // self.sprite_height + columns = self.sprite_sheet.get_image_size()[0] // self.sprite_width + rows = self.sprite_sheet.get_image_size()[1] // self.sprite_height for row in range(rows): for col in range(columns): - frame = Image(self.extract_frame(col, row), 0, 0, 0, 0) + frame = self.extract_frame(col, row) frames.append(frame) return frames - def extract_frame(self, col: int, row: int) -> Imager.Image: + def extract_frame(self, col: int, row: int) -> Image: """ Extract a single frame from the sprite sheet. @@ -46,14 +45,15 @@ def extract_frame(self, col: int, row: int) -> Imager.Image: row (int): Row index of the sprite. Returns: - Imager.Image: Image object representing the extracted frame. + Image: Image object representing the extracted frame. """ x = col * self.sprite_width y = row * self.sprite_height - frame = self.sprite_sheet.crop( - (x, y, x + self.sprite_width, y + self.sprite_height) + frame_surface = self.sprite_sheet.crop( + x, y, self.sprite_width, self.sprite_height ) + frame = Image(frame_surface.image, 0, 0, self.sprite_width, self.sprite_height) return frame def frame_size(self, width: int, height: int) -> None: diff --git a/src/fusionengine/engine/ui.py b/src/fusionengine/engine/ui.py index 1acbeb29..1e5902f9 100644 --- a/src/fusionengine/engine/ui.py +++ b/src/fusionengine/engine/ui.py @@ -1,7 +1,6 @@ -from fusionengine.engine.window import Window from fusionengine.engine.shape import Rect -from fusionengine.engine.color import Color, WHITE, BLACK, GRAY -import fusionengine.backend.gl as gl +from fusionengine.engine.color import Color, WHITE, GRAY +import fusionengine.fusiongl as gl from fusionengine.engine.debug import DEBUGFONT import pygame as pg diff --git a/src/fusionengine/engine/window.py b/src/fusionengine/engine/window.py index 57dfc968..12c65eaf 100644 --- a/src/fusionengine/engine/window.py +++ b/src/fusionengine/engine/window.py @@ -1,5 +1,5 @@ from fusionengine.engine.debug import DEBUGIMAGE -import fusionengine.backend.gl as gl +import fusionengine.fusiongl as gl import pygame as pg from pygame.locals import DOUBLEBUF, OPENGL @@ -15,8 +15,11 @@ def __init__(self, title: str, width: int, height: int) -> None: width (int): The width of your window height (int): The height of your window """ + try: + pg.init() - pg.init() + except Exception: + print("Error: Can't initialize pygame.") self._running = False self._fps = 60 diff --git a/src/fusionengine/examples/example3.py b/src/fusionengine/examples/example3.py index 3b30f5c9..031e9f47 100644 --- a/src/fusionengine/examples/example3.py +++ b/src/fusionengine/examples/example3.py @@ -2,10 +2,9 @@ window = fusion.Window("Example: 3", 800, 600) -player = fusion.Entity(window, 50, 50, 50, 50) +player = fusion.Node(window, 50, 50, 50, 50) - -speed = 10 +SPEED = 10 @window.loop @@ -15,15 +14,15 @@ def loop(): player.load_rect(fusion.AQUA) if fusion.Key(fusion.KEY_UP).key_down() or fusion.Key(fusion.KEY_W).key_down(): - player.y = int(player.y - speed) + player.y = player.y - SPEED elif fusion.Key(fusion.KEY_DOWN).key_down() or fusion.Key(fusion.KEY_S).key_down(): - player.y = int(player.y + speed) + player.y = player.y + SPEED elif fusion.Key(fusion.KEY_RIGHT).key_down() or fusion.Key(fusion.KEY_D).key_down(): - player.x = int(player.x + speed) + player.x = player.x + SPEED elif fusion.Key(fusion.KEY_LEFT).key_down() or fusion.Key(fusion.KEY_A).key_down(): - player.x = int(player.x - speed) + player.x = player.x - SPEED - player.draw_rect() + player.update() diff --git a/src/fusionengine/fusiongl/__init__.py b/src/fusionengine/fusiongl/__init__.py new file mode 100644 index 00000000..4e896cc7 --- /dev/null +++ b/src/fusionengine/fusiongl/__init__.py @@ -0,0 +1,4 @@ +__author__ = "Fusion Engine Team" +__version__ = "1.0.1" + +from fusionengine.fusiongl.binding import * diff --git a/src/fusionengine/fusiongl/binding.py b/src/fusionengine/fusiongl/binding.py new file mode 100644 index 00000000..0ecf7623 --- /dev/null +++ b/src/fusionengine/fusiongl/binding.py @@ -0,0 +1,364 @@ +import ctypes +from fusionengine.fusiongl.libgl import gl + +LINES = 0x0001 +QUADS = 0x0007 +POINTS = 0x0000 + +SRC_ALPHA = 0x0302 +ONE_MINUS_SRC_ALPHA = 0x0303 + +BLEND = 0x0BE2 +TEXTURE_2D = 0x0DE1 +RGBA = 0x1908 +UNSIGNED_BYTE = 0x1401 + +TEXTURE_WRAP_S = 0x2802 +TEXTURE_WRAP_T = 0x2803 +TEXTURE_MIN_FILTER = 0x2801 +TEXTURE_MAG_FILTER = 0x2800 +CLAMP_TO_EDGE = 0x812F + +NEAREST = 0x2600 +REPEAT = 0x2901 +LINEAR_MIPMAP_LINEAR = 0x2703 +LINEAR = 0x2601 + +COLOR_BUFFER_BIT = 0x4000 +DEPTH_BUFFER_BIT = 0x0100 + +PROJECTION = 0x1701 +MODELVIEW = 0x1700 + +GL_VERSION = 0x1F02 +GL_MAJOR_VERSION = 0x821B +GL_MINOR_VERSION = 0x821C + + +def Vertex2f(x, y): + """ + Set a vertex on the screen. + + Args: + x (float): x coordinate of the vertex + y (float): y coordinate of the vertex + """ + gl.glVertex2f(ctypes.c_float(x), ctypes.c_float(y)) + + +def Begin(mode): + """ + Begin drawing. + + Args: + mode (int): The mode of drawing + """ + gl.glBegin(ctypes.c_uint(mode)) + + +def End(): + """ + End drawing. + """ + gl.glEnd() + + +def Color4f(r, g, b, a): + """ + Set the color of the next vertex. + + Args: + r (float): The red value of the color + g (float): The green value of the color + b (float): The blue value of the color + a (float): The alpha value of the color + """ + gl.glColor4f( + ctypes.c_float(r / 255), + ctypes.c_float(g / 255), + ctypes.c_float(b / 255), + ctypes.c_float(a / 255), + ) + + +def ClearColor(r, g, b, a): + """ + Set the background color. + + Args: + r (float): The red value of the color + g (float): The green value of the color + b (float): The blue value of the color + a (float): The alpha value of the color + """ + gl.glClearColor( + ctypes.c_float(r / 255), + ctypes.c_float(g / 255), + ctypes.c_float(b / 255), + ctypes.c_float(a / 255), + ) + + +def LineWidth(width): + """ + Set the width of the lines. + + Args: + width (float): The width of the lines + """ + gl.glLineWidth(ctypes.c_float(width)) + + +def GenTextures(n): + """ + Generate a texture. + + Args: + n (int): The amount of textures to generate + + Returns: + int: The texture id + """ + texture_id = ctypes.c_uint(0) + gl.glGenTextures(1, ctypes.byref(texture_id)) + return texture_id.value + + +def BindTexture(target, texture): + """ + Bind a texture. + + Args: + target (int): The target of the texture + texture (int): The texture id + """ + gl.glBindTexture(ctypes.c_uint(target), ctypes.c_uint(texture)) + + +def TexImage2D( + target, level, internalformat, width, height, border, format, type, pixels +): + """ + Set the image of a texture. + + Args: + target (int): The target of the texture + level (int): The level of the texture + internalformat (int): The internal format of the texture + width (int): The width of the texture + height (int): The height of the texture + border (int): The border of the texture + format (int): The format of the texture + type (int): The type of the texture + pixels (ctypes.c_void_p): The pixels of the texture + """ + gl.glTexImage2D( + ctypes.c_uint(target), + ctypes.c_int(level), + ctypes.c_int(internalformat), + ctypes.c_int(width), + ctypes.c_int(height), + ctypes.c_int(border), + ctypes.c_uint(format), + ctypes.c_uint(type), + pixels, + ) + + +def GenerateMipmap(target): + """ + Generate mipmaps. + + Args: + target (int): The target of the texture + """ + gl.glGenerateMipmap(ctypes.c_uint(target)) + + +def TexParameteri(target, pname, param): + """ + Set the parameters of a texture. + + Args: + target (int): The target of the texture + pname (int): The name of the parameter + param (int): The value of the parameter + """ + gl.glTexParameteri(ctypes.c_uint(target), ctypes.c_uint(pname), ctypes.c_int(param)) + + +def TexParameterf(target, pname, param): + """ + Set the parameters of a texture. + + Args: + target (int): The target of the texture + pname (int): The name of the parameter + param (float): The value of the parameter + """ + gl.glTexParameterf( + ctypes.c_uint(target), ctypes.c_uint(pname), ctypes.c_float(param) + ) + + +def Clear(buffer_mask): + """ + Clear the screen. + + Args: + buffer_mask (int): The target of the clear + """ + gl.glClear(ctypes.c_uint(buffer_mask)) + + +def ViewPort(x, y, width, height): + """ + Set viewport. + + Args: + x (int): x + y (int): y + width (int): width + height (int): height + """ + gl.glViewport( + ctypes.c_int(x), ctypes.c_int(y), ctypes.c_int(width), ctypes.c_int(height) + ) + + +def Ortho(left, right, bottom, top, near, far): + """ + Set up an orthographic projection matrix. + + Args: + left (float): Coordinate of the left clipping plane. + right (float): Coordinate of the right clipping plane. + bottom (float): Coordinate of the bottom clipping plane. + top (float): Coordinate of the top clipping plane. + near (float): Distance to the near clipping plane. + far (float): Distance to the far clipping plane. + """ + gl.glOrtho( + ctypes.c_double(left), + ctypes.c_double(right), + ctypes.c_double(bottom), + ctypes.c_double(top), + ctypes.c_double(near), + ctypes.c_double(far), + ) + + +def MatrixMode(mode): + """ + Set the current matrix mode. + + Args: + mode (int): The matrix mode to set (e.g., GL_MODELVIEW, GL_PROJECTION). + """ + gl.glMatrixMode(ctypes.c_uint(mode)) + + +def LoadIdentity(): + """ + Replace the current matrix with the identity matrix. + """ + gl.glLoadIdentity() + + +def TexCoord2f(x, y): + """ + Set the texture coordinates. + + Args: + x (float): x coordinate of the texture + y (float): y coordinate of the texture + """ + gl.glTexCoord2f(ctypes.c_float(x), ctypes.c_float(y)) + + +def Enable(cap): + """ + Enable a capability. + + Args: + cap (int): The capability to enable + """ + gl.glEnable(ctypes.c_uint(cap)) + + +def BlendFunc(sfactor, dfactor): + """ + Set the pixel blending factors. + + Args: + sfactor (int): The source blending factor + dfactor (int): The destination blending factor + """ + gl.glBlendFunc(ctypes.c_uint(sfactor), ctypes.c_uint(dfactor)) + + +def RasterPos2d(sfactor, dfactor): + """ + Set the pixel blending factors. + + Args: + sfactor (float): The source blending factor + dfactor (float): The destination blending factor + """ + gl.glRasterPos2d(ctypes.c_double(sfactor), ctypes.c_double(dfactor)) + + +def DrawPixels(width, height, format, type, pixels): + """ + Draw pixels. + + Args: + width (int): The width of the pixels + height (int): The height of the pixels + format (int): The format of the pixels + type (int): The type of the pixels + pixels (ctypes.c_void_p): The pixels + """ + gl.glDrawPixels( + ctypes.c_int(width), + ctypes.c_int(height), + ctypes.c_uint(format), + ctypes.c_uint(type), + pixels, + ) + + +def TexParameter(target, pname, param): + """ + Set the parameters of a texture. + + Args: + target (int): The target of the texture + pname (int): The name of the parameter + param (int): The value of the parameter + """ + gl.glTexParameter(ctypes.c_uint(target), ctypes.c_uint(pname), ctypes.c_int(param)) + + +def Flush(): + """ + Flush all commands. + """ + gl.glFlush() + + +def GetString(type) -> bytes | None: + return ctypes.cast(gl.glGetString(GL_VERSION), ctypes.c_char_p).value + + +def GetIntegerv(type) -> int: + integ = ctypes.c_int() + gl.glGetIntegerv(type, ctypes.byref(integ)) + return int(integ.value) + + +def GetVersion() -> str: + major_version = GetIntegerv(GL_MAJOR_VERSION) + minor_version = GetIntegerv(GL_MINOR_VERSION) + + return str(major_version) + "." + str(minor_version) diff --git a/src/fusionengine/fusiongl/libgl.py b/src/fusionengine/fusiongl/libgl.py new file mode 100644 index 00000000..c0dfb664 --- /dev/null +++ b/src/fusionengine/fusiongl/libgl.py @@ -0,0 +1,28 @@ +import ctypes +import platform +import os + +from ctypes.util import find_library +from warnings import warn + +system_platform = platform.system().lower() +if system_platform == "windows": + library_name = "opengl32" +elif system_platform == "darwin": + library_name = "OpenGL" +elif system_platform == "linux": + library_name = "GL" +else: + if os.environ.get("FUSION_HIDE_GL_PROMPT") is None: + warn( + "Your platform could not be resolved. Defaulting to OpenGL as GL. Rever to the documentation to learn about how to remove this warning.", + category=None, + stacklevel=1, + ) + library_name = "GL" + +opengl_lib_path = find_library(library_name) +if opengl_lib_path is None: + raise OSError(f"Could not find the OpenGL library for platform {system_platform}") + +gl = ctypes.CDLL(opengl_lib_path) diff --git a/tests/anim.py b/tests/anim.py index 886a0455..1a5b8ba4 100644 --- a/tests/anim.py +++ b/tests/anim.py @@ -1,12 +1,12 @@ import fusionengine as fusion window = fusion.Window("Example: 1", 600, 600) -image1 = fusion.Image(window, fusion.DEBUGIMAGE, 0, 0, 600, 600) -image2 = fusion.Image(window, fusion.DEBUGIMAGE, 0, 0, 400, 400) +image1 = fusion.Image(fusion.DEBUGIMAGE, 0, 0, 600, 600) +image2 = fusion.Image(fusion.DEBUGIMAGE, 0, 0, 400, 400) -anim = fusion.Animation(window, [image1, image2], 3) +anim = fusion.Animation(window, (image1, image2), 3) @window.loop def loop(): - anim.draw() + anim.play() diff --git a/tests/codon_test.py b/tests/codon_test.py index 8f0d0252..3cc3f320 100644 --- a/tests/codon_test.py +++ b/tests/codon_test.py @@ -1,7 +1,7 @@ from python import fusionengine as fusion window = fusion.window.Window("Example: 1", 600, 600) -image = fusion.image.Image(window, fusion.debug.DEBUGIMAGE, 0, 0, 600, 600) +image = fusion.image.Image(fusion.debug.DEBUGIMAGE, 0, 0, 600, 600) while window.running(): image.draw() diff --git a/tests/drawing_test.py b/tests/drawing_test.py deleted file mode 100644 index 66e8ccca..00000000 --- a/tests/drawing_test.py +++ /dev/null @@ -1,13 +0,0 @@ -import fusionengine as fe - -main = fe.Main() - -window = main.window.new_window("test", 400, 400) - - -@main.window.loop -def loop(): - main.draw.draw_rect(window, 0, 0, 300, 200, (234, 43, 54, 100)) - - image = main.image.open_image(window, main.debug.DEBUGIMAGE, 64, 64, 64, 64) - main.image.draw_image(image) diff --git a/tests/encode.py b/tests/encode.py index f773fa20..481e138e 100644 --- a/tests/encode.py +++ b/tests/encode.py @@ -1,4 +1,5 @@ import base64 +import fusionengine def image_to_base64(image_path): @@ -7,7 +8,6 @@ def image_to_base64(image_path): return encoded_image.decode("utf-8") -image_path = "src/fusionengine/debugfiles/fe.png" -base64_image = image_to_base64(image_path) +base64_image = image_to_base64(fusionengine.DEBUGIMAGE) print(base64_image) diff --git a/tests/oop_check.py b/tests/oop_check.py deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/performance.py b/tests/performance.py new file mode 100644 index 00000000..35f5d5ed --- /dev/null +++ b/tests/performance.py @@ -0,0 +1,27 @@ +import fusionengine as fusion +import time + +checked_time = False +start_time = time.time() + +window = fusion.Window("test", 600, 600) + + +if fusion.__version__ == "5.1.0" or fusion.__version__ == "5.0.0": + image = fusion.Image(fusion.DEBUGIMAGE, 0, 0, 600, 600) + +else: + image = fusion.Image(window, fusion.DEBUGIMAGE, 0, 0, 600, 600) + + +@window.loop +def loop(): + global checked_time + image.draw() + + if not checked_time: + end_time = time.time() + elapsed_time = end_time - start_time + + print(elapsed_time) + checked_time = True diff --git a/tests/py_gui_test.py b/tests/py_gui_test.py deleted file mode 100644 index 643b0f8a..00000000 --- a/tests/py_gui_test.py +++ /dev/null @@ -1,30 +0,0 @@ -import pygame as pg -import pygame_gui - -pg.init() -pg.display.set_mode((800, 600)) - -manager = pygame_gui.UIManager((800, 600)) -hello_button = pygame_gui.elements.UIButton( - relative_rect=pg.Rect((350, 275), (100, 50)), text="Hello", manager=manager -) - -running = True - -while running: - for event in pg.event.get(): - if event.type == pg.QUIT: - running = False - - manager.process_events(event) - - manager.update(1.0 / 60.0) - - if hello_button.check_pressed(): - print("Hello World!") - - manager.draw_ui(pg.display.get_surface()) - - pg.display.flip() - -pg.quit() diff --git a/tests/pygame_opengl.py b/tests/pygame_opengl.py deleted file mode 100644 index 29a299b5..00000000 --- a/tests/pygame_opengl.py +++ /dev/null @@ -1,73 +0,0 @@ -import pygame -from pygame.locals import * -from OpenGL.GL import * -from OpenGL.GLUT import * -from OpenGL.GLU import gluPerspective -from PIL import Image -from fusionengine import DEBUGIMAGE - - -def load_texture(filename): - image = Image.open(filename) - texture_data = image.tobytes("raw", "RGBA", 0, -1) - - texture_id = glGenTextures(1) - glBindTexture(GL_TEXTURE_2D, texture_id) - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR) - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) - glTexImage2D( - GL_TEXTURE_2D, - 0, - GL_RGBA, - image.width, - image.height, - 0, - GL_RGBA, - GL_UNSIGNED_BYTE, - texture_data, - ) - - return texture_id - - -def draw_textured_quad(texture_id): - glBindTexture(GL_TEXTURE_2D, texture_id) - glBegin(GL_QUADS) - glTexCoord2f(0, 0) - glVertex2f(-1, -1) - - glTexCoord2f(1, 0) - glVertex2f(1, -1) - - glTexCoord2f(1, 1) - glVertex2f(1, 1) - - glTexCoord2f(0, 1) - glVertex2f(-1, 1) - - glEnd() - - -def main(): - pygame.init() - display = (800, 600) - pygame.display.set_mode(display, DOUBLEBUF | OPENGL) - gluPerspective(45, (display[0] / display[1]), 0.1, 50.0) - glTranslatef(0.0, 0.0, -5) - - texture_id = load_texture(DEBUGIMAGE) - - while True: - for event in pygame.event.get(): - if event.type == pygame.QUIT: - pygame.quit() - quit() - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) - draw_textured_quad(texture_id) - pygame.display.flip() - pygame.time.wait(10) - - -if __name__ == "__main__": - main() diff --git a/tests/sdl2_pygame.py b/tests/sdl2_pygame.py deleted file mode 100644 index 4aa2390c..00000000 --- a/tests/sdl2_pygame.py +++ /dev/null @@ -1,65 +0,0 @@ -import pygame -from pygame.locals import * -from sdl2 import * - - -def main(): - pygame.init() - pygame.display.set_caption("Mixed Rendering Example") - - width, height = 800, 600 - pygame_window = pygame.display.set_mode( - (width, height), pygame.DOUBLEBUF | pygame.HWSURFACE - ) - - SDL_Init(SDL_INIT_VIDEO) - sdl_window = SDL_CreateWindowFrom(pygame.display.get_wm_info()["window"]) - renderer = SDL_CreateRenderer( - sdl_window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC - ) - - running = True - clock = pygame.time.Clock() - - # Create a Pygame surface for rendering - pygame_surface = pygame.Surface((width, height), pygame.SRCALPHA) - - # Create a PySDL2 texture for rendering - texture = SDL_CreateTexture( - renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_STREAMING, width, height - ) - - while running: - for event in pygame.event.get(): - if event.type == QUIT: - running = False - - # PySDL2 rendering - SDL_SetRenderTarget(renderer, texture) - SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0) - SDL_RenderClear(renderer) - SDL_SetRenderDrawColor(renderer, 255, 0, 0, 128) - SDL_RenderDrawLine(renderer, 0, 0, width, height) - SDL_RenderDrawLine(renderer, width, 0, 0, height) - SDL_SetRenderTarget(renderer, None) - - # Update the Pygame surface with the PySDL2 texture pixels - pixels, pitch = SDL_LockTexture(texture, None, None) - pygame_surface = pygame.image.fromstring(pixels, (width, height), "RGBA", True) - SDL_UnlockTexture(texture) - - # Draw the Pygame surface onto the Pygame window - pygame_window.blit(pygame_surface, (0, 0)) - pygame.display.flip() - - clock.tick(60) - - SDL_DestroyTexture(texture) - SDL_DestroyRenderer(renderer) - SDL_DestroyWindow(sdl_window) - SDL_Quit() - pygame.quit() - - -if __name__ == "__main__": - main() diff --git a/tests/spritesheet.py b/tests/spritesheet.py index f2f6bac3..1de505d0 100644 --- a/tests/spritesheet.py +++ b/tests/spritesheet.py @@ -8,9 +8,9 @@ spr.frame_size(100, 100) spr.frame_pos(50, 50) -anim = fusion.Animation(window, spr) +anim = fusion.Animation(window, spr, 0.1) @window.loop def loop(): - anim.play(0.1) + anim.play() diff --git a/tests/tests.py b/tests/tests.py deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/ui_test.py b/tests/ui_test.py deleted file mode 100644 index 1b5a3f5e..00000000 --- a/tests/ui_test.py +++ /dev/null @@ -1,11 +0,0 @@ -import fusionengine as fusion - -window = fusion.Window() - -button = fusion.Button(fusion.Rect(window, 64, 64, 64, 64), "Click me") - - -@window.loop -def loop(): - if button.button_pressed(): - print("hi")