Gathering detailed insights and metrics for extrude-polyline
Gathering detailed insights and metrics for extrude-polyline
Gathering detailed insights and metrics for extrude-polyline
Gathering detailed insights and metrics for extrude-polyline
npm install extrude-polyline
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
177 Stars
25 Commits
17 Forks
8 Watchers
1 Branches
2 Contributors
Updated on Jul 03, 2025
Latest Version
1.0.6
Package Id
extrude-polyline@1.0.6
Size
4.02 kB
NPM Version
2.1.4
Node Version
0.10.32
Published on
Nov 28, 2014
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Extrudes a 2D polyline with a given line thickness and the desired join/cap types. Tries to maintain visual consistency with HTML5 2D context stroking.
1var polylne = [ [25, 25], [15, 60] ] 2var stroke = require('extrude-polyline')({ 3 thickness: 20, 4 cap: 'square', 5 join: 'bevel', 6 miterLimit: 10 7}) 8 9//builds a triangulated mesh from a polyline 10var mesh = stroke.build(polyline)
The returned mesh is a simplicial complex.
1{ 2 positions: [ [x,y], [x,y] ], 3 cells: [ [a,b,c], [a,b,c] ] 4}
Currently, to achieve variable thickness you can provide a mapThickness
function to the stroke instance before building. By default, it will simply return the current thickness.
1//create a falloff, so the thickness tapers toward the start of the path 2stroke.mapThickness = function(point, index, points) { 3 return this.thickness * index/(points.length-1) 4}.bind(stroke)
Git clone, npm install
, then npm run test
stroke = Extrusion([opt])
Creates a new path builder with the given settings:
thickness
the line thicknessmiterLimit
the limit before miters turn into bevels; default 10join
the join type, can be 'miter'
or 'bevel'
- default 'miter'cap
the cap type, can be 'butt'
or 'square'
- defalut 'butt'mesh = stroke.build(points)
Builds a stroke with the specified list of 2D points. Returns a simplicial complex.
Some features that could be useful to add at a later point. PRs welcome.
MIT, see LICENSE.md for details.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 1/25 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More