314 static int depth = 9;
318 for (
int i = 0; i < depth; i++) {
320 int size = 225 - i * (225 / (depth * 2));
322 auto clipper = ClippingNode::create();
323 clipper->setContentSize(Size(size, size));
324 clipper->setAnchorPoint(Vec2(0.5f, 0.5f));
325 clipper->setPosition(parent->getContentSize().width / 2, parent->getContentSize().height / 2);
326 clipper->setAlphaThreshold(0.05f);
327 clipper->runAction(RepeatForever::create(RotateBy::create(i % 3 ? 1.33f : 1.66f, i % 2 ? 90.0f : -90.0f)));
328 parent->addChild(clipper);
331 stencil->setScale( 2.5f - (i * (2.5f / depth)) );
332 stencil->setAnchorPoint( Vec2(0.5f, 0.5f) );
333 stencil->setPosition(clipper->getContentSize().width / 2, clipper->getContentSize().height / 2);
334 stencil->setVisible(
false);
335 stencil->runAction(Sequence::createWithTwoActions(DelayTime::create(i), Show::create()));
336 clipper->setStencil(stencil);
338 clipper->addChild(stencil);
static const char s_pathGrossini[]