是否可以支持“旧”版本的 WebGL?通过插件或插件的浏览器?
鉴于WebGL的不成熟情况和有些亮点的功能,我决定使用它来构建一个在线应用程序。对于那些使用 Firefox 4 或 Chrome 的用户来说,没有问题。但对于 Firefox 3.* 甚至 IE 6、7 等用户我该怎么办呢?
所以我想问一下是否有可能写一个插件/插件。当我的代码检测到不兼容时,它可以提醒用户下载/安装这个额外的组件,以便他们能够使用 WebGL 内容。
我注意到几乎所有的WebGL指令都只要求你安装新的、现代的浏览器来访问WebGL内容,但没有告诉你如何处理旧的浏览器。老派浏览器还有生存之道吗?
非常感谢。
Regarding to the immature situation and the somewhat bright feature of WebGL, I decide to use it to build an online application. For those users who have Firefox 4 or Chrome, there is no problem. But what should I do for the users of Firefox 3.* or even IE 6, 7, etc.?
So I'd like to ask that if there is any possible to write a plugin/addon. And when my codes detect the incompatibility, it can alert the user to download/install this extra component to enable them using the WebGL contents.
I noticed that nearly all instructions of WebGL only ask you to install the new, modern browsers to access WebGL contents, but none of them tell you how to handle the old browsers. Will there be a way for the survival of old school browsers?
Thanks very much.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
就 IE 而言,当 webgl 访问 chrome 时,您应该能够使用 google chrome 框架(您已经可以破解它以使其正常工作)。而且由于您不再需要管理员权限来安装它,因此它不应该成为太大的障碍。就FF3而言,我认为这并不算什么
对于长期问题,FF 用户明智并升级;-)
As far as IE goes you should be able to use google chrome frame when webgl hits chrome(you can already hack it to get it working). And since you don't need admin rights to install it anymore it shouldn't be that much of a hurdle. As far as FF3 goes, I don't think that's much
of a long term issue, FF users are sensible and upgrade ;-)
据我所知,这个问题没有简单的答案。
如果你想编写无需更改也能在旧浏览器上运行的 WebGL 代码,那么我只能想到 Google 的 O3D 项目。不过,在这里您不会直接编写 WebGL 代码。 O3D 是在 WebGL 之上实现的,但其之前的实现是基于插件的。因此,您可以在 O3D 中编写游戏或 3D 应用程序,并提示使用旧浏览器的用户安装插件。
我在项目 3DTin 中实现的一个更难的解决方案是,当 WebGL 不可用时,我在软件中进行一些 3D 数学运算并在 Canvas 2D 上渲染它。如果您的 3D 应用程序不是很复杂,它就可以工作。在 excanvas 的帮助下,我的应用程序可以在所有主要浏览器上运行,包括 IE 7,8。但是,如果您的 3D 场景很复杂,则不适合使用此方法。您可能需要查看以下在 Canvas 2D 之上渲染的 3D javascript 库:
pre3d
三.js
To the best of my knowledge there is no easy answer to this.
If you want to write WebGL code that - without change - will also run on old browsers, then I can only think of Google's O3D project. Here you won't be directly writing WebGL code though. O3D is being implemented on top of WebGL, but its previous implementation was plugin based. So you can write your game or 3D app in O3D and prompt your users with old browser to install the plugin.
A much harder solution that I implement in my project 3DTin, is when WebGL is not available I do some 3D math in software and render it on Canvas 2D. It works if your 3D app is not very complicated. My app runs on all major browsers, including IE 7,8 with the help of excanvas. However this approach is not an option if your 3D scenes are complicated. You may want to look at following 3D javascript libraries that render on top of Canvas 2D:
pre3d
three.js