Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

I'd take a look at GLGE, SpiderGL and CopperLicht

Update: I saw that you specified which demo you are trying to use.

But there is no rendergraph object/method in WebGL and no indication of what it was renamed to

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.

And from what I have been learning, there is no inclusion of a base file like that (expect perhaps sylvester.js for doing calculations).

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top