HTML and CSS Reference
◦ Step 3: Generate random enemy properties.
◦ Step 4: Resolve enemy collisions.
◦ Step 5: Spawn enemies in a controlled manner.
Step 1: Create a 3D polygon enemy
Set up the large Polygon first by adding it below gd.template.Bullet with the fol-
lowing listing. You're only going to create its base right now; you'll configure its 3D data
in the next listing.
Listing 9.23. run.js—Polygon base
Step 2: Create a complex 3D model
You need to add a massive amount of vertex data to finish gd.template.Polygon
.init() from the previous listing. It comprises a pyramid on the top and bottom, with a