Provides a CCNode type [CCScissorNode] which can be used for clipping the visible area of children
This has been sourced from:
-
http://www.learn-cocos2d.com/2011/01/cocos2d-gem-clippingnode/
-
Forked from https://github.com/njt1982/ClippingNode for cocos2d v3 work
CGRect menuBoundaryRect = CGRectMake(x, y, width, height);
CCScissorNode *clipNode = [CCScissorNode scissorNodeWithRect:menuBoundaryRect];
[clipNode addChild:menu];
[menu fixPosition];
[self addChild:clipNode];
Modification of the default project to add a clipping region to the HelloWorld test scene: