Lesson goal: Obtaining WebGL

Home

To render 3D graphics in your web browser, you need a WebGL-enabled browser. Here's what we know:
  • Chrome: Runs WebGL without modification.

  • Firefox: To activate WebGL type about:config into the address bar, search for webgl, and set webgl.force-enabled=true.

  • Safari: To activate WebGL in Safari 5.1, go to the Advanced section of Safari preferences and check "Show Develop menu in menu bar", then on the Develop menu check "Enable WebGL".

  • Internet Explorer: Internet Explorer does not include WebGL, but there is a WebGL plug-in available here.
If everything is working, click the run button below. You should see two spheres orbiting each other at the bottom of this browser screen (you might have to scroll down to see them.)

Now you try. Try to get WebGL working on your browser. If in doubt, just download and use Chrome.

Type your code here:


See your results here:

Show a friend, family member, or teacher what you've done!

Here is a share link to your code:

Does your code work? Want to run it on your iPhone?

Here's your code:

  1. Use [Control]-[C] (Windows) or [⌘]-[C] (MacOS) to copy your code.

  2. Paste it using [Control]-[V] (Windows) or [⌘]-[V] (MacOS) into this page

  3. Then click the "Use on iPhone" button that you'll see.