The lines that start with angled brackets (less-than symbols) form a minimal HTML document. The HTML lines, except for the script tags, are reproduced below.
example S1: event cancellation
Not much is going on beyond the creation of a canvas that we will render to later.
This line includes the three.js library.
The next script tag starts a large block of code that is the actual example. The code consists largely of a single function definition.