π€Username
parseUsername β Object
ObjectFunction that parses the username to fit the canvas size.
Kind: global variable
Returns: Object - { username: string, newSize: number, textLength: number }
Param
Type
Default
Description
username
string
User name
ctx
Object
Canvas context
ctx.fillStyle
string
Text color
ctx.textAlign
string
Text alignment
ctx.measureText
TextMetrics
Text size
[font]
string
"'Arial'"
Text source
size
string
Text size
maxLength
number
Maximum text length
Last updated