Intro to 3D Game Development

0 of 193 lessons complete (0%)

Scripting Part 2: Making Code Respond to Players

Look For Unnecessary Computations

You don’t have access to this lesson
Please register or sign in to access the course content.

Right now, we calculate the percent finished, and the rotation change every frame (almost 60 times per second!) regardless of whether we are actually using this. To test this, add this console.log and open your Dev Tools console with the F12 key, or by pressing Ctrl+Shift+i.

You can log multiple values to the console by separating them with a comma ( , )

Tip: Moving Chrome Dev Tools

By default in Chrome, the Dev Tools menu shows up on the right side of your screen, but you can move it to the left or bottom, or even open it in a new window.

  1. Click the icon in the top right corner to open the menu.
  2. Select one of the Dock side images to choose where the Dev Tools will go.