I want to create a module to render x3d content

Mark Hammond

Joined: 2008-02-11
Posts: 6
Posted: Mon, 2008-02-11 19:18

Hello there. I've been using gallery for several years on my own little website and I want to say that it's a great piece of software.

I'm interested in displaying x3d content in my gallery. I want to write the code that will render it.

Do I need to develop a module to do so or would this code go elsewhere.

I'm a C++ developer but a newbie to php. I've downloaded the tutorial on creating a new module.

Apparently I only need to write some php code that will embed the x3d content in the appropriate spot and the Browser's x3d plugin will take care of the rest.

Thanks.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2008-02-11 19:56

> I'm interested in displaying x3d content in my gallery. I want to write the code that will render it.

do you mean as image or do you want to add some 3d-viewer?

@image:
you'll need to find a program that renders the x3d program and can output it in some 2d image format.
if the output image format isn't web-viewable, use g2's imagemagick, gd or netpbm toolkit to create a web-viewable image (jpg,png,bmp,gif) from the output image.

@3d viewer:
you'll need to find some browser plugin / applet / solution to render your x3d in the browser.
once you have that, you could create a gallery item class for x3d items and add a render method that outputs the HTML needed to render it.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
Mark Hammond

Joined: 2008-02-11
Posts: 6
Posted: Mon, 2008-02-11 20:12

Thank you very much for your quick reply.

The 3d viewer option is what I want.

Is there a tutorial for creating an item class?

Or should I just browse the source code?

 
Mark Hammond

Joined: 2008-02-11
Posts: 6
Posted: Mon, 2008-02-11 20:36

Well I found GalleryPhotoItem.class and it looks like I can use that as a template.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2008-02-11 20:56
 
Mark Hammond

Joined: 2008-02-11
Posts: 6
Posted: Mon, 2008-02-11 21:10

I think I'll just assume that FLUX is the viewer installed (simplify my task).

I'm just searching through the code for any module that has a class that extends GalleryDataItem, so I can use that as a template.

All I can find right now is GalleryPhotoItem in the core and that gives me a good starting point.

 
Mark Hammond

Joined: 2008-02-11
Posts: 6
Posted: Mon, 2008-02-11 21:38

I think I've got enough to get started. Thanks for answering my questions.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2008-02-11 22:28

i'd take a look at GalleryAnimationItem.class and GalleryMovieItem.class in modules/core/classes/ .

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage