0

In paperjs, you need to associate canvas element for the js file:

<script type="text/paperscript" canvas="myCanvas">
      //your code
</script>

I wonder how i could do this in ace (live coding editor)?

I have a canvas and also the editor in the same page, and i want to code in the editor to control the canvas. How could i do that?

thanks.

Johnny Willemsen
  • 2,942
  • 1
  • 14
  • 16
kikkpunk
  • 1,287
  • 5
  • 22
  • 34

1 Answers1

1

We do exactly this over at http://sketch.paperjs.org/ Look at the createPaperScript () function in http://sketch.paperjs.org/assets/js/editor.js

Jürg Lehni
  • 1,677
  • 13
  • 16