Native | Web |
---|---|
Screenshots from older version
git clone https://github.com/pkarnakov/ptoy.git
- Linux or Mac OS X
- C++14 compiler
- CMake (optional)
- emscripten (optional to build WebAssembly)
- SDL2
- glew
Build with CMake
make
Build without CMake, using pkgconf
to find SDL2 and glew
make legacy
cd build && ./ptoy
r
: switch mouse to Repulsion modea
: switch mouse to Attraction modep
: switch mouse to Pick modef
: switch mouse to Freeze modeo
: switch mouse to Portal modeb
: switch mouse to Bonds moden
: switch mouse to No action modeg
: toggle gravityi
: remove last pair of portalsspace
: toggle pauseq
: quit after pressing 3 times
Click actions depend on the mode selected by keyboard, all mouse buttons are equivalent.
Mode | Key | Click action |
---|---|---|
Repulsion (default) | r |
repulsive force |
Attraction | a |
attractive force |
Portal | o |
draw portals (blue, then orange) |
Pick | p |
pick the closest particle |
Freeze | f |
freeze/unfreeze particle |
Bonds | b |
draw bonds between particles |
No action | n |
nothing |