RobotPrototype / RedBit

For Prototyping the robot game
0 stars 0 forks source link

Help me test prototypes? #1

Closed RobotPrototype closed 6 years ago

RobotPrototype commented 6 years ago

How can I circumvent the browser not allowing .pngs?

benjamin-heasly commented 6 years ago

https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb?hl=en

This might help. I think the issue is the browser cross origin security policy -- js downloaded from one server making a request to a different server. For us, this is Babylon making a request for the png, although it would apply to any file type.

Our "origin" is a local file, which chrome calls null origin, and apparently this fails the policy.

The link above would let Chrome and like a proper origin / web server for our local file. You'd fire it up to serve from the project folder and visit http://localhost... Instead of file://...