forked from Petah/2d-visibility
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eebbb75
commit 8789c39
Showing
1 changed file
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,30 @@ | ||
# 2D Visibility Algorithm Demo | ||
# 2D Visibility Algorithm | ||
|
||
Fork of https://github.com/Silverwolf90/2d-visibility | ||
Fork of https://github.com/Petah/2d-visibility | ||
|
||
This is a 2d visibility algorithm described in [this article](http://www.redblobgames.com/articles/visibility/), ported by hand to TypeScript and slightly refactored. | ||
|
||
I highly suggest reading the article. It's very well explained with some really awesome interactive examples and provides the code in multiple languages. The original code was written in Haxe, which can compile into JavaScript but I found the generated JS to be rather difficult to read and comes with an (unnecessary) doubly linked list implementation. | ||
|
||
# Building the demo | ||
# Local developement | ||
|
||
![Screenshot of demo](http://i.imgur.com/PIljyGJ.png) | ||
## Installation | ||
|
||
Clone the repo, `npm install` then run `npm run build` and open `index.html` in your browser. | ||
``` | ||
npm install | ||
``` | ||
|
||
## Run demo | ||
|
||
``` | ||
npm run dev | ||
``` | ||
|
||
## Build | ||
|
||
``` | ||
npm run build | ||
``` | ||
|
||
|
||
![image](https://github.com/archilogic-com/2d-visibility/assets/7444615/2037ff60-c118-4f39-b66b-ca8fd6a86f96) |