0

I am trying to add several multiple shapes in different colours in my HTML canvas using paper.js. Is there a way to do this without having several canvases? Is it possible to draw the shapes within one canvas? Here is what I have: https://jsfiddle.net/8hywopu8/1/

HTML:

<canvas id="bacterium"></canvas>

<canvas id="bacterium"></canvas>

<canvas id="bacterium"></canvas>

<canvas id="bacterium"></canvas>

<canvas id="bacterium"></canvas>
nicholaswmin
  • 21,686
  • 15
  • 91
  • 167
replicant129
  • 103
  • 1
  • 10

1 Answers1

1

Yes it is possible to draw multiple shapes in one canvas. http://paperjs.org/examples/hit-testing/ is one of the examples.

sapics
  • 1,104
  • 8
  • 22