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
  • 19,740
  • 13
  • 80
  • 155
replicant129
  • 103
  • 1
  • 9

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,052
  • 7
  • 22