Learn AI, Data Science & Business — Earn Certificates That Get You Hired
The Most Addictive Python and SQL Courses
Overview
Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This tutorial builds an interactive canvas particle effect resembling a lightsaber. It covers canvas setup, particle positioning with sine and cosine, mouse-based rotation using atan2, color effects, and easing with GSAP.
Syllabus
Introduction
Project overview
Initial canvas setup
Render particles on screen
Space particles out in line formation
Sine + cosine lesson on whiteboard
Rotate line based on init
Math.atan2 lesson to obtain angle of mouse coordinate
Rotate line based on mouse coordinates
Colorize background, add fade effect, and add rainbow particles
Add interpolation and easing with GSAP
Messing around with variables for funsies
Introduction to chriscourses.com
Taught by
Chris Courses