Quantcast
Channel: Babylon.js
Viewing all articles
Browse latest Browse all 388

Another way of getting picture for new BABYLON.Texture(path, scene)

$
0
0

Hi, Babylon Professors!

I'm changing textures of my objects by dragging and dropping some stuff inside my html document.

And when I'm calling this line:

scene.materials[x].diffuseTexture = new BABYLON.Texture(givenFilePath, scene);

Babylon makes a GET request to the server in order to get an image.

But I need to add some headers to this request and some times even try to take this picture locally. Is it any predefined functions or ways to change GET request, or to upload this picture for example from browser web storage?

Thanks!


Viewing all articles
Browse latest Browse all 388

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>