JavaScript-Projects

Logo

Collection of simple exercises completed with the aim of practicing JavaScript and... to have fun!

View the Project on GitHub acerasoni/JavaScript-Projects

These projects are compatible only with laptop/PC

About

Developed and Maintained by Andrea Giulio Cerasoni

This repository contains a collection of JavaScript programs ranging from simple exercises to more complex projects with the aim of practicing the JavaScript language and surrounding frameworks, and to gain exposure to physics and game engines.

Setup Instructions

Running the code is super easy. Simply click on the title for any of the projects below.

Raycasting

This exercise was built with the p5.js library and inspired from The Coding Train’s video on raycasting. The objective of this project was to simulate a 2D environment in which a point casts rays onto randomly generated borders around it, known as raycasting or line of sight 2D.

Tensor Product

This program generates two distinct undirected graphs with a pre-determined number of vertices and edges, coloring them with the minimum possible number of colors such that two adjacent edges are not colored the same. The program then computes the tensor product of the two graphs and displays the output. A future iteration of this project will try to find an algorithm that can color the tensor product with a number of colors less than the minimum between the first two graphs. This project was built with the p5.js library.

You can adjust screen, vertices, and edges settings via sketch.js. Please note that the program will not run if the number of edges exceeds the maximum number of edges possible for the number of vertices entered

Max edges: n * (n - 1) where n = number of vertices

Game of Life

This is my implementation of Conway’s Game of Life made with the p5.js library.

Snake

This project emulates the famous snake game, built with the p5.js library.