What are the differences between group and layer in KineticJs with HTML?

JavascriptWeb DevelopmentFront End Scripts

When making HTML5 web application using KineticJS, grouping, and layering need to be used.

Groups are basically containers whereas layers are separators basically.

The group is a container which is having shaped objects inside layers for ex group might contain both circle and rectangle.If a group is manipulated then elements within that group is also manipulated.ex if we drag the group then its elements get dragged as well.

However, layers actually separate canvas elements that are at the top of one another. This is quite similar to the layers that work in Photoshop and Illustrator. Multiple layers are visible simultaneously.

Layers are used to separate one item from another; example background layer is made separate from animation layer.

Published on 11-Apr-2018 16:58:53