Drag the background!

Ancient Brain Starter Tutorial (Three.js)

This tutorial shows you how to get started on Ancient Brain (Three.js version).

To be precise, this shows how to start coding on Ancient Brain in the JavaScript programming language, using the Three.js library for the graphics. (You can use other libraries for graphics, notably P5.)

On Ancient Brain, you can edit and run programs in the browser, with no install. You have to register and get a username if you want to save your creations.

This tutorial will show you how to copy and edit a simple "World" called "One Cube World". (Click on a World image to run it.) You will soon be able to make many variants of this World, such as "Lamborghini cube". You can mouse drag (or touch drag) the camera in these Worlds.

Lamborghini cube
175 runs ♦ 0 likes
By Mark Humphrys  
Created: 13 Dec 2019
Modified: 11 Sep 2024
Simple variant of One Cube World
One Cube World (...
1221 runs ♦ 2 likes
By Starter user  
Created: 11 Apr 2018
Modified: 17 Sep 2023
Simple starter World (Three.js version). Built-in camera control.

Contents

  1. Register and login
  2. Run the Starter World
  3. Clone the Starter World
  4. Edit your World
  5. First look at the code
  6. Change some code
  7. Program structure
  8. Paint the cube
  9. Upload your own image
  10. Make the object move
  11. Add music
  12. Errors
  13. Documentation
  14. Clone and edit other Three.js Worlds
  15. Finish


Notes

  • Use buttons (or back and forward arrow keys) to move through the tutorial.
  • This tutorial does not assume you have ever done any computer programming (or "coding") before.
  • This is not a full course in programming. For that see the Introduction to Programming course.
  • Rather, this explains how to use Ancient Brain. As such, it serves as a gentle introduction to the idea of coding itself.


Get started

Enough talk. Let's start the tutorial!
The background is a program, showing the JavaScript graphics used on this site.
The globes light up when you log in.
 
Font:

Users retain ownership of user content.

Platforms      Stats      The name      Terms and conditions

Call for partners      Contact

Call for partners!
Ancient Brain is looking for a partner to co-write a JavaScript coding book for schools, to be used worldwide. This would be a course for students in learning to code from scratch. The book and course will be integrated into the Ancient Brain site. This is an opportunity for someone looking to develop a course and textbook to partner with a site to promote it. Read more.