-
Notifications
You must be signed in to change notification settings - Fork 0
llenodo/path.js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A 2D SVG path constructor with no external dependencies. Without using any external libraries, create a 2D "Path" constructor in JavaScript that accepts either an array of points (which are arrays themselves of length two) or a subset of an SVG path string (see http://www.w3.org/TR/SVG/paths.html), where only the moveto, closepath and lineto commands are accepted. The path must be connected, so the moveto command must only appear at the beginning and the closepath may optionally appear only at the end. The lineto must accept both absolute and relative integer coordinates. The Path objects must inherit from Arrays, so all array methods should work on Pathobjects. This means that new Path instanceof Path and new Path instanceof Array must both return true. See live demo at http://llenodo.github.com/path.js/
About
A simple 2D SVG "Path" constructor with no external dependencies
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published