Kinrany / vue-p5

Vue component for p5.js
125 stars 16 forks source link

Use exact element, not id property to link p5 canvas containers. #2

Closed Kinrany closed 6 years ago

Kinrany commented 6 years ago

In new p5(sketch, element) the element parameter can be either an id attribute or an HTMLElement object.

Using an id causes all canvas elements be parented to the first element in the document with that id.

Kinrany commented 6 years ago

Food for thought: new p5(...) has exactly two parameters: where to mount and what to render.

Like a Vue app. Or a Cycle component.