Atashbahar
Atashbahar

Reputation: 571

Remove shadow in KineticJS

Is there a way to remove the applied shadow from Kinetic.Shape? unfortunately shape.setShadow(null) doesn't work.

Upvotes: 1

Views: 485

Answers (3)

ABentSpoon
ABentSpoon

Reputation: 5169

Kinetic.js now has a setShadowEnabled method.

So, just call shape.setShadowEnabled(false).

Upvotes: 1

Auralis
Auralis

Reputation: 1

shape.setShadowColor('transparent');

Upvotes: 0

Jens
Jens

Reputation: 36

Set the shadow color's alpha component to 0 (e.g.):

shape.setShadow({color: 'rgba(80, 80, 80, 0)'})

Upvotes: 2

Related Questions