Extension:X3d

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
x3d

Release status: experimental

Implementation Tag
Description Renders x3d in a Java Applet
Author(s) Luc Yriarte (LyriarteTalk)
Last version rev 0.1
License Open Source (BSD)
Download php extension x3d.php Java Applet binary x3d.jar

Check usage (experimental)


Summary

Use this extension to render x3d content directly in MediaWiki. All content between <x3d> and </x3d> tags is passed to a Java applet. No additional plugin is required on the client side.

x3d tags recognized

  • DEF / USE
  • Transfom: translation, rotation, scale, position, orientation
  • Appearance.Material.diffuseColor
  • Shape: Sphere, Cylinder, Cone, Box, IndexedFaceSet

Note: The only parameters recognised for the X3D tag are the applet's width and height in pixels, the rest is ignored.

Installation

All the code is open sourced under the BSD licence.

You need to add a x3d folder under extensions with x3d.php and x3d.jar inside.

/var/www/mediawiki/extensions/x3d/x3d.jar
/var/www/mediawiki/extensions/x3d/x3d.php

Then add the line below to your LocalSettings.php.

require_once("$IP/extensions/x3d/x3d.php");

Resources

Limitations

  • Ligth sources not supported
  • Texture mapping not supported
  • Transparency not supported
  • Interpolators not supported - maybe later

Acknowledgements

  • Uses the org.json Java classes to parse xml code for x3d. The org.json classes are also open-source.

Using x3d.jar as an applet

<applet code="org.yriarte.x3d.X3dApplet.class"  width="400" height="400" archive="x3d.jar">
  <param name="scene" 
   value="<X3D><Scene><Shape><Cone height='25' bottomRadius='10'/></Shape></Scene></X3D>">
</applet>

Using x3d.jar on the command line

java -jar x3d.jar foobar.x3d

External links

Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox