These previous methods are nice, in that you can then just double-click on a WebGL html page and it’ll run. To the end of Target, which will be something like “C:\Users\hainese\AppData\Local\Google\Chrome\Application\chrome.exe”. Second method: made a shortcut to Chrome, right-click on it and select Properties. Key tip: make sure to close down all copies of Chrome before restarting it this way, otherwise it doesn’t work (thanks to Patrick Cozzi for this “obvious in retrospect” tip). On Chrome you can do it two ways: each time on the command line, or once with the program icon itself I recommend the latter.įirst method, command line: start a command window (“Start” button, type “cmd”), go to the directory where chrome.exe is located, (e.g., “cd C:\Users\hainese\AppData\Local\Google\Chrome\Application”) then type: chrome.exe -allow-file-access-from-files Now search on “strict_” and you’ll find “_origin_policy”. On Firefox you can get around this security feature by typing “about:config” in the URL. You don’t have a server running on your machine and are as clueless as I am about setting such things up.īackground: if you want to load a texture image to use in a WebGL program, then you need the texture to be on the same machine (barring cleverness) and to have both your web page and the texture somewhere in the “documents” area of the same server.You don’t want to set up some tricksy settings that open up security holes in your browser.You plan on loading textures or model files.You want to develop WebGL applications.Why would you want to set up a server for webpages? Well, you need this only if: Update: I found some further instructions here for other platforms and other server setup methods. Whoever’s left might be on Mac or Linux – you could use LAMP on Mac, Apache on Linux, or whatever else you like. 99% of readers won’t care, so begone! Or actually, see the power of WebGL by trying out a zillion demos on the three.js page (you’ll need to use Chrome or Firefox or properly-prepared Safari – try this page if you have problems getting going, it points to the information you’ll need). While it’s fresh in my mind, I’m going to write down the steps for setting up a simple server on your local machine to help run WebGL.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |