+ 1

What is ctx.fill

IMA trying to learn and understand the matrix code, but what does the CTX.fill mean https://code.sololearn.com/W7Z68RytP9z1/?ref=app

2nd Jun 2017, 3:31 PM
Leonardo Monterey
Leonardo Monterey - avatar
4 Réponses
+ 2
In this code ctx is a defined variable: var ctx = c.getContext("2d"); this variable contains an object and fill... are the methods on this objects: ctx.fillRect, ctx.fillStyle, etc.
2nd Jun 2017, 10:43 PM
Krzysztof Przybylowski
Krzysztof Przybylowski - avatar
+ 2
nice, thanks, what part of the code makes it drop????
2nd Jun 2017, 11:48 PM
Leonardo Monterey
Leonardo Monterey - avatar
+ 2
It actually doesn't drop, it adds new characters above and changes the colour of the previous one. Analyse the draw() function.
2nd Jun 2017, 11:59 PM
Krzysztof Przybylowski
Krzysztof Przybylowski - avatar
+ 2
nice
3rd Jun 2017, 12:49 AM
Leonardo Monterey
Leonardo Monterey - avatar