@thi.ng/boids 1.1.25 → 1.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +150 -150
- package/CHANGELOG.md +0 -115
package/package.json
CHANGED
|
@@ -1,151 +1,151 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
2
|
+
"name": "@thi.ng/boids",
|
|
3
|
+
"version": "1.1.29",
|
|
4
|
+
"description": "n-dimensional boids simulation with modular behavior system",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "./index.js",
|
|
7
|
+
"typings": "./index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/thi-ng/umbrella.git"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://thi.ng/boids",
|
|
14
|
+
"funding": [
|
|
15
|
+
{
|
|
16
|
+
"type": "github",
|
|
17
|
+
"url": "https://github.com/sponsors/postspectacular"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"type": "patreon",
|
|
21
|
+
"url": "https://patreon.com/thing_umbrella"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "liberapay",
|
|
25
|
+
"url": "https://liberapay.com/thi.ng"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"author": "Karsten Schmidt (https://thi.ng)",
|
|
29
|
+
"license": "Apache-2.0",
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "yarn build:esbuild && yarn build:decl",
|
|
32
|
+
"build:decl": "tsc --declaration --emitDeclarationOnly",
|
|
33
|
+
"build:esbuild": "esbuild --format=esm --platform=neutral --target=es2022 --tsconfig=tsconfig.json --outdir=. src/**/*.ts",
|
|
34
|
+
"clean": "bun ../../tools/src/clean-package.ts",
|
|
35
|
+
"doc": "typedoc --options ../../typedoc.json --out doc src/index.ts",
|
|
36
|
+
"doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
|
|
37
|
+
"pub": "npm publish --access public",
|
|
38
|
+
"test": "bun test",
|
|
39
|
+
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@thi.ng/api": "^8.12.6",
|
|
43
|
+
"@thi.ng/checks": "^3.7.22",
|
|
44
|
+
"@thi.ng/distance": "^3.0.20",
|
|
45
|
+
"@thi.ng/geom-closest-point": "^2.1.194",
|
|
46
|
+
"@thi.ng/geom-resample": "^3.0.66",
|
|
47
|
+
"@thi.ng/math": "^5.13.3",
|
|
48
|
+
"@thi.ng/timestep": "^1.0.42",
|
|
49
|
+
"@thi.ng/vectors": "^8.6.10"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"esbuild": "^0.25.11",
|
|
53
|
+
"typedoc": "^0.28.14",
|
|
54
|
+
"typescript": "^5.9.3"
|
|
55
|
+
},
|
|
56
|
+
"keywords": [
|
|
57
|
+
"2d",
|
|
58
|
+
"3d",
|
|
59
|
+
"acceleration",
|
|
60
|
+
"agent",
|
|
61
|
+
"align",
|
|
62
|
+
"attractor",
|
|
63
|
+
"behavior",
|
|
64
|
+
"boids",
|
|
65
|
+
"braitenberg",
|
|
66
|
+
"constraint",
|
|
67
|
+
"flocking",
|
|
68
|
+
"follow",
|
|
69
|
+
"force",
|
|
70
|
+
"modular",
|
|
71
|
+
"nd",
|
|
72
|
+
"particles",
|
|
73
|
+
"path",
|
|
74
|
+
"physics",
|
|
75
|
+
"points",
|
|
76
|
+
"polygon",
|
|
77
|
+
"polyline",
|
|
78
|
+
"separation",
|
|
79
|
+
"simulation",
|
|
80
|
+
"spatial",
|
|
81
|
+
"steering",
|
|
82
|
+
"time",
|
|
83
|
+
"typescript",
|
|
84
|
+
"vector"
|
|
85
|
+
],
|
|
86
|
+
"publishConfig": {
|
|
87
|
+
"access": "public"
|
|
88
|
+
},
|
|
89
|
+
"browser": {
|
|
90
|
+
"process": false,
|
|
91
|
+
"setTimeout": false
|
|
92
|
+
},
|
|
93
|
+
"engines": {
|
|
94
|
+
"node": ">=18"
|
|
95
|
+
},
|
|
96
|
+
"files": [
|
|
97
|
+
"./*.js",
|
|
98
|
+
"./*.d.ts",
|
|
99
|
+
"behaviors",
|
|
100
|
+
"internal"
|
|
101
|
+
],
|
|
102
|
+
"exports": {
|
|
103
|
+
".": {
|
|
104
|
+
"default": "./index.js"
|
|
105
|
+
},
|
|
106
|
+
"./accel": {
|
|
107
|
+
"default": "./accel.js"
|
|
108
|
+
},
|
|
109
|
+
"./api": {
|
|
110
|
+
"default": "./api.js"
|
|
111
|
+
},
|
|
112
|
+
"./behaviors/alignment": {
|
|
113
|
+
"default": "./behaviors/alignment.js"
|
|
114
|
+
},
|
|
115
|
+
"./behaviors/attraction": {
|
|
116
|
+
"default": "./behaviors/attraction.js"
|
|
117
|
+
},
|
|
118
|
+
"./behaviors/braitenberg": {
|
|
119
|
+
"default": "./behaviors/braitenberg.js"
|
|
120
|
+
},
|
|
121
|
+
"./behaviors/cohesion": {
|
|
122
|
+
"default": "./behaviors/cohesion.js"
|
|
123
|
+
},
|
|
124
|
+
"./behaviors/dynamic": {
|
|
125
|
+
"default": "./behaviors/dynamic.js"
|
|
126
|
+
},
|
|
127
|
+
"./behaviors/follow": {
|
|
128
|
+
"default": "./behaviors/follow.js"
|
|
129
|
+
},
|
|
130
|
+
"./behaviors/separation": {
|
|
131
|
+
"default": "./behaviors/separation.js"
|
|
132
|
+
},
|
|
133
|
+
"./behaviors/update": {
|
|
134
|
+
"default": "./behaviors/update.js"
|
|
135
|
+
},
|
|
136
|
+
"./boid": {
|
|
137
|
+
"default": "./boid.js"
|
|
138
|
+
},
|
|
139
|
+
"./constrain": {
|
|
140
|
+
"default": "./constrain.js"
|
|
141
|
+
},
|
|
142
|
+
"./flock": {
|
|
143
|
+
"default": "./flock.js"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"thi.ng": {
|
|
147
|
+
"status": "alpha",
|
|
148
|
+
"year": 2023
|
|
149
|
+
},
|
|
150
|
+
"gitHead": "136a5e5ef0b69e82329db00d806c3c4e8f1aa063\n"
|
|
151
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
- **Last updated**: 2025-09-01T16:38:35Z
|
|
4
|
-
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
|
-
|
|
6
|
-
All notable changes to this project will be documented in this file.
|
|
7
|
-
Only versions published since **2022-01-01** are listed here.
|
|
8
|
-
Please consult the Git history for older version information.
|
|
9
|
-
See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
|
|
10
|
-
|
|
11
|
-
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
12
|
-
and/or version bumps of transitive dependencies.
|
|
13
|
-
|
|
14
|
-
### [1.1.10](https://github.com/thi-ng/umbrella/tree/@thi.ng/boids@1.1.10) (2025-06-19)
|
|
15
|
-
|
|
16
|
-
#### ⏱ Performance improvements
|
|
17
|
-
|
|
18
|
-
- various minor optimizations ([f47c986](https://github.com/thi-ng/umbrella/commit/f47c986))
|
|
19
|
-
- hoist local vars in hotspots
|
|
20
|
-
- update Radial.setRadius() to avoid distance calc if possible
|
|
21
|
-
|
|
22
|
-
### [1.1.4](https://github.com/thi-ng/umbrella/tree/@thi.ng/boids@1.1.4) (2025-05-12)
|
|
23
|
-
|
|
24
|
-
#### ⏱ Performance improvements
|
|
25
|
-
|
|
26
|
-
- add Boid.force, update blendedBehaviorUpdate() ([dbb3178](https://github.com/thi-ng/umbrella/commit/dbb3178))
|
|
27
|
-
- pre-allocate force vector to avoid re-allocations for every frame
|
|
28
|
-
|
|
29
|
-
### [1.1.3](https://github.com/thi-ng/umbrella/tree/@thi.ng/boids@1.1.3) (2025-05-09)
|
|
30
|
-
|
|
31
|
-
#### 🩹 Bug fixes
|
|
32
|
-
|
|
33
|
-
- off-by-one error in cohesion() ([e93b66c](https://github.com/thi-ng/umbrella/commit/e93b66c))
|
|
34
|
-
|
|
35
|
-
### [1.1.2](https://github.com/thi-ng/umbrella/tree/@thi.ng/boids@1.1.2) (2025-05-08)
|
|
36
|
-
|
|
37
|
-
#### 🩹 Bug fixes
|
|
38
|
-
|
|
39
|
-
- update cohesion(), count used neighbors only ([9eef80c](https://github.com/thi-ng/umbrella/commit/9eef80c))
|
|
40
|
-
|
|
41
|
-
### [1.1.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/boids@1.1.1) (2025-05-08)
|
|
42
|
-
|
|
43
|
-
#### 🩹 Bug fixes
|
|
44
|
-
|
|
45
|
-
- update cohesion(), use filter predicate ([66d219b](https://github.com/thi-ng/umbrella/commit/66d219b))
|
|
46
|
-
|
|
47
|
-
## [1.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/boids@1.1.0) (2025-05-08)
|
|
48
|
-
|
|
49
|
-
#### 🚀 Features
|
|
50
|
-
|
|
51
|
-
- add optional amp param for behaviors ([74720a5](https://github.com/thi-ng/umbrella/commit/74720a5))
|
|
52
|
-
- update alignment(), cohesion(), separation() behaviors
|
|
53
|
-
- add optional `BoidOpts.id` ([965c2ad](https://github.com/thi-ng/umbrella/commit/965c2ad))
|
|
54
|
-
|
|
55
|
-
#### ♻️ Refactoring
|
|
56
|
-
|
|
57
|
-
- rename Boid internals ([8bdd9cd](https://github.com/thi-ng/umbrella/commit/8bdd9cd))
|
|
58
|
-
- rename `.computeSteer()` => `.averageForce()`
|
|
59
|
-
- rename `.limitSteer()` => `.limitForce()`
|
|
60
|
-
- add docs
|
|
61
|
-
|
|
62
|
-
### [1.0.34](https://github.com/thi-ng/umbrella/tree/@thi.ng/boids@1.0.34) (2024-06-21)
|
|
63
|
-
|
|
64
|
-
#### ♻️ Refactoring
|
|
65
|
-
|
|
66
|
-
- dedupe wrap2/3() internals ([6ca4b99](https://github.com/thi-ng/umbrella/commit/6ca4b99))
|
|
67
|
-
|
|
68
|
-
### [1.0.30](https://github.com/thi-ng/umbrella/tree/@thi.ng/boids@1.0.30) (2024-04-20)
|
|
69
|
-
|
|
70
|
-
#### ♻️ Refactoring
|
|
71
|
-
|
|
72
|
-
- update type usage ([abad151](https://github.com/thi-ng/umbrella/commit/abad151))
|
|
73
|
-
|
|
74
|
-
# [1.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/boids@1.0.0) (2024-01-23)
|
|
75
|
-
|
|
76
|
-
#### 🛑 Breaking changes
|
|
77
|
-
|
|
78
|
-
- major refactoring/restructuring, new behavior system ([22cb42d](https://github.com/thi-ng/umbrella/commit/22cb42d))
|
|
79
|
-
- BREAKING CHANGE: major refactoring/restructuring, new behavior system
|
|
80
|
-
- modular behavior system with currently these 7 behaviors:
|
|
81
|
-
- alignment()
|
|
82
|
-
- attractPolyline()
|
|
83
|
-
- braitenberg2()
|
|
84
|
-
- cohesion()
|
|
85
|
-
- dynamicTarget()
|
|
86
|
-
- followPolyline()
|
|
87
|
-
- separation()
|
|
88
|
-
- add blendedBehaviorUpdate()
|
|
89
|
-
- add clamp2/3() and wrap2/3() global constraints
|
|
90
|
-
- add Flock class (+ defFlock() factory fn)
|
|
91
|
-
- update/simplify Boid class and 2d/3d factory fns
|
|
92
|
-
- update BoidOpts
|
|
93
|
-
- add doc strings
|
|
94
|
-
- add/update deps
|
|
95
|
-
|
|
96
|
-
#### 🚀 Features
|
|
97
|
-
|
|
98
|
-
- update dynamicTarget() ([647d7e1](https://github.com/thi-ng/umbrella/commit/647d7e1))
|
|
99
|
-
- add radius param
|
|
100
|
-
|
|
101
|
-
#### 🩹 Bug fixes
|
|
102
|
-
|
|
103
|
-
- update separation() behavior neighbor lookup ([c8ece89](https://github.com/thi-ng/umbrella/commit/c8ece89))
|
|
104
|
-
|
|
105
|
-
### [0.1.3](https://github.com/thi-ng/umbrella/tree/@thi.ng/boids@0.1.3) (2023-11-09)
|
|
106
|
-
|
|
107
|
-
#### ♻️ Refactoring
|
|
108
|
-
|
|
109
|
-
- update all tests (packages A-S) ([e3085e4](https://github.com/thi-ng/umbrella/commit/e3085e4))
|
|
110
|
-
|
|
111
|
-
## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/boids@0.1.0) (2023-10-27)
|
|
112
|
-
|
|
113
|
-
#### 🚀 Features
|
|
114
|
-
|
|
115
|
-
- import as new pkg ([4852b92](https://github.com/thi-ng/umbrella/commit/4852b92))
|