有我可以阅读/学习的 WebGL API 吗?
更新:我已经理清了我的 O3D 情况,但我还没有选择下面列出的库之一。我想我会在所有项目中尝试散点图,看看哪个项目可以轻松处理数据并且最容易编程。
我一直在阅读 http://learningwebgl.com/blog/ 尝试使用一种新语言,WebGL 让我着迷。我还访问过 Google 代码页面: http://code.google.com/p/o3d/
这似乎是折旧的地点?我在他们让你下载的samples.zip中看到,有一个我想要完成的完美示例,但它使用了
<script type="text/javascript" src="o3djs/base.js"></script>
并且从我一直在学习的情况来看,没有包含这样的基本文件(也许是 sylvester.zip ) js 进行计算)。
我的项目是否混淆了?有没有什么地方可以查看可用的课程和课程? WebGL 中的方法?我正在尝试从此处创建 scatter-chart.html 示例。
方法、类名,实际上一切的完成方式看起来与learningwebgl.com 网站和那些示例不同。 可用的通话&这里列出的类看起来与我在 WebGL 现场演示中看到的 WebGL 调用完全不同
我哪里出错了?
例如,我在尝试模仿的演示中看到这个元素:
g_viewInfo = o3djs.rendergraph.createBasicView(
g_pack,
g_client.root,
g_client.renderGraphRoot,
clearColor);
但是 WebGL 中没有渲染图对象/方法,也没有指示它被重命名的内容。我是否应该放弃查看旧的 o3d 示例并尝试拼凑出一个读取 API 的图表,或者我可以通过下面链接的此 API 文档找到从 o3d 到 WebGL 转换的更深入的解释吗?
UPDATE: I got my O3D situation straightened out, but I have yet to settle on one of the libraries listed below. I think I will try a scatter plot in all projects and see which one handles the data easily and is easiest to program in.
I have been reading the tutorials on http://learningwebgl.com/blog/ to try and play with a new language, and WebGL fascinates me. I have also been to the Google Code page for it here:
http://code.google.com/p/o3d/
That seems to be the depreciated site? I saw in the samples.zip they have you download, there is a perfect example of what I want to accomplish, but it uses
<script type="text/javascript" src="o3djs/base.js"></script>
And from what I have been learning, there is no inclusion of a base file like that (expect perhaps sylvester.js for doing calculations).
Have I got projects mixed up? Is there any place where I can view the available classes & methods in WebGL? I am trying to do a the scatter-chart.html example from here.
The method, class names, in fact how everything is done looks different from the learningwebgl.com website and those samples. The available calls & classes listed here look nothing like the WebGL calls I have seen in live demos of WebGL
Where am I going wrong?
For example, I see this element in the demo I am trying to mimic:
g_viewInfo = o3djs.rendergraph.createBasicView(
g_pack,
g_client.root,
g_client.renderGraphRoot,
clearColor);
But there is no rendergraph object/method in WebGL and no indication of what it was renamed too. Should I abandon even looking at the old o3d samples and try to piece together a chart reading the API or can I find a deeper explanation of the conversion from o3d into WebGL with this API doc linked below?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
WebGL 还在开发中,API 很不稳定,你可以看一下:
回答你的第二个问题,O3D 与WebGL,它们是完全独立的项目。它们之间唯一的关系是 O3D 现在使用 WebGL,类似于使用 OpenGL 编写的游戏引擎或场景图。
WebGL is still in development, APIs are very unstable, you can take a look here:
Answering your second question, O3D has no relation with WebGL, they're completely separate projects. The only relation between them is that O3D now uses WebGL, something like a game engine or scenegraph written using OpenGL.
我会看一下GLGE,SpiderGL 和 CopperLicht
I'd take a look at GLGE, SpiderGL and CopperLicht
更新:我看到您指定了您要尝试使用的演示。
是一个 o3d 对象,因此是 o3djs 命名空间对象。
它在 WebGL 中还没有被重命名为其他名称; O3D 是 WebGL 之上的一层 JavaScript 库。它消除了 WebGL 中的一些微观管理,因此您可以专注于更高级别的抽象。
除非下载并安装 O3D javascript 库,否则无法使用 O3D 示例。
在 WebGL 中没有; base.js 属于 O3D,您必须下载并安装。
您提到您尝试使用的演示是来自此处。该演示尚未从旧的 O3D 插件移植到 WebGL...您可以看出,因为当您 在浏览器中查看实时页面,它显示“此页面需要安装 O3D 插件。”示例位于 http://code.google.com/p/o3d/wiki/Samples 是关于 WebGL 的最新内容。为 O3D 插件编写的其他示例(即在插件被 WebGL 替换之前)可能需要进行大量更改才能工作。
值得在 Google 网上论坛邮件列表上寻求移植方面的帮助这个演示。开发人员反应灵敏且乐于助人。他们可能会根据需求提高此演示的优先级。
Update: I saw that you specified which demo you are trying to use.
o3djs.rendergraph is an o3d object, hence the o3djs namespace object.
It has not been renamed to something else in WebGL; O3D is a layer of javascript libraries on top of WebGL. It takes some of the micromanagement out of WebGL so you can focus on a higher level of abstraction.
You cannot use O3D samples unless you download and install the O3D javascript libraries.
In WebGL there isn't; base.js belongs to O3D, which you have to download and install.
You mention that the demo you're trying to use is the scatter plot demo from here. That demo has not been ported from the old O3D plugin to WebGL... you can tell because when you view the live page in your browser it says "This page requires the O3D plugin to be installed." The samples at http://code.google.com/p/o3d/wiki/Samples are up-to-date with regard to WebGL. Other samples that were written for the O3D plugin (i.e. before the plugin was replaced by WebGL) may require a lot of changes to work.
It's worthwhile to ask on the google group mailing list for help in porting this demo. The developers are responsive and helpful. They may bump the priority of this demo based on demand.