Comments (8)
It is! There are a lot of improvements we'd like to make and not all of these are reflected within the Issues. I'll share a recent comment I left in #82.
This project could really use some TLC. It's past due to be converted to TypeScript along with generating both ESM and CJS bundles. These things should probably happen as part of a 1.0.0 release.
I'm definitely open to any and all suggestions or PRs to improve things. Theres probably also room for some general housekeeping around Issues and PRs, which I haven't had an opportunity to get around to just yet 😬 but probably should do soon.
from easystarjs.
Ah I see, I saw quite a few stale PRs and issues so I wasn't sure, that could use some cleaning up.
I was considering making my own fork with quite a few changes and improvements.
from easystarjs.
Well if you're interested in contributing your improvements back here then I would certainly welcome it, but if you decide you want to take a different direction then you're of course welcome to fork and do whatever you like. The license is very permissive for this reason. 😄
from easystarjs.
honestly, I just wanted the customization to declare custom functions for things like isTileWalkable, checkAdjacentNode ect.
from easystarjs.
I like the idea of providing a custom function for something like this. You're jogging my memory of a past PR that started to do something similar, but I don't believe it was ever finished.
from easystarjs.
Would love a custom condition for those functions - would allow for things like elevation, especially useful for isometric games (E.g. can't go from tile -> tile if elevation is too high)
from easystarjs.
I ended up writing my own implementation.
It's usable something like this.
const WALL_TILE = Object.freeze(new AStaar.TileMeta({walkable: false}));
const SLOW_TILE = Object.freeze(new AStaar.TileMeta({cost: 2}));
const NORMAL_TILE = Object.freeze(new AStaar.TileMeta());
export let astaar = new AStaar({
getTile: function (x, y) {
if (!window.app.biomeData[x] || !window.app.biomeData[x][y]) return WALL_TILE;
let color = window.app.biomeData[x][y];
switch (color) {
case "#808080":
return WALL_TILE;
case "...":
return SLOW_TILE;
default:
return NORMAL_TILE;
}
}
});```
from easystarjs.
Not sure that'd work for my use-case unfortunately - elevation would depend on knowing both the current and target tile to know if the elevation difference is too high :(
from easystarjs.
Related Issues (20)
- Demo Uncaught ReferenceError: EasyStar is not defined at easy-star-demo.js:97:4
- Multiple End Points
- Is this still updated?
- Custom checkAdjacentNode or isTileWalkable HOT 2
- Possibility to define for each tile which directions are allowed. HOT 1
- Proposal: replace callbacks by Promises HOT 3
- Feature Request: Move to 'within range' of target HOT 6
- Broken links on website due to latest release being incorrectly tagged HOT 1
- Additionnal points and corner cutting
- setDirectionalCondition can be more efficient if a Set is used HOT 1
- finding path out of unwalkable area
- Are there any forks or strategies that utilize a 3rd axis?
- How do you import this please? HOT 1
- modifying grid values between setGrid and and findPath/calculate causes wrong results HOT 1
- Tactical RPG use HOT 1
- How to get the shortest path HOT 4
- Is "setAcceptableTiles" always necessary?
- "End Point Is Not An Acceptable Tile" HOT 1
- bower.json file reference 0.4.3 but the distribution file is 0.4.4 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easystarjs.