In KinectJS , how do you create a shadow (that is, a translucent shape with blurry edges) without drawing a shape that “casts” it?
At first, I thought that you could just let the shape cast a shadow, but set the opacity of the shape to zero. For instance:
var rect = new Kinetic.Rect({ width: 100, height: 100, opacity: 0, shadowEnabled: true, shadowBlur: 10, shadowOpacity: 0.6 });
However, this does not work, because it seems that the final shadowOpacity is multiplied by the value of the native opacity of the form. Therefore, if opacity op == 0, then final shadowOpacity = 0.6 * 0 == 0. This means that the shadow also becomes invisible.
Do you have any ideas on how to achieve the desired effect?
source share