检测使用 three.js 时的 WebGL 和浏览器兼容性(Detecting WebGL and browser compatibility with three.js)(转)
来源:互联网 发布:苏新诗毛糙体简 mac 编辑:程序博客网 时间:2024/06/15 19:24
太阳火神的美丽人生 (http://blog.csdn.net/opengl_es)
本文遵循“署名-非商业用途-保持一致”创作公用协议
转载请保留此句:太阳火神的美丽人生 - 本博客专注于 敏捷开发及移动和物联设备研究:iOS、Android、Html5、Arduino、pcDuino,否则,出自本博客的文章拒绝转载或再转载,谢谢合作。
检测使用 three.js 时的 WebGL 和浏览器兼容性
(Detecting WebGL and browser compatibility with three.js)
遇到的问题
The problem
Not all browsers support WebGL, in fact only chrome and firefox work with three.js WebGLRenderer currently. iOS works with the canvas renderer and although IE9 supports canvas, it doesn't support workers so currently isn't supported.
一种解决方案
A solution
In order to detect webgl compatibility and gracefully inform the user you can addhttps://github.com/mrdoob/three.js/blob/master/examples/js/Detector.js to your javascript and use this example to avoid even attempting to render anything:
if (Detector.webgl) { init(); animate();} else { var warning = Detector.getWebGLErrorMessage(); document.getElementById('container').appendChild(warning);}
相关资源
Resources
http://stackoverflow.com/questions/8312546/support-of-canvas-and-webgl-three-js-on-moble-devices https://github.com/mrdoob/three.js/issues/257
转自:http://blog.csdn.net/opengl_es/article/details/38350625
- 检测使用 three.js 时的 WebGL 和浏览器兼容性(Detecting WebGL and browser compatibility with three.js)(转)
- Threejs 官网 - 检测使用 three.js 时的 WebGL 和浏览器兼容性(Detecting WebGL and browser compatibility with three.js)
- 结合Blender和Three.js使用WEBGL
- WebGL和 Three.js 的关系
- WebGL three.js
- Webgl之three.js
- three.js(webGL库)
- three.js 与 webGL
- WebGL With Three.js – Lesson 6(转)
- WebGL框架:Three.js和Babylon.js的比较
- three.js和webGL学习,初级
- 学习 WebGL 的开源库 Three.js
- canvas延伸-WebGL(three.js)
- WebGL库Three.js入门
- Three.js讲解以及WEBGL实例(转)
- 小八——WebGL心路历程(2),一个基于Three.js的webGL程序解析
- Calculate superficial area and volume of mesh with Three.js(WebGL)
- (WebGL) Max to Three.js workflow tips and tricks
- web前端35个jQuery小技巧!
- Android进阶UI之使用自定义字体
- 版本管理SVN的使用——SmartSVN
- C++ 操作cmd并返回结果
- ti L138 board
- 检测使用 three.js 时的 WebGL 和浏览器兼容性(Detecting WebGL and browser compatibility with three.js)(转)
- Activity的生命周期和启动模式-Android开发艺术探索读书笔记第一章
- 关于slax
- 反射
- java实现无组件导出CSV文件
- Eclipse ANT
- 使用LayoutParams设置布局
- Adobe AIR 代码签名证书使用指南
- 【C语言】数组与指针