Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
glenzli committed Apr 25, 2020
1 parent 137de42 commit efacf23
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ PaperOffset.offsetStroke(path, offset, options)
```

You may still use the old way to extend paperjs module, which is **deprecated** and will be removed in future version.
<br/><font color="#a84040">**Warning:** The library no longer carries extended definitions for paper.Path & paper.CompoundPath, you may need your own declarations to use extension in typescript.</font>
```javascript
```typescript
import ExtendPaperJs from 'paperjs-offset'
// extend paper.Path, paper.CompoundPath with offset, offsetStroke method
ExtendPaperJs(paper)
ExtendPaperJs(paper);

// Warning: The library no longer include extended definitions for paper.Path & paper.CompoundPath, you may need your own declarations to use extension in typescript.
(path as any).offset(10);
```

Or for web development, include the **paperjs-offset.js** or **paperjs-offset.min.js** in demo folder.
Expand Down

0 comments on commit efacf23

Please sign in to comment.