Reputation: 33297
I use Caman.js and hava a
<canvas>
element on my page.
How can I rotate this canvas with Caman.js?
I found this but I do not know how to apply it.
Upvotes: 0
Views: 2619
Reputation: 572
To outline in more detail on how to get the rotate plugin (and other plugins for Camanjs) included in Camanjs I followed these steps:
Now you will have the plugin included into your caman plugin.
Note: I'm sure there is a better way to do this, however, this worked for me and I couldn't find any other information out there outlining these steps.
Upvotes: 1
Reputation: 5986
Rotate is a Plugin.
You have to compile Caman.js with the plugin since its all written in coffeescript.
The plugins you will find here: https://github.com/meltingice/CamanJS-Plugins
For how to include them have a look at the cakefile
After that is done it will work as stephan1001 wrote.
Upvotes: 1
Reputation:
Use this:
Caman("#canvasId", function () {
this.rotate(90);
this.render();
});
Upvotes: 5