[英]How To: Kinetic.js cached shape filter
Kinetic.js文檔參考告訴我們以下內容:
緩存節點以提高繪圖性能, 應用過濾器或創建更准確的命中區域
但是當我嘗試緩存自定義形狀並對其應用一些過濾器時,如下所示
shape.cache();
shape.filters([Kinetic.Filters.Brighten]); //nothing happens
shape.filterBrightness(100); //this even throws error: Shape doesn't have this method at all
那么,有什么方法可以將某種過濾器/陰影/模糊/描邊應用於緩存的形狀?
如果找不到某些方法,請查看documantation: http ://kineticjs.com/docs/
rect.brightness(0.5);
演示: http : //jsbin.com/fucix/1/edit
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.