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.)

目录
相关文章
|
15天前
|
JavaScript API 开发工具
(H5-Web3D-ThreeJS)在网页三维CAD中绘制窗户模型
本文介绍了如何使用mxcad3d在网页中创建一个简单的三维窗户模型。通过官方教程搭建环境,编写绘制窗户模型的代码,并在点击按钮后展示模型效果。最终模型包括窗框和玻璃部分,具备丰富的三维建模功能和便捷的API支持。
|
1月前
|
编解码 前端开发 JavaScript
ThreeJs制作模型图片
这篇文章介绍了如何使用Three.js将一张图片转化为3D场景中的像素化模型,通过提取图片的像素颜色并将它们应用到3D立方体上,形成一种特殊的图像展示效果。
25 0
ThreeJs制作模型图片
|
3月前
|
前端开发 数据可视化 JavaScript
Echarts如何实现多图表缩放和自适应?附源码
Echarts如何实现多图表缩放和自适应?附源码
Echarts如何实现多图表缩放和自适应?附源码
|
3月前
|
图形学 数据可视化 开发者
超实用Unity Shader Graph教程:从零开始打造令人惊叹的游戏视觉特效,让你的作品瞬间高大上,附带示例代码与详细步骤解析!
【8月更文挑战第31天】Unity Shader Graph 是 Unity 引擎中的强大工具,通过可视化编程帮助开发者轻松创建复杂且炫酷的视觉效果。本文将指导你使用 Shader Graph 实现三种效果:彩虹色渐变着色器、动态光效和水波纹效果。首先确保安装最新版 Unity 并启用 Shader Graph。创建新材质和着色器图谱后,利用节点库中的预定义节点,在编辑区连接节点定义着色器行为。
235 0
|
3月前
|
Web App开发 应用服务中间件 定位技术
three.js:三维模型加载量测试
three.js:三维模型加载量测试
154 4
|
6月前
|
C# 图形学
【Unity 3D】元宇宙案例之虚拟地球信息射线实战(附源码、演示视频和步骤 超详细)
【Unity 3D】元宇宙案例之虚拟地球信息射线实战(附源码、演示视频和步骤 超详细)
111 0
|
6月前
|
XML Java Android开发
Android App开发之图像加工中给图像添加水波动态特效(附源码和演示视频 简单易懂)
Android App开发之图像加工中给图像添加水波动态特效(附源码和演示视频 简单易懂)
81 0
|
数据可视化
【视觉高级篇】20 # 如何用WebGL绘制3D物体?
【视觉高级篇】20 # 如何用WebGL绘制3D物体?
178 0
【视觉高级篇】20 # 如何用WebGL绘制3D物体?
|
数据可视化
Qt开发技术:Q3D图表开发笔记(三):Q3DSurface三维曲面图介绍、Demo以及代码详解
qt提供了q3d进行三维开发,虽然这个框架没有得到大量运用也不是那么成功,性能上也有很大的欠缺,但是普通的点到为止的应用展示还是可以的。其中就包括华丽绚烂的三维图表,数据量不大的时候是可以使用的。前面介绍了基础的q3d散点图、柱状图,本篇介绍基础的三维曲面图。Q3DSurface类提供了渲染3D曲面图的方法。该类使开发人员能够渲染3D表面图,并通过自由旋转场景来查看它们。可以通过QSurface3DSeries控制曲面的视觉财产,例如绘制模式和着色。