Skip to content

Commit

Permalink
Move PhaseTransition.html to PhaseTransition/ and fix README
Browse files Browse the repository at this point in the history
  • Loading branch information
kongaskristjan committed Dec 24, 2019
1 parent 98c64ac commit 6b71380
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if(EMSCRIPTEN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s USE_SDL=2 -s USE_SDL_TTF=2 -s ASSERTIONS=1 -s ALLOW_MEMORY_GROWTH=1")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --embed-file ${CMAKE_SOURCE_DIR}/Setups@PhaseTransition")

configure_file(Tests/PhaseTransition.html PhaseTransition.html COPY_ONLY)
configure_file(PhaseTransition/PhaseTransition.html PhaseTransition.html COPY_ONLY)
else()
include_directories(${SDL2_INCLUDE_DIRS} ${SDL2TTF_INCLUDE_DIR} ${SDL2_IMAGE_INCLUDE_DIR} .)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Building:
* Create and change working directory to build directory: `mkdir build && cd build`
* Build, run tests and program on Linux: `cmake -D CMAKE_BUILD_TYPE=Release .. && make && ./RunTests && ./PhaseTransition ../Setups/default.txt`,
where `./RunTests` is optional.
* Build for web using emscripten: `emconfigure cmake -D CMAKE_BUILD_TYPE=Release .. && emmake make`. This should generate PhaseTransition html, js and wasm files. You probably need a web server to actually run this in your browser: `python -m http.server 8080` (still from the build directory). Then go to <http://localhost:8080/PhaseTransition.html>. Currently the web build is slow because it's single-threaded.
* Build for web using emscripten: `emconfigure cmake -D CMAKE_BUILD_TYPE=Release .. && emmake make`. This should generate PhaseTransition html, js and wasm files. You probably need a web server to actually run this in your browser: `python3 -m http.server 8080` (still from the build directory). Then go to <http://localhost:8080/PhaseTransition.html>. Currently the web build is slow because it's single-threaded.

Default simulation resolution, particle properties, etc. can be modified in Setups/default.txt. For web build, modify Setups/web.txt and force a rebuild by removing all files in the build directory.

Expand Down

0 comments on commit 6b71380

Please sign in to comment.