Phyxel GUI
GUI implementation for the Phyxel cellular physics library project.
ScreenRecorderProject25.mp4
As per now only the basic behavior illustrated in Phyxel README is implemented.
The project organization is the same as in my previous project OOP_LAB2_sem2.
-- is taken from OOP_LAB2_sem2 README
As this project uses several external libraries (Phyxel, Box2D, ImGui, SDL), to build the project you will first need to init the git submodules:
git submodule update --init --recursiveCMake is used for the project building.
Thus, building for PC would be done as usual:
# Generate the CMake cache
cmake -S "." -B "./build"
# Build the sources
cmake --build "./build" --target guiEmscripten build
This is the section in which the WebAssembly executable building process is explained. Due to usage of CMake, the process is quite similar to what we have already seen in PC build.
Again, we have to pull the git submodules to get sources of our libraries:
git submodule update --init --recursiveNext, we have to deal with the Emscripten building pipeline. General guidelines could be found and were stolen from here: https://stunlock.gg/posts/emscripten_with_cmake/
The next steps for the build are:
- Install the Emscripten compiler and setup the Env variables (follow the link above for more detailed instructions);
- Open the terminal in ADMIN MODE and go the source dir. Now use following commands:
# Configure the build folder
emcmake cmake -S . -B ./build/emscripten_build
# Build the gui target
cmake --build ./build/emscripten_build --target gui- If there are no errors, this must be the thing. Now you could serve a Python server from a
docsfolder:
python -m http.server --directory ./docs 8000