audiomotion-analyzer 4.5.2 → 4.5.4
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/README.md +6 -6
- package/dist/index.js +7 -3
- package/package.json +3 -3
- package/src/audioMotion-analyzer.js +7 -3
package/README.md
CHANGED
|
@@ -79,11 +79,11 @@ const { AudioMotionAnalyzer } = require('audioMotion-analyzer');
|
|
|
79
79
|
|
|
80
80
|
### In the browser using native ES6 module (ESM)
|
|
81
81
|
|
|
82
|
-
Load from
|
|
82
|
+
Load from jsDelivr CDN:
|
|
83
83
|
|
|
84
84
|
```html
|
|
85
85
|
<script type="module">
|
|
86
|
-
import AudioMotionAnalyzer from 'https://cdn.
|
|
86
|
+
import AudioMotionAnalyzer from 'https://cdn.jsdelivr.net/npm/audiomotion-analyzer@4/+esm';
|
|
87
87
|
// your code here
|
|
88
88
|
</script>
|
|
89
89
|
```
|
|
@@ -92,10 +92,10 @@ Or download the [latest version](https://github.com/hvianna/audioMotion-analyzer
|
|
|
92
92
|
|
|
93
93
|
### In the browser using global variable
|
|
94
94
|
|
|
95
|
-
Load from
|
|
95
|
+
Load from jsDelivr CDN:
|
|
96
96
|
|
|
97
97
|
```html
|
|
98
|
-
<script src="https://
|
|
98
|
+
<script src="https://cdn.jsdelivr.net/npm/audiomotion-analyzer@4"></script>
|
|
99
99
|
<script>
|
|
100
100
|
// available as AudioMotionAnalyzer global
|
|
101
101
|
</script>
|
|
@@ -1525,7 +1525,7 @@ The `import` statement must be inside a `script` which has the `type="module"` p
|
|
|
1525
1525
|
|
|
1526
1526
|
```html
|
|
1527
1527
|
<script type="module">
|
|
1528
|
-
import AudioMotionAnalyzer from 'https://cdn.
|
|
1528
|
+
import AudioMotionAnalyzer from 'https://cdn.jsdelivr.net/npm/audiomotion-analyzer@4/+esm';
|
|
1529
1529
|
|
|
1530
1530
|
// your code here
|
|
1531
1531
|
</script>
|
|
@@ -1614,5 +1614,5 @@ And if you're feeling generous, maybe:
|
|
|
1614
1614
|
|
|
1615
1615
|
## License
|
|
1616
1616
|
|
|
1617
|
-
audioMotion-analyzer copyright (c) 2018-
|
|
1617
|
+
audioMotion-analyzer copyright (c) 2018-2026 [Henrique Avila Vianna](https://henriquevianna.com)<br>
|
|
1618
1618
|
Licensed under the [GNU Affero General Public License, version 3 or later](https://www.gnu.org/licenses/agpl.html).
|
package/dist/index.js
CHANGED
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
* audioMotion-analyzer
|
|
22
22
|
* High-resolution real-time graphic audio spectrum analyzer JS module
|
|
23
23
|
*
|
|
24
|
-
* @version 4.5.
|
|
24
|
+
* @version 4.5.4
|
|
25
25
|
* @author Henrique Avila Vianna <hvianna@gmail.com> <https://henriquevianna.com>
|
|
26
26
|
* @license AGPL-3.0-or-later
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
|
-
const VERSION = '4.5.
|
|
29
|
+
const VERSION = '4.5.4';
|
|
30
30
|
|
|
31
31
|
// internal constants
|
|
32
32
|
const PI = Math.PI,
|
|
@@ -2295,7 +2295,11 @@
|
|
|
2295
2295
|
if (showPeakLine) {
|
|
2296
2296
|
_ctx[m](...(_radial ? radialXY(x, h) : [x, analyzerBottom - h]));
|
|
2297
2297
|
if (_radial && _mirror && !isDualHorizontal) points.push([x, h]);
|
|
2298
|
-
} else if (
|
|
2298
|
+
} else if (b.peak[channel] > 0) {
|
|
2299
|
+
// note: `h` is negative in inner radial
|
|
2300
|
+
if (_fadePeaks) _ctx.globalAlpha = b.alpha[channel];
|
|
2301
|
+
radialPoly(x, h, 1, -2); // standard peaks (also does mirror)
|
|
2302
|
+
}
|
|
2299
2303
|
});
|
|
2300
2304
|
if (showPeakLine) {
|
|
2301
2305
|
let p;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "audiomotion-analyzer",
|
|
3
3
|
"description": "High-resolution real-time graphic audio spectrum analyzer JavaScript module with no dependencies.",
|
|
4
|
-
"version": "4.5.
|
|
4
|
+
"version": "4.5.4",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./src/audioMotion-analyzer.js",
|
|
7
7
|
"types": "./src/index.d.ts",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
},
|
|
44
44
|
"homepage": "https://audiomotion.dev",
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@babel/cli": "^7.
|
|
47
|
-
"@babel/core": "^7.
|
|
46
|
+
"@babel/cli": "^7.28.3",
|
|
47
|
+
"@babel/core": "^7.28.5",
|
|
48
48
|
"@babel/plugin-transform-modules-umd": "^7.27.1"
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* audioMotion-analyzer
|
|
3
3
|
* High-resolution real-time graphic audio spectrum analyzer JS module
|
|
4
4
|
*
|
|
5
|
-
* @version 4.5.
|
|
5
|
+
* @version 4.5.4
|
|
6
6
|
* @author Henrique Avila Vianna <hvianna@gmail.com> <https://henriquevianna.com>
|
|
7
7
|
* @license AGPL-3.0-or-later
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
const VERSION = '4.5.
|
|
10
|
+
const VERSION = '4.5.4';
|
|
11
11
|
|
|
12
12
|
// internal constants
|
|
13
13
|
const PI = Math.PI,
|
|
@@ -2406,8 +2406,12 @@ class AudioMotionAnalyzer {
|
|
|
2406
2406
|
if ( _radial && _mirror && ! isDualHorizontal )
|
|
2407
2407
|
points.push( [ x, h ] );
|
|
2408
2408
|
}
|
|
2409
|
-
else if (
|
|
2409
|
+
else if ( b.peak[ channel ] > 0 ) { // note: `h` is negative in inner radial
|
|
2410
|
+
if ( _fadePeaks )
|
|
2411
|
+
_ctx.globalAlpha = b.alpha[ channel ];
|
|
2412
|
+
|
|
2410
2413
|
radialPoly( x, h, 1, -2 ); // standard peaks (also does mirror)
|
|
2414
|
+
}
|
|
2411
2415
|
});
|
|
2412
2416
|
if ( showPeakLine ) {
|
|
2413
2417
|
let p;
|