Monday, 27 April 2020

JS Drawing and Animation Day6

Today I did Functions. They are used to make blocks of code usable multiple times. To create a function, we make a variable for it ex var makesquare =function(){ }; then we put code in the {} ex var makesquare = function() {rect(200,200,10,10);}; now all we have to do is type makesquare(); and it make the square and we make it so we can change the postion by in function making the x and y into variables that we determined. ex var makesquare = function(Posx,PosY){rect(200,200,10,10);}; now typing makesquare(250,204); will change the postion and u can the other ones too. Next Ill be learning logic and if statements.

Saturday, 25 April 2020

JS Drawing and Animation Day5

Today I learned about text and strings in JS. It wasn't that hard. The next day I will be learning functions.

Thursday, 23 April 2020

JS Drawing and Animation Day4





Today I did the bonus Resizing variables. I learned how to use variables to resize multiple objects by
using mathematical operators to calculate numbers and create expressions. Ex  var x=3
(x,x+2) I would need to change the x var to change both of them.

Tuesday, 21 April 2020

JS Drawing and Animation Day3



Today I learned how to make interactive programs. By putting mouseX and  mouseY where the x and y position would be. That makes it so it follows the mouse.This can be used in multiple ways like drawing programs or games. Tomorrow I'll being doing resizing with variables and Text and strings.



Monday, 20 April 2020

JS Drawing and Animation Day2

JS Drawing and Animation Day2

 On day 2 I learn how to use variables and to animate. Variables are used to make animating easier by being able to move multiple object with the same variable.  I learned how to move objects by giving them a position then adding or subject that number so it moves ex Var positionx = 200             positionx += 1. The next day I will be learning
Interactive programs.


Sunday, 19 April 2020

JS Drawing and Animation Day1

JS Drawing and Animation Day1




Today I started the intro to JS drawing and animation on khan academy. I have competed the drawing and colouring sections , which taught me how to draw shapes like circles, squares,lines and to colour them with commands. A useful tip I got is to organize my code with subscripts, so I can tell what each of my lines do, very easily.

Next time I will  be learn  variables and animation basics.