From f1f33caf02e22542ba4f10fd256bdee868936de8 Mon Sep 17 00:00:00 2001 From: Koji AGAWA Date: Fri, 10 May 2024 06:50:39 +0900 Subject: [PATCH] docs: readme --- README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..ad4d6b4 --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +# Path of Building Web + +> [!WARNING] +> This project is under development. + +This is online version of [Path of Building](https://pathofbuilding.community/). + +## Development + +### Prerequisites + +- [Bun](https://bun.sh/) +- [Emscripten](https://emscripten.org/) +- [CMake](https://cmake.org/) +- [Ninja](https://ninja-build.org/) + +### Run driver shell + +Set up a development server for the PoB engine alone. + +```bash +cd packages/driver +bun install +bun run build +bun dev +``` + +### Run web app + +Set up a web application development server. +You need to build the driver first. + +```bash +cd packages/web +bun install +bun dev +``` + +## Under the hood + +- Running the original PoB Lua code with [few modifications for Lua 5.2](https://github.com/atty303/PathOfBuilding/tree/pob-web). +- Using Emscripten to compile the PoB engine to WebAssembly. +- A module equivalent to SimpleGraphic is written in C to bridge with the JS driver. +- The JS renderer renders using WebGL. +- `packages/driver` emulates PoB windows with vanilla JS. +- `packages/web` is the React application that uses the driver.