0.2.0 • Published 4 years ago

@julien76/js-simplify v0.2.0

Weekly downloads
3
License
BSD-2-Clause
Repository
gitlab
Last release
4 years ago

This is a fork of simply-js with the following changes:

  • options to set the xKey and yKey for the points
  • use es6 syntax
  • Bundle the scripts with microbundle with UMD, module targer
  • Add calculation info in addition to return the simplified points
    const {
        simplifiedPoints,
        calculationInfo
        } = simplify(points, { highestQuality: true, tolerance: 3.0, xKey: 'x', yKey: 'y' })

calculationInfo returns:

{
    time: Number // time spent to compute in ms
    pointsBefore: Number // Number of points before the simplification
    pointsAfter: Number // Number of points after the simplification
    info: String // String containing the above info
}

Installation

npm i @julien76/data-simplification

or

yarn add @julien76/data-simplification
0.2.0

4 years ago

0.1.0

4 years ago