视觉效果 / iOS / NATIVESCRIPT VUE
改变氛围。
让色彩、光线与方向流动起来。
动效背后的代码。
Jolt 0.1.0-rc.11直接来自指南的核心 API 示例。完整界面与控件请查看完整演示。
TypeScript · NativeScript
import { gradient } from '@rafaelaugusto/jolt'
const glow = gradient(card, {
type: 'radial',
colors: ['#A78BFA', '#0F172A'],
center: { x: 0.3, y: 0.3 },
radius: 0.45,
})
glow.animate({ center: { x: 0.7, y: 0.7 }, radius: 0.9 }, { duration: 1400 })