Pryme8 Posted March 31, 2016 Share Posted March 31, 2016 http://www.babylonjs-playground.com/#1SLO65#1 @Wingnut Ok here is a CORS object load... turn it into a model now please someone? Im not sure how I tried modelData = "data:" + data.reponseText; BABYLON.SceneLoader.ImportMesh("", "", modelData, scene, function (meshes){ }); but that does not work... I got the CORS down though and thats what everyone wanted so can someone help me with turning the data into a model now? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted April 1, 2016 Author Share Posted April 1, 2016 http://www.babylonjs-playground.com/#1SLO65#4 I am dumb.. i had a typo... Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted April 1, 2016 Author Share Posted April 1, 2016 http://www.babylonjs-playground.com/#1SLO65#5 ANNNND here you go... CORSloader with callbacks.... Ill add the ability to load other files as well, just give me some ideas. the async seems to not do anything do to BABYLON it being called in the scenes scope... but thats why I build you a loaded callback you can define. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted April 1, 2016 Author Share Posted April 1, 2016 Ive got Textures workish... umm http://www.babylonjs-playground.com/#1SLO65#11 anyone know the correct way I should parse the return of a image as a text file? I should write up a fun little ajax spinner shader for when the texture is loading... ha... Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted April 1, 2016 Author Share Posted April 1, 2016 Ill fix cross orgin requests from servers that have it explicitly blocked in the next day or so, I would just need someone willing to host a php file with a cURL function. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted April 1, 2016 Author Share Posted April 1, 2016 Ok fine I'll host it on my vps... But if I see one security flag your gonna ruin it for everyone cause I'm gonna shut it down instantly... Give me a little bit this morning then I'll get it up and give you information on how to use the external loader. i still have not worked out how to load the raw image as a texture, the information is there I just have not parsed it right yet. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted April 1, 2016 Author Share Posted April 1, 2016 Ok, I have made the curl loader work and have gotten around blocked cross domain requests... @Wingnut can confirm from a msg I sent to him demonstrating it. I am hesitant to make it public because it is hosted on my vps and I have origins from the playground open to it... Buut I don't wanna make that public cause my vps is not ready to be exposed to the nastiness of the internetz. Perhaps azure host or Babylon playgrounds server could host the php file and then we can delpoy this method in Babylon... I figured you guys would like to be able to natively pull cross origin files and not have to worry about Cors. i just don't know how supportive the admins would be on hosting this cause it has a very hackish vibe to it. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 2, 2016 Share Posted April 2, 2016 hmm, not much excitement from the troops, eh? It's all over my head. I sure can't speak for the community elders, as far as a sanity check for what you are doing, P8. But yes, I can verify that I saw a playground load-in and render a small .obj file that came from a server that I think is CORS-blocked. P8, you might want to briefly and clearly summarize what your mod does, how it does it, and ask the local Gods if it can implemented without explosions. Brief and clean proposals... that's how one wins the hearts and minds of the power core-coders. I'm just the guy in front of the store... waving the "come visit us" sign (public relations). I'm a little guy in the grand scheme of things, but I like pretending I'm somehow somebody. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 2, 2016 Share Posted April 2, 2016 I dont think I will allow it on babylon playground server for sure:) Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted April 3, 2016 Author Share Posted April 3, 2016 Its ok, my new project which I will be revealing here soon, will allow you to import any babylon compatible object from any url and save it for later use o_O... There will be a standardExternal Loader and a CORSloader, both of which before the program loads the object will check the response and prompt you if it is valid or not, then once its grabs it it will make it tangible and you can export it at that point O_o... no model hosted online will be safe from being hijacked if you have its url.... call me an anarchist, but there will be clear disclaimers as to its use. Everything will go smooth till some blocks the IP from my server doing the request... but thats when I just make a quick rotating proxy... dun dun dun.... and technically I dont need the playground to host it, you could pull a good old WUKONG method, and inject right into that scene... super duper shady but yea... GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted April 3, 2016 Author Share Posted April 3, 2016 Infact now that I think about it, I could inject into any babylon file that does not even have an editor attached o_O... what the heck have i just thought of... wow... that means no multiplayer game would be secure at all absolutely not at all... not even the database attached to it... come to think of it that means microsofts databases are exposed with this same hole... my... god... I dont even want to think about all that right now, my mind is to pre occupied... in fact im gonna completely forget about it until I need to deploy packet communications between a server and a client. 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.