[英]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.