4.5 Interaction 交互 - Interaction 交互


Capture touch events on specific layers. Note that layers must be enabled and have an opacity larger than 0 to receive touches.
Detect Double Tap or Long Press with additional patches.
Use the Touch button on a layer to quickly add interactions.
捕获特定层的触摸事件。注意图层必须启用,不透明度大于0且接收触摸。
检测 Double Tap 模块或 Long Press 模块和额外的模块。
使用图层上的 Touch 按钮快速添加交互。

输入口

Layer 图层
The layer to check for touch interactions. When no layer is specified, the touches on the whole screen are registered.
用来接收触摸交互。没有指定图层时,点击整个屏幕触发交互。

Enable 启用
A boolean that is true when touch detection is on. To disable interactions on this layer, disable it.
触摸检测开启时布尔值为真。要禁用图层的交互只需要禁用这就行。

输出口

Down 按下
A boolean that is true when there is a touch on the layer.
触摸按下图层时布尔值为真。

Tap 点击
A pulse that represents the moment a touch has been released from the layer (touch up) as long as the touch is inside of the layer and hasn't moved.
一个脉冲,按下-松开,松开时激活交互,在层内按下且在层内松开。

Position 位置
The position of the touch, relative to the center of the layer's parent group or device
触摸的位置,相对于该层的父组或设备的中心。

Force 力度
A number between 0 and 1 that represents the force of the touch.
0~1之间的数字代表触摸的力度。


Related Patches 相关模块

HoverDouble TapLong PressScrollMouseTouchesTrackpad


Related Learn Content 相关学习内容

Adding Logic
Add logic to your transitions and flows.

Screen Transitions
Create screen flows.

Getting Started
An introduction to using Origami Studio.


Related Examples 案例

Instagram Boomerang
Transition between screens and scrolls in Boomerang.

Instagram Direct Messages
Send an Instagram direct message to a friend, over and over again.

Instagram Notifications
Switch between notifications with animation.

Messenger Photo View
Animate a photo between conversation and lightbox.

Photo Zoom
Animate between two states when the screen is tapped.

Traffic Light
Transition across three or more states and include logic.


最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 10,066评论 0 23
  • 来北京这几年最深的体会就是假如上天赏个蓝脸,那就不要轻易放弃与它亲密的机会了,因为下一次又不知何时才能相见 如今我...
    迷绿阅读 304评论 0 0
  • 有父母,尚年轻,便该知足。
    尹家的大管家阅读 463评论 0 0
  • 前一段时间,把我弄的左右为难的雷沃咨询项目是否拉我加入的事情终于告一段落,最终以我不介入或轻介入的形式完结。 周六...
    迅雷不及燕儿阅读 324评论 0 0
  • 咪蒙 已经是一种的世界观了吧 全文1743字 | 建议阅读3分钟 我就是那种以前喜欢, 现在却反对你的人。 讲真,...
    顾易凡阅读 512评论 0 2