Jump to content

Heres your CORS load... now make it work


Pryme8
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.  :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...