Skip to content Skip to sidebar Skip to footer

Three.js - Cannot Load Texture Locally In Chrome Browser In Android Device

I have been trying to load textures for a WebGL application in a Chrome browser in an Android device I came across a similar post THREE.js - Can't load texture locally where a solu

Solution 1:

The Crosswalk projects embeds a Chromium webview and, by standard, will allow the loading of textures and models from files.You can compile your demo with Crosswalk by using this if you have a blacklisted gpu: make_apk.py --package=org.crosswalkproject.yourproject \ --manifest=your_webgl_demo/manifest.json --xwalk-command-line='--ignore-gpu-blacklist'

The last part isn't necessary if your gpu supports webgl completely. If you have problems though, replace the last part with --xwalk-command-line='--disable-web-security' which will give you total access to files (with all the risks involved).

But the simplest method is to use a webserver on android to access files from 127.0.0.1:8080. There are many free webservers on the playstore and I use them on a daily basis to test webgl demos on my device.

Post a Comment for "Three.js - Cannot Load Texture Locally In Chrome Browser In Android Device"