Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法从 Kinetic.Shape 中删除应用的阴影?不幸的是 shape.setShadow(null) 不起作用。
将阴影颜色的 alpha 分量设置为 0(例如):
shape.setShadow({color: 'rgba(80, 80, 80, 0)'})
Kinetic.js 现在有一个setShadowEnabled方法。
setShadowEnabled
所以,只需调用shape.setShadowEnabled(false).
shape.setShadowEnabled(false)
shape.setShadowColor('transparent');