Framer临摹练习01
济南/UI设计师/9年前/179浏览
版权
Framer临摹练习01
#创建背景色
Screen.backgroundColor = "#669cf5"
#创建统一的弹性曲线(张力,摩擦,速度)
Framer.Defaults.animation =
curve:"spring(80,12,0)"
#创建父层级
layerA = new Layer
width: 1000,height: 1000
backgroundColor: "transparent"
layerA.center()
#创建发光层
fg = new Layer
width: 480,height: 480,borderRadius: "50%",backgroundColor: "#ffffff"
opacity: 0.5,scale: 0,superLayer: layerA
fg.center()
#导入太阳层
psA = Framer.Importer.load("imported/sun@1x")
#导入云朵层
psB = Framer.Importer.load("imported/cloud@1x")
#设置太阳层
psA.sun.scale = 0
psA.sun.opacity = 0
psA.sun.superLayer = layerA
psA.sun.center()
#设置云朵层
psB.cloud.x = psA.sun.midX - 50
psB.cloud.y = psA.sun.midY
psB.cloud.superLayer = layerA
psB.cloud.scale = 0
#设置发光层动画属性
animatefg = new Animation
layer: fg
properties:
scale: 2
opacity: 0
curve: "linear"
time: 0.5
#设置太阳层动画属性
animatepsA = new Animation
layer: psA.sun
properties:
scale: 1
opacity: 1
animatepsArotate = new Animation
layer: psA.sun
properties:
rotation: 315
curve: "ease-in-out"
time: 2
#设置云朵层动画属性
psB.cloud.originX = 0
psB.cloud.originY = 1
animatepsB = new Animation
layer: psB.cloud
properties:
scale: 1
animatepsBmove = new Animation
layer: psB.cloud
properties:
x: psA.sun.midX
delay: 0.2
#创建动画开始函数
animatefg.start()
animatepsA.start()
animatepsArotate.start()
animatepsB.start()
animatepsBmove.start()
#创建消失动画
animatepsArotate.onAnimationEnd ->
layerA.animate
properties:
scale: 0
curve: "ease-out"
time: 0.6
0
Report
声明
收藏
Share
相关推荐
in to comment
Add emoji
喜欢TA的作品吗?喜欢就快来夸夸TA吧!
You may like
相关收藏夹
Log in
推荐Log in and synchronize recommended records
收藏Log in and add to My Favorites
评论Log in and comment your thoughts
分享Share





















































