Are you ready for WebGL?

Posted in 三维时代 on February 24th, 2010 by Adam

The main advantage of WebGL is that cross-device, cross-platform and zero-install. It’s the new revolution for 3D entertainment on the Internet. It’s the future.

Javascript with CUDA: Elevating JavaScript Performance Through GPU Power

http://mozillalabs.com/jetpack/2010/01/25/elevating-javascript-performance-through-gpu-power/

It’s possible to utilize CUDA from within Jetpack now. (See the Jetpack-to-CUDA project)

Jetpack.toGPU() is that hint. Under the hood of Jetpack.toGPU() there is translation of function(nums, numsSize) {…} to CUDA Kernel and a method of sending C-code to the GPU. Jetpack.toGPU() should be non-blocking. It means “some job” will be done while resNumbers is calculating. Of course, a developer could write their own CUDA Kernel in C to be sent to the GPU. This technique is like in similar to the PyCUDA project.

WebGL on Mobile: Nokia N900 impressively demos WebGL 3D graphics

http://www.engadget.com/2009/12/03/nokia-n900-impressively-demos-webgl-3d-graphics/

Start to Learn WebGL Now? WebGL Lesson

http://learningwebgl.com/blog/?p=28

Tags: , ,

WebGL三维示例和Js版Box2D物理引擎

Posted in javascript, 三维时代 on February 21st, 2010 by Adam

WebGL示例
http://spidergl.org/code.php
SpiderGL: JavaScript 3D Graphics Library on top of WebGL.

测试环境:XP sp3 + firefox-3.7a2pre.en-US.win32\firefox
about:config激活 webgl.enabled_for_all_sites 为 true
同系统运行多个Firefox版本的办法:firefox.exe -profilemanager -no-remote创建新的profile,指定irefox-3.7a2pre.en-US.win32的安装目录即可。

Js版Box2D
http://box2d-js.sourceforge.net/index2.html

Tags: , ,

FLash与HTML5

Posted in Flash, javascript, 互联网 on February 5th, 2010 by Adam

苹果新发布的平板电脑iPad不支持Flash(也不支持USB, 扩展内存和蓝牙),乔布斯做了解释(因为Flash buggy,常常和苹果的宕机有关),

Apple does not support Flash because it is so buggy. Whenever a Mac crashes more often than not it’s because of Flash. No one will be using Flash. The world is moving to HTML5.

与此同时以降低浏览器对插件的依赖程度为主要目的的HMLT5推出了大量的HTML新特性,其中用以替代Flash的CanvasSVG图形功能(通过Javascript进行二维/三维绘图,其中二维绘图已经被主流浏览器所支持)让人刮目相看。以前只能用Flash做到的效果,现在不用装插件就可以通过Javascript来实现。我们可以看看下面简单的Canvas/SVG例子

Flash未来可谓是凶多吉少。虽然目前看来,和HTML5相比,Flash确实有着明显优势

  1. 安装方便
  2. 性能流畅
  3. 巨大的用户基数
  4. 领先的视频/音频播放技术

特别是高性能三维网页动画(但是这种优势很快即将不再,OpenGL已经瞄准三维网页市场,推出WebGL):

但是Flash仍然有不少隐忧:

  1. 始终需要插件安装
  2. 三维复杂动画的性能瓶颈
  3. 众多竞争对手:苹果公司, Sliverlight, HTML5, WebGL

如果有那么一天,Flash将不再是插件,而成为主要浏览器默认的一部分,我想这才是我对Flash的期望。无论如何,对我来说Flash的确是个很棒的玩具和工具,我会继续支持和使用它!至于它能否占领市场,一统天下,乔布斯和HTML5最终能否成为Flash的终结者,我们拭目以待吧。

另外,你准备好HTML5了吗?

Tags: , , , ,
RSS Feed