2

So, Im working with Caman.js library and I was wondering why this.render(); is not working when the function is looping - in my case i use the draw() function from p5.js

function draw(){

   /* APPLY FILTERS */
   if(checkFiltersActivation() === true){

       //Prepares selected filters from array (e.g this.vintage(); & this.orangePeel();)
       apply_Filters(); 

       Caman("#myCanvas-element", function(){
           this.render();
           noLoop();
       });
   }
   /* CANVAS 2D - draw image from video element */
   image(videoElement, 0, 0, canvasWidth, canvasHeight); 
}

Results: enter image description here

On the other hand, when I use the loop(); , no filters are added.

Is it possible to achieve this or is there any library that i can do this?

Loizos Vasileiou
  • 674
  • 10
  • 37

0 Answers0