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 10 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
http://www.cocos2d-x.org/html5-samples/samples/tests/index.html

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: https://github.com/cocos2d/cocos2d-html5/pull/1316
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
http://www.cocos2d-x.org/issues/3446

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: http://www.cocos2d-x.org/issues/3460

Atom PDF

Status:Closed
Start date:2013-12-09
Priority:Low
Due date:
Assignee:-
% Done:

100%

Category:-
Target version:v2.2.2