7th Feb 2022, 2:26 PM
Mohammed
7 Answers
+ 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);
7th Feb 2022, 3:14 PM
Jayakrishna 🇮🇳
+ 3
// This statement should be context.fillText("FPS :"+fps,20,30);
7th Feb 2022, 2:46 PM
JaScript
JaScript - avatar
+ 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
7th Feb 2022, 2:39 PM
William Owens
William Owens - avatar
+ 2
Did you not see in my first answer mentioned above? Bescause you have written with equals character: context.fillText=("FPS :"+fps,20,30);
7th Feb 2022, 3:45 PM
JaScript
JaScript - avatar
7th Feb 2022, 2:52 PM
Mohammed
+ 1
Jayakrishna🇮🇳 Yes it works, Thank you so much.
7th Feb 2022, 3:21 PM
Mohammed
0
JaScript Why it haven't got printed ?
7th Feb 2022, 2:53 PM
Mohammed