Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

3D object viewer in MediaWiki?

I recently discovered WebGL and particularly Three.js, which is the best API I've found so far for that. For now I'm just coding simple demos to display 3D models of starships from my main project, which is a Sci-Fi universe.

My mid-term goal is to enhance a MediaWiki wiki with 3D display of objects described in pages, with orbit camera. I see it as a tool for presenting the contents of the universe we're developping.

I want nothing fancy or difficult to do per se, I know how to do that with standard Wavefront .OBJ and .MTL files, and it's quite enough for me. But it's the wiki integration that worries me.

The base idea would be to first upload the various files (models, materials, textures) as wiki files typed by their extension, then having the extension add a wikicode item or a template to use them at will from their wiki URLs.

If we stay with the .OBJ/.MTL example :
- .MTL would be displayed as materials applied on a sphere with some obejcts bouncing around to see mirror effects, with adjustable ambient/background for contrast,
- .OBJ would be displayed by blankly applying its materials, also with adjustable ambient/background.

Is there already such an extension or at least a framework that could be used and expanded into it, or is it up to me to develop, knowing I probably'll have neither the skill nor the time?

like image 965
Mutos Avatar asked Nov 27 '12 12:11

Mutos


1 Answers

If you just want to display models you might want to take a look at x3dom. I don't know what steps you'd need tointegrate it into mediawiki though.

On the other hand, on the Khronos WebGL Wiki we use some iframe plugin to let us put random WebGL samples on the wiki.

like image 154
gman Avatar answered Sep 24 '22 02:09

gman