KineticJS - Performance Difference Between Kinetic.Group.listening() and Individual Kinetic.Node.listening()

做~自己de王妃 提交于 2020-01-05 10:52:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!