Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 807 Bytes

File metadata and controls

29 lines (21 loc) · 807 Bytes

ClippingNode

Provides a CCNode type [CCScissorNode] which can be used for clipping the visible area of children

This has been sourced from:

Usage

CGRect menuBoundaryRect = CGRectMake(x, y, width, height);
CCScissorNode *clipNode = [CCScissorNode scissorNodeWithRect:menuBoundaryRect];
[clipNode addChild:menu];
[menu fixPosition];
[self addChild:clipNode];

Example

Modification of the default project to add a clipping region to the HelloWorld test scene:

https://github.com/NoodlFroot/Cocos2d-v3-ScissorNode-Test