Quantcast
Channel: Pens from Bas Groothedde
Viewing all articles
Browse latest Browse all 39

#codevember 5: OOP - The Amazing Solar System!

$
0
0

See the Code - See it Full Page - See Details

Hover!! This pen was once made as example for the blog posts ["Class"-inheritance in Javascript](http://codepen.io/ImagineProgramming/post/class-inheritance-in-javascript) and [Object oriented canvas rendering in Javascript](http://codepen.io/ImagineProgramming/post/oop-canvas-rendering-javascript) and the [COLOR.JS system](http://codepen.io/ImagineProgramming/pen/QjVxoL) which I never published before yesterday. I wanted to show how you can create an interactive solar system with object oriented javascript and Canvas. The speeds, masses and clipped sizes of planets and moons are factorized to the size of earth. If a planet or moon is too big or too small, I gave it a fixed size or did not show it all together. I didn't add all moons, because I ran out of time haha. Thanks to @tmrDevelops for reminding me to give the Sun a solar mass of credit, as I have forgot to give it a card....

This Pen uses: HTML, SCSS, JavaScript, and


Viewing all articles
Browse latest Browse all 39

Trending Articles