oco2dx-2d仿3d动画grid3d
作者:互联网
coco2dx-2d仿3d动画grid3d
@转载, 原地址:https://blog.csdn.net/qq_30392565/article/details/58615384
local bg = display.newSprite(fishSp)
bg:pos(display.cx,display.cy)
local nodegrid = cc.NodeGrid:create()
nodegrid:addChild(bg)
nodegrid:addTo(self)
先创建一个格子节点,然后再创建各种特效
–3D晃动的效果
–Shaky3D:create(时间,晃动网格大小,晃动范围,Z轴是否晃动)
–local shake= cc.Shaky3D:create(time, cc.size(5,5), range, false)
–3D水波特效
–Ripple3D:create(时间,网格大小,坐标,半径,速度,振幅)
–local shake= cc.Ripple3D:create(4, cc.size(15,10), cc.p(658,320), 240, 4, 160)
–瓷砖洗牌特效
–local shake= cc.ShuffleTiles:create(4, cc.size(15,10), 16)
–3D瓷砖晃动的效果
–ShuffleTiles:create(时间,网格大小,随机数)
–local shake= cc.ShakyTiles3D:create(4, cc.size(15,10), 4,false)
–3D波动效果
–Waves3D:create(时间,晃动网格大小,波动速度,振幅)
–local shake= cc.Waves3D:create(4, cc.size(15,10), 4,60)
–液体特效
–Liquid:create(时间,网格大小,速度,振幅)
–local shake= cc.Liquid:create(4, cc.size(15,10), 4,60)
–扭曲特效
–Twirl:create(时间,网格大小,坐标,扭曲次数,振幅)
–local shake= cc.Twirl:create(4, cc.size(15,10),cc.p(568,320),4,260)
–从右上到左下部落格消失
–FadeOutBLTiles:create(时间,网格大小)
–local shake= cc.FadeOutBLTiles:create(2, cc.size(5,10))
–方格跳动
–JumpTiles3D:create(时间,网格大小,次数,振幅)
–local shake= cc.JumpTiles3D:create(4, cc.size(15,10),10,60)
–3D翻页效果
–PageTurn3D:create(时间,网格大小)
–local shake= cc.PageTurn3D:create(4, cc.size(15,10))
–多行消失特效(水平)
–SplitRows:create(时间,行数)
–local shake= cc.SplitRows:create(4, 10)
–多行消失特效(垂直)
–SplitCols::create(时间,行数)
–local shake= cc.SplitCols:create(2, 10)
–凸透镜特效
–Lens3D:create(时间,网格大小,圆心坐标,圆半径)
–local shake= cc.Lens3D:create(2, cc.size(15,10), cc.p(658,320), 320)
–X轴3D反转特效
–FlipX3D:create(时间)
–local shake= cc.FlipX3D:create(2)
–Y轴3D反转特效
–FlipX3D:create(时间)
–local shake= cc.FlipY3D:create(2)
–波动特效
–Waves:create(时间,晃动网格大小,波动速度,振幅,是否水平波动,是否垂直波动)
–local shake = cc.Waves:create(2, cc.size(15,10), 1,30,true,true)
然后nodegrid再runaction(shake)就可以了
local grid = cc.NodeGrid:create()
标签:10,cc,create,grid3d,2d,shake,size,local,3d 来源: https://blog.csdn.net/qq_33039615/article/details/98195253