Daniel Shiffman, who you might know from his enthusiastic YouTube channel The Coding Train, updated his book The Nature of Code. The original version from 2012 focused on Processing. The new version uses p5.js, while still focusing on “understanding the mathematical principles behind our physical world.” You can find the free-to-read online version here.