问题
Is there any performance difference between this:
var rect1 = new Kinetic.Rect({ listening: false }),
rect2 = new Kinetic.Rect({ listening: false }),
group = new Kinetic.Group;
group.add( rect1 );
group.add( rect2 );
... and this:
var rect1 = new Kinetic.Rect,
rect2 = new Kinetic.Rect,
group = new Kinetic.Group({ listening: false });
group.add( rect1 );
group.add( rect2 );
If so, why?
来源:https://stackoverflow.com/questions/24592127/kineticjs-performance-difference-between-kinetic-group-listening-and-individ