mirror of
https://github.com/captbaritone/webamp.git
synced 2026-08-03 07:23:55 +00:00
Use default args for spline
This commit is contained in:
parent
c8163244d7
commit
f931d6ecf9
1 changed files with 1 additions and 7 deletions
|
|
@ -14,13 +14,7 @@
|
|||
* @param {Number} [numOfSeg=20] - number of segments between two points (line resolution)
|
||||
* @returns {Float32Array} New array with the calculated points that was added to the path
|
||||
*/
|
||||
export function getCurvePoints(points, tension, numOfSeg) {
|
||||
"use strict";
|
||||
|
||||
// options or defaults
|
||||
tension = typeof tension === "number" ? tension : 0.5;
|
||||
numOfSeg = numOfSeg ? numOfSeg : 25;
|
||||
|
||||
export function getCurvePoints(points, tension = 0.5, numOfSeg = 25) {
|
||||
let pts, // for cloning point array
|
||||
i = 1,
|
||||
l = points.length,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue