All videos · All how-to videos
How to write hello world in R3, by hand (no AI)
1:18 · 2026-11-04
In the R3 editor, with an empty project: add a Cube and a Code component. Its event, RENDER_BEFORE, runs it every frame: your main loop. In JavaScript, print hello world in start and turn the cube in update. Save, then Start Code. A second Code component on Key Down moves the cube up when Space is pressed. Narration: AI voice.
Chapters
- 0:00 An empty project: add a Cube and a Code component
- 0:12 RENDER_BEFORE runs the script every frame: your main loop
- 0:26 Edit Code: print hello world, turn the cube
- 0:37 Save, then Start Code: hello world is in the console
- 0:49 A second script on Key Down: an interrupt handler
- 1:00 Print the key, move the cube on Space
- 1:08 Click the scene and press Space
Transcript
0:02 Start with an empty project. Open the menu, then Create. Add a Cube, and a Code component.
0:12 In the Inspector, open Scripts, then the new script. Its event, RENDER_BEFORE, runs it every frame. It is your main loop.
0:26 Press Edit Code. You write JavaScript. In start, print hello world. In update, turn the cube a little every frame.
0:37 Press Save, then Start Code, right in the message. The cube spins. Hello world is in the browser's console. Press F12 to see it.
0:49 Now a key. Add a second Code component, and set its Event to Key Down. It runs once per key press, like an interrupt handler.
1:00 In its update, print the key, and when it is Space, move the cube up. Save, and close.
1:08 Click the scene, and press Space. The cube jumps with every press.