Return to Video

Learn programming 5: Light speed effect, change line colors

  • Not Synced
    On the first day we were drawing dots and lines, but they were all black.
  • Not Synced
    Let's check out how we can change the color of those lines.
  • Not Synced
    We quickly saw yesterday that 'stroke' is used to change it.
  • Not Synced
    We didn't try it out, but we opened this page here and saw stroke can change the color of the border.
  • Not Synced
    In the same way, 'background' changes the whole background of the screen.
  • Not Synced
    'stroke' changes the color of the next drawing action.
  • Not Synced
    See? "Sets the color used to draw lines and borders around shapes."
  • Not Synced
    So it looks like it works the same way as background.
  • Not Synced
    You can have stroke with one number. So you get a grey value, or you can make a stroke with three RGB values.
  • Not Synced
    So then we'll call 'stroke' first and then draw lines.
  • Not Synced
    If this is RGB, the first value is red, then green and blue. This way we can make a red line.
  • Not Synced
    Now, what's the syntax for line?
  • Not Synced
    We have 'line();' and in the middle we have to enter four numbers.
Title:
Learn programming 5: Light speed effect, change line colors
Description:

Learn how to change line colors and make some kind of disco laser effect and a very simple light speed effect. We also show the option to auto-format the source code, which adds and removes spaces to make it all beautifully aligned.

more » « less
Video Language:
English
Duration:
08:52
lfz added a translation

English subtitles

Incomplete

Revisions