New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pixi won't run locally #33
Comments
Thanks very much :) I absolutely love the idea of you teaching pixi.js to your students! Unfortunately getting webGL textures to work locally is a bit of a pain. For security reasons, JavaScript is only allowed to access resources from the same domain. The pixi.js CanvasRender runs fine locally so you could use that maybe? |
You can run it in Firefox if you set the "security.fileuri.strict_origin_policy" preference to false in about:config. |
@Nibbler999 I'd like to use Chrome because that's the only browser that supports live editing with WebStorm, plus there are some other plugins not available in Firefox we use.
|
A really easy way is to install Python (if you don't already have it). Then from the directory that has your html/js/css in it, just type:
or, if you're on Python 3:
Then you would just point chrome at http://127.0.0.1:8000 There are additional tips and tricks here: |
@ateoto thank you. I don't want to use a webserver for the reasons cited above. These are kids as young as 6 we're teaching. Your link was insightful. I didn't know there was a configuration parameter in Chrome. However, I'm a bit nervous to have these kids go home with links to security lessened browsers... |
My apologies, that's what happens when I skim through things. I just took a quick look at WebStorm and it seems as though starting with version 6, it includes a built-in HTTP server, couldn't find any specific documentation on the feature though. |
@ateoto I had no idea about that built-in HTTP server!! This is so helpful, it works amazing! Thanks. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I love the philosophy of pixi.js and the demos are impressive. So I'd really like to teach my students JavaScript through pixi.js. However, it won't run locally (entering
file:///C:/etc
in the address bar of Chrome) for me. I have to host the HTML/JavaScript code to get the examples to run.I know I can install a simple local webserver, but then we lose out on live editing (which WebStorm beautifully supports), simplicity and other conveniences. Is there any way I can use pixi.js locally? I get the following error for the Basics example:
Uncaught Error: SecurityError: DOM Exception 18 pixi.js:58
PIXI.WebGLRenderer.updateTexture pixi.js:58
PIXI.WebGLRenderer.render pixi.js:56
animate index.html:51
The text was updated successfully, but these errors were encountered: