Dosen原创
这是我学习quartz composer,Origami,看官方文档翻译下来的,每天一篇,有不准确的地方希望能指出,一起交流进步。转载请与我联系,擅自转载视作侵权。
States 状态
Every prototype has multiple states it can transition between. Origami has several patches to help you manage these states.
每一个原型都有多个状态,并可以在这些状态间转换。Origami有一些模块帮助你管理这些状态。
1. State patches 状态模块
Switch → “ ⇧ S ” 开关
The Switch patch works like a light switch. Flipping it when it's on will turn it off, and when it's off flipping it will turn it on. Switches help you build simple two-state interactions. For example you might have a Switch managing whether a photo is full screen or not or whether a modal view is on screen.
Switch模块的作用像是一个灯的开关。轻击它会在开和关的状态间切换。Switch帮你建立简单的两个状态的交互。例如,你可以用一个Switch管理一个图是否全屏或者一个模型视图是否在屏幕上。
2. Index numbers represent states 索引数字代表状态
Both Switch and Index Switch patches output a number for the state that is active. Switch patches output a 0 (off) or a 1 (on), and Index Switch patches output a number starting from 0 for the first state, to 1 for the 2nd, and so on:
Index 0 → Initial state / Off State
Index 1 → 2nd state / On State
Index 2 → 3rd state
Index 3 → 4th state
...
Switch和Index Switch模块都是给有效的状态输出一个数字,Switch模块输出一个0(关)或1(开),Index Switch模块输出一个数字从0开始代表第一个状态,1代表第二个状态,如此...
网友评论