Filters a loop to a subset of its values using a loop of booleans.
使用一组布尔值将循环过滤到其值的子集。
Example A: Filter to a subset of a loop.
例A:过滤到循环的一个子集。
- 假设 Input 输入口收到三个值:
| Input | |
|---|---|
| 0 | apple |
| 1 | carrot |
| 2 | orange |
- Include 属性:
| Include | |
|---|---|
| 0 | ✓ |
| 1 | |
| 2 | ✓ |
- 输出口。
| Output | |
|---|---|
| 0 | apple |
| 1 | orange |
Example B: Repeat filtered values by using a loop of indices.
例B:选择并重新排序多个值。
- 假设 Input 输入口收到三个值:
| Input | |
|---|---|
| 0 | apple |
| 1 | carrot |
| 2 | orange |
- 假设
| Include | |
|---|---|
| 0 | 0 |
| 1 | 3 |
| 2 | 0 |
- 那 Output 输出的顺序如下:
| Output | |
|---|---|
| 0 | carrot |
| 1 | carrot |
| 2 | carrot |
| 3 | orange |
Right-click the patch to change the expected type of the Input loop.
右键更改模块类型。
Use Loop Builder to make a boolean or number loop.
输入口
Input
A loop of values.
接入一个循环值。一般交互模块连接到这里,和Loop 一起使用。
Include
A loop of booleans (or indices) that decides which values in the Input loop to filter.
输出口
Output
A loop of booleans (or indices) that decides which values in the Input loop to filter.
相关模块
Loop Loop Builder [Loop Select](
相关案例
12. Facebook Notifications
创建一系列完整的循环通知。