Add difficult terrain support for pathfinding on gridded scenes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use js_sys::Array;
|
||||
use sha1::{Sha1, Digest};
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
use crate::{
|
||||
@@ -262,6 +263,14 @@ pub fn debug_get_pathfinding_points(pathfinder: &Pathfinder) -> Array {
|
||||
.collect()
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[wasm_bindgen]
|
||||
pub fn sha1(input: &str) -> String {
|
||||
let mut hasher = Sha1::new();
|
||||
hasher.update(input);
|
||||
format!("{:x}", hasher.finalize())
|
||||
}
|
||||
|
||||
trait IteratePath {
|
||||
fn iter_path(&self) -> PathIterator;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user