How to Draw on a Canvas with Javascript

Поділитися
Вставка
  • Опубліковано 29 жов 2024

КОМЕНТАРІ • 19

  • @matiaspando
    @matiaspando 3 роки тому +3

    Excellent tutorial! I am teaching my kids to code and this is a great idea! Thanks

  • @4--a957
    @4--a957 2 роки тому +1

    I love you mame, i love you because you are dealing with the viewers that want to learn just like a mom dealing with son ❤️.

    • @WorldClassTechEd
      @WorldClassTechEd  2 роки тому

      Thank you very much, young man. Your comment has warmed my heart. Thank you.

  • @kamelnazar4576
    @kamelnazar4576 2 роки тому +1

    Excellent !

  • @peterhalverson929
    @peterhalverson929 2 роки тому +1

    Helpful video! Thank you for making it.
    Question: what editor are you using? I would like to get the same for it's hints.
    Update: I found the answer to my question in your UA-cam "home". The Brackets editor. Nice!

    • @WorldClassTechEd
      @WorldClassTechEd  2 роки тому

      The Bracket's project was abandoned for a while last year. But, I see now it is under development again. I'm glad. It is my favorite. Also, to get the feedback you see on my screen, you have to add some extensions. Here's the video on that: ua-cam.com/video/lUf8WrBr_aM/v-deo.html

  • @peterhalverson929
    @peterhalverson929 2 роки тому +1

    Another question: Most tutorials to JavaScript with Canvas have you embed the JavaScript in the .html file. But you have us put the JavaScript in a separate .js file. What are the reasons for doing that?
    Thanks again!

    • @WorldClassTechEd
      @WorldClassTechEd  2 роки тому

      Great question. Either way works, however there are advantages to separating each language into it's own file: 1) Many debuggers will only work with a file of just one language. Example: The Lint debugger only works on Javascript and won't find bugs in the JS when it is embedded in an HTML file. 2) Modular design. When you write all your code in a separate file, you could conceivably use that code with a different program. Just plug and play. Attach the JS, or CSS to a different HTML file and you have modular design. All professional programmers separate their code into distinct file types.

  • @abelyekayel1144
    @abelyekayel1144 2 роки тому +1

    How i make motion of car you draw,q0Q for ur bestlecture

    • @WorldClassTechEd
      @WorldClassTechEd  2 роки тому

      You need to use an animation loop, to make things move with Javascript and the Canvas element. I have a video that gives a good introduction to this concept. ua-cam.com/video/5otlt9dCbnc/v-deo.html

  • @gm_kuro
    @gm_kuro 3 роки тому +1

    I need a command prompt with a canvas so as I type things such as ellipse(x,y,z); it will appear to be a circle

    • @WorldClassTechEd
      @WorldClassTechEd  3 роки тому

      You can accept input from the user, in Javascript, using the window.prompt() command. You will have to store the input in a variable and then use that variable in the computation to create an ellipse.

  • @dev_99999
    @dev_99999 3 роки тому +1

    Thanks.

  • @yuramaxine5346
    @yuramaxine5346 3 роки тому +1

    Grandma?can you gave me the whole code for this?I really need it for our activity tomorrow

    • @yuramaxine5346
      @yuramaxine5346 3 роки тому +1

      Please finish the car

    • @WorldClassTechEd
      @WorldClassTechEd  3 роки тому

      The challenge of the assignment is to see if you can finish it yourself. Good luck!!