Skip to content

Commit

Permalink
Add JS api example to display only face of character, fix #73
Browse files Browse the repository at this point in the history
  • Loading branch information
tejesh0 committed May 8, 2020
1 parent 8fd0fce commit 72a5f50
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,19 @@ comicgen('.new')

![Dynamic character rendered via JS](docs/dee-sad-yuhoo-400-300.png)

If you want to show only face of a comic character, you can do it by skipping `pose` attribute.
For example:

```js
// Add only face of character
$('<g class="only-face" name="dee" angle="straight" emotion="smile"></g>').appendTo('body')
// Call comicgen()
comicgen('.only-face')
```

![Only face of character rendered via JS](docs/dee-smile-face-only-200-200.png)


You can pass an `options` parameter to `comicgen()` to provide default values.
For example:

Expand Down
Binary file added docs/dee-smile-face-only-200-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 72a5f50

Please sign in to comment.