Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
 * remove snake_case and kebab-case examples of incorrect event names
 * update the "Missing events" section
 * update the "Feedback" section to include twitter and email
  • Loading branch information
Kinrany authored Feb 21, 2020
1 parent c798839 commit 1b82b68
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,23 @@ methods: {

Each event emitted by vue-p5 has the same name as the corresponding p5 event, but lowercase.

`mouseclicked`, not ~~`mouseClicked`~~, not ~~`mouse-clicked`~~, not ~~`mouse_clicked`~~.
`mouseclicked`, not ~~`mouseClicked`~~.

#### Missing events

Currently all p5 events are supported, but there's an escape hatch for registering missing events:
Currently all p5 events [are supported], but there is an escape hatch. For example, if `windowResized` was missing, it's (lowercase) name could be passed to `additional-events` prop to make `vue-p5` aware of it:

```html
<vue-p5 :additionalEvents="['windowResized']"></vue-p5>
<vue-p5
:additional-events="['windowresized']"
@windowresized="windowresized"
></vue-p5>
```

Though please [let me know](#feedback) if you ever have to use this.

[are supported]: https://github.com/Kinrany/vue-p5/blob/master/src/p5.vue#L12-L38

### Importing existing sketches

In addition to p5 events, there's a `@sketch` event for importing an existing p5 sketch written in [instance mode](https://github.com/processing/p5.js/wiki/Global-and-instance-mode).
Expand Down Expand Up @@ -169,7 +176,9 @@ A game of Snake: [vue-p5-snake](https://github.com/Kinrany/vue-p5-snake/)

## Feedback

Feel free to open a new [issue](https://github.com/Kinrany/vue-p5/issues) if you have a question or a feature request!
Feedback is very welcome! Free to [open a new issue](https://github.com/Kinrany/vue-p5/issues/new) for any reason.

You can also [ping me on twitter](https://twitter.com/kinrany) or [write me an email](mailto:[email protected]).

## Versioning

Expand Down

0 comments on commit 1b82b68

Please sign in to comment.