本文介绍了three.js所 - 无法加载本地的质感在Android设备在Chrome浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图加载在Chrome浏览器上的WebGL应用纹理的Andr​​oid设备

I have been trying to load textures for a WebGL application in a Chrome browser in an Android device

我碰到一个类似的帖子THREE.js - 无法加载本地质地哪里加载纹理的解决方案,给出了Chrome浏览器里面只有PC /笔记本电脑的设备上工作。

I came across a similar post THREE.js - Can't load texture locally where a solution to load textures is given for Chrome which works only on a PC/laptop device

--allow-文件访问从档案工作的一台笔记本电脑设备上,我可以使用命令行,但如何做到这一点在移动设备上的标志?

The flag --allow-file-access-from-files works on a laptop device as I can use the command line but how to do it on a mobile device?

可有人请这方面的帮助?

Can someone please help with this?

推荐答案

人行横道项目嵌入一个web视图铬,并通过标准,将允许来自files.You材质和型号的负载可以通过使用该编译人行横道您的演示如果你有一个黑名单GPU:
make_apk.py --package = org.crosswalkproject.yourproject \\ --​​manifest = your_webgl_demo / manifest.json的--xwalk的命令行=' - 忽略-GPU-黑名单

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'

如果您的GPU支持WebGL的完全的最后一部分是没有必要的。
如果你有问题,虽然,替换的最后一部分
--xwalk的命令行=' - 禁用 - 网络安全
这将给你对文件的访问总量(所涉及的所有风险)。

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

但最简单的方法是使用在Android Web服务器从127.0.0.1:8080访问文件。
有在Play商店中许多免费的Web服务器和我使用它们每天都在我的测试设备上的WebGL演示。

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.

这篇关于three.js所 - 无法加载本地的质感在Android设备在Chrome浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 08:23