3D Web · Exercise 1 of 3Next
Intermediate
Fix the stretched picture
The camera was made for a square window, but the canvas is twice as wide as it is tall, so the bike looks stretched.
Make the camera's aspect match the canvas (innerWidth / innerHeight) and rebuild its projection matrix.
What Check tests
- camera.aspect matches the canvas
- The projection matrix was rebuilt from it
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Your page
Press Run to see the page.
Console
Nothing logged yet.