July 2018
Beginner to intermediate
374 pages
8h 54m
English
Start a new project in 3DE. Choose the 3D starter project (with Animation) template and name this project Purple Fruit Monster. Do not use the template with physics for this project—we’ll use that in later chapters.
This game will need two JavaScript code collections and some settings to go along with them. At the very top of the file, add two new <script> tags:
| | <body></body> |
| | <script src="/three.js"></script> |
| ① | <script src="/physi.js"></script> |
| ② | <script src="/scoreboard.js"></script> |
We’re going to use code to simulate real-life motion like falling, rolling, and colliding. We use the Physijs (physics + JavaScript) code collection so we don’t have to write all the physics code ourselves.
Read now
Unlock full access