+ 2
Why the text is hidden ?
7 Antworten
+ 2
fillText is a function..
You have = sign, in between, which is not needed in context.fillText=("FPS :"+fps,20,30);
Instead remove = , and use
context.fillText("FPS :"+fps,20,30);
+ 3
// This statement should be
context.fillText("FPS :"+fps,20,30);
+ 2
canvas won't print data it's used to create graphics, You can use a textfill method to get your text in the graphic.
https://www.w3schools.com/html/html5_canvas.asp
+ 2
Did you not see in my first answer mentioned above?
Bescause you have written with equals character:
context.fillText=("FPS :"+fps,20,30);
+ 1
William Owens
https://www.w3schools.com/graphics/canvas_intro.asp
Canvas can draw text.
+ 1
Jayakrishna🇮🇳
Yes it works, Thank you so much.
0
JaScript
Why it haven't got printed ?