質問

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.

役に立ちましたか?

解決

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top