ControlSwitch only show the thumb without on off image and labels.
ControlSwitch only show the thumb without on off image and labels.
the related version is 2.2.1 html5
The issue can also be reproduced in the online demo below
http://www.cocos2d-x.org/html5-samples/samples/tests/index.html
- 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.
- % 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.
A new bug has been created for the WebGL issue of ClippingNode
http://www.cocos2d-x.org/issues/3446
- 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.
- % 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
Status: | Closed | |
---|---|---|
Start date: | 2013-12-09 | |
Priority: | Low | |
Due date: | ||
Assignee: | - | |
% Done: | 100% |
|
Category: | - | |
Target version: | v2.2.2 |
The bug exists in the demo. extension -> controlswitch test