File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ type GlyphPath = {
6666
6767const clamp01 = ( value : number ) => Math . min ( 1 , Math . max ( 0 , value ) )
6868const DEFAULT_LAG_RATIO = 0.6
69+ const STROKE_VISIBLE_EPSILON = 1e-4
6970
7071const resolveTimelineValue = (
7172 source : number | Variable < number > | undefined ,
@@ -374,6 +375,8 @@ const renderGlyphSvg = (params: {
374375 outTiming . duration > 0 ? clamp01 ( ( frame - outTiming . start ) / outTiming . duration ) : 0
375376 const progress = outProgress > 0 ? inProgress * ( 1 - outProgress ) : inProgress
376377 const dashOffset = length > 0 ? length * ( 1 - progress ) : 0
378+ // Workaround for Chromium/Skia: stroke-dash can leak a 1px cap at progress=0 on Windows.
379+ const strokeVisible = length > 0 && progress > STROKE_VISIBLE_EPSILON
377380 const fillStart = timing . start + timing . duration + fillDelayFrames
378381 const fillProgress =
379382 resolvedFillColor === "transparent"
@@ -396,6 +399,7 @@ const renderGlyphSvg = (params: {
396399 strokeLinejoin = "round"
397400 strokeDasharray = { length || 1 }
398401 strokeDashoffset = { dashOffset }
402+ strokeOpacity = { strokeVisible ? 1 : 0 }
399403 style = { { opacity : length > 0 ? 1 : 0 } }
400404 />
401405 )
You can’t perform that action at this time.
0 commit comments