最后,我决定从头开始制作我自己的WebGL 3D引擎,我从http://www.khronos.org/webgl/、http://learningwebgl.com和https://developer.mozilla.org/en/WebGL开始了教程。
但问题是每个教程都使用/推荐了不同的矩阵计算库,所以我很困惑!
way!
问题是:哪一个适合3D WebGL应用程序、图表和游戏?(性能和可用性都很重要)
谢谢
发布于 2011-08-22 12:43:31
看看http://greggman.github.io/webgl-matrix-benchmarks/matrix_benchmark.html
我使用glMatrix,它工作得很好。API有点奇怪。
var in = vec3.create([1, 2, 3]);
//overwrite 'in' in-place
vec3.scale(in, 2);
//write output to a different vector
var out = vec3.create();
vec3.scale(in, 2, out);或适用于glMatrix 2
var in = vec3.fromValues(1, 2, 3);
//overwrite 'in' in-place
vec3.scale(in, in, 2);
//write output to a different vector
var out = vec3.create();
vec3.scale(out, in, 2);但是它是快速的,它支持我想要的操作,而且很简单。此外,消息来源也是可以理解的。
不过,我和其他人没有经验。
更新:
在http://stepheneb.github.io/webgl-matrix-benchmarks/matrix_benchmark.html中有更多库的基准测试。在我的Mac上的Chrome,关闭赢得了相当轻松。在我的个人电脑上的Chrome,这是一个更多的混乱。我现在还在使用glMatrix,因为它存在于一个Javascript文件中。
https://stackoverflow.com/questions/7147438
复制相似问题