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
創建一系列完整的循環通知。