New issue
 Projects > js > Issues > Bug #3363

ControlSwitch only show the thumb without on off image and labels.

Bug #3363 [Closed]
victorlionline 2013-12-09 01:38 . Updated almost 3 years ago

The bug exists in the demo. extension -> controlswitch test

victorlionline 2013-12-09 03:43

the related version is 2.2.1 html5

victorlionline 2013-12-10 16:44

The issue can also be reproduced in the online demo below

pandamicro 2013-12-13 05:20
  • Status changed from New to In Progress
  • Target version set to v2.2.2
  • % Done changed from 0 to 80

I have proposed a clipping node solution on github. And the render logic of ClippingNode for canvas mode is implemented.
But on WebGL, the stencil clipping doesn’t work as expected.

pandamicro 2013-12-13 07:12
  • % Done changed from 80 to 90

Refer to this pull request to see what has been changed:
A solution to improve the performance of ClippingNode on canvas mode is still waiting to be found.

pandamicro 2013-12-19 13:53

A new bug has been created for the WebGL issue of ClippingNode

pandamicro 2013-12-20 07:37
  • Status changed from In Progress to Closed

I added Xingsen’s clip version of ClippingNode for canvas render mode. Now the cc.DrawNode stencil will clip the scene with context.clip() function, but cc.Sprite will still clip the scene with context.globalCompositionOperation which support texture stencil.
Clip mode is a more efficient way. But it has two main inconvenient:
1. It doesn’t support recessive stencil
2. It doesn’t support texture stencil

We suggest using ClippingNode with shapes on cc.DrawNode. If developer need texture stencil, we suggest that his ClippingNode’s visit function shouldn’t be called too often, otherwise the performance on mobile isn’t very good.

pandamicro 2013-12-20 07:44
  • % Done changed from 90 to 100

This is no longer a bug, but CCClippingNode still need some improvement on performance, so I close this issue and opened another refactor request:

Atom PDF

Start date:2013-12-09
Due date:
% Done:


Target version:v2.2.2

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.