4.10 Interaction 交互 - Pop Switch 开关


Swipe, rotate or pinch a layer between any two positions, rotations or scales, with added bouncy animations from Pop Animation.
Use the Touch button on a layer to quickly add interactions.
在任意两个位置之间划动、旋转或捏旋转或捏一个图层,和 Pop Animation模块一起用添加弹性动画。
使用图层右上角的Touch按钮快速添加交互。

4.10 Interaction 交互 - Pop Switch 开关_第1张图片

输入口

Enable 启用
A boolean that is true when the gesture is enabled.
勾选启用这个模块。

Layer 图层
The layer to capture gestures from.
用来捕捉手势的图层。

Gesture 手势
The gesture to detect. The options:
手势选项:(板栗:用什么手势激活开关)

  1. Swipe X
  2. Swipe Y
  3. Pinch Scale
  4. Pinch Rotate
  5. Pinch X
  6. Pinch Y
  1. X轴向滑动
  2. Y轴向滑动
  3. 捏住缩放
  4. 捏住旋转
  5. 捏X轴向
  6. 捏Y轴向

Start Value 开始值
A number that represents the default position, scale or rotation of the layer.
表示图层动画位置、比例或角度的初始值。

End Value 结束值
A number that represents the second position, scale or rotation of the layer that the gesture should animate towards.
表示图层动画位置、比例或角度的最终值。

Flip 翻转
A pulse that flips the state of the switch (from on to off, or vice versa), which will also animate the value to the corresponding number.
翻转Start Value开始值和End Value 结束值。

Turn On 打开
A pulse that turns the switch on, which will also animate the value to the end value. If the switch is already on, the pulse has no effect.
接通开关的操作,也将动画值转化为最终值。如果开关已经打开则操作无效。

Turn Off 关闭
A pulse that turns the switch off, which will also animate the value to the start value. If the switch is already off, the pulse has no effect.
关闭开关的操作,也将动画的值转化为开始值。如果开关已经关闭则操作无效。

Bounciness 弹性
A number that represents the bounciness of the animation.
一个表示动画弹性的数字。
(板栗:值越大弹性越大)

Speed 速度
A number that represents the speed of the animation.
一个表示动画速度的数字。
(板栗:值越大速度越快)

输出口

Value 值
A number that represents the current position, rotation or scale. Connect to the position X, position Y, rotation Z, or scale of the layer.
表示当前位置、角度或比例的数字。连接到层的Position X、PositionY、Rotation Z或Scale。

Progress 进度
A progress value that represents the animation progress between the start and end values. See Animation Basics for more information.
表示动画在起始值和结束值之间的进度值。见动画基础获取更多信息。

On/Off 开/关
A boolean that is true either: - when the current position, rotation or scale of the gesture is closer to the end value than the start value. - when the switch is flipped, turned on, or turned off with a pulse.
符合以下两种情况中的一个时布尔值为真:

  • 当手势的当前位置、旋转或比例接近起始值时。
  • 当开关有翻转,打开,或关闭的操作。
    (板栗:哎耶上面写的其实不知道啥哎~)

Related Examples 案例

Instagram Notifications
Switch between notifications with animation.


你可能感兴趣的:(4.10 Interaction 交互 - Pop Switch 开关)