dsh-remotion 0.3.3 → 0.4.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.
- package/CHANGELOG.md +21 -0
- package/README.en.md +26 -65
- package/README.md +25 -67
- package/docs/USAGE.en.md +93 -0
- package/docs/USAGE.md +97 -0
- package/docs/VALIDATION.md +22 -0
- package/lib/client.js +90 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +5 -1
- package/lib/media-store.d.ts +25 -0
- package/lib/media-store.js +174 -0
- package/lib/media-templates.d.ts +52 -0
- package/lib/media-templates.js +91 -0
- package/lib/media-workbench.d.ts +42 -0
- package/lib/media-workbench.js +476 -0
- package/package.json +18 -5
- package/scripts/build-client.mjs +4 -0
- package/skills/remotion-best-practices/SKILL.md +54 -54
- package/skills/remotion-best-practices/agents/openai.yaml +7 -7
- package/skills/remotion-best-practices/assets/remotion-icon.svg +4 -4
- package/skills/remotion-best-practices/remotion-captions/REFERENCE.md +36 -36
- package/skills/remotion-best-practices/remotion-captions/agents/openai.yaml +7 -7
- package/skills/remotion-best-practices/remotion-captions/assets/remotion-icon.svg +4 -4
- package/skills/remotion-best-practices/remotion-captions/display-captions.md +190 -190
- package/skills/remotion-best-practices/remotion-captions/import-srt-captions.md +73 -73
- package/skills/remotion-best-practices/remotion-captions/transcribe-captions.md +70 -70
- package/skills/remotion-best-practices/remotion-create/REFERENCE.md +85 -85
- package/skills/remotion-best-practices/remotion-create/agents/openai.yaml +7 -7
- package/skills/remotion-best-practices/remotion-create/assets/remotion-icon.svg +4 -4
- package/skills/remotion-best-practices/remotion-create/tailwind.md +11 -11
- package/skills/remotion-best-practices/remotion-create/video-layout.md +9 -9
- package/skills/remotion-best-practices/remotion-docs/REFERENCE.md +46 -46
- package/skills/remotion-best-practices/remotion-docs/agents/openai.yaml +7 -7
- package/skills/remotion-best-practices/remotion-docs/assets/remotion-icon.svg +4 -4
- package/skills/remotion-best-practices/remotion-interactivity/REFERENCE.md +315 -315
- package/skills/remotion-best-practices/remotion-interactivity/agents/openai.yaml +7 -7
- package/skills/remotion-best-practices/remotion-interactivity/assets/remotion-icon.svg +4 -4
- package/skills/remotion-best-practices/remotion-maps/REFERENCE.md +36 -36
- package/skills/remotion-best-practices/remotion-maps/agents/openai.yaml +7 -7
- package/skills/remotion-best-practices/remotion-maps/assets/remotion-icon.svg +4 -4
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/TECHNIQUE.md +89 -89
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/assets/CesiumFlythrough.tsx +284 -284
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/assets/cesium-path.json +299 -299
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/assets/city-path.json +12 -12
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/assets/example-Root.tsx +39 -39
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/assets/flight-path.ts +35 -35
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/assets/sample-river.geojson +215 -215
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/references/3d-data-sources.md +43 -43
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/references/3d-flyover-architecture.md +128 -128
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/references/3d-troubleshooting.md +57 -57
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/scripts/prep-cesium-path.mjs +161 -161
- package/skills/remotion-best-practices/remotion-maps/techniques/mapbox/TECHNIQUE.md +449 -449
- package/skills/remotion-best-practices/remotion-maps/techniques/mapbox/references/render-stability.md +64 -64
- package/skills/remotion-best-practices/remotion-maps/techniques/maplibre/TECHNIQUE.md +484 -484
- package/skills/remotion-best-practices/remotion-maps/techniques/maplibre/references/render-stability.md +64 -64
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/TECHNIQUE.md +80 -80
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/CountryLabel.tsx +70 -70
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/MapTilerVectorElement.ts +80 -80
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/RiverReveal.tsx +363 -363
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/example-Root.tsx +22 -22
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/sample-data/country-meta.json +7535 -7535
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/sample-data/yarlung-flow.json +605 -605
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/tokens.ts +34 -34
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/references/map-data-sources.md +91 -91
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/references/map-explainer-architecture.md +129 -129
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/references/map-geo-prep.md +85 -85
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/references/render-stability.md +64 -64
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/scripts/prep-geo.mjs +202 -202
- package/skills/remotion-best-practices/remotion-maps/techniques/static-map/TECHNIQUE.md +37 -37
- package/skills/remotion-best-practices/remotion-markup/3d.md +86 -86
- package/skills/remotion-best-practices/remotion-markup/REFERENCE.md +358 -358
- package/skills/remotion-best-practices/remotion-markup/agents/openai.yaml +7 -7
- package/skills/remotion-best-practices/remotion-markup/assets/remotion-icon.svg +4 -4
- package/skills/remotion-best-practices/remotion-markup/audio-visualization.md +198 -198
- package/skills/remotion-best-practices/remotion-markup/audio.md +169 -169
- package/skills/remotion-best-practices/remotion-markup/calculate-metadata.md +136 -136
- package/skills/remotion-best-practices/remotion-markup/compositions.md +123 -123
- package/skills/remotion-best-practices/remotion-markup/connected-compositions.md +79 -79
- package/skills/remotion-best-practices/remotion-markup/cropping.md +34 -34
- package/skills/remotion-best-practices/remotion-markup/effects.md +251 -251
- package/skills/remotion-best-practices/remotion-markup/embedding-videos.md +171 -171
- package/skills/remotion-best-practices/remotion-markup/ffmpeg.md +38 -38
- package/skills/remotion-best-practices/remotion-markup/gifs.md +187 -187
- package/skills/remotion-best-practices/remotion-markup/google-fonts.md +76 -76
- package/skills/remotion-best-practices/remotion-markup/html-in-canvas.md +128 -128
- package/skills/remotion-best-practices/remotion-markup/images.md +73 -73
- package/skills/remotion-best-practices/remotion-markup/light-leaks.md +106 -106
- package/skills/remotion-best-practices/remotion-markup/local-fonts.md +69 -69
- package/skills/remotion-best-practices/remotion-markup/lottie.md +73 -73
- package/skills/remotion-best-practices/remotion-markup/measuring-dom-nodes.md +38 -38
- package/skills/remotion-best-practices/remotion-markup/measuring-text.md +146 -146
- package/skills/remotion-best-practices/remotion-markup/motion-blur.md +60 -60
- package/skills/remotion-best-practices/remotion-markup/multi-scene-video.md +81 -81
- package/skills/remotion-best-practices/remotion-markup/parameters.md +111 -111
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/REFERENCE.md +36 -36
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/agents/openai.yaml +7 -7
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/assets/remotion-icon.svg +4 -4
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/TECHNIQUE.md +89 -89
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/assets/CesiumFlythrough.tsx +284 -284
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/assets/cesium-path.json +299 -299
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/assets/city-path.json +12 -12
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/assets/example-Root.tsx +39 -39
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/assets/flight-path.ts +35 -35
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/assets/sample-river.geojson +215 -215
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/references/3d-data-sources.md +43 -43
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/references/3d-flyover-architecture.md +128 -128
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/references/3d-troubleshooting.md +57 -57
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/scripts/prep-cesium-path.mjs +161 -161
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/mapbox/TECHNIQUE.md +449 -449
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/mapbox/references/render-stability.md +64 -64
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maplibre/TECHNIQUE.md +484 -484
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maplibre/references/render-stability.md +64 -64
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/TECHNIQUE.md +80 -80
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/CountryLabel.tsx +70 -70
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/MapTilerVectorElement.ts +80 -80
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/RiverReveal.tsx +363 -363
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/example-Root.tsx +22 -22
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/sample-data/country-meta.json +7535 -7535
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/sample-data/yarlung-flow.json +605 -605
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/tokens.ts +34 -34
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/references/map-data-sources.md +91 -91
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/references/map-explainer-architecture.md +129 -129
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/references/map-geo-prep.md +85 -85
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/references/render-stability.md +64 -64
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/scripts/prep-geo.mjs +202 -202
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/static-map/TECHNIQUE.md +37 -37
- package/skills/remotion-best-practices/remotion-markup/sequencing.md +169 -169
- package/skills/remotion-best-practices/remotion-markup/sfx.md +51 -51
- package/skills/remotion-best-practices/remotion-markup/silence-detection.md +71 -71
- package/skills/remotion-best-practices/remotion-markup/text-highlights.md +56 -56
- package/skills/remotion-best-practices/remotion-markup/timing.md +111 -111
- package/skills/remotion-best-practices/remotion-markup/transitions.md +239 -239
- package/skills/remotion-best-practices/remotion-markup/video-editing.md +90 -90
- package/skills/remotion-best-practices/remotion-markup/voiceover.md +99 -99
- package/skills/remotion-best-practices/remotion-multimedia/REFERENCE.md +20 -20
- package/skills/remotion-best-practices/remotion-multimedia/agents/openai.yaml +7 -7
- package/skills/remotion-best-practices/remotion-multimedia/assets/remotion-icon.svg +4 -4
- package/skills/remotion-best-practices/remotion-multimedia/get-audio-duration.md +56 -56
- package/skills/remotion-best-practices/remotion-multimedia/get-video-dimensions.md +66 -66
- package/skills/remotion-best-practices/remotion-multimedia/get-video-duration.md +58 -58
- package/skills/remotion-best-practices/remotion-render/REFERENCE.md +35 -35
- package/skills/remotion-best-practices/remotion-render/agents/openai.yaml +7 -7
- package/skills/remotion-best-practices/remotion-render/assets/remotion-icon.svg +4 -4
- package/skills/remotion-best-practices/remotion-render/transparent-videos.md +106 -106
- package/skills/remotion-best-practices/remotion-saas/REFERENCE.md +33 -33
- package/skills/remotion-best-practices/remotion-saas/agents/openai.yaml +7 -7
- package/skills/remotion-best-practices/remotion-saas/assets/remotion-icon.svg +4 -4
- package/skills/remotion-best-practices/remotion-saas/framework.md +19 -19
- package/skills/remotion-best-practices/remotion-saas/player.md +33 -33
- package/skills/remotion-best-practices/remotion-saas/rendering.md +69 -69
- package/skills/remotion-best-practices/remotion-studio/REFERENCE.md +24 -24
- package/skills/remotion-best-practices/remotion-studio/agents/openai.yaml +7 -7
- package/skills/remotion-best-practices/remotion-studio/assets/remotion-icon.svg +4 -4
- package/skills/remotion-best-practices/remotion-upgrade/REFERENCE.md +31 -31
- package/skills/remotion-best-practices/remotion-upgrade/agents/openai.yaml +7 -7
- package/skills/remotion-best-practices/remotion-upgrade/assets/remotion-icon.svg +4 -4
- package/skills/remotion-captions/SKILL.md +31 -31
- package/skills/remotion-captions/agents/openai.yaml +7 -7
- package/skills/remotion-captions/assets/remotion-icon.svg +4 -4
- package/skills/remotion-captions/display-captions.md +190 -190
- package/skills/remotion-captions/import-srt-captions.md +73 -73
- package/skills/remotion-captions/transcribe-captions.md +70 -70
- package/skills/remotion-create/SKILL.md +80 -80
- package/skills/remotion-create/agents/openai.yaml +7 -7
- package/skills/remotion-create/assets/remotion-icon.svg +4 -4
- package/skills/remotion-create/tailwind.md +11 -11
- package/skills/remotion-create/video-layout.md +9 -9
- package/skills/remotion-docs/SKILL.md +41 -41
- package/skills/remotion-docs/agents/openai.yaml +7 -7
- package/skills/remotion-docs/assets/remotion-icon.svg +4 -4
- package/skills/remotion-interactivity/SKILL.md +310 -310
- package/skills/remotion-interactivity/agents/openai.yaml +7 -7
- package/skills/remotion-interactivity/assets/remotion-icon.svg +4 -4
- package/skills/remotion-maps/SKILL.md +31 -31
- package/skills/remotion-maps/agents/openai.yaml +7 -7
- package/skills/remotion-maps/assets/remotion-icon.svg +4 -4
- package/skills/remotion-maps/techniques/cesium/TECHNIQUE.md +89 -89
- package/skills/remotion-maps/techniques/cesium/assets/CesiumFlythrough.tsx +284 -284
- package/skills/remotion-maps/techniques/cesium/assets/cesium-path.json +299 -299
- package/skills/remotion-maps/techniques/cesium/assets/city-path.json +12 -12
- package/skills/remotion-maps/techniques/cesium/assets/example-Root.tsx +39 -39
- package/skills/remotion-maps/techniques/cesium/assets/flight-path.ts +35 -35
- package/skills/remotion-maps/techniques/cesium/assets/sample-river.geojson +215 -215
- package/skills/remotion-maps/techniques/cesium/references/3d-data-sources.md +43 -43
- package/skills/remotion-maps/techniques/cesium/references/3d-flyover-architecture.md +128 -128
- package/skills/remotion-maps/techniques/cesium/references/3d-troubleshooting.md +57 -57
- package/skills/remotion-maps/techniques/cesium/scripts/prep-cesium-path.mjs +161 -161
- package/skills/remotion-maps/techniques/mapbox/TECHNIQUE.md +449 -449
- package/skills/remotion-maps/techniques/mapbox/references/render-stability.md +64 -64
- package/skills/remotion-maps/techniques/maplibre/TECHNIQUE.md +484 -484
- package/skills/remotion-maps/techniques/maplibre/references/render-stability.md +64 -64
- package/skills/remotion-maps/techniques/maptiler/TECHNIQUE.md +80 -80
- package/skills/remotion-maps/techniques/maptiler/assets/CountryLabel.tsx +70 -70
- package/skills/remotion-maps/techniques/maptiler/assets/MapTilerVectorElement.ts +80 -80
- package/skills/remotion-maps/techniques/maptiler/assets/RiverReveal.tsx +363 -363
- package/skills/remotion-maps/techniques/maptiler/assets/example-Root.tsx +22 -22
- package/skills/remotion-maps/techniques/maptiler/assets/sample-data/country-meta.json +7535 -7535
- package/skills/remotion-maps/techniques/maptiler/assets/sample-data/yarlung-flow.json +605 -605
- package/skills/remotion-maps/techniques/maptiler/assets/tokens.ts +34 -34
- package/skills/remotion-maps/techniques/maptiler/references/map-data-sources.md +91 -91
- package/skills/remotion-maps/techniques/maptiler/references/map-explainer-architecture.md +129 -129
- package/skills/remotion-maps/techniques/maptiler/references/map-geo-prep.md +85 -85
- package/skills/remotion-maps/techniques/maptiler/references/render-stability.md +64 -64
- package/skills/remotion-maps/techniques/maptiler/scripts/prep-geo.mjs +202 -202
- package/skills/remotion-maps/techniques/static-map/TECHNIQUE.md +37 -37
- package/skills/remotion-markup/3d.md +86 -86
- package/skills/remotion-markup/SKILL.md +353 -353
- package/skills/remotion-markup/agents/openai.yaml +7 -7
- package/skills/remotion-markup/assets/remotion-icon.svg +4 -4
- package/skills/remotion-markup/audio-visualization.md +198 -198
- package/skills/remotion-markup/audio.md +169 -169
- package/skills/remotion-markup/calculate-metadata.md +136 -136
- package/skills/remotion-markup/compositions.md +123 -123
- package/skills/remotion-markup/connected-compositions.md +79 -79
- package/skills/remotion-markup/cropping.md +34 -34
- package/skills/remotion-markup/effects.md +251 -251
- package/skills/remotion-markup/embedding-videos.md +171 -171
- package/skills/remotion-markup/ffmpeg.md +38 -38
- package/skills/remotion-markup/gifs.md +187 -187
- package/skills/remotion-markup/google-fonts.md +76 -76
- package/skills/remotion-markup/html-in-canvas.md +128 -128
- package/skills/remotion-markup/images.md +73 -73
- package/skills/remotion-markup/light-leaks.md +106 -106
- package/skills/remotion-markup/local-fonts.md +69 -69
- package/skills/remotion-markup/lottie.md +73 -73
- package/skills/remotion-markup/measuring-dom-nodes.md +38 -38
- package/skills/remotion-markup/measuring-text.md +146 -146
- package/skills/remotion-markup/motion-blur.md +60 -60
- package/skills/remotion-markup/multi-scene-video.md +81 -81
- package/skills/remotion-markup/parameters.md +111 -111
- package/skills/remotion-markup/remotion-maps/REFERENCE.md +36 -36
- package/skills/remotion-markup/remotion-maps/agents/openai.yaml +7 -7
- package/skills/remotion-markup/remotion-maps/assets/remotion-icon.svg +4 -4
- package/skills/remotion-markup/remotion-maps/techniques/cesium/TECHNIQUE.md +89 -89
- package/skills/remotion-markup/remotion-maps/techniques/cesium/assets/CesiumFlythrough.tsx +284 -284
- package/skills/remotion-markup/remotion-maps/techniques/cesium/assets/cesium-path.json +299 -299
- package/skills/remotion-markup/remotion-maps/techniques/cesium/assets/city-path.json +12 -12
- package/skills/remotion-markup/remotion-maps/techniques/cesium/assets/example-Root.tsx +39 -39
- package/skills/remotion-markup/remotion-maps/techniques/cesium/assets/flight-path.ts +35 -35
- package/skills/remotion-markup/remotion-maps/techniques/cesium/assets/sample-river.geojson +215 -215
- package/skills/remotion-markup/remotion-maps/techniques/cesium/references/3d-data-sources.md +43 -43
- package/skills/remotion-markup/remotion-maps/techniques/cesium/references/3d-flyover-architecture.md +128 -128
- package/skills/remotion-markup/remotion-maps/techniques/cesium/references/3d-troubleshooting.md +57 -57
- package/skills/remotion-markup/remotion-maps/techniques/cesium/scripts/prep-cesium-path.mjs +161 -161
- package/skills/remotion-markup/remotion-maps/techniques/mapbox/TECHNIQUE.md +449 -449
- package/skills/remotion-markup/remotion-maps/techniques/mapbox/references/render-stability.md +64 -64
- package/skills/remotion-markup/remotion-maps/techniques/maplibre/TECHNIQUE.md +484 -484
- package/skills/remotion-markup/remotion-maps/techniques/maplibre/references/render-stability.md +64 -64
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/TECHNIQUE.md +80 -80
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/CountryLabel.tsx +70 -70
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/MapTilerVectorElement.ts +80 -80
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/RiverReveal.tsx +363 -363
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/example-Root.tsx +22 -22
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/sample-data/country-meta.json +7535 -7535
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/sample-data/yarlung-flow.json +605 -605
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/tokens.ts +34 -34
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/references/map-data-sources.md +91 -91
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/references/map-explainer-architecture.md +129 -129
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/references/map-geo-prep.md +85 -85
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/references/render-stability.md +64 -64
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/scripts/prep-geo.mjs +202 -202
- package/skills/remotion-markup/remotion-maps/techniques/static-map/TECHNIQUE.md +37 -37
- package/skills/remotion-markup/sequencing.md +169 -169
- package/skills/remotion-markup/sfx.md +51 -51
- package/skills/remotion-markup/silence-detection.md +71 -71
- package/skills/remotion-markup/text-highlights.md +56 -56
- package/skills/remotion-markup/timing.md +111 -111
- package/skills/remotion-markup/transitions.md +239 -239
- package/skills/remotion-markup/video-editing.md +90 -90
- package/skills/remotion-markup/voiceover.md +99 -99
- package/skills/remotion-multimedia/SKILL.md +15 -15
- package/skills/remotion-multimedia/agents/openai.yaml +7 -7
- package/skills/remotion-multimedia/assets/remotion-icon.svg +4 -4
- package/skills/remotion-multimedia/get-audio-duration.md +56 -56
- package/skills/remotion-multimedia/get-video-dimensions.md +66 -66
- package/skills/remotion-multimedia/get-video-duration.md +58 -58
- package/skills/remotion-render/SKILL.md +30 -30
- package/skills/remotion-render/agents/openai.yaml +7 -7
- package/skills/remotion-render/assets/remotion-icon.svg +4 -4
- package/skills/remotion-render/transparent-videos.md +106 -106
- package/skills/remotion-saas/SKILL.md +28 -28
- package/skills/remotion-saas/agents/openai.yaml +7 -7
- package/skills/remotion-saas/assets/remotion-icon.svg +4 -4
- package/skills/remotion-saas/framework.md +19 -19
- package/skills/remotion-saas/player.md +33 -33
- package/skills/remotion-saas/rendering.md +69 -69
- package/skills/remotion-studio/SKILL.md +19 -19
- package/skills/remotion-studio/agents/openai.yaml +7 -7
- package/skills/remotion-studio/assets/remotion-icon.svg +4 -4
- package/skills/remotion-upgrade/SKILL.md +26 -26
- package/skills/remotion-upgrade/agents/openai.yaml +7 -7
- package/skills/remotion-upgrade/assets/remotion-icon.svg +4 -4
- package/templates/DESIGN.md +26 -0
|
@@ -1,128 +1,128 @@
|
|
|
1
|
-
# Using `<HtmlInCanvas>` in Remotion
|
|
2
|
-
|
|
3
|
-
Renders children into a `<canvas>` so you can post-process them with the Canvas 2D API or WebGL.
|
|
4
|
-
|
|
5
|
-
Only works in Chrome 149+ with the `chrome://flags/#canvas-draw-element` flag enabled.
|
|
6
|
-
Give the user a notice.
|
|
7
|
-
|
|
8
|
-
## Nesting
|
|
9
|
-
|
|
10
|
-
Do not nest `<HtmlInCanvas>` components. Remotion rejects nesting because Chrome does not reliably render nested HTML-in-canvas subtrees.
|
|
11
|
-
|
|
12
|
-
## Enabling WebGL during renders
|
|
13
|
-
|
|
14
|
-
If you make use of WebGL during renders, you need to enable it:
|
|
15
|
-
|
|
16
|
-
From the CLI:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
npx remotion render --gl=angle
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Set it as the default for Studio and CLI (advised):
|
|
23
|
-
|
|
24
|
-
```ts
|
|
25
|
-
import { Config } from "@remotion/cli/config";
|
|
26
|
-
|
|
27
|
-
Config.setChromiumOpenGlRenderer("angle");
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Basic usage
|
|
31
|
-
|
|
32
|
-
By default, draws to canvas with no effect applied:
|
|
33
|
-
|
|
34
|
-
```tsx
|
|
35
|
-
import { HtmlInCanvas } from "remotion";
|
|
36
|
-
|
|
37
|
-
export const MyComp = () => {
|
|
38
|
-
return (
|
|
39
|
-
<HtmlInCanvas width={1280} height={720}>
|
|
40
|
-
<div style={{ fontSize: 80 }}>
|
|
41
|
-
Hello
|
|
42
|
-
</div>
|
|
43
|
-
</HtmlInCanvas>
|
|
44
|
-
);
|
|
45
|
-
};
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## 2D effect with `onPaint`
|
|
49
|
-
|
|
50
|
-
`onPaint` runs whenever the content updates. Call `ctx.drawElementImage(elementImage, 0, 0)` to draw the captured DOM, and assign the returned transform to `element.style.transform` so DOM selection still aligns with the painted output.
|
|
51
|
-
|
|
52
|
-
```tsx
|
|
53
|
-
import {
|
|
54
|
-
AbsoluteFill,
|
|
55
|
-
HtmlInCanvas,
|
|
56
|
-
type HtmlInCanvasOnPaint,
|
|
57
|
-
useCurrentFrame,
|
|
58
|
-
useVideoConfig,
|
|
59
|
-
} from "remotion";
|
|
60
|
-
import { useCallback } from "react";
|
|
61
|
-
|
|
62
|
-
export const Blur = () => {
|
|
63
|
-
const frame = useCurrentFrame();
|
|
64
|
-
const { width, height, fps } = useVideoConfig();
|
|
65
|
-
|
|
66
|
-
const onPaint: HtmlInCanvasOnPaint = useCallback(
|
|
67
|
-
({ canvas, element, elementImage }) => {
|
|
68
|
-
const ctx = canvas.getContext("2d");
|
|
69
|
-
if (!ctx) throw new Error("Failed to acquire 2D context");
|
|
70
|
-
|
|
71
|
-
const blurPx = 4 + 18 * (0.5 + 0.5 * Math.sin((frame / fps) * Math.PI));
|
|
72
|
-
|
|
73
|
-
ctx.reset();
|
|
74
|
-
ctx.filter = `blur(${blurPx}px)`;
|
|
75
|
-
const transform = ctx.drawElementImage(elementImage, 0, 0);
|
|
76
|
-
element.style.transform = transform.toString();
|
|
77
|
-
},
|
|
78
|
-
[frame, fps],
|
|
79
|
-
);
|
|
80
|
-
|
|
81
|
-
return (
|
|
82
|
-
<HtmlInCanvas width={width} height={height} onPaint={onPaint}>
|
|
83
|
-
<AbsoluteFill
|
|
84
|
-
style={{
|
|
85
|
-
justifyContent: "center",
|
|
86
|
-
alignItems: "center",
|
|
87
|
-
fontSize: 120,
|
|
88
|
-
}}
|
|
89
|
-
>
|
|
90
|
-
<h1>
|
|
91
|
-
Hello
|
|
92
|
-
</h1>
|
|
93
|
-
</AbsoluteFill>
|
|
94
|
-
</HtmlInCanvas>
|
|
95
|
-
);
|
|
96
|
-
};
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
## WebGL effects
|
|
100
|
-
|
|
101
|
-
For WebGL, set up the context, program, and texture in `onInit` and return a cleanup function. Inside `onPaint`, upload the captured DOM with `gl.texElementImage2D(...)` and draw.
|
|
102
|
-
|
|
103
|
-
```tsx
|
|
104
|
-
const onInit: HtmlInCanvasOnInit = useCallback(({ canvas }) => {
|
|
105
|
-
const gl = canvas.getContext("webgl2", { alpha: true, premultipliedAlpha: true });
|
|
106
|
-
if (!gl) {
|
|
107
|
-
throw new Error(
|
|
108
|
-
"WebGL2 unavailable. Try rendering with the --gl=angle option. See https://remotion.dev/docs/gl-options.",
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
|
|
112
|
-
// compile program, create texture, set up VAO...
|
|
113
|
-
return () => {
|
|
114
|
-
// delete program, texture, buffers...
|
|
115
|
-
};
|
|
116
|
-
}, []);
|
|
117
|
-
|
|
118
|
-
const onPaint: HtmlInCanvasOnPaint = useCallback(({ elementImage }) => {
|
|
119
|
-
gl.texElementImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, elementImage);
|
|
120
|
-
gl.drawArrays(gl.TRIANGLES, 0, 6);
|
|
121
|
-
}, []);
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
For a fully working minimal example, see https://github.com/remotion-dev/remotion/blob/main/packages/docs/components/demos/HtmlInCanvasDocsDemoWebGL.tsx.
|
|
125
|
-
|
|
126
|
-
## Async `onPaint`
|
|
127
|
-
|
|
128
|
-
`onPaint` may be `async`. Remotion holds the frame open via `delayRender()` until the promise resolves. Useful for multi-pass effects with `createImageBitmap`.
|
|
1
|
+
# Using `<HtmlInCanvas>` in Remotion
|
|
2
|
+
|
|
3
|
+
Renders children into a `<canvas>` so you can post-process them with the Canvas 2D API or WebGL.
|
|
4
|
+
|
|
5
|
+
Only works in Chrome 149+ with the `chrome://flags/#canvas-draw-element` flag enabled.
|
|
6
|
+
Give the user a notice.
|
|
7
|
+
|
|
8
|
+
## Nesting
|
|
9
|
+
|
|
10
|
+
Do not nest `<HtmlInCanvas>` components. Remotion rejects nesting because Chrome does not reliably render nested HTML-in-canvas subtrees.
|
|
11
|
+
|
|
12
|
+
## Enabling WebGL during renders
|
|
13
|
+
|
|
14
|
+
If you make use of WebGL during renders, you need to enable it:
|
|
15
|
+
|
|
16
|
+
From the CLI:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx remotion render --gl=angle
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Set it as the default for Studio and CLI (advised):
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import { Config } from "@remotion/cli/config";
|
|
26
|
+
|
|
27
|
+
Config.setChromiumOpenGlRenderer("angle");
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Basic usage
|
|
31
|
+
|
|
32
|
+
By default, draws to canvas with no effect applied:
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
import { HtmlInCanvas } from "remotion";
|
|
36
|
+
|
|
37
|
+
export const MyComp = () => {
|
|
38
|
+
return (
|
|
39
|
+
<HtmlInCanvas width={1280} height={720}>
|
|
40
|
+
<div style={{ fontSize: 80 }}>
|
|
41
|
+
Hello
|
|
42
|
+
</div>
|
|
43
|
+
</HtmlInCanvas>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## 2D effect with `onPaint`
|
|
49
|
+
|
|
50
|
+
`onPaint` runs whenever the content updates. Call `ctx.drawElementImage(elementImage, 0, 0)` to draw the captured DOM, and assign the returned transform to `element.style.transform` so DOM selection still aligns with the painted output.
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
import {
|
|
54
|
+
AbsoluteFill,
|
|
55
|
+
HtmlInCanvas,
|
|
56
|
+
type HtmlInCanvasOnPaint,
|
|
57
|
+
useCurrentFrame,
|
|
58
|
+
useVideoConfig,
|
|
59
|
+
} from "remotion";
|
|
60
|
+
import { useCallback } from "react";
|
|
61
|
+
|
|
62
|
+
export const Blur = () => {
|
|
63
|
+
const frame = useCurrentFrame();
|
|
64
|
+
const { width, height, fps } = useVideoConfig();
|
|
65
|
+
|
|
66
|
+
const onPaint: HtmlInCanvasOnPaint = useCallback(
|
|
67
|
+
({ canvas, element, elementImage }) => {
|
|
68
|
+
const ctx = canvas.getContext("2d");
|
|
69
|
+
if (!ctx) throw new Error("Failed to acquire 2D context");
|
|
70
|
+
|
|
71
|
+
const blurPx = 4 + 18 * (0.5 + 0.5 * Math.sin((frame / fps) * Math.PI));
|
|
72
|
+
|
|
73
|
+
ctx.reset();
|
|
74
|
+
ctx.filter = `blur(${blurPx}px)`;
|
|
75
|
+
const transform = ctx.drawElementImage(elementImage, 0, 0);
|
|
76
|
+
element.style.transform = transform.toString();
|
|
77
|
+
},
|
|
78
|
+
[frame, fps],
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
return (
|
|
82
|
+
<HtmlInCanvas width={width} height={height} onPaint={onPaint}>
|
|
83
|
+
<AbsoluteFill
|
|
84
|
+
style={{
|
|
85
|
+
justifyContent: "center",
|
|
86
|
+
alignItems: "center",
|
|
87
|
+
fontSize: 120,
|
|
88
|
+
}}
|
|
89
|
+
>
|
|
90
|
+
<h1>
|
|
91
|
+
Hello
|
|
92
|
+
</h1>
|
|
93
|
+
</AbsoluteFill>
|
|
94
|
+
</HtmlInCanvas>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## WebGL effects
|
|
100
|
+
|
|
101
|
+
For WebGL, set up the context, program, and texture in `onInit` and return a cleanup function. Inside `onPaint`, upload the captured DOM with `gl.texElementImage2D(...)` and draw.
|
|
102
|
+
|
|
103
|
+
```tsx
|
|
104
|
+
const onInit: HtmlInCanvasOnInit = useCallback(({ canvas }) => {
|
|
105
|
+
const gl = canvas.getContext("webgl2", { alpha: true, premultipliedAlpha: true });
|
|
106
|
+
if (!gl) {
|
|
107
|
+
throw new Error(
|
|
108
|
+
"WebGL2 unavailable. Try rendering with the --gl=angle option. See https://remotion.dev/docs/gl-options.",
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
|
|
112
|
+
// compile program, create texture, set up VAO...
|
|
113
|
+
return () => {
|
|
114
|
+
// delete program, texture, buffers...
|
|
115
|
+
};
|
|
116
|
+
}, []);
|
|
117
|
+
|
|
118
|
+
const onPaint: HtmlInCanvasOnPaint = useCallback(({ elementImage }) => {
|
|
119
|
+
gl.texElementImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, elementImage);
|
|
120
|
+
gl.drawArrays(gl.TRIANGLES, 0, 6);
|
|
121
|
+
}, []);
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
For a fully working minimal example, see https://github.com/remotion-dev/remotion/blob/main/packages/docs/components/demos/HtmlInCanvasDocsDemoWebGL.tsx.
|
|
125
|
+
|
|
126
|
+
## Async `onPaint`
|
|
127
|
+
|
|
128
|
+
`onPaint` may be `async`. Remotion holds the frame open via `delayRender()` until the promise resolves. Useful for multi-pass effects with `createImageBitmap`.
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
## Sizing and positioning
|
|
2
|
-
|
|
3
|
-
Use the `style` prop to control size and position:
|
|
4
|
-
|
|
5
|
-
```tsx
|
|
6
|
-
<Img
|
|
7
|
-
src={staticFile("photo.png")}
|
|
8
|
-
style={{
|
|
9
|
-
width: 500,
|
|
10
|
-
height: 300,
|
|
11
|
-
position: "absolute",
|
|
12
|
-
top: 100,
|
|
13
|
-
left: 50,
|
|
14
|
-
objectFit: "cover",
|
|
15
|
-
}}
|
|
16
|
-
/>
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Dynamic image paths
|
|
20
|
-
|
|
21
|
-
Use template literals for dynamic file references:
|
|
22
|
-
|
|
23
|
-
```tsx
|
|
24
|
-
import { Img, staticFile, useCurrentFrame } from "remotion";
|
|
25
|
-
|
|
26
|
-
const frame = useCurrentFrame();
|
|
27
|
-
|
|
28
|
-
// Image sequence
|
|
29
|
-
<Img src={staticFile(`frames/frame${frame}.png`)} />
|
|
30
|
-
|
|
31
|
-
// Selecting based on props
|
|
32
|
-
<Img src={staticFile(`avatars/${props.userId}.png`)} />
|
|
33
|
-
|
|
34
|
-
// Conditional images
|
|
35
|
-
<Img
|
|
36
|
-
src={staticFile(`icons/${isActive ? "active" : "inactive"}.svg`)}
|
|
37
|
-
/>
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
This pattern is useful for:
|
|
41
|
-
|
|
42
|
-
- Image sequences (frame-by-frame animations)
|
|
43
|
-
- User-specific avatars or profile images
|
|
44
|
-
- Theme-based icons
|
|
45
|
-
- State-dependent graphics
|
|
46
|
-
|
|
47
|
-
## Getting image dimensions
|
|
48
|
-
|
|
49
|
-
Use `getImageDimensions()` to get the dimensions of an image:
|
|
50
|
-
|
|
51
|
-
```tsx
|
|
52
|
-
import { getImageDimensions, staticFile } from "remotion";
|
|
53
|
-
|
|
54
|
-
const { width, height } = await getImageDimensions(staticFile("photo.png"));
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
This is useful for calculating aspect ratios or sizing compositions:
|
|
58
|
-
|
|
59
|
-
```tsx
|
|
60
|
-
import {
|
|
61
|
-
getImageDimensions,
|
|
62
|
-
staticFile,
|
|
63
|
-
CalculateMetadataFunction,
|
|
64
|
-
} from "remotion";
|
|
65
|
-
|
|
66
|
-
const calculateMetadata: CalculateMetadataFunction = async () => {
|
|
67
|
-
const { width, height } = await getImageDimensions(staticFile("photo.png"));
|
|
68
|
-
return {
|
|
69
|
-
width,
|
|
70
|
-
height,
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
```
|
|
1
|
+
## Sizing and positioning
|
|
2
|
+
|
|
3
|
+
Use the `style` prop to control size and position:
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
<Img
|
|
7
|
+
src={staticFile("photo.png")}
|
|
8
|
+
style={{
|
|
9
|
+
width: 500,
|
|
10
|
+
height: 300,
|
|
11
|
+
position: "absolute",
|
|
12
|
+
top: 100,
|
|
13
|
+
left: 50,
|
|
14
|
+
objectFit: "cover",
|
|
15
|
+
}}
|
|
16
|
+
/>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Dynamic image paths
|
|
20
|
+
|
|
21
|
+
Use template literals for dynamic file references:
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import { Img, staticFile, useCurrentFrame } from "remotion";
|
|
25
|
+
|
|
26
|
+
const frame = useCurrentFrame();
|
|
27
|
+
|
|
28
|
+
// Image sequence
|
|
29
|
+
<Img src={staticFile(`frames/frame${frame}.png`)} />
|
|
30
|
+
|
|
31
|
+
// Selecting based on props
|
|
32
|
+
<Img src={staticFile(`avatars/${props.userId}.png`)} />
|
|
33
|
+
|
|
34
|
+
// Conditional images
|
|
35
|
+
<Img
|
|
36
|
+
src={staticFile(`icons/${isActive ? "active" : "inactive"}.svg`)}
|
|
37
|
+
/>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
This pattern is useful for:
|
|
41
|
+
|
|
42
|
+
- Image sequences (frame-by-frame animations)
|
|
43
|
+
- User-specific avatars or profile images
|
|
44
|
+
- Theme-based icons
|
|
45
|
+
- State-dependent graphics
|
|
46
|
+
|
|
47
|
+
## Getting image dimensions
|
|
48
|
+
|
|
49
|
+
Use `getImageDimensions()` to get the dimensions of an image:
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
import { getImageDimensions, staticFile } from "remotion";
|
|
53
|
+
|
|
54
|
+
const { width, height } = await getImageDimensions(staticFile("photo.png"));
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
This is useful for calculating aspect ratios or sizing compositions:
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
import {
|
|
61
|
+
getImageDimensions,
|
|
62
|
+
staticFile,
|
|
63
|
+
CalculateMetadataFunction,
|
|
64
|
+
} from "remotion";
|
|
65
|
+
|
|
66
|
+
const calculateMetadata: CalculateMetadataFunction = async () => {
|
|
67
|
+
const { width, height } = await getImageDimensions(staticFile("photo.png"));
|
|
68
|
+
return {
|
|
69
|
+
width,
|
|
70
|
+
height,
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
```
|
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: light-leaks
|
|
3
|
-
description: Light leak overlay effects for Remotion using lightLeak() from @remotion/effects.
|
|
4
|
-
metadata:
|
|
5
|
-
tags: light-leaks, overlays, effects, transitions
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Light Leaks
|
|
9
|
-
|
|
10
|
-
This only works from Remotion 4.0.500 and up. Use `npx remotion versions` to check your Remotion version and `npx remotion upgrade` to upgrade your Remotion version.
|
|
11
|
-
|
|
12
|
-
Apply `lightLeak()` from `@remotion/effects/light-leak` to a canvas-based component such as `<Solid>`. Animate `progress` from `0` to `1`; the light leak reveals during the first half and retracts during the second half.
|
|
13
|
-
|
|
14
|
-
Typically use it inside a `<TransitionSeries.Overlay>` to play over the cut point between two scenes. See the **transitions** rule for `<TransitionSeries>` and overlay usage.
|
|
15
|
-
|
|
16
|
-
## Prerequisites
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
npx remotion add @remotion/effects
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Light leak overlay component
|
|
23
|
-
|
|
24
|
-
Keep the `progress` calculation inline so it is editable in Remotion Studio:
|
|
25
|
-
|
|
26
|
-
```tsx
|
|
27
|
-
import {lightLeak} from '@remotion/effects/light-leak';
|
|
28
|
-
import {interpolate, Solid, useCurrentFrame, useVideoConfig} from 'remotion';
|
|
29
|
-
|
|
30
|
-
const LightLeakOverlay: React.FC<{
|
|
31
|
-
seed?: number;
|
|
32
|
-
hueShift?: number;
|
|
33
|
-
}> = ({seed = 0, hueShift = 0}) => {
|
|
34
|
-
const frame = useCurrentFrame();
|
|
35
|
-
const {durationInFrames, height, width} = useVideoConfig();
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<Solid
|
|
39
|
-
width={width}
|
|
40
|
-
height={height}
|
|
41
|
-
effects={[
|
|
42
|
-
lightLeak({
|
|
43
|
-
seed,
|
|
44
|
-
hueShift,
|
|
45
|
-
progress: interpolate(frame, [0, durationInFrames - 1], [0, 1], {
|
|
46
|
-
extrapolateLeft: 'clamp',
|
|
47
|
-
extrapolateRight: 'clamp',
|
|
48
|
-
}),
|
|
49
|
-
}),
|
|
50
|
-
]}
|
|
51
|
-
/>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## Basic usage with TransitionSeries
|
|
57
|
-
|
|
58
|
-
```tsx
|
|
59
|
-
import {TransitionSeries} from '@remotion/transitions';
|
|
60
|
-
|
|
61
|
-
<TransitionSeries>
|
|
62
|
-
<TransitionSeries.Sequence durationInFrames={60}>
|
|
63
|
-
<SceneA />
|
|
64
|
-
</TransitionSeries.Sequence>
|
|
65
|
-
<TransitionSeries.Overlay durationInFrames={30}>
|
|
66
|
-
<LightLeakOverlay />
|
|
67
|
-
</TransitionSeries.Overlay>
|
|
68
|
-
<TransitionSeries.Sequence durationInFrames={60}>
|
|
69
|
-
<SceneB />
|
|
70
|
-
</TransitionSeries.Sequence>
|
|
71
|
-
</TransitionSeries>;
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## Options
|
|
75
|
-
|
|
76
|
-
- `progress?` — controls the evolve/retract phase from `0` to `1`. Effects do not animate on their own, so drive it with `useCurrentFrame()` and `interpolate()`. Default: `0.5`.
|
|
77
|
-
- `seed?` — determines the shape of the light leak pattern. Different seeds produce different patterns. Default: `0`.
|
|
78
|
-
- `hueShift?` — rotates the hue in degrees (`0`–`360`). Default: `0` (yellow-to-orange). `120` = green, `240` = blue.
|
|
79
|
-
- `disabled?` — skips the effect when `true`. Default: `false`.
|
|
80
|
-
|
|
81
|
-
## Customizing the look
|
|
82
|
-
|
|
83
|
-
```tsx
|
|
84
|
-
// Blue-tinted light leak with a different pattern
|
|
85
|
-
<LightLeakOverlay seed={5} hueShift={240} />;
|
|
86
|
-
|
|
87
|
-
// Green-tinted light leak
|
|
88
|
-
<LightLeakOverlay seed={2} hueShift={120} />;
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## Standalone usage
|
|
92
|
-
|
|
93
|
-
The overlay component can also be used outside of `<TransitionSeries>` as a decorative layer in any composition:
|
|
94
|
-
|
|
95
|
-
```tsx
|
|
96
|
-
import {AbsoluteFill} from 'remotion';
|
|
97
|
-
|
|
98
|
-
const MyComp: React.FC = () => (
|
|
99
|
-
<AbsoluteFill>
|
|
100
|
-
<MyContent />
|
|
101
|
-
<LightLeakOverlay seed={3} />
|
|
102
|
-
</AbsoluteFill>
|
|
103
|
-
);
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
`lightLeak()` uses WebGL2. Enable WebGL during rendering with `Config.setChromiumOpenGlRenderer("angle")`.
|
|
1
|
+
---
|
|
2
|
+
name: light-leaks
|
|
3
|
+
description: Light leak overlay effects for Remotion using lightLeak() from @remotion/effects.
|
|
4
|
+
metadata:
|
|
5
|
+
tags: light-leaks, overlays, effects, transitions
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Light Leaks
|
|
9
|
+
|
|
10
|
+
This only works from Remotion 4.0.500 and up. Use `npx remotion versions` to check your Remotion version and `npx remotion upgrade` to upgrade your Remotion version.
|
|
11
|
+
|
|
12
|
+
Apply `lightLeak()` from `@remotion/effects/light-leak` to a canvas-based component such as `<Solid>`. Animate `progress` from `0` to `1`; the light leak reveals during the first half and retracts during the second half.
|
|
13
|
+
|
|
14
|
+
Typically use it inside a `<TransitionSeries.Overlay>` to play over the cut point between two scenes. See the **transitions** rule for `<TransitionSeries>` and overlay usage.
|
|
15
|
+
|
|
16
|
+
## Prerequisites
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx remotion add @remotion/effects
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Light leak overlay component
|
|
23
|
+
|
|
24
|
+
Keep the `progress` calculation inline so it is editable in Remotion Studio:
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
import {lightLeak} from '@remotion/effects/light-leak';
|
|
28
|
+
import {interpolate, Solid, useCurrentFrame, useVideoConfig} from 'remotion';
|
|
29
|
+
|
|
30
|
+
const LightLeakOverlay: React.FC<{
|
|
31
|
+
seed?: number;
|
|
32
|
+
hueShift?: number;
|
|
33
|
+
}> = ({seed = 0, hueShift = 0}) => {
|
|
34
|
+
const frame = useCurrentFrame();
|
|
35
|
+
const {durationInFrames, height, width} = useVideoConfig();
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<Solid
|
|
39
|
+
width={width}
|
|
40
|
+
height={height}
|
|
41
|
+
effects={[
|
|
42
|
+
lightLeak({
|
|
43
|
+
seed,
|
|
44
|
+
hueShift,
|
|
45
|
+
progress: interpolate(frame, [0, durationInFrames - 1], [0, 1], {
|
|
46
|
+
extrapolateLeft: 'clamp',
|
|
47
|
+
extrapolateRight: 'clamp',
|
|
48
|
+
}),
|
|
49
|
+
}),
|
|
50
|
+
]}
|
|
51
|
+
/>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Basic usage with TransitionSeries
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
import {TransitionSeries} from '@remotion/transitions';
|
|
60
|
+
|
|
61
|
+
<TransitionSeries>
|
|
62
|
+
<TransitionSeries.Sequence durationInFrames={60}>
|
|
63
|
+
<SceneA />
|
|
64
|
+
</TransitionSeries.Sequence>
|
|
65
|
+
<TransitionSeries.Overlay durationInFrames={30}>
|
|
66
|
+
<LightLeakOverlay />
|
|
67
|
+
</TransitionSeries.Overlay>
|
|
68
|
+
<TransitionSeries.Sequence durationInFrames={60}>
|
|
69
|
+
<SceneB />
|
|
70
|
+
</TransitionSeries.Sequence>
|
|
71
|
+
</TransitionSeries>;
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Options
|
|
75
|
+
|
|
76
|
+
- `progress?` — controls the evolve/retract phase from `0` to `1`. Effects do not animate on their own, so drive it with `useCurrentFrame()` and `interpolate()`. Default: `0.5`.
|
|
77
|
+
- `seed?` — determines the shape of the light leak pattern. Different seeds produce different patterns. Default: `0`.
|
|
78
|
+
- `hueShift?` — rotates the hue in degrees (`0`–`360`). Default: `0` (yellow-to-orange). `120` = green, `240` = blue.
|
|
79
|
+
- `disabled?` — skips the effect when `true`. Default: `false`.
|
|
80
|
+
|
|
81
|
+
## Customizing the look
|
|
82
|
+
|
|
83
|
+
```tsx
|
|
84
|
+
// Blue-tinted light leak with a different pattern
|
|
85
|
+
<LightLeakOverlay seed={5} hueShift={240} />;
|
|
86
|
+
|
|
87
|
+
// Green-tinted light leak
|
|
88
|
+
<LightLeakOverlay seed={2} hueShift={120} />;
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Standalone usage
|
|
92
|
+
|
|
93
|
+
The overlay component can also be used outside of `<TransitionSeries>` as a decorative layer in any composition:
|
|
94
|
+
|
|
95
|
+
```tsx
|
|
96
|
+
import {AbsoluteFill} from 'remotion';
|
|
97
|
+
|
|
98
|
+
const MyComp: React.FC = () => (
|
|
99
|
+
<AbsoluteFill>
|
|
100
|
+
<MyContent />
|
|
101
|
+
<LightLeakOverlay seed={3} />
|
|
102
|
+
</AbsoluteFill>
|
|
103
|
+
);
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
`lightLeak()` uses WebGL2. Enable WebGL during rendering with `Config.setChromiumOpenGlRenderer("angle")`.
|