Skip to content

Commit

Permalink
fix: ascii font
Browse files Browse the repository at this point in the history
  • Loading branch information
drcmda committed Oct 31, 2023
1 parent 00b9a7c commit 3df78a9
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/effects/ASCII.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,20 @@ class ASCIIEffect extends Effect {
}

export const ASCII = forwardRef<ASCIIEffect, IASCIIEffectProps>(
({ characters = ` .:,'-^=*+?!|0#X%WM@`, fontSize = 54, cellSize = 16, color = '#ffffff', invert = false }, fref) => {
(
{
font = 'arial',
characters = ` .:,'-^=*+?!|0#X%WM@`,
fontSize = 54,
cellSize = 16,
color = '#ffffff',
invert = false,
},
fref
) => {
const effect = useMemo(
() => new ASCIIEffect({ characters, fontSize, cellSize, color, invert }),
[characters, fontSize, cellSize, color, invert]
() => new ASCIIEffect({ characters, font, fontSize, cellSize, color, invert }),
[characters, fontSize, cellSize, color, invert, font]
)
return <primitive ref={fref} object={effect} />
}
Expand Down

0 comments on commit 3df78a9

Please sign in to comment.