@editframe/create 0.43.0 → 0.45.0

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.
Files changed (99) hide show
  1. package/README.md +11 -0
  2. package/dist/index.js +16 -28
  3. package/dist/index.js.map +1 -1
  4. package/dist/skills/editframe-brand-video-generator/README.md +155 -0
  5. package/dist/skills/editframe-brand-video-generator/SKILL.md +207 -0
  6. package/dist/skills/editframe-brand-video-generator/references/brand-examples.md +178 -0
  7. package/dist/skills/editframe-brand-video-generator/references/color-psychology.md +227 -0
  8. package/dist/skills/editframe-brand-video-generator/references/composition-patterns.md +383 -0
  9. package/dist/skills/editframe-brand-video-generator/references/editing.md +66 -0
  10. package/dist/skills/editframe-brand-video-generator/references/emotional-arcs.md +496 -0
  11. package/dist/skills/editframe-brand-video-generator/references/genre-selection.md +135 -0
  12. package/dist/skills/editframe-brand-video-generator/references/transition-styles.md +611 -0
  13. package/dist/skills/editframe-brand-video-generator/references/typography-personalities.md +326 -0
  14. package/dist/skills/editframe-brand-video-generator/references/video-archetypes.md +86 -0
  15. package/dist/skills/editframe-brand-video-generator/references/video-fundamentals.md +169 -0
  16. package/dist/skills/editframe-brand-video-generator/references/visual-metaphors.md +50 -0
  17. package/dist/skills/editframe-composition/SKILL.md +169 -0
  18. package/dist/skills/editframe-composition/references/audio.md +483 -0
  19. package/dist/skills/editframe-composition/references/captions.md +844 -0
  20. package/dist/skills/editframe-composition/references/composition-model.md +73 -0
  21. package/dist/skills/editframe-composition/references/configuration.md +403 -0
  22. package/dist/skills/editframe-composition/references/css-parts.md +105 -0
  23. package/dist/skills/editframe-composition/references/css-variables.md +640 -0
  24. package/dist/skills/editframe-composition/references/entry-points.md +810 -0
  25. package/dist/skills/editframe-composition/references/events.md +499 -0
  26. package/dist/skills/editframe-composition/references/getting-started.md +259 -0
  27. package/dist/skills/editframe-composition/references/hooks.md +234 -0
  28. package/dist/skills/editframe-composition/references/image.md +241 -0
  29. package/dist/skills/editframe-composition/references/r3f.md +580 -0
  30. package/dist/skills/editframe-composition/references/render-api.md +484 -0
  31. package/dist/skills/editframe-composition/references/render-strategies.md +119 -0
  32. package/dist/skills/editframe-composition/references/render-to-video.md +1101 -0
  33. package/dist/skills/editframe-composition/references/scripting.md +606 -0
  34. package/dist/skills/editframe-composition/references/sequencing.md +116 -0
  35. package/dist/skills/editframe-composition/references/server-rendering.md +753 -0
  36. package/dist/skills/editframe-composition/references/surface.md +329 -0
  37. package/dist/skills/editframe-composition/references/text.md +627 -0
  38. package/dist/skills/editframe-composition/references/time-model.md +99 -0
  39. package/dist/skills/editframe-composition/references/timegroup-modes.md +102 -0
  40. package/dist/skills/editframe-composition/references/timegroup.md +457 -0
  41. package/dist/skills/editframe-composition/references/timeline-root.md +398 -0
  42. package/dist/skills/editframe-composition/references/transcription.md +47 -0
  43. package/dist/skills/editframe-composition/references/transitions.md +608 -0
  44. package/dist/skills/editframe-composition/references/use-media-info.md +357 -0
  45. package/dist/skills/editframe-composition/references/video.md +506 -0
  46. package/dist/skills/editframe-composition/references/waveform.md +327 -0
  47. package/dist/skills/editframe-editor-gui/SKILL.md +152 -0
  48. package/dist/skills/editframe-editor-gui/references/active-root-temporal.md +657 -0
  49. package/dist/skills/editframe-editor-gui/references/canvas.md +947 -0
  50. package/dist/skills/editframe-editor-gui/references/controls.md +366 -0
  51. package/dist/skills/editframe-editor-gui/references/dial.md +756 -0
  52. package/dist/skills/editframe-editor-gui/references/editor-toolkit.md +587 -0
  53. package/dist/skills/editframe-editor-gui/references/filmstrip.md +460 -0
  54. package/dist/skills/editframe-editor-gui/references/fit-scale.md +772 -0
  55. package/dist/skills/editframe-editor-gui/references/focus-overlay.md +561 -0
  56. package/dist/skills/editframe-editor-gui/references/hierarchy.md +544 -0
  57. package/dist/skills/editframe-editor-gui/references/overlay-item.md +634 -0
  58. package/dist/skills/editframe-editor-gui/references/overlay-layer.md +429 -0
  59. package/dist/skills/editframe-editor-gui/references/pan-zoom.md +568 -0
  60. package/dist/skills/editframe-editor-gui/references/pause.md +397 -0
  61. package/dist/skills/editframe-editor-gui/references/play.md +370 -0
  62. package/dist/skills/editframe-editor-gui/references/preview.md +391 -0
  63. package/dist/skills/editframe-editor-gui/references/resizable-box.md +749 -0
  64. package/dist/skills/editframe-editor-gui/references/scrubber.md +588 -0
  65. package/dist/skills/editframe-editor-gui/references/thumbnail-strip.md +566 -0
  66. package/dist/skills/editframe-editor-gui/references/time-display.md +492 -0
  67. package/dist/skills/editframe-editor-gui/references/timeline-ruler.md +489 -0
  68. package/dist/skills/editframe-editor-gui/references/timeline.md +604 -0
  69. package/dist/skills/editframe-editor-gui/references/toggle-loop.md +618 -0
  70. package/dist/skills/editframe-editor-gui/references/toggle-play.md +526 -0
  71. package/dist/skills/editframe-editor-gui/references/transform-handles.md +924 -0
  72. package/dist/skills/editframe-editor-gui/references/trim-handles.md +725 -0
  73. package/dist/skills/editframe-editor-gui/references/workbench.md +453 -0
  74. package/dist/skills/editframe-motion-design/SKILL.md +101 -0
  75. package/dist/skills/editframe-motion-design/references/0-editframe.md +299 -0
  76. package/dist/skills/editframe-motion-design/references/1-intent.md +201 -0
  77. package/dist/skills/editframe-motion-design/references/2-physics-model.md +405 -0
  78. package/dist/skills/editframe-motion-design/references/3-attention.md +350 -0
  79. package/dist/skills/editframe-motion-design/references/4-process.md +418 -0
  80. package/dist/skills/editframe-vite-plugin/SKILL.md +75 -0
  81. package/dist/skills/editframe-vite-plugin/references/file-api.md +111 -0
  82. package/dist/skills/editframe-vite-plugin/references/getting-started.md +96 -0
  83. package/dist/skills/editframe-vite-plugin/references/jit-transcoding.md +91 -0
  84. package/dist/skills/editframe-vite-plugin/references/local-assets.md +75 -0
  85. package/dist/skills/editframe-vite-plugin/references/visual-testing.md +136 -0
  86. package/dist/skills/editframe-webhooks/SKILL.md +126 -0
  87. package/dist/skills/editframe-webhooks/references/events.md +382 -0
  88. package/dist/skills/editframe-webhooks/references/getting-started.md +232 -0
  89. package/dist/skills/editframe-webhooks/references/security.md +418 -0
  90. package/dist/skills/editframe-webhooks/references/testing.md +409 -0
  91. package/dist/skills/editframe-webhooks/references/troubleshooting.md +457 -0
  92. package/dist/templates/html/AGENTS.md +13 -0
  93. package/dist/templates/react/AGENTS.md +13 -0
  94. package/dist/utils.js +15 -16
  95. package/dist/utils.js.map +1 -1
  96. package/package.json +2 -2
  97. package/tsdown.config.ts +4 -0
  98. package/dist/detectAgent.js +0 -89
  99. package/dist/detectAgent.js.map +0 -1
