Xeonzinc Posted February 24, 2015 Share Posted February 24, 2015 Hi, Currently i create my ground mesh from a height map which is created dynamically on the canvas with:world_map = canvas.toDataURL();This is then just passed to the CreateGroundFromHeightMap function, where it creates the height map. Everything works fine when i run this at the start of my program. Now I'm working on rebuilding the ground in game, however whenever I run the same functions again everything still works (the new canvas height map is created, put into a dataURL and the mesh is constructed) but once all the other functions have finished I get this error:XMLHttpRequest cannot load data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALEAAADUCAYAAADTEMIsAAAgAElEQ…gmrCfUWUWMxNTwxuXZjRsTzpS8riZwYmpFxXufWonXYPoMikF/INIzW/MAAAAASUVORK5CYII=. Received an invalid response. Origin 'http://54.213.159.7' is therefore not allowed access.babylon.js:3 BJS - [17:15:18]: Error in XHR request in BABYLON.Database.I don't really understand why I'm getting this error when: a ) The image is getting used babylon without problem before the error is thrown b ) There is no error when i first run the process (and I'm disposing of everything as far as i can tell) Quote Link to comment Share on other sites More sharing options...
davrous Posted February 24, 2015 Share Posted February 24, 2015 Hello, This is strange indeed you fall into database code. Can you please share a simple repro on a website or even better into our playground? Are you loading a .babylon file without the corresponding .manifest file in your project?Bye,David Quote Link to comment Share on other sites More sharing options...
Wingnut Posted February 25, 2015 Share Posted February 25, 2015 A sneaky hint. There is only one place in the framework that reports "Error in XHR request in BABYLON.Database"... https://github.com/BabylonJS/Babylon.js/blob/master/Babylon/Tools/babylon.database.ts#L298 and of course... https://github.com/BabylonJS/Babylon.js/blob/master/Babylon/Tools/babylon.database.js#L235 A guy COULD localize (hijack) BABYLON.Database.prototype._saveImageIntoDBAsync function... putting it inside one's own code. Put a little console.log in it to make sure the project is running YOUR new localized version. Then fill that puppy full of alerts and logs and try/catch, and maybe you can see what's happening. And maybe not. Once you "borrow" a function from the framework and get it into your own code, you can stick probes and sensors all over it. Make it talk. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.