# nodesOverlap

Canonical: https://docs.shumoku.dev/ja/library/api/nodesOverlap
Language: ja

@shumoku/core · 0.4.0 · function

# nodesOverlap

[ソース](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/layout/interaction.ts#L41)

APIの説明は英語のcanonical sourceを表示しています。

Check if two centre-based rectangles overlap with a gap. Free function for callers that want to do their own collision math; the engine's \`tryPlace\` is preferred for full placement validation.

```
nodesOverlap(a: { h: number; w: number; x: number; y: number }, b: { h: number; w: number; x: number; y: number }, gap?: number): boolean
```

## パラメーター

| 名前 | 型 | 説明 | 既定値 |
| --- | --- | --- | --- |
| `a` | `{ h: number; w: number; x: number; y: number }` | 追加説明はありません。 | `—` |
| `b` | `{ h: number; w: number; x: number; y: number }` | 追加説明はありません。 | `—` |
| `gap` | `number` | 追加説明はありません。 | `DEFAULT_NODE_GAP` |

## 戻り値

```
boolean
```

[`libs/@shumoku/core/src/layout/interaction.ts:41`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/layout/interaction.ts#L41)
