Currently, I don't really like our API of filters.
Each filter adds its own special properties to every Konva.Node instance. For example Konva.Filters.RGB will add three new methods: red(), green(), blue() (also it will add get and set prefixed methods). As we have many filters, all of them adds tons of new methods to the prototype. Documentations become messed with some many methods. Also, too many methods in prototype may make it slower. And such code is not very modular.
Currently, I don't really like our API of filters. Each filter adds its own special properties to every
Konva.Node
instance. For exampleKonva.Filters.RGB
will add three new methods:red()
,green()
,blue()
(also it will addget
andset
prefixed methods). As we have many filters, all of them adds tons of new methods to the prototype. Documentations become messed with some many methods. Also, too many methods in prototype may make it slower. And such code is not very modular.So your current API is:
How can we make it better?
What about this: