Effect
特效:阴影与模糊。
type Effect = ShadowEffect | BlurEffect
ShadowEffect
阴影。
interface ShadowEffect {
readonly type: 'DROP_SHADOW' | 'INNER_SHADOW'
readonly color: RGBA
readonly offset: Vector
readonly spread: number
readonly radius: number
readonly isVisible: boolean
readonly blendMode: BlendMode
}
type
:阴影类型,取值为DROP_SHADOW
外阴影,或INNER_SHADOW
内阴影。color
:阴影颜色。offset
:阴影的位置。spread
:扩张度。radius
:弧度。isVisible
:是否可见。blendMode
:混合模式,具体可查看类型BlendMode
。
BlurEffect
模糊。
interface BlurEffect {
readonly type: 'LAYER_BLUR' | 'BACKGROUND_BLUR'
readonly radius: number
readonly isVisible: boolean
readonly blendMode: BlendMode
}
type
:模糊类型,取值为LAYER_BLUR
高斯模糊,或BACKGROUND_BLUR
背景模糊。radius
:圆角。isVisible
:是否可见。blendMode
:混合模式,具体可查看类型BlendMode