@twick/visualizer 0.14.0 → 0.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +20 -20
- package/README.md +113 -13
- package/package.json +14 -14
- package/package.json.bak +34 -0
- package/src/animations/blur.tsx +96 -60
- package/src/animations/breathe.tsx +95 -60
- package/src/animations/fade.tsx +173 -60
- package/src/animations/index.ts +12 -0
- package/src/animations/photo-rise.tsx +103 -66
- package/src/animations/photo-zoom.tsx +109 -73
- package/src/animations/rise.tsx +157 -118
- package/src/animations/succession.tsx +112 -77
- package/src/components/frame-effects.tsx +188 -188
- package/src/components/track.tsx +237 -232
- package/src/controllers/animation.controller.ts +38 -38
- package/src/controllers/element.controller.ts +42 -42
- package/src/controllers/frame-effect.controller.tsx +29 -29
- package/src/controllers/text-effect.controller.ts +32 -32
- package/src/elements/audio.element.tsx +79 -17
- package/src/elements/caption.element.tsx +169 -87
- package/src/elements/circle.element.tsx +88 -20
- package/src/elements/icon.element.tsx +88 -20
- package/src/elements/image.element.tsx +134 -55
- package/src/elements/index.ts +14 -0
- package/src/elements/rect.element.tsx +92 -22
- package/src/elements/scene.element.tsx +97 -29
- package/src/elements/text.element.tsx +101 -27
- package/src/elements/video.element.tsx +274 -56
- package/src/frame-effects/circle.frame.tsx +168 -103
- package/src/frame-effects/index.ts +7 -0
- package/src/frame-effects/rect.frame.tsx +198 -103
- package/src/global.css +11 -11
- package/src/helpers/caption.utils.ts +29 -29
- package/src/helpers/constants.ts +162 -158
- package/src/helpers/element.utils.ts +331 -239
- package/src/helpers/event.utils.ts +21 -0
- package/src/helpers/filters.ts +127 -127
- package/src/helpers/log.utils.ts +55 -29
- package/src/helpers/timing.utils.ts +109 -109
- package/src/helpers/types.ts +361 -241
- package/src/helpers/utils.ts +36 -19
- package/src/index.ts +196 -6
- package/src/live.tsx +16 -16
- package/src/project.ts +6 -6
- package/src/sample.ts +247 -247
- package/src/text-effects/elastic.tsx +70 -39
- package/src/text-effects/erase.tsx +91 -58
- package/src/text-effects/index.ts +9 -0
- package/src/text-effects/stream-word.tsx +94 -60
- package/src/text-effects/typewriter.tsx +93 -59
- package/src/visualizer-grouped.ts +83 -0
- package/src/visualizer.tsx +182 -78
- package/tsconfig.json +11 -11
- package/typedoc.json +19 -14
- package/vite.config.ts +15 -15
- package/.turbo/turbo-build.log +0 -19
- package/.turbo/turbo-docs.log +0 -7
- package/LICENSE +0 -197
- package/dist/mp4.wasm +0 -0
- package/dist/project.css +0 -1
- package/dist/project.js +0 -145
- package/docs/.nojekyll +0 -1
- package/docs/README.md +0 -13
- package/docs/interfaces/Animation.md +0 -47
- package/docs/interfaces/Element.md +0 -47
- package/docs/interfaces/FrameEffectPlugin.md +0 -47
- package/docs/interfaces/TextEffect.md +0 -47
- package/docs/modules.md +0 -535
package/docs/modules.md
DELETED
|
@@ -1,535 +0,0 @@
|
|
|
1
|
-
# @twick/visualizer
|
|
2
|
-
|
|
3
|
-
## Table of contents
|
|
4
|
-
|
|
5
|
-
### Interfaces
|
|
6
|
-
|
|
7
|
-
- [Animation](interfaces/Animation.md)
|
|
8
|
-
- [Element](interfaces/Element.md)
|
|
9
|
-
- [FrameEffectPlugin](interfaces/FrameEffectPlugin.md)
|
|
10
|
-
- [TextEffect](interfaces/TextEffect.md)
|
|
11
|
-
|
|
12
|
-
### Type Aliases
|
|
13
|
-
|
|
14
|
-
- [AnimationParams](modules.md#animationparams)
|
|
15
|
-
- [AnimationProps](modules.md#animationprops)
|
|
16
|
-
- [Caption](modules.md#caption)
|
|
17
|
-
- [CaptionColors](modules.md#captioncolors)
|
|
18
|
-
- [CaptionFont](modules.md#captionfont)
|
|
19
|
-
- [CaptionProps](modules.md#captionprops)
|
|
20
|
-
- [CaptionStyle](modules.md#captionstyle)
|
|
21
|
-
- [ElementParams](modules.md#elementparams)
|
|
22
|
-
- [FrameEffect](modules.md#frameeffect)
|
|
23
|
-
- [FrameEffectParams](modules.md#frameeffectparams)
|
|
24
|
-
- [FrameEffectProps](modules.md#frameeffectprops)
|
|
25
|
-
- [FrameState](modules.md#framestate)
|
|
26
|
-
- [MediaType](modules.md#mediatype)
|
|
27
|
-
- [ObjectFit](modules.md#objectfit)
|
|
28
|
-
- [Position](modules.md#position)
|
|
29
|
-
- [Size](modules.md#size)
|
|
30
|
-
- [SizeArray](modules.md#sizearray)
|
|
31
|
-
- [SizeVector](modules.md#sizevector)
|
|
32
|
-
- [TextEffectParams](modules.md#texteffectparams)
|
|
33
|
-
- [TextEffectProps](modules.md#texteffectprops)
|
|
34
|
-
- [VideoInput](modules.md#videoinput)
|
|
35
|
-
- [VisualizerElement](modules.md#visualizerelement)
|
|
36
|
-
- [VisualizerTrack](modules.md#visualizertrack)
|
|
37
|
-
|
|
38
|
-
### Variables
|
|
39
|
-
|
|
40
|
-
- [scene](modules.md#scene)
|
|
41
|
-
|
|
42
|
-
## Type Aliases
|
|
43
|
-
|
|
44
|
-
### AnimationParams
|
|
45
|
-
|
|
46
|
-
Ƭ **AnimationParams**: `Object`
|
|
47
|
-
|
|
48
|
-
#### Type declaration
|
|
49
|
-
|
|
50
|
-
| Name | Type |
|
|
51
|
-
| :------ | :------ |
|
|
52
|
-
| `animate?` | ``"enter"`` \| ``"exit"`` \| ``"both"`` |
|
|
53
|
-
| `containerRef?` | `Reference`\<`any`\> |
|
|
54
|
-
| `direction?` | ``"left"`` \| ``"right"`` \| ``"center"`` \| ``"up"`` \| ``"down"`` |
|
|
55
|
-
| `duration?` | `number` |
|
|
56
|
-
| `elementRef` | `Reference`\<`any`\> |
|
|
57
|
-
| `intensity?` | `number` |
|
|
58
|
-
| `interval?` | `number` |
|
|
59
|
-
| `mode?` | ``"in"`` \| ``"out"`` |
|
|
60
|
-
| `view` | `View2D` |
|
|
61
|
-
|
|
62
|
-
#### Defined in
|
|
63
|
-
|
|
64
|
-
[helpers/types.ts:189](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L189)
|
|
65
|
-
|
|
66
|
-
___
|
|
67
|
-
|
|
68
|
-
### AnimationProps
|
|
69
|
-
|
|
70
|
-
Ƭ **AnimationProps**: `Object`
|
|
71
|
-
|
|
72
|
-
#### Type declaration
|
|
73
|
-
|
|
74
|
-
| Name | Type |
|
|
75
|
-
| :------ | :------ |
|
|
76
|
-
| `animate?` | ``"enter"`` \| ``"exit"`` \| ``"both"`` |
|
|
77
|
-
| `direction?` | ``"left"`` \| ``"right"`` \| ``"center"`` \| ``"up"`` \| ``"down"`` |
|
|
78
|
-
| `duration?` | `number` |
|
|
79
|
-
| `intensity?` | `number` |
|
|
80
|
-
| `interval?` | `number` |
|
|
81
|
-
| `mode?` | ``"in"`` \| ``"out"`` |
|
|
82
|
-
| `name` | `string` |
|
|
83
|
-
|
|
84
|
-
#### Defined in
|
|
85
|
-
|
|
86
|
-
[helpers/types.ts:201](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L201)
|
|
87
|
-
|
|
88
|
-
___
|
|
89
|
-
|
|
90
|
-
### Caption
|
|
91
|
-
|
|
92
|
-
Ƭ **Caption**: `Object`
|
|
93
|
-
|
|
94
|
-
#### Type declaration
|
|
95
|
-
|
|
96
|
-
| Name | Type |
|
|
97
|
-
| :------ | :------ |
|
|
98
|
-
| `capStyle?` | `string` |
|
|
99
|
-
| `e` | `number` |
|
|
100
|
-
| `props?` | [`CaptionProps`](modules.md#captionprops) |
|
|
101
|
-
| `s` | `number` |
|
|
102
|
-
| `t` | `string` |
|
|
103
|
-
|
|
104
|
-
#### Defined in
|
|
105
|
-
|
|
106
|
-
[helpers/types.ts:77](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L77)
|
|
107
|
-
|
|
108
|
-
___
|
|
109
|
-
|
|
110
|
-
### CaptionColors
|
|
111
|
-
|
|
112
|
-
Ƭ **CaptionColors**: `Object`
|
|
113
|
-
|
|
114
|
-
#### Type declaration
|
|
115
|
-
|
|
116
|
-
| Name | Type |
|
|
117
|
-
| :------ | :------ |
|
|
118
|
-
| `background?` | `string` |
|
|
119
|
-
| `highlight?` | `string` |
|
|
120
|
-
| `text?` | `string` |
|
|
121
|
-
|
|
122
|
-
#### Defined in
|
|
123
|
-
|
|
124
|
-
[helpers/types.ts:98](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L98)
|
|
125
|
-
|
|
126
|
-
___
|
|
127
|
-
|
|
128
|
-
### CaptionFont
|
|
129
|
-
|
|
130
|
-
Ƭ **CaptionFont**: `Object`
|
|
131
|
-
|
|
132
|
-
#### Type declaration
|
|
133
|
-
|
|
134
|
-
| Name | Type |
|
|
135
|
-
| :------ | :------ |
|
|
136
|
-
| `family?` | `string` |
|
|
137
|
-
| `size?` | `number` |
|
|
138
|
-
| `style?` | `string` |
|
|
139
|
-
| `weight?` | `number` |
|
|
140
|
-
|
|
141
|
-
#### Defined in
|
|
142
|
-
|
|
143
|
-
[helpers/types.ts:104](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L104)
|
|
144
|
-
|
|
145
|
-
___
|
|
146
|
-
|
|
147
|
-
### CaptionProps
|
|
148
|
-
|
|
149
|
-
Ƭ **CaptionProps**: `Object`
|
|
150
|
-
|
|
151
|
-
#### Type declaration
|
|
152
|
-
|
|
153
|
-
| Name | Type |
|
|
154
|
-
| :------ | :------ |
|
|
155
|
-
| `bgMargin?` | [`number`, `number`] |
|
|
156
|
-
| `bgOffsetHeight?` | `number` |
|
|
157
|
-
| `bgOffsetWidth?` | `number` |
|
|
158
|
-
| `bgOpacity?` | `number` |
|
|
159
|
-
| `bgPadding?` | [`number`, `number`] |
|
|
160
|
-
| `bgRadius?` | `number` |
|
|
161
|
-
| `colors` | [`CaptionColors`](modules.md#captioncolors) |
|
|
162
|
-
| `font` | [`CaptionFont`](modules.md#captionfont) |
|
|
163
|
-
| `x?` | `number` |
|
|
164
|
-
| `y?` | `number` |
|
|
165
|
-
|
|
166
|
-
#### Defined in
|
|
167
|
-
|
|
168
|
-
[helpers/types.ts:85](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L85)
|
|
169
|
-
|
|
170
|
-
___
|
|
171
|
-
|
|
172
|
-
### CaptionStyle
|
|
173
|
-
|
|
174
|
-
Ƭ **CaptionStyle**: `Object`
|
|
175
|
-
|
|
176
|
-
#### Type declaration
|
|
177
|
-
|
|
178
|
-
| Name | Type |
|
|
179
|
-
| :------ | :------ |
|
|
180
|
-
| `rect` | \{ `alignItems?`: `string` ; `gap?`: `number` ; `justifyContent?`: `string` ; `padding?`: [`number`, `number`] ; `radius?`: `number` } |
|
|
181
|
-
| `rect.alignItems?` | `string` |
|
|
182
|
-
| `rect.gap?` | `number` |
|
|
183
|
-
| `rect.justifyContent?` | `string` |
|
|
184
|
-
| `rect.padding?` | [`number`, `number`] |
|
|
185
|
-
| `rect.radius?` | `number` |
|
|
186
|
-
| `word` | \{ `bgColor?`: `string` ; `bgOffsetHeight?`: `number` ; `bgOffsetWidth?`: `number` ; `fill`: `string` ; `fontFamily`: `string` ; `fontSize`: `number` ; `fontWeight`: `number` ; `lineWidth`: `number` ; `shadowBlur?`: `number` ; `shadowColor?`: `string` ; `shadowOffset?`: `number`[] ; `stroke`: `string` ; `strokeFirst?`: `boolean` } |
|
|
187
|
-
| `word.bgColor?` | `string` |
|
|
188
|
-
| `word.bgOffsetHeight?` | `number` |
|
|
189
|
-
| `word.bgOffsetWidth?` | `number` |
|
|
190
|
-
| `word.fill` | `string` |
|
|
191
|
-
| `word.fontFamily` | `string` |
|
|
192
|
-
| `word.fontSize` | `number` |
|
|
193
|
-
| `word.fontWeight` | `number` |
|
|
194
|
-
| `word.lineWidth` | `number` |
|
|
195
|
-
| `word.shadowBlur?` | `number` |
|
|
196
|
-
| `word.shadowColor?` | `string` |
|
|
197
|
-
| `word.shadowOffset?` | `number`[] |
|
|
198
|
-
| `word.stroke` | `string` |
|
|
199
|
-
| `word.strokeFirst?` | `boolean` |
|
|
200
|
-
|
|
201
|
-
#### Defined in
|
|
202
|
-
|
|
203
|
-
[helpers/types.ts:52](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L52)
|
|
204
|
-
|
|
205
|
-
___
|
|
206
|
-
|
|
207
|
-
### ElementParams
|
|
208
|
-
|
|
209
|
-
Ƭ **ElementParams**: `Object`
|
|
210
|
-
|
|
211
|
-
#### Type declaration
|
|
212
|
-
|
|
213
|
-
| Name | Type |
|
|
214
|
-
| :------ | :------ |
|
|
215
|
-
| `caption?` | [`Caption`](modules.md#caption) |
|
|
216
|
-
| `containerRef` | `Reference`\<`any`\> |
|
|
217
|
-
| `element?` | [`VisualizerElement`](modules.md#visualizerelement) |
|
|
218
|
-
| `view` | `View2D` |
|
|
219
|
-
| `waitOnStart?` | `boolean` |
|
|
220
|
-
|
|
221
|
-
#### Defined in
|
|
222
|
-
|
|
223
|
-
[helpers/types.ts:153](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L153)
|
|
224
|
-
|
|
225
|
-
___
|
|
226
|
-
|
|
227
|
-
### FrameEffect
|
|
228
|
-
|
|
229
|
-
Ƭ **FrameEffect**: `Object`
|
|
230
|
-
|
|
231
|
-
#### Type declaration
|
|
232
|
-
|
|
233
|
-
| Name | Type |
|
|
234
|
-
| :------ | :------ |
|
|
235
|
-
| `e` | `number` |
|
|
236
|
-
| `name` | `string` |
|
|
237
|
-
| `props` | [`FrameEffectProps`](modules.md#frameeffectprops) |
|
|
238
|
-
| `s` | `number` |
|
|
239
|
-
|
|
240
|
-
#### Defined in
|
|
241
|
-
|
|
242
|
-
[helpers/types.ts:34](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L34)
|
|
243
|
-
|
|
244
|
-
___
|
|
245
|
-
|
|
246
|
-
### FrameEffectParams
|
|
247
|
-
|
|
248
|
-
Ƭ **FrameEffectParams**: `Object`
|
|
249
|
-
|
|
250
|
-
#### Type declaration
|
|
251
|
-
|
|
252
|
-
| Name | Type |
|
|
253
|
-
| :------ | :------ |
|
|
254
|
-
| `containerRef?` | `Reference`\<`any`\> |
|
|
255
|
-
| `elementRef` | `Reference`\<`any`\> |
|
|
256
|
-
| `frameEffect` | [`FrameEffect`](modules.md#frameeffect) |
|
|
257
|
-
| `initFrameState` | [`FrameState`](modules.md#framestate) |
|
|
258
|
-
|
|
259
|
-
#### Defined in
|
|
260
|
-
|
|
261
|
-
[helpers/types.ts:216](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L216)
|
|
262
|
-
|
|
263
|
-
___
|
|
264
|
-
|
|
265
|
-
### FrameEffectProps
|
|
266
|
-
|
|
267
|
-
Ƭ **FrameEffectProps**: `Object`
|
|
268
|
-
|
|
269
|
-
#### Type declaration
|
|
270
|
-
|
|
271
|
-
| Name | Type |
|
|
272
|
-
| :------ | :------ |
|
|
273
|
-
| `elementPosition` | [`Position`](modules.md#position) |
|
|
274
|
-
| `framePosition` | [`Position`](modules.md#position) |
|
|
275
|
-
| `frameShape` | ``"circle"`` \| ``"rect"`` |
|
|
276
|
-
| `frameSize` | [`SizeArray`](modules.md#sizearray) |
|
|
277
|
-
| `objectFit` | [`ObjectFit`](modules.md#objectfit) |
|
|
278
|
-
| `radius` | `number` |
|
|
279
|
-
| `transitionDuration` | `number` |
|
|
280
|
-
| `transitionEasing?` | `string` |
|
|
281
|
-
|
|
282
|
-
#### Defined in
|
|
283
|
-
|
|
284
|
-
[helpers/types.ts:41](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L41)
|
|
285
|
-
|
|
286
|
-
___
|
|
287
|
-
|
|
288
|
-
### FrameState
|
|
289
|
-
|
|
290
|
-
Ƭ **FrameState**: `Object`
|
|
291
|
-
|
|
292
|
-
#### Type declaration
|
|
293
|
-
|
|
294
|
-
| Name | Type |
|
|
295
|
-
| :------ | :------ |
|
|
296
|
-
| `element` | \{ `pos`: `Vector2` ; `scale`: `Vector2` ; `size`: `Vector2` } |
|
|
297
|
-
| `element.pos` | `Vector2` |
|
|
298
|
-
| `element.scale` | `Vector2` |
|
|
299
|
-
| `element.size` | `Vector2` |
|
|
300
|
-
| `frame` | \{ `pos`: `Vector2` ; `radius`: `number` ; `rotation`: `number` ; `scale`: `Vector2` ; `size`: `Vector2` } |
|
|
301
|
-
| `frame.pos` | `Vector2` |
|
|
302
|
-
| `frame.radius` | `number` |
|
|
303
|
-
| `frame.rotation` | `number` |
|
|
304
|
-
| `frame.scale` | `Vector2` |
|
|
305
|
-
| `frame.size` | `Vector2` |
|
|
306
|
-
|
|
307
|
-
#### Defined in
|
|
308
|
-
|
|
309
|
-
[helpers/types.ts:228](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L228)
|
|
310
|
-
|
|
311
|
-
___
|
|
312
|
-
|
|
313
|
-
### MediaType
|
|
314
|
-
|
|
315
|
-
Ƭ **MediaType**: ``"video"`` \| ``"image"``
|
|
316
|
-
|
|
317
|
-
#### Defined in
|
|
318
|
-
|
|
319
|
-
[helpers/types.ts:13](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L13)
|
|
320
|
-
|
|
321
|
-
___
|
|
322
|
-
|
|
323
|
-
### ObjectFit
|
|
324
|
-
|
|
325
|
-
Ƭ **ObjectFit**: ``"contain"`` \| ``"cover"`` \| ``"fill"`` \| ``"none"``
|
|
326
|
-
|
|
327
|
-
#### Defined in
|
|
328
|
-
|
|
329
|
-
[helpers/types.ts:15](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L15)
|
|
330
|
-
|
|
331
|
-
___
|
|
332
|
-
|
|
333
|
-
### Position
|
|
334
|
-
|
|
335
|
-
Ƭ **Position**: `Object`
|
|
336
|
-
|
|
337
|
-
#### Type declaration
|
|
338
|
-
|
|
339
|
-
| Name | Type |
|
|
340
|
-
| :------ | :------ |
|
|
341
|
-
| `x` | `number` |
|
|
342
|
-
| `y` | `number` |
|
|
343
|
-
|
|
344
|
-
#### Defined in
|
|
345
|
-
|
|
346
|
-
[helpers/types.ts:29](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L29)
|
|
347
|
-
|
|
348
|
-
___
|
|
349
|
-
|
|
350
|
-
### Size
|
|
351
|
-
|
|
352
|
-
Ƭ **Size**: `Object`
|
|
353
|
-
|
|
354
|
-
#### Type declaration
|
|
355
|
-
|
|
356
|
-
| Name | Type |
|
|
357
|
-
| :------ | :------ |
|
|
358
|
-
| `height` | `number` |
|
|
359
|
-
| `width` | `number` |
|
|
360
|
-
|
|
361
|
-
#### Defined in
|
|
362
|
-
|
|
363
|
-
[helpers/types.ts:22](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L22)
|
|
364
|
-
|
|
365
|
-
___
|
|
366
|
-
|
|
367
|
-
### SizeArray
|
|
368
|
-
|
|
369
|
-
Ƭ **SizeArray**: [`number`, `number`]
|
|
370
|
-
|
|
371
|
-
#### Defined in
|
|
372
|
-
|
|
373
|
-
[helpers/types.ts:27](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L27)
|
|
374
|
-
|
|
375
|
-
___
|
|
376
|
-
|
|
377
|
-
### SizeVector
|
|
378
|
-
|
|
379
|
-
Ƭ **SizeVector**: `Object`
|
|
380
|
-
|
|
381
|
-
#### Type declaration
|
|
382
|
-
|
|
383
|
-
| Name | Type |
|
|
384
|
-
| :------ | :------ |
|
|
385
|
-
| `x` | `number` |
|
|
386
|
-
| `y` | `number` |
|
|
387
|
-
|
|
388
|
-
#### Defined in
|
|
389
|
-
|
|
390
|
-
[helpers/types.ts:17](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L17)
|
|
391
|
-
|
|
392
|
-
___
|
|
393
|
-
|
|
394
|
-
### TextEffectParams
|
|
395
|
-
|
|
396
|
-
Ƭ **TextEffectParams**: `Object`
|
|
397
|
-
|
|
398
|
-
#### Type declaration
|
|
399
|
-
|
|
400
|
-
| Name | Type |
|
|
401
|
-
| :------ | :------ |
|
|
402
|
-
| `bufferTime?` | `number` |
|
|
403
|
-
| `delay?` | `number` |
|
|
404
|
-
| `direction?` | ``"left"`` \| ``"right"`` \| ``"center"`` |
|
|
405
|
-
| `duration?` | `number` |
|
|
406
|
-
| `elementRef` | `Reference`\<`any`\> |
|
|
407
|
-
| `interval?` | `number` |
|
|
408
|
-
|
|
409
|
-
#### Defined in
|
|
410
|
-
|
|
411
|
-
[helpers/types.ts:166](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L166)
|
|
412
|
-
|
|
413
|
-
___
|
|
414
|
-
|
|
415
|
-
### TextEffectProps
|
|
416
|
-
|
|
417
|
-
Ƭ **TextEffectProps**: `Object`
|
|
418
|
-
|
|
419
|
-
#### Type declaration
|
|
420
|
-
|
|
421
|
-
| Name | Type |
|
|
422
|
-
| :------ | :------ |
|
|
423
|
-
| `bufferTime?` | `number` |
|
|
424
|
-
| `delay?` | `number` |
|
|
425
|
-
| `direction?` | ``"left"`` \| ``"right"`` \| ``"center"`` |
|
|
426
|
-
| `duration?` | `number` |
|
|
427
|
-
| `interval?` | `number` |
|
|
428
|
-
| `name` | `string` |
|
|
429
|
-
|
|
430
|
-
#### Defined in
|
|
431
|
-
|
|
432
|
-
[helpers/types.ts:175](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L175)
|
|
433
|
-
|
|
434
|
-
___
|
|
435
|
-
|
|
436
|
-
### VideoInput
|
|
437
|
-
|
|
438
|
-
Ƭ **VideoInput**: `Object`
|
|
439
|
-
|
|
440
|
-
#### Type declaration
|
|
441
|
-
|
|
442
|
-
| Name | Type |
|
|
443
|
-
| :------ | :------ |
|
|
444
|
-
| `backgroundColor` | `string` |
|
|
445
|
-
| `properties` | \{ `height`: `number` ; `width`: `number` } |
|
|
446
|
-
| `properties.height` | `number` |
|
|
447
|
-
| `properties.width` | `number` |
|
|
448
|
-
| `tracks` | [`VisualizerTrack`](modules.md#visualizertrack)[] |
|
|
449
|
-
|
|
450
|
-
#### Defined in
|
|
451
|
-
|
|
452
|
-
[helpers/types.ts:4](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L4)
|
|
453
|
-
|
|
454
|
-
___
|
|
455
|
-
|
|
456
|
-
### VisualizerElement
|
|
457
|
-
|
|
458
|
-
Ƭ **VisualizerElement**: `Object`
|
|
459
|
-
|
|
460
|
-
#### Type declaration
|
|
461
|
-
|
|
462
|
-
| Name | Type |
|
|
463
|
-
| :------ | :------ |
|
|
464
|
-
| `animation?` | [`AnimationProps`](modules.md#animationprops) |
|
|
465
|
-
| `backgroundColor?` | `string` |
|
|
466
|
-
| `e` | `number` |
|
|
467
|
-
| `frame?` | `any` |
|
|
468
|
-
| `frameEffects?` | [`FrameEffect`](modules.md#frameeffect)[] |
|
|
469
|
-
| `hWords?` | `any` |
|
|
470
|
-
| `id` | `string` |
|
|
471
|
-
| `objectFit?` | ``"contain"`` \| ``"cover"`` \| ``"fill"`` |
|
|
472
|
-
| `props?` | `any` |
|
|
473
|
-
| `s` | `number` |
|
|
474
|
-
| `scale?` | `number` |
|
|
475
|
-
| `t?` | `string` |
|
|
476
|
-
| `textEffect` | [`TextEffectProps`](modules.md#texteffectprops) |
|
|
477
|
-
| `trackId?` | `string` |
|
|
478
|
-
| `type?` | `string` |
|
|
479
|
-
|
|
480
|
-
#### Defined in
|
|
481
|
-
|
|
482
|
-
[helpers/types.ts:111](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L111)
|
|
483
|
-
|
|
484
|
-
___
|
|
485
|
-
|
|
486
|
-
### VisualizerTrack
|
|
487
|
-
|
|
488
|
-
Ƭ **VisualizerTrack**: `Object`
|
|
489
|
-
|
|
490
|
-
#### Type declaration
|
|
491
|
-
|
|
492
|
-
| Name | Type |
|
|
493
|
-
| :------ | :------ |
|
|
494
|
-
| `elements` | [`VisualizerElement`](modules.md#visualizerelement)[] |
|
|
495
|
-
| `id` | `string` |
|
|
496
|
-
| `props?` | \{ `bgOpacity?`: `number` ; `capStyle?`: `string` ; `captionProps?`: [`CaptionProps`](modules.md#captionprops) ; `colors?`: \{ `background?`: `string` ; `highlight?`: `string` ; `text?`: `string` } ; `font?`: \{ `family?`: `string` ; `size?`: `number` ; `style?`: `string` ; `weight?`: `number` } ; `x?`: `number` ; `y?`: `number` } |
|
|
497
|
-
| `props.bgOpacity?` | `number` |
|
|
498
|
-
| `props.capStyle?` | `string` |
|
|
499
|
-
| `props.captionProps?` | [`CaptionProps`](modules.md#captionprops) |
|
|
500
|
-
| `props.colors?` | \{ `background?`: `string` ; `highlight?`: `string` ; `text?`: `string` } |
|
|
501
|
-
| `props.colors.background?` | `string` |
|
|
502
|
-
| `props.colors.highlight?` | `string` |
|
|
503
|
-
| `props.colors.text?` | `string` |
|
|
504
|
-
| `props.font?` | \{ `family?`: `string` ; `size?`: `number` ; `style?`: `string` ; `weight?`: `number` } |
|
|
505
|
-
| `props.font.family?` | `string` |
|
|
506
|
-
| `props.font.size?` | `number` |
|
|
507
|
-
| `props.font.style?` | `string` |
|
|
508
|
-
| `props.font.weight?` | `number` |
|
|
509
|
-
| `props.x?` | `number` |
|
|
510
|
-
| `props.y?` | `number` |
|
|
511
|
-
| `type` | `string` |
|
|
512
|
-
|
|
513
|
-
#### Defined in
|
|
514
|
-
|
|
515
|
-
[helpers/types.ts:129](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/helpers/types.ts#L129)
|
|
516
|
-
|
|
517
|
-
## Variables
|
|
518
|
-
|
|
519
|
-
### scene
|
|
520
|
-
|
|
521
|
-
• `Const` **scene**: `SceneDescription`\<`ThreadGeneratorFactory`\<`View2D`\>\>
|
|
522
|
-
|
|
523
|
-
Creates and configures the main scene for video visualization
|
|
524
|
-
|
|
525
|
-
**`Param`**
|
|
526
|
-
|
|
527
|
-
Name of the scene
|
|
528
|
-
|
|
529
|
-
**`Param`**
|
|
530
|
-
|
|
531
|
-
Generator function that handles scene setup and animation
|
|
532
|
-
|
|
533
|
-
#### Defined in
|
|
534
|
-
|
|
535
|
-
[visualizer.tsx:27](https://github.com/ncounterspecialist/twick/blob/7c22d63b8d885bd0a8497127883a5009346a6a6b/packages/visualizer/src/visualizer.tsx#L27)
|