@@ -263,7 +263,7 @@ export function ConfigSidebar() {
263
263
class = { cx (
264
264
"flex justify-center relative border-transparent border z-10 items-center rounded-md size-9 transition will-change-transform" ,
265
265
state . selectedTab !== item . id &&
266
- "group-hover:border-gray-300 group-disabled:border-none"
266
+ "group-hover:border-gray-300 group-disabled:border-none"
267
267
) }
268
268
>
269
269
< Dynamic component = { item . icon } />
@@ -940,17 +940,13 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) {
940
940
ref = { setBackgroundRef }
941
941
class = "flex overflow-x-auto overscroll-contain relative z-40 flex-row gap-2 items-center mb-3 text-xs hide-scroll"
942
942
style = { {
943
- "-webkit-mask-image" : `linear-gradient(to right, transparent, black ${
944
- scrollX ( ) > 0 ? "24px" : "0"
945
- } , black calc(100% - ${
946
- reachedEndOfScroll ( ) ? "0px" : "24px"
947
- } ), transparent)`,
948
-
949
- "mask-image" : `linear-gradient(to right, transparent, black ${
950
- scrollX ( ) > 0 ? "24px" : "0"
951
- } , black calc(100% - ${
952
- reachedEndOfScroll ( ) ? "0px" : "24px"
953
- } ), transparent);`,
943
+ "-webkit-mask-image" : `linear-gradient(to right, transparent, black ${ scrollX ( ) > 0 ? "24px" : "0"
944
+ } , black calc(100% - ${ reachedEndOfScroll ( ) ? "0px" : "24px"
945
+ } ), transparent)`,
946
+
947
+ "mask-image" : `linear-gradient(to right, transparent, black ${ scrollX ( ) > 0 ? "24px" : "0"
948
+ } , black calc(100% - ${ reachedEndOfScroll ( ) ? "0px" : "24px"
949
+ } ), transparent);`,
954
950
} }
955
951
>
956
952
< For each = { Object . entries ( BACKGROUND_THEMES ) } >
@@ -977,10 +973,10 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) {
977
973
value = {
978
974
project . background . source . type === "wallpaper"
979
975
? wallpapers ( ) ?. find ( ( w ) =>
980
- (
981
- project . background . source as { path ?: string }
982
- ) . path ?. includes ( w . id )
983
- ) ?. url ?? undefined
976
+ (
977
+ project . background . source as { path ?: string }
978
+ ) . path ?. includes ( w . id )
979
+ ) ?. url ?? undefined
984
980
: undefined
985
981
}
986
982
onChange = { ( photoUrl ) => {
@@ -1271,7 +1267,7 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) {
1271
1267
const rawNewAngle =
1272
1268
Math . round (
1273
1269
start +
1274
- ( downEvent . clientY - moveEvent . clientY )
1270
+ ( downEvent . clientY - moveEvent . clientY )
1275
1271
) % max ;
1276
1272
const newAngle = moveEvent . shiftKey
1277
1273
? rawNewAngle
@@ -1281,7 +1277,7 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) {
1281
1277
! moveEvent . shiftKey &&
1282
1278
hapticsEnabled ( ) &&
1283
1279
project . background . source . type ===
1284
- "gradient" &&
1280
+ "gradient" &&
1285
1281
project . background . source . angle !== newAngle
1286
1282
) {
1287
1283
commands . performHapticFeedback (
@@ -1494,8 +1490,8 @@ function CameraConfig(props: { scrollRef: HTMLDivElement }) {
1494
1490
item . x === "left"
1495
1491
? "left-2"
1496
1492
: item . x === "right"
1497
- ? "right-2"
1498
- : "left-1/2 transform -translate-x-1/2" ,
1493
+ ? "right-2"
1494
+ : "left-1/2 transform -translate-x-1/2" ,
1499
1495
item . y === "top" ? "top-2" : "bottom-2"
1500
1496
) }
1501
1497
onClick = { ( ) => setProject ( "camera" , "position" , item ) }
@@ -1752,8 +1748,7 @@ function ZoomSegmentConfig(props: {
1752
1748
createEffect ( ( ) => {
1753
1749
video . src = convertFileSrc (
1754
1750
// TODO: this shouldn't be so hardcoded
1755
- `${
1756
- editorInstance . path
1751
+ `${ editorInstance . path
1757
1752
} /content/segments/segment-${ segmentIndex ( ) } /display.mp4`
1758
1753
) ;
1759
1754
} ) ;
@@ -1850,15 +1845,15 @@ function ZoomSegmentConfig(props: {
1850
1845
x : Math . max (
1851
1846
Math . min (
1852
1847
( moveEvent . clientX - bounds . left ) /
1853
- bounds . width ,
1848
+ bounds . width ,
1854
1849
1
1855
1850
) ,
1856
1851
0
1857
1852
) ,
1858
1853
y : Math . max (
1859
1854
Math . min (
1860
1855
( moveEvent . clientY - bounds . top ) /
1861
- bounds . height ,
1856
+ bounds . height ,
1862
1857
1
1863
1858
) ,
1864
1859
0
@@ -1873,12 +1868,10 @@ function ZoomSegmentConfig(props: {
1873
1868
< div
1874
1869
class = "absolute z-10 w-6 h-6 rounded-full border border-gray-400 -translate-x-1/2 -translate-y-1/2 bg-gray-1"
1875
1870
style = { {
1876
- left : `calc(${ mode ( ) . x * 100 } % + ${
1877
- 2 + mode ( ) . x * - 6
1878
- } px)`,
1879
- top : `calc(${ mode ( ) . y * 100 } % + ${
1880
- 2 + mode ( ) . y * - 6
1881
- } px)`,
1871
+ left : `calc(${ mode ( ) . x * 100 } % + ${ 2 + mode ( ) . x * - 6
1872
+ } px)`,
1873
+ top : `calc(${ mode ( ) . y * 100 } % + ${ 2 + mode ( ) . y * - 6
1874
+ } px)`,
1882
1875
} }
1883
1876
/>
1884
1877
< div class = "overflow-hidden rounded-lg border border-gray-3 bg-gray-2" >
@@ -1945,6 +1938,84 @@ function ClipSegmentConfig(props: {
1945
1938
Delete
1946
1939
</ EditorButton >
1947
1940
</ div >
1941
+ < Field name = "Speed" icon = { < IconLucideFastForward class = "size-4" /> } >
1942
+ < div class = "flex flex-col gap-2" >
1943
+ < Slider
1944
+ value = { [ props . segment . timescale ] }
1945
+ onChange = { ( v ) =>
1946
+ setProject (
1947
+ "timeline" ,
1948
+ "segments" ,
1949
+ props . segmentIndex ,
1950
+ "timescale" ,
1951
+ v [ 0 ]
1952
+ )
1953
+ }
1954
+ minValue = { 0.25 }
1955
+ maxValue = { 4 }
1956
+ step = { 0.25 }
1957
+ formatTooltip = { ( v ) => `${ v } x` }
1958
+ />
1959
+ < div class = "flex gap-2 text-xs" >
1960
+ < button
1961
+ onClick = { ( ) =>
1962
+ setProject (
1963
+ "timeline" ,
1964
+ "segments" ,
1965
+ props . segmentIndex ,
1966
+ "timescale" ,
1967
+ 0.5
1968
+ )
1969
+ }
1970
+ class = "px-2 py-1 rounded-md bg-gray-3 hover:bg-gray-4 transition-colors"
1971
+ >
1972
+ 0.5x
1973
+ </ button >
1974
+ < button
1975
+ onClick = { ( ) =>
1976
+ setProject (
1977
+ "timeline" ,
1978
+ "segments" ,
1979
+ props . segmentIndex ,
1980
+ "timescale" ,
1981
+ 1
1982
+ )
1983
+ }
1984
+ class = "px-2 py-1 rounded-md bg-gray-3 hover:bg-gray-4 transition-colors"
1985
+ >
1986
+ 1x
1987
+ </ button >
1988
+ < button
1989
+ onClick = { ( ) =>
1990
+ setProject (
1991
+ "timeline" ,
1992
+ "segments" ,
1993
+ props . segmentIndex ,
1994
+ "timescale" ,
1995
+ 1.5
1996
+ )
1997
+ }
1998
+ class = "px-2 py-1 rounded-md bg-gray-3 hover:bg-gray-4 transition-colors"
1999
+ >
2000
+ 1.5x
2001
+ </ button >
2002
+ < button
2003
+ onClick = { ( ) =>
2004
+ setProject (
2005
+ "timeline" ,
2006
+ "segments" ,
2007
+ props . segmentIndex ,
2008
+ "timescale" ,
2009
+ 2
2010
+ )
2011
+ }
2012
+ class = "px-2 py-1 rounded-md bg-gray-3 hover:bg-gray-4 transition-colors"
2013
+ >
2014
+ 2x
2015
+ </ button >
2016
+ </ div >
2017
+ </ div >
2018
+ </ Field >
1948
2019
< ComingSoonTooltip >
1949
2020
< Field name = "Hide Cursor" disabled value = { < Toggle disabled /> } />
1950
2021
</ ComingSoonTooltip >
0 commit comments