Skip to content

Commit 8a455cb

Browse files
committed
add Clip utilities dosc
1 parent 07bfa11 commit 8a455cb

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

docs/docs/lib/components.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,43 @@ Chains multiple `<Clip>` on a single lane. Start positions are calculated automa
6565
</ClipSequence>
6666
```
6767

68+
### Clip utilities
69+
70+
#### `useClipStart()`
71+
Returns the start frame of the current clip.
72+
73+
```tsx
74+
const start = useClipStart()
75+
```
76+
77+
#### `useClipRange()`
78+
Returns the frame range of the current clip.
79+
80+
```tsx
81+
const range = useClipRange()
82+
const start = range.start
83+
const end = range.end
84+
```
85+
86+
#### `useClipId()`
87+
Returns the current clip ID.
88+
89+
```tsx
90+
const id = useClipId()
91+
```
92+
93+
#### `useClipDepth()`
94+
Returns the nesting depth of the current clip.
95+
```tsx
96+
const depth = useClipDepth()
97+
```
98+
99+
#### `useClipActive()`
100+
Returns true when the current clip is active and visible.
101+
```tsx
102+
const active = useClipActive()
103+
```
104+
68105
### `<ClipStatic>`
69106

70107
Explicit start/end clip. Useful when you need strict boundaries.

docs/i18n/ja/docusaurus-plugin-content-docs/current/lib/components.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,43 @@ export const PROJECT = () => (
6565
</ClipSequence>
6666
```
6767

68+
### Clip utilities
69+
70+
#### `useClipStart()`
71+
現在のクリップの開始フレームを返します。
72+
73+
```tsx
74+
const start = useClipStart()
75+
```
76+
77+
#### `useClipRange()`
78+
現在のクリップの範囲を返します
79+
80+
```tsx
81+
const range = useClipRange()
82+
const start = range.start
83+
const end = range.end
84+
```
85+
86+
#### `useClipId()`
87+
現在のクリップ ID を返します。
88+
89+
```tsx
90+
const id = useClipId()
91+
```
92+
93+
#### `useClipDepth()`
94+
現在のクリップのネスト深度を返します。
95+
```tsx
96+
const depth = useClipDepth()
97+
```
98+
99+
#### `useClipActive()`
100+
現在のクリップがアクティブかつ表示中なら true を返します。
101+
```tsx
102+
const active = useClipActive()
103+
```
104+
68105
### `<ClipStatic>`
69106

70107
表示する期間を明示できる静的クリップ。境界を厳密に制御したい場合に使います。

0 commit comments

Comments
 (0)