July 2018
Beginner to intermediate
374 pages
8h 54m
English
Where’s the fun in scattering a bunch of planets around if you can’t fly through them, right?
Fly controls are much more complicated than they might seem—very much more complex than the controls we’re building for our avatar. So we’ll load in new controls instead of writing our own. All the way at the top of our code, add a new <script> tag to load in FlyControls.js.
| | <body></body> |
| | <script src="/three.js"></script> |
| » | <script src="/controls/FlyControls.js"></script> |
We’ll talk more about loading code like that in Chapter 9, What’s All That Other Code?.
Loading the code is only half of the job. The other half is using it. To do that, add the following below the rColor() function, which should be at the bottom of ...
Read now
Unlock full access