Git Product home page Git Product logo

Comments (8)

GoodBoyDigital avatar GoodBoyDigital commented on April 16, 2024

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?

from pixijs.

Nibbler999 avatar Nibbler999 commented on April 16, 2024

You can run it in Firefox if you set the "security.fileuri.strict_origin_policy" preference to false in about:config.

from pixijs.

samueller avatar samueller commented on April 16, 2024

@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.

CanvasRenderer is fine, I'll have them use that for now. Unfortunately they won't get as wowed by the amazing speed without WebGL. Does it make sense to check the URL of the webpage the JavaScript is on and if it starts with file:/// then use the CanvasRenderer, otherwise use the regular mechanism in the autoDetectRenderer function?

from pixijs.

ateoto avatar ateoto commented on April 16, 2024

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:

python -m SimpleHTTPServer

or, if you're on Python 3:

python -m http.server

Then you would just point chrome at http://127.0.0.1:8000

There are additional tips and tricks here:
https://github.com/mrdoob/three.js/wiki/How-to-run-things-locally

from pixijs.

samueller avatar samueller commented on April 16, 2024

@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...

from pixijs.

ateoto avatar ateoto commented on April 16, 2024

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.

from pixijs.

samueller avatar samueller commented on April 16, 2024

@ateoto I had no idea about that built-in HTTP server!! This is so helpful, it works amazing! Thanks.

from pixijs.

lock avatar lock commented on April 16, 2024

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.

from pixijs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.