Despite my best Google-fu, nowhere in the main tutorial or the KineticJS docs does it explicitly state the difference between a group and a layer. Kinetic's "Getting Started" page sort of addresses this--it mentions that layers have special renderers, although I don't quite understand what that means. So do groups not have those renderers? Can groups not be inside of layers? What makes layers (or groups) different than just a parent to a bunch of nodes for organization/transformation?
Essentially, what's the difference between a group and a layer?
Group is simply a collection of KineticJS defined objects within a layer, while each layer is a separate Canvas (or used to be until version 3.x of KineticJS) you can see the difference by adding multiple layers on a stage. Also, in the framework hierarchy, a group is contained inside a layer and not the other way around. So you can display/render multiple groups at one time but not multiple layers (only the topmost one is visible).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With