Angelic Sanoy2,536 Points
So if you load up the page, and open up the console, you'll probably see an error similar to below:
Uncaught DOMException: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The image element contains cross-origin data, and may not be loaded.
There's an entire world of Cross Origin Resource Sharing (CORS) - but that's definitely out of score for this course!
To get the code up and running, the easiest way is to run it locally on your machine. This sounds like it would take a lot of effort, but can be done in a matter of seconds using python's SimpleHTTPServer.
To do this:
- Launch a terminal window.
- Switch to the directory containing the files you wish to run locally
- Then run the following command:
python -m SimpleHTTPServer 8000
- Open up your browser and navigate to
http://localhost:8000/and the everything should be running!
Hope this helps!
Ahh that's because Python hasn't been added the Windows PATH. I'm on Mac, so python kind of just works here.
If you've already installed Python 2.7 then you need to follow these instructions:
- Open System Properties (Right click Computer in the start menu, or use the keyboard shortcut Win+Pause)
- Click Advanced system settings in the sidebar.
- Click Environment Variables...
- Select PATH in the System variables section
- Click Edit
- Add Python's path to the end of the list (the paths are separated by semicolons). For example:
If you have installed Python 3, the installation should have included an option to add python.exe to the system search path. The SimpleHTTPServer python command is slightly different on py3 however,
python -m http.server
Hope this helps!