useTransform

useTransform 创建一个新的运动值,用于转换一个或多个运动值的输出。

使用

import { useTransform } from 'motion-v'

useTransform 可以有两种使用方式:通过转换函数和通过值映射。

// Transform function
useTransform(() => x.get() * 2)

// Value mapping
useTransform(x, [0, 100], ['#f00', '00f'])

拖拽变换

HTML 内容

    0
  

资源