Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/icewind1991/sourcenav
parsing of SourceEngine .nav files
https://github.com/icewind1991/sourcenav
Last synced: 9 days ago
JSON representation
parsing of SourceEngine .nav files
- Host: GitHub
- URL: https://github.com/icewind1991/sourcenav
- Owner: icewind1991
- License: agpl-3.0
- Created: 2020-04-30T22:27:51.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-02T12:53:47.000Z (over 4 years ago)
- Last Synced: 2024-10-11T13:42:40.525Z (about 1 month ago)
- Language: Rust
- Size: 377 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tf2-devs - icewind1991/sourcenav - rust - parser for `.nav` files (Table of contents / Format parsers)
README
# SourceNav
parsing of SourceEngine `.nav` files
## Usage
This library is currently focused on getting the z-height from an x/y coordinate in a map and the api is tailored towards
that usage. For other usages the raw navigation areas are exposed.```rust
use sourcenav::get_quad_tree;fn main() -> Result<(), Box> {
let file = std::fs::read("data/pl_badwater.nav")?;
let tree = get_quad_tree(file)?;assert_eq!(220.83125, tree.find_best_height(320.0, -1030.0, 0.0));
Ok(())
}```
## Credits and Licence
This library is largely based on [gonav](https://github.com/mrazza/gonav), a parser for `.nav` files written in Go
and is licenced under AGPL-3.0.