@@ -0,0 +1,405 @@
1
+ ---
2
+ title: Physics Model
3
+ description: How material weight, elasticity, and applied force shape motion profiles — spring, gravity, and friction in animation.
4
+ type: explanation
5
+ order: 2
6
+ ---
7
+
8
+ # Physics Model
9
+
10
+ ## Core Concept
11
+
12
+ **Material + Weight + Force = Motion Profile**
13
+
14
+ Objects have physical properties that determine how they move. Express these through timing, deformation, and easing curves.
15
+
16
+ ## Quick Reference
17
+
18
+ ### Context Base Durations
19
+
20
+ - **Social media (mobile)**: 200-400ms (fast-paced, attention-grabbing)
21
+ - **Explainer videos**: 500-800ms (clear, readable)
22
+ - **Cinematic**: 1000-1600ms (dramatic, luxurious)
23
+ - **Transitions**: 300-600ms (context-dependent)
24
+
25
+ ### Frame Rate Considerations
26
+
27
+ At **24fps**: 1 frame = ~42ms (round to multiples of 42ms)
28
+ At **30fps**: 1 frame = ~33ms (round to multiples of 33ms)
29
+ At **60fps**: 1 frame = ~17ms (round to multiples of 17ms)
30
+
31
+ Use frame-aligned timing for smooth motion.
32
+
33
+ ### Weight Multipliers
34
+
35
+ - **Heavy**: 1.5-2.0× base duration (large text blocks, full-screen graphics)
36
+ - **Medium**: 1.0× base duration (title cards, standard elements)
37
+ - **Light**: 0.5-0.7× base duration (small icons, decorative elements)
38
+
39
+ ### Duration Calculation Formula
40
+
41
+ ```
42
+ Duration = Material.base × WeightMultiplier × DistanceFactor
43
+
44
+ Example:
45
+ Paper title card (800ms base) × Medium weight (1.0×) × 200px movement (2.0×)
46
+ = 800 × 1.0 × 2.0 = 1600ms
47
+
48
+ At 30fps: 1600ms ÷ 33ms = ~48 frames
49
+ At 24fps: 1600ms ÷ 42ms = ~38 frames
50
+ ```
51
+
52
+ ## Material Properties (Source of Truth)
53
+
54
+ Every animation chooses a material metaphor. The material determines all motion characteristics.
55
+
56
+ ### Complete Material Matrix
57
+
58
+ | Material | Base Duration | Deformation | Bounce | Friction | Density |
59
+ |----------|---------------|-------------|---------|----------|---------|
60
+ | Feather | 2000ms | 80% | 0% | Low | Very low |
61
+ | Paper | 800ms | 30-40% | 10% | Medium | Low |
62
+ | Leather | 500ms | 20-30% | 15% | High | Medium |
63
+ | Rubber | 600ms | 60-80% | 80% | High | Medium |
64
+ | Wood | 500ms | 5-10% | 20% | Medium | Medium |
65
+ | Plastic | 350ms | 10-20% | 30% | Low | Medium |
66
+ | Glass | 400ms | 0% | 25% | Low | Medium-high |
67
+ | Metal | 300ms | 0-5% | 5% | Medium | High |
68
+ | Stone | 600ms | 0% | 5% | High | Very high |
69
+ | Liquid | 1400ms | 100% | 0% | Variable | Low |
70
+
71
+ ### Deriving Motion from Material
72
+
73
+ **Material determines timing:**
74
+ ```
75
+ Playful logo (rubber):
76
+ Duration: 600ms (rubber base)
77
+ Deformation: scaleY(0.7) scaleX(1.3)
78
+ Bounce: Returns past resting point by 80%
79
+ Use: Fun brands, celebration moments
80
+
81
+ Professional title card (glass):
82
+ Duration: 400ms (glass base)
83
+ Deformation: None (rigid)
84
+ Bounce: Minimal overshoot (5%)
85
+ Use: Corporate, technical content
86
+ ```
87
+
88
+ **Consistency rule:** All elements of the same material move similarly throughout the composition.
89
+
90
+ ## Weight Scaling
91
+
92
+ Weight multiplies base duration and affects deformation:
93
+
94
+ ### Weight Categories
95
+
96
+ **Light (0.5-0.7× base):**
97
+ - Small tooltips, badges, chips
98
+ - Fast start, floaty motion
99
+ - Minimal deformation (barely compresses)
100
+ - Example: Paper badge = 800ms × 0.6 = 480ms
101
+
102
+ **Medium (1.0× base):**
103
+ - Standard UI elements, cards, buttons
104
+ - Balanced motion
105
+ - Standard material deformation
106
+ - Example: Paper card = 800ms × 1.0 = 800ms
107
+
108
+ **Heavy (1.5-2.0× base):**
109
+ - Large modals, full-page transitions
110
+ - Slow start (inertia), momentum carries
111
+ - Increased deformation (more impact)
112
+ - Example: Paper modal = 800ms × 1.8 = 1440ms
113
+
114
+ ### Volume Conservation
115
+
116
+ When objects deform, volume stays constant:
117
+
118
+ ```
119
+ Volume = Width × Height = constant
120
+
121
+ Normal: scaleX(1.0) × scaleY(1.0) = 1.0
122
+ Squashed: scaleX(1.25) × scaleY(0.8) = 1.0
123
+ Stretched: scaleX(0.85) × scaleY(1.3) = 1.1 (close enough)
124
+ ```
125
+
126
+ Compress one axis → expand the other proportionally.
127
+
128
+ ## Force Applied (Easing)
129
+
130
+ Easing curves represent forces acting on objects:
131
+
132
+ ### Gravity
133
+
134
+ **Falling (ease-in - accelerating):**
135
+ ```
136
+ Object falls, gravity pulls harder over time
137
+ cubic-bezier(0.55, 0, 1, 0.45)
138
+ ```
139
+
140
+ **Rising (ease-out - decelerating):**
141
+ ```
142
+ Object thrown upward, gravity slows it
143
+ cubic-bezier(0, 0.55, 0.45, 1)
144
+ ```
145
+
146
+ ### Entrances vs Exits
147
+
148
+ **Entrance (ease-out):**
149
+ Object enters viewport, needs to decelerate to stop
150
+ ```
151
+ Starting with momentum, slowing to rest
152
+ 0% → fast → slow → 100%
153
+ ```
154
+
155
+ **Exit (ease-in):**
156
+ Object accelerates away, doesn't need to stop
157
+ ```
158
+ Starting at rest, speeding up to leave
159
+ 0% → slow → fast → 100%
160
+ ```
161
+
162
+ **Within-screen (ease-in-out):**
163
+ Object moves from A to B on screen, must start and stop
164
+ ```
165
+ Starting at rest, accelerating, then decelerating
166
+ 0% → slow → fast → slow → 100%
167
+ ```
168
+
169
+ ### Spring Physics
170
+
171
+ **For elastic materials (rubber, plastic):**
172
+
173
+ ```javascript
174
+ // Tight spring (professional UI)
175
+ stiffness: 300
176
+ damping: 30
177
+ = Quick snap, 1-2 oscillations
178
+
179
+ // Loose spring (playful UI)
180
+ stiffness: 100
181
+ damping: 15
182
+ = Gentle motion, 3-4 oscillations
183
+
184
+ // Critically damped (precise)
185
+ stiffness: 200
186
+ damping: 28 (2 × √stiffness)
187
+ = Fastest approach without overshoot
188
+ ```
189
+
190
+ Maps to cubic-bezier:
191
+ ```
192
+ Tight spring: cubic-bezier(0.68, -0.1, 0.265, 1.1)
193
+ Loose spring: cubic-bezier(0.68, -0.55, 0.265, 1.55)
194
+ Critically damped: cubic-bezier(0.36, 0, 0.66, 1)
195
+ ```
196
+
197
+ ## Distance Scaling
198
+
199
+ Duration scales with distance traveled:
200
+
201
+ ```
202
+ Base distance: 100px
203
+ Base duration: Material.base
204
+
205
+ Distance factor = actualDistance / 100px
206
+
207
+ Final duration = Material.base × Weight × DistanceFactor
208
+ ```
209
+
210
+ **Example:**
211
+ ```
212
+ Paper card (800ms base)
213
+ Medium weight (1.0×)
214
+ Moving 250px (2.5×)
215
+ = 800 × 1.0 × 2.5 = 2000ms
216
+ ```
217
+
218
+ **Practical limits:**
219
+ - Don't scale linearly beyond 3× distance (feels too slow)
220
+ - Use √distance for very long movements
221
+ - Example: 400px → use √4 = 2× instead of 4×
222
+
223
+ ## Friction and Drag
224
+
225
+ **High friction (rough surfaces):**
226
+ ```
227
+ Slow, constant deceleration
228
+ Longer timing
229
+ cubic-bezier(0.4, 0.1, 0.6, 0.9)
230
+ Use for: Dragging, scrubbing, sliders
231
+ ```
232
+
233
+ **Low friction (smooth surfaces):**
234
+ ```
235
+ Maintains speed, sharp stop
236
+ Faster timing
237
+ cubic-bezier(0.1, 0.7, 0.3, 1)
238
+ Use for: Swipes, throws, momentum scroll
239
+ ```
240
+
241
+ ## Bounce Dynamics
242
+
243
+ **Realistic bounce sequence:**
244
+ ```
245
+ Drop from height H, duration D
246
+
247
+ Bounce 1: H × 100%, D × 100%
248
+ Bounce 2: H × 70%, D × 70%
249
+ Bounce 3: H × 49%, D × 49%
250
+ Bounce 4: H × 34%, D × 34%
251
+ ```
252
+
253
+ Each bounce is ~70% of previous height and duration.
254
+
255
+ **Simplified UI bounce (single overshoot):**
256
+ ```javascript
257
+ // Button scale bounce
258
+ element.animate([
259
+ { transform: 'scale(0)' },
260
+ { transform: 'scale(1.08)' }, // 8% overshoot
261
+ { transform: 'scale(1)' }
262
+ ], {
263
+ duration: 400,
264
+ easing: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)'
265
+ });
266
+ ```
267
+
268
+ ## Inertia and Momentum
269
+
270
+ **Heavy objects resist changes:**
271
+
272
+ ```
273
+ Phase 1: Overcome inertia (slow start)
274
+ Duration: 40% of total
275
+ Easing: Slow at start
276
+
277
+ Phase 2: Momentum builds (constant speed)
278
+ Duration: 30% of total
279
+ Easing: Linear
280
+
281
+ Phase 3: Decelerate to stop (slow end)
282
+ Duration: 30% of total
283
+ Easing: Slow at end
284
+ ```
285
+
286
+ **Direction changes require momentum decay:**
287
+ ```
288
+ Moving right → stop → move left
289
+
290
+ Cannot change instantly. Must:
291
+ 1. Decelerate to stop (200ms, ease-in)
292
+ 2. Pause (50-100ms, shows momentum lost)
293
+ 3. Accelerate new direction (250ms, ease-out)
294
+ ```
295
+
296
+ ## Implementation Pattern
297
+
298
+ **Determine material, weight, distance:**
299
+ ```
300
+ 1. Material (from intent): Glass
301
+ 2. Weight: Medium (standard button)
302
+ 3. Distance: 50px
303
+ 4. Force: Gravity (falling in)
304
+
305
+ Calculation:
306
+ Base: 400ms (glass)
307
+ Weight: 1.0× (medium)
308
+ Distance: 0.5× (50px vs 100px base)
309
+ = 400 × 1.0 × 0.5 = 200ms
310
+
311
+ Easing: ease-in (falling)
312
+ Deformation: 0% (glass doesn't compress)
313
+ Bounce: 25% overshoot
314
+
315
+ Result:
316
+ duration: 200ms
317
+ transform: translateY(-50px) → translateY(0) → translateY(-12.5px) → translateY(0)
318
+ easing: cubic-bezier(0.55, 0, 1, 0.45) for fall, then bounce
319
+ ```
320
+
321
+ ## Common Animation Patterns for Video
322
+
323
+ ### Title Card Entrance (400-600ms, ease-out)
324
+ ```
325
+ At 30fps (12-18 frames):
326
+ opacity: 0 → 1
327
+ translateY: 40px → 0
328
+ scale: 0.95 → 1
329
+ ```
330
+
331
+ ### Title Card Exit (300-400ms, ease-in, 30% faster)
332
+ ```
333
+ At 30fps (9-12 frames):
334
+ opacity: 1 → 0
335
+ translateY: 0 → -30px
336
+ ```
337
+
338
+ ### Logo Animation (800ms, bounce)
339
+ ```
340
+ At 30fps (24 frames):
341
+ scale: 0 → 1.15 → 0.95 → 1
342
+ rotation: 0 → 5 → -3 → 0
343
+ easing: bounce/elastic
344
+ ```
345
+
346
+ ### Scene Transition - Wipe (500ms)
347
+ ```
348
+ At 30fps (15 frames):
349
+ clipPath: inset(0 0 0 100%) → inset(0 0 0 0%)
350
+ easing: ease-in-out
351
+ ```
352
+
353
+ ### Scene Transition - Cross-dissolve (800ms)
354
+ ```
355
+ At 30fps (24 frames):
356
+ Outgoing scene opacity: 1 → 0
357
+ Incoming scene opacity: 0 → 1
358
+ Overlap: 100% (simultaneous)
359
+ ```
360
+
361
+ ### Text Reveal - Typewriter
362
+ ```
363
+ Per character: 50ms (1-2 frames at 30fps)
364
+ Total for 20 characters: ~1000ms
365
+ ```
366
+
367
+ ### Emphasis Pulse (600ms)
368
+ ```
369
+ At 30fps (18 frames):
370
+ scale: 1 → 1.1 → 1
371
+ opacity: 1 → 1 → 1 (maintain)
372
+ Used for: Drawing attention to key information
373
+ ```
374
+
375
+ ## Common Physics Errors
376
+
377
+ **Error: Ignoring weight**
378
+ ```
379
+ Bad: Full-screen graphic animates in 300ms (too fast for size)
380
+ Fix: Apply heavy multiplier: 300ms × 1.8 = 540ms
381
+ ```
382
+
383
+ **Error: Violating volume conservation**
384
+ ```
385
+ Bad: scaleX(1.5) scaleY(1.5) on squash (volume increases unnaturally)
386
+ Fix: scaleX(1.5) scaleY(0.67) (volume stays constant)
387
+ ```
388
+
389
+ **Error: Wrong easing direction**
390
+ ```
391
+ Bad: Title entrance with ease-in (feels like accelerating into wall)
392
+ Fix: Title entrance with ease-out (decelerating to rest)
393
+ ```
394
+
395
+ **Error: Inconsistent material**
396
+ ```
397
+ Bad: Title card has paper timing (800ms) but metal deformation (2%)
398
+ Fix: Use paper deformation (35%) to match timing
399
+ ```
400
+
401
+ **Error: Not frame-aligned**
402
+ ```
403
+ Bad: 347ms animation at 30fps (10.4 frames - fractional)
404
+ Fix: 330ms (10 frames) or 363ms (11 frames) - whole frame counts
405
+ ```