所以,我正在使用 Caman.js 库,我想知道为什么this.render(); 函数循环时不起作用 - 在我的情况下,我使用p5.js中的draw()函数
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);
}
另一方面,当我使用 loop(); ,不添加过滤器。
是否有可能实现这一点,或者是否有任何图书馆可以做到这一点?