Faux sphere render with interactive lighting – vanilla JS and canvas.

aka Zombie’s software eye logo.

See the Pen
Faux sphere render + interactive lighting
by Hristo G. (@izo0x90)
on CodePen.

Quick and dirty lighted “sphere” likeness using circle radius calculation for the color intensity value. We shift the “lighting” around by adding/subtracting to the color intensity amount of a pixel on the “sphere”, this amount is based on the current x, y position of the pixel multiplied by horizontal and vertical constants. Those are modulated by the current mouse x, y mouse cursor position as percentage of the inner window dimensions. The green/zombie’s “eye” was a logo that I used when branding the games/ graphics demos, etc. that I would write way back when in the ’90s.