【问题标题】:WebGL on Cordova with Three.js带有 Three.js 的 Cordova 上的 WebGL
【发布时间】:2016-06-10 06:19:26
【问题描述】:

我正在尝试在 Cordova 上使用 Three.js 构建一个移动应用程序,

这在浏览器中的 PC 上运行良好,但在设备上它似乎无法在三星 Note 3 上创建 WebGL 上下文

这是错误:

THREE.WebGLRenderer 77 
THREE.WebGLRenderer: Error creating WebGL context. three.min.js:633
THREE.WebGLRenderer three.min.js:633
Uncaught TypeError: Cannot call method 'getExtension' of null 

我正在使用 CrossWalk,但它似乎没有任何区别

【问题讨论】:

  • 直到 KitKat,我认为 WebView 不支持 WebGL,你有哪个版本的 android?

标签: javascript android cordova three.js webgl


【解决方案1】:

是的,我正在运行似乎不支持 WebGL 的 4.4.2。我发现您需要使用 CrossWalk 并启用列入黑名单的 GPU。

 <preference name="xwalkCommandLine" value="--disable-pull-to-refresh-effect --ignore-gpu-blacklist" />

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-08-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-23
    • 2015-01-31
    • 1970-01-01
    • 2020-09-17
    相关资源
    最近更新 更多