Skip to content

Commit 1f510d4

Browse files
1.2.6 update
1 parent ddda145 commit 1f510d4

File tree

10 files changed

+1260
-2591
lines changed

10 files changed

+1260
-2591
lines changed

CHANGELOG.md

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,45 @@
11
# Changelog
2+
23
All notable changes to this project will be documented in this file.
34

45
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
56

67
## [1.X.X] - 2020-XX-XX
8+
79
### Added
10+
11+
### Changed
12+
13+
### Fixed
14+
15+
---
16+
17+
## [1.2.6] - 2023-01-31
18+
819
### Changed
20+
21+
- Update all dependencies in `./` and `./example`
22+
- Prettify `./example/index.html`, `README.md`, `CHANGELOG.md` and `CODE_OF_CONDUCT.md`
23+
- Add 2023 in Copyright in `LICENSE`
24+
925
### Fixed
1026

27+
- Remove `astar-typescript` as a `dependency` in the example `package.json`
28+
1129
---
1230

1331
## [1.2.5] - 2020-12-13
1432

1533
### Fixed
34+
1635
- Update `example/yarn.lock` file
1736

1837
---
1938

2039
## [1.2.4] - 2020-12-13
2140

2241
### Changed
42+
2343
- Update dependencies in example
2444
- Remove NPM support: Remove `package-lock.json` in main project and example
2545

@@ -28,6 +48,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
2848
## [1.2.3] - 2020-12-13
2949

3050
### Changed
51+
3152
- Update `loadash` from `4.17.19` to `4.17.20`
3253
- Update `typescript` from `3.9.7` to `4.1.3`
3354
- Update `package-lock.json` and `yarn.lock`
@@ -37,9 +58,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
3758
## [1.2.2] - 2020-08-06
3859

3960
### Changed
40-
- Update astar-typescript version from 1.2.0 to 1.2.1 in example
61+
62+
- Update astar-typescript version from 1.2.0 to 1.2.1 in example
4163

4264
### Fixed
65+
4366
- Fix misspelling: It is not manhatt**e**n, it is manhatt**a**n
4467
(Thank you @spassvogel)
4568

@@ -48,42 +71,49 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
4871
## [1.2.1] - 2020-08-06
4972

5073
### Changed
74+
5175
- Update astar-typescript version from 1.1.9 to 1.2.0 in example
5276

5377
---
5478

5579
## [1.2.0] - 2020-08-06
5680

5781
### Added
82+
5883
- Add `yarn.lock` in root
5984
- Add `yarn.lock` in example folder
6085
- Add `package-lock.json` in example folder
6186

6287
### Changed
88+
6389
- Update `typescript` from `3.8.3` to `3.9.7`
6490
- Update `loadash` from `4.17.15` to `4.17.19`
6591
- Only import `minBy` and `remove` from lodash
6692
- Update dependencies in example
6793

6894
### Fixed
95+
6996
- Remove `yarn.lock` from the `.gitignore` file list
7097

7198
---
7299

73100
## [1.1.9] - 2020-04-17
74101

75102
### Changed
103+
76104
- Introduce const for let where possible
77105
- Small changes in LICENSE and README
78106

79107
### Fixed
108+
80109
- Fixes failing builds with a fresh install (Thank you @krazyjakee)
81110

82111
---
83112

84113
## [1.1.8] - 2020-04-15
85114

86115
### Changed
116+
87117
- Remove unnecessary `console.log` in `astar-finder.ts`
88118
- Small changes of the prettier configuration
89119
- Small changes in the README.md file
@@ -95,16 +125,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
95125
## [1.1.6] - 2020-02-22
96126

97127
### Added
128+
98129
- Update `example`
99130

100131
---
101132

102133
## [1.1.4] - 2020-02-21
103134

104135
### Added
136+
105137
- Add `example` folder
106138

107139
### Changed
140+
108141
- Small changes in the `.gitignore` and `.npmignore` files
109142
- Update `CHANGELOG.md`
110143
- Small changes
@@ -114,11 +147,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
114147
## [1.1.3] - 2020-02-16
115148

116149
### Added
150+
117151
- Add `tsconfig.json`file
118152
- Add `typescript 3.5.2` as `devDependencies`
119153
- Add `.npmignore`
120154

121155
### Changed
156+
122157
- Add TimerEvent to path generation in example
123158
- Remove `example` folder
124159
- Move library files to folder `lib`
@@ -131,6 +166,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
131166
- Small cahnges in the README.md
132167

133168
### Fixed
169+
134170
- Bug that empty array could go into the main while loop of the astar-finder
135171
- Path could only be created once (https://github.com/digitsensitive/astar-typescript/issues/2)
136172

@@ -139,28 +175,32 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
139175
## [1.0.0] - 2019-07-26
140176

141177
### Added
178+
142179
- Example folder with an integration of this library into [Phaser 3](https://phaser.io/phaser3)
143180
- Separate interfaces into own file `astar-inferfaces.ts`
144181
- Add `Dijkstra's Finder`
145182

146183
### Changed
184+
147185
- New scripts in the `package.json` file
148186
- Update `.gitignore` with `yarn.lock`
149187
- Multiple optimizations in `Grid.ts` and `AStarFinder.ts`
150188
- Update `Heuristics`
151189
- New functionality to include or exclude start and end node when backtracing
152-
- Add interface `IPoint`
190+
- Add interface `IPoint`
153191

154192
---
155193

156194
## [0.0.5] - 2019-07-17
157195

158196
### Added
197+
159198
- Add a `CHANGELOG.md` file
160199
- Add [Prettier](https://github.com/prettier/prettier) configuration file `.prettierrc`
161200
- Add `.gitignore` file
162201

163202
### Changed
164-
- Format all *.ts files with [Prettier](https://github.com/prettier/prettier)
165-
- Edit top comments in all *.ts files
166-
- Update lodash version in package.json from 4.17.4 to 4.17.14
203+
204+
- Format all \*.ts files with [Prettier](https://github.com/prettier/prettier)
205+
- Edit top comments in all \*.ts files
206+
- Update lodash version in package.json from 4.17.4 to 4.17.14

CODE_OF_CONDUCT.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
1414
Examples of behavior that contributes to creating a positive environment
1515
include:
1616

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
2222

2323
Examples of unacceptable behavior by participants include:
2424

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
28-
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
30-
address, without explicit permission
31-
* Other conduct which could reasonably be considered inappropriate in a
32-
professional setting
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
3333

3434
## Our Responsibilities
3535

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 - 2020 digitsensitive <digit.sensitivee@gmail.com>
3+
Copyright (c) 2017 - 2023 digitsensitive <digit.sensitivee@gmail.com>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
AStar-Typescript
2-
==============
1+
# AStar-Typescript
2+
33
[![GitHub Stars](https://img.shields.io/david/digitsensitive/astar-typescript?style=flat-square)](https://david-dm.org/digitsensitive/astar-typescript)
44
[![GitHub Stars](https://img.shields.io/github/stars/digitsensitive/astar-typescript?style=flat-square)](https://github.com/digitsensitive/astar-typescript/stargazers) [![GitHub Forks](https://img.shields.io/github/forks/digitsensitive/astar-typescript?style=flat-square)](https://github.com/digitsensitive/astar-typescript/network/members) [![GitHub Issues](https://img.shields.io/github/issues/digitsensitive/astar-typescript?style=flat-square)](https://github.com/digitsensitive/astar-typescript/issues) [![Current Version](https://img.shields.io/npm/v/astar-typescript?style=flat-square)](https://www.npmjs.com/package/astar-typescript)
55

66
<p align="center">
77
<img width=100% src="astar_logo.png">
88
</p>
99

10-
#### The A* search algorithm library in TypeScript
10+
#### The A-star search algorithm library in TypeScript
1111

12-
AStar-TypeScript is an A* pathfinding API written in TypeScript to use for your HTML5 games or other browser-based projects.
12+
AStar-TypeScript is an A-star pathfinding API written in TypeScript to use for your HTML5 games or other browser-based projects.
1313

1414
This library was influenced and inspired by [@qioa - PathFinding.js](https://github.com/qiao/PathFinding.js), [@bgrins - javascript-astar](https://github.com/bgrins/javascript-astar), [@prettymuchbryce - easystarjs](https://github.com/prettymuchbryce/easystarjs) and [@redblobgames](https://www.redblobgames.com/pathfinding/a-star/introduction.html).
1515

@@ -56,19 +56,19 @@ bower install astar-typescript --save
5656
### TypeScript
5757

5858
```typescript
59-
import { AStarFinder } from "astar-typescript";
59+
import { AStarFinder } from 'astar-typescript';
6060
```
6161

6262
### Javascript
6363

6464
```javascript
65-
let AStarFinder = require("astar-typescript");
65+
let AStarFinder = require('astar-typescript');
6666
```
6767

6868
### AMD
6969

7070
```javascript
71-
define(function(require,exports,module){
71+
define(function (require, exports, module) {
7272
let AStarFinder = require('astar-typescript');
7373
});
7474
```
@@ -84,10 +84,11 @@ private aStarInstance: AStarFinder;
8484
Load grid data:
8585

8686
Using an **array** (hardcoded or from a Tilemap-Editor)
87+
8788
> 0 = walkable
8889
> 1 = not walkable
8990
90-
``` ts
91+
```ts
9192
let myMatrix = [
9293
[0, 0, 0, 0, 0, 0, 0, 0],
9394
[0, 0, 0, 0, 0, 0, 0, 1],
@@ -108,7 +109,7 @@ this.aStarInstance = new AStarFinder({
108109

109110
or randomly generated array **from width and height**
110111

111-
``` ts
112+
```ts
112113
this.aStarInstance = new AStarFinder({
113114
grid: {
114115
width: 8,
@@ -132,7 +133,7 @@ Additional parameters may be passed to adapt your finder.
132133

133134
If you want to disable `diagonal movements`:
134135

135-
``` ts
136+
```ts
136137
this.aStarInstance = new AStarFinder({
137138
grid: {
138139
width: 8,
@@ -144,13 +145,13 @@ this.aStarInstance = new AStarFinder({
144145

145146
Set the `heuristic function` (Manhattan, Euclidean, Chebyshev or Octile):
146147

147-
``` ts
148+
```ts
148149
this.aStarInstance = new AStarFinder({
149150
grid: {
150151
width: 8,
151152
height: 8
152153
},
153-
heuristicFunction: "Manhattan"
154+
heuristicFunction: 'Manhattan'
154155
});
155156
```
156157

@@ -161,7 +162,7 @@ Depending on the `weight` value you can decide if you prefer speed or accuracy.
161162
The lower the `weight` is, the lower will the heuristic function get, which will
162163
make the A* slower.
163164

164-
``` ts
165+
```ts
165166
this.aStarInstance = new AStarFinder({
166167
grid: {
167168
width: 8,
@@ -173,7 +174,7 @@ this.aStarInstance = new AStarFinder({
173174

174175
Include or Exclude the `start and end node`:
175176

176-
``` ts
177+
```ts
177178
this.aStarInstance = new AStarFinder({
178179
grid: {
179180
width: 8,
@@ -190,27 +191,26 @@ This library uses [Prettier](https://github.com/prettier/prettier).
190191
The configuration used can be seen in the `.prettierrc` file.
191192
More informations about the format options can be found [here](https://prettier.io/docs/en/options.html).
192193

193-
194194
## License
195195

196196
[MIT License](https://opensource.org/licenses/mit-license.php)
197197

198198
Copyright (c) 2017 - 2020 digitsensitive <digit.sensitivee@gmail.com>
199199

200200
Permission is hereby granted, free of charge, to any person obtaining a copy
201-
of this software and associated documentation files (the "Software"), to deal
202-
in the Software without restriction, including without limitation the rights
203-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
204-
copies of the Software, and to permit persons to whom the Software is
201+
of this software and associated documentation files (the "Software"), to deal
202+
in the Software without restriction, including without limitation the rights
203+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
204+
copies of the Software, and to permit persons to whom the Software is
205205
furnished to do so, subject to the following conditions:
206206

207207
The above copyright notice and this permission notice shall be included in all
208-
copies or substantial portions of the Software.
208+
copies or substantial portions of the Software.
209209

210210
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
211211
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
212212
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
213213
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
214214
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
215215
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
216-
SOFTWARE.
216+
SOFTWARE.

example/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<meta name="author" content="digitsensitive">
5+
<meta name="author" content="digitsensitive" />
66
<title>astar-typescript-example</title>
7-
<link rel="stylesheet" type="text/css" href="styles/css/styles.css">
7+
<link rel="stylesheet" type="text/css" href="styles/css/styles.css" />
88
<script src="dist/bundle.js"></script>
99
</head>
1010
<body>

0 commit comments

Comments
 (0)