Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using paper.js without canvas and paperscript

Tags:

javascript

2d

I hope not pose an already answered question, but I could not find something helpful anywhere. I am evaluating javascript libraries for 2d vector graphics and animation. On my way i found paper.js but no way to use it with type="text/javascript", without canvas and so on. In the paper.js FAQ about this point here i could find out that it might work, but for now i could not get it to work.

If anybody has any experience with this, it would be nice to let me know about this.

like image 538
philipp Avatar asked Feb 25 '26 05:02

philipp


1 Answers

Since version 0.2, using paper.js from pure JavaScript is easy and well documented. One way to initialize is:

var scope = new paper.PaperScope();
scope.setup(myCanvas);

Full documentation here: http://paperjs.org/tutorials/getting-started/using-javascript-directly/

I'm not sure what you mean by "without canvas" though, paper.js does need a canvas object to operate.

like image 120
Soulman Avatar answered Feb 27 '26 18:02

Soulman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!