Permalink
Commits on Mar 9, 2018
Commits on Feb 23, 2018
Commits on Jan 17, 2018
  1. Fix corner cutting (#58)

    prettymuchbryce committed Jan 17, 2018
    * Fixed missing argument to isTileWalkable() when !allowCornerCutting. (#57)
    
    * Add regression and bump version
Commits on Apr 16, 2017
  1. Bump version to 0.4.1

    prettymuchbryce committed Apr 16, 2017
Commits on Apr 3, 2017
  1. Update README.md

    prettymuchbryce committed Apr 3, 2017
  2. Add benchmarks (#48)

    sbj42 authored and prettymuchbryce committed Apr 3, 2017
    * Issue #46: Add ability to cancel an instance
    
    `findPath()` now returns a unique number (even across multiple instances of easystar).  There's a new method `cancelPath()` which can be used to cancel a path calculation.
    
    This can be used to avoid wasting effort, for instance if a game actor dies or changes its destination before the path is computed.
    
    * Cleanup, and have cancelPath return boolean
    
    * Missed a spot renaming _nextId.
    
    Add a test case confirming that two instances have different IDs, which might have caught this mistake.
    
    * Convert instances from array to map
    
    Add instanceQueue to maintain the calculation order.  This change should make cancelling paths O(1) rather than O(n).
    
    * update index.d.ts for path canelling changes.
    
    * Add karma-benchmark, and some benchmarks.
    
    There are two grids benchmarked:  One is maze-like, so the search will be deep but narrow.  The other is a mostly open field, so the search will be short but with more branches.
    
    For both grids, the benchmarks are run three different ways: With no diagonals, diagonals but no corner-cutting, and diagonals with corner-cutting.
    
    * Add karma-benchmark, and some benchmarks.
    
    There are two grids benchmarked:  One is maze-like, so the search will be deep but narrow.  The other is a mostly open field, so the search will be short but with more branches.
    
    For both grids, the benchmarks are run three different ways: With no diagonals, diagonals but no corner-cutting, and diagonals with corner-cutting.
    
    * Bump version to 0.4.0
    
    * Use synchronous benchmarks
    
    Because these benchmarks use `enableAsync` there is no need to use the benchmarkjs `defer` flag.  This seems to avoid potential "Maximum call stack size exceeded" errors when the benchmarks are fast (possible bug in karma-benchmark).
    
    * Add karma-benchmark, and some benchmarks.
    
    There are two grids benchmarked:  One is maze-like, so the search will be deep but narrow.  The other is a mostly open field, so the search will be short but with more branches.
    
    For both grids, the benchmarks are run three different ways: With no diagonals, diagonals but no corner-cutting, and diagonals with corner-cutting.
    
    * Use synchronous benchmarks
    
    Because these benchmarks use `enableAsync` there is no need to use the benchmarkjs `defer` flag.  This seems to avoid potential "Maximum call stack size exceeded" errors when the benchmarks are fast (possible bug in karma-benchmark).
    
    * Add a 1000x1000 benchmark.
    
    This pushes the limits of `karma-benchmarkjs-reporter`, in that it doesn't show precise results when ops take more than one second.
    
    But a test like this is important to avoid optimizing the small-grid case at the expense of the large-grid case.
  3. Merge pull request #51 from sbj42/performance

    prettymuchbryce committed Apr 3, 2017
    Performance improvements
Commits on Apr 1, 2017
  1. Merge pull request #53 from sbj42/issue52

    prettymuchbryce committed Apr 1, 2017
    Fix issue #52: Some conditional directions were not working.
  2. Fix for issue #52

    sbj42 committed Apr 1, 2017
    Replace `,` with `&&` in `calculateDirection()`.  Also fix the reversed directions there.
    
    This seemed to work before because the only used direction in the previous test case was `LEFT`, which happened to be correct in that case.
  3. Extend the directional-condition test case

    sbj42 committed Apr 1, 2017
    Try to hit more of the directions, to get better coverage.  This exposes that some of the directions don't work properly.  For instance the `[EasyStar.LEFT]` condition fails because `calculateDirection()` can never return `LEFT`.
Commits on Mar 31, 2017
  1. Add spaces around operator

    sbj42 committed Mar 31, 2017
  2. Revert changes to bin directory

    sbj42 committed Mar 31, 2017
  3. `pointsToAvoid` performance improvement

    sbj42 committed Mar 31, 2017
    Improve the performance of `pointsToAvoid` by doing a two-level lookup instead of a single lookup using a concatenated string.
  4. `directionalConditions` performance improvement

    sbj42 committed Mar 31, 2017
    Improve the performance of `directionalConditions` by doing a two-level lookup instead of a single lookup using a concatenated string.
  5. `pointsToCost` performance improvement

    sbj42 committed Mar 31, 2017
    Improve the performance of `pointsToCost` by doing a two-level lookup instead of a single lookup using a concatenated string.
  6. `nodeHash` performance improvement

    sbj42 committed Mar 31, 2017
    Improve the performance of `nodeHash` lookups by doing a two-level lookup of y-then-x instead of concatenating them together as a single key.
    
    For me this makes the benchmarks run about 30% more ops/sec.
  7. Cleanup in `calculate`

    sbj42 committed Mar 31, 2017
    `isDoneCalculating` was unnecessary, the instance being looked at in `tilesToSearch[i].instance.isDoneCalculating` is always the current instance, and the point at which `isDoneCalculating` was being set to `true` was a fine place to go ahead and remove the instance.
    
    `tilesToSearch` was unnecessary, it's sufficient to go straight to calling `checkAdjacentNode`.  This avoids constructing the `tilesToSearch` array and the tile objects in it.  That's not a big performance improvement, but it simplifies the code.
  8. Bump version to 0.4.0

    prettymuchbryce committed Mar 31, 2017
  9. Merge pull request #47 from sbj42/issue46

    prettymuchbryce committed Mar 31, 2017
    Add ability to cancel an instance (issue #46)
Commits on Mar 27, 2017
  1. Convert instances from array to map

    sbj42 committed Mar 27, 2017
    Add instanceQueue to maintain the calculation order.  This change should make cancelling paths O(1) rather than O(n).
  2. Missed a spot renaming _nextId.

    sbj42 committed Mar 27, 2017
    Add a test case confirming that two instances have different IDs, which might have caught this mistake.
Commits on Mar 26, 2017
  1. Issue #46: Add ability to cancel an instance

    sbj42 committed Mar 26, 2017
    `findPath()` now returns a unique number (even across multiple instances of easystar).  There's a new method `cancelPath()` which can be used to cancel a path calculation.
    
    This can be used to avoid wasting effort, for instance if a game actor dies or changes its destination before the path is computed.
Commits on Dec 30, 2016
  1. Merge pull request #34 from EddieOne/patch-1

    prettymuchbryce committed Dec 30, 2016
    Update readme to include node.js useage
Commits on Nov 19, 2016
  1. Bump version to 0.3.1

    prettymuchbryce committed Nov 19, 2016
Commits on Sep 10, 2016
  1. Update README.md

    prettymuchbryce committed Sep 10, 2016
  2. Update README.md

    prettymuchbryce committed Sep 10, 2016
  3. Merge pull request #39 from pellejacobs/add_directional_condition

    prettymuchbryce committed Sep 10, 2016
    Add directional condition
  4. Minor fixes to typings and readme files

    Pelle Jacobs Pelle Jacobs
    Pelle Jacobs authored and Pelle Jacobs committed Sep 10, 2016
  5. Update readme | adding `removeAllDirectionalConditions`

    Pelle Jacobs Pelle Jacobs
    Pelle Jacobs authored and Pelle Jacobs committed Sep 10, 2016
  6. Revert "Remove lodash.includes dep"

    Pelle Jacobs Pelle Jacobs
    Pelle Jacobs authored and Pelle Jacobs committed Sep 10, 2016
    This reverts commit b6aba25.