Method and device for realizing page turning effect based on cocos2d-x
A page-turning effect and page-turning technology, which is applied in the computer field, can solve the problems that the page-turning effect is not three-dimensional, the sprite shape cannot be freely deformed, and the user experience is poor. Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0027] Please refer to figure 1 , a method for realizing page turning effect based on cocos2d-x, including steps:
[0028] S1. By taking pictures, use the picture of the page that needs to be turned as the rendering picture of the grid sprite, and set the grid sprite;
[0029] Step S1 is specifically:
[0030] By taking a photo, save the screenshot of the page that needs to be turned as the rendered image of the grid sprite, select an icon node on the page, and set the node as the grid sprite.
[0031] S2. When the page turning starts, hide all the ordinary sprite nodes on the page and replace them with the set grid sprites;
[0032] Step S2 also includes:
[0033] According to the ratio between the sliding distance and the sliding distance needed to complete the page turning, set the texture coordinates of the grid sprite, change the shape of the picture, and complete the page turning.
[0034] According to the ratio between the sliding distance and the sliding distance r...
Embodiment 2
[0039] Please refer to figure 2 , a device 1 based on cocos2d-x for realizing the page turning effect, including a memory 2, a processor 3 and a computer program stored in the memory 2 and operable on the processor 3, when the processor 3 executes the program, it realizes Each step in the first embodiment.
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 

