~koehr/catmullrom2bezier

30788a56878edf066c916f5ee013ff9c6a3d66ff — koehr 3 years ago b553dcb
update README
1 files changed, 17 insertions(+), 17 deletions(-)

M README.md
M README.md => README.md +17 -17
@@ 16,25 16,25 @@ on this and other aspects is welcome.
 
The syntax is as follows:

`([number],[number])+  R([number],[number])+ ([number],[number])*`
```html
import cr2bezier from 'catmullrom2bezier' 

For example:
const crPath = [
  'M20,380', 
  'R58,342', 
  '100,342', 
  '100,300', 
  '140,250', 
  '190,210', 
  '220,197', 
  '250,184', 
  '280,155', 
  '310,260', 
  '404,20'  
].join(' ')

```html
  <path stroke="#BADA55" 
        stroke-width="2"
        fill="none" 
        d="M20,380 
           R58,342 
           100,342 
           100,300 
           140,250 
           190,210 
           220,197 
           250,184 
           280,155 
           310,260 
           404,20"/>  
const bezierPath = cr2bezier(crPath)
document.getElementById('the-path').setAttribute('d', bezierPath)
```

In other words, there must be at least one coordinate pair preceding the