Is Within
Shape の位置が別の Shape 内にあるかどうかに基づいてプロパティを切り替えます。Is Within は Shape が Within Shape の 外 にある場合は 0、内 にある場合は 1 を出力します。
Within Shape - 他の shapes の境界として使用する shape を接続します。
2 points を含む Lines を Within Shape として使用できます。線の左側が内側と見なされます — 線のパス方向に歩いて左を見るイメージです。Path 方向は、Shape を選択して Edit Shape tool で Viewport で確認できます。
Basic Line を使用する場合は、Divisions を 0 に減らすことを忘れないでください。
Invert - 結果を反転させ、Shape が Within Shape の内側の時に 0、外側の時に 1 を出力します。
- 2 つの Polygons を作成します。
- Poly と Zone と名付けます。
- Is Within Behaviour を作成します。
- zone.id→isWithin.withinShape を接続します。
- Color Array を作成します。
- 配列に 2 番目のインデックスを追加し、色を設定します。
- isWithin.id→colorArray.index を接続します。
- colorArray.id→poly.fillColor を接続します。
Poly が移動するとき、その pivot が Zone Shape の内側にあると、色が Color Array の 2 番目のインデックスに変わります。