Methods
getAll() → {Iterator}
今回のフレームで接触している全ての物体を得る。for(let object of ...)で個々の物体にアクセス可能。
- Source:
Returns:
of を使って for 文でアクセスできる。
- Type
- Iterator
Example
for (let object of target.userData.collision.getAll()) {
// target と接触している個々の物体を参照できる。
}
getEnter() → {Iterator}
今回のフレームで接触を開始した全ての物体を得る。for(let object of ...)で個々の物体にアクセス可能。
- Source:
Returns:
of を使って for 文でアクセスできる。
- Type
- Iterator
Example
for (let object of target.userData.collision.getEnter()) {
// target と接触を開始した個々の物体を参照できる。
}
getExit() → {Iterator}
今回のフレームで接触を終了した全ての物体を得る。for(let object of ...)で個々の物体にアクセス可能。
- Source:
Returns:
of を使って for 文でアクセスできる。
- Type
- Iterator
Example
for (let object of target.userData.collision.getExit()) {
// target と接触を終了した個々の物体を参照できる。
}
getStay() → {Iterator}
前回のフレームから接触を継続している全ての物体を得る。for(let object of ...)で個々の物体にアクセス可能。
- Source:
Returns:
of を使って for 文でアクセスできる。
- Type
- Iterator
Example
for (let object of target.userData.collision.getStay()) {
// target と接触を継続している個々の物体を参照できる。
}