WebGL样品与演示

简介: 来源:http://blog.vlad1.com/2009/09/21/webgl-samples/ 下载9月18日以后Firefox的Nightly版,在地址栏输入about:config,搜索“webgl”,双击“webgl.enabled_for_all_sites”,将其值从“false”改为“true”。

来源:http://blog.vlad1.com/2009/09/21/webgl-samples/

下载9月18日以后Firefox的Nightly版,在地址栏输入about:config,搜索“webgl”,双击“webgl.enabled_for_all_sites”,将其值从“false”改为“true”。

演示地址:http://people.mozilla.com/~vladimir/webgl/spore/sporeview.html

然而,速度暂时确实慢的有点受不了,起码要等一分钟才能加载并渲染出来。

原文如下:

Since my post on Friday , we landed a few fixes to improve our WebGL implementation and to fix a couple of bugs we discovered on Friday.  I'm looking forward to seeing what people do with WebGL, and how it can be useful on the web right now.  For example, EA/Maxis recently added COLLADA export of Creature designs to their popular game Spore , and they have a Sporepedia where players can see others' creations.  Right now, those previews are just as images.  With WebGL, they could be fully 3D, even animated.

Spore Creature View (thumbnail) Over the weekend I've put together this example , which uses WebGL to render an exported Spore creature, and let the user rotate the 3D model to view it from different angles.  For those who want to try it out, you'll need a recent Firefox nightly (one from today, September 21, or newer), and with one preference flipped as described in this post .

I'll be working to update the very basic "getting started " demos from the GL ES 2 book that I ported to Canvas 3D as well, so that those who are interested in experimenting can have some good basic code to look at.  They're not updated yet, but they should be in the next day or two.

For those of you on Windows who don't have an up to date OpenGL driver, or don't have the possibility of getting one (e.g. many common Intel graphics cards doesn't have OpenGL drivers), you can enable software rendering by downloading a Windows build of the Mesa software OpenGL implementation.  It won't be fast, but it should be enough for you to get an idea of what's going on, and to play with some of the demos.  To use it, download webgl-mesa-751.zip and extract it somewhere on your computer.  It has a single file, OSMESA32.DLL, that you need to tell Firefox where to find:  open up about:config, and set the preference webgl.osmesalib to the path of OSMESA32.DLL.  If you extracted it to "C:/temp", you would put in "C:/temp/osmesa32.dll" in the pref.  Then, flip webgl.software_rendering to true, and you should be good to go.

(Mac OS X users shouldn't need to bother with software rendering, since Apple already provides a high quality OpenGL implementation, and Linux users should be ok as long as they have recent OpenGL drivers installed.)

目录
相关文章
Threejs入门进阶实战案例(5):坐标系理解时辅助坐标系的使用
Threejs入门进阶实战案例(5):坐标系理解时辅助坐标系的使用
156 0
|
8月前
|
数据可视化
R语言动态图可视化:如何、创建具有精美动画的图
R语言动态图可视化:如何、创建具有精美动画的图
|
8月前
|
数据可视化
R语言对布丰投针(蒲丰投针)实验进行模拟和动态可视化生成GIF动画
R语言对布丰投针(蒲丰投针)实验进行模拟和动态可视化生成GIF动画
|
8月前
|
C# 图形学
【Unity 3D】元宇宙案例之虚拟地球信息射线实战(附源码、演示视频和步骤 超详细)
【Unity 3D】元宇宙案例之虚拟地球信息射线实战(附源码、演示视频和步骤 超详细)
130 0
|
8月前
|
vr&ar C# 图形学
【Unity 3D】VR飞机拆装后零件说明功能案例实战(附源码和演示视频 超详细)
【Unity 3D】VR飞机拆装后零件说明功能案例实战(附源码和演示视频 超详细)
107 0
|
Java
手把手一步一步教你使用Java开发一个大型街机动作闯关类游戏10之一组sprite动画
手把手一步一步教你使用Java开发一个大型街机动作闯关类游戏10之一组sprite动画
163 0
|
存储 测试技术 Python
软件测试|手把手教你用Python来模拟绘制自由落体运动过程中的抛物线
软件测试|手把手教你用Python来模拟绘制自由落体运动过程中的抛物线
软件测试|手把手教你用Python来模拟绘制自由落体运动过程中的抛物线
|
Web App开发 数据可视化 容器
基于Threejs构建的3D立体空间实战入门
本文将简单介绍Threejs的相关基础知识,四个基础对象组件。最后采用一个实例一步一步的进行3D房间展示,最终达到可视化的效果。
471 0
基于Threejs构建的3D立体空间实战入门
|
JavaScript 前端开发
javascript挑战编程技能-第三题:计算矩形房间面积
javascript挑战编程技能-第三题:计算矩形房间面积
202 0
javascript挑战编程技能-第三题:计算矩形房间面积
基于Bokeh库,手把手教你制作子弹图和瀑布图!
基于Bokeh库,手把手教你制作子弹图和瀑布图!
基于Bokeh库,手把手教你制作子弹图和瀑布图!