如何使用threejs与PhoneGap的? [英] How to use threejs with phonegap?

查看:239
本文介绍了如何使用threejs与PhoneGap的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

的追问是非常自我描述。我有一个简单的3D立方体测试。它工作正常的浏览器。但就在仿真器将显示一个空白页。

The questing is very self-describing. I have tested with a simple 3D cube. it works fine in browser. but just displays a blank page in emulator.

有人说这threejs不与PhoneGap的工作,但另一些人说,他们使用和正常工作!

Some says that threejs does not work with phonegap, but some others say they used and it works fine !

推荐答案

在Android中,你可以使用Chrome的应用程序,以显示自己的网页或使用的PhoneGap /科尔多瓦和所使用的嵌入式web视图。

In Android you can either use the Chrome app to show your webpage or use phonegap/cordova and used the embedded WebView.

直到棒棒糖默认的WebView依赖于操作系统的更新,现在的设备从棒棒堂(5.x的),并在那里是一个Android系统的WebView'这是更新。

Until Lollipop the default WebView depended on OS updates, now on devices from Lollipop (5.x) and up there is a 'Android System WebView' which is updated.

在此页: https://developer.chrome.com/multidevice/webview/overview 你可以看到WebGL的支持是不添加到的WebView V36。

From this page: https://developer.chrome.com/multidevice/webview/overview You can see that WebGL support wasn't added until WebView v36.

在模拟器我不相信,WebGL是支持web视图,但你应该能够使用它的棒棒糖设备及更高版本。

On emulator I don't believe that WebGL is supported in the WebView but you should be able to use it on devices with Lollipop and higher.

修改2015年12月2日

另外一个可能性,如果你想在Android设备上使用WebGL的低于棒棒堂(5.x的),你可以有自己的浏览器组件。

One other possibility if you want to use WebGL on Android devices lower than Lollipop (5.x) you could include your own browser component.

借助人行横道计划会是这样来看待,允许更多的设备来运行你的WebGL $ C $ ℃。

The Crosswalk Project would be something to look at to allow for more devices to run your WebGL code.

请注意,这里列出的WebGL的限制: 的https://crosswalk-project.org/documentation/about/faq.html#Canvas-and-WebGL-support

Do note the WebGL limitations listed here: https://crosswalk-project.org/documentation/about/faq.html#Canvas-and-WebGL-support

这篇关于如何使用threejs与PhoneGap的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