@thi.ng/ramp 3.1.21 → 3.1.23
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/CHANGELOG.md +1 -1
- package/package.json +13 -13
- package/ramp.js +2 -4
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/ramp",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.23",
|
|
4
4
|
"description": "Extensible keyframe interpolation/tweening of arbitrary, nested types",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -36,19 +36,19 @@
|
|
|
36
36
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@thi.ng/api": "^8.11.
|
|
40
|
-
"@thi.ng/arrays": "^2.9.
|
|
41
|
-
"@thi.ng/compare": "^2.3.
|
|
42
|
-
"@thi.ng/errors": "^2.5.
|
|
43
|
-
"@thi.ng/math": "^5.10.
|
|
44
|
-
"@thi.ng/transducers": "^9.0.
|
|
45
|
-
"@thi.ng/vectors": "^7.10.
|
|
39
|
+
"@thi.ng/api": "^8.11.2",
|
|
40
|
+
"@thi.ng/arrays": "^2.9.6",
|
|
41
|
+
"@thi.ng/compare": "^2.3.5",
|
|
42
|
+
"@thi.ng/errors": "^2.5.7",
|
|
43
|
+
"@thi.ng/math": "^5.10.13",
|
|
44
|
+
"@thi.ng/transducers": "^9.0.5",
|
|
45
|
+
"@thi.ng/vectors": "^7.10.31"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@microsoft/api-extractor": "^7.43.
|
|
49
|
-
"esbuild": "^0.
|
|
50
|
-
"typedoc": "^0.25.
|
|
51
|
-
"typescript": "^5.4.
|
|
48
|
+
"@microsoft/api-extractor": "^7.43.2",
|
|
49
|
+
"esbuild": "^0.21.1",
|
|
50
|
+
"typedoc": "^0.25.13",
|
|
51
|
+
"typescript": "^5.4.5"
|
|
52
52
|
},
|
|
53
53
|
"keywords": [
|
|
54
54
|
"1d",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"thi.ng": {
|
|
118
118
|
"year": 2019
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "df34b4a9e650cc7323575356de207d78933bdcf3\n"
|
|
121
121
|
}
|
package/ramp.js
CHANGED
|
@@ -100,8 +100,7 @@ class Ramp {
|
|
|
100
100
|
closestIndex(t, eps = 0.01) {
|
|
101
101
|
const stops = this.stops;
|
|
102
102
|
for (let i = stops.length; i-- > 0; ) {
|
|
103
|
-
if (absDiff(t, stops[i][0]) < eps)
|
|
104
|
-
return i;
|
|
103
|
+
if (absDiff(t, stops[i][0]) < eps) return i;
|
|
105
104
|
}
|
|
106
105
|
return -1;
|
|
107
106
|
}
|
|
@@ -122,8 +121,7 @@ class Ramp {
|
|
|
122
121
|
const n = stops.length;
|
|
123
122
|
if (n < 256) {
|
|
124
123
|
for (let i = n; i-- > 0; ) {
|
|
125
|
-
if (t >= stops[i][0])
|
|
126
|
-
return i;
|
|
124
|
+
if (t >= stops[i][0]) return i;
|
|
127
125
|
}
|
|
128
126
|
return -1;
|
|
129
127
|
}
|