Bounding Box Constraint
將 Shape 約束到其他 Shape 的邊界框上。
Input Shape - 連接 Shape 以取樣其邊界框。
Width - 值為 0 時將 Shape 固定到 Input Shape 邊界框的左邊緣,值為 100 時固定到右邊緣。
Height - 值為 0 時將 Shape 固定到 Input Shape 邊界框的底部,值為 100 時固定到頂部。
Offset - 為輸出加入/減去 [x, y] 值。
Out Position [唯讀] - 顯示圖層正在輸出的 [x, y] 值。Id 連接同時包含了 x 和 y 位置,而此屬性允許你將單獨的 [x, y] 屬性連接到其他圖層。
- 建立 2 個 Shapes。
- 建立一個 Bounding Box Constraint。
- 連接 shape1.id→boundingBoxConstraint.inputShape。
- 連接 boundingBoxConstraint.id→shape2.position。
- 將 Bounding Box Constraint 的 Width 設為 0。
Shape 2 將被約束到 Shape 1 邊界框的左邊緣。