Extension:Wiki3D
From MediaWiki.org
|
Wiki3D Release status: experimental |
|
|---|---|
| Implementation | Tag |
| Description | A simple 3D description language embedded in a Java Applet |
| Author(s) | Luc Yriarte (LyriarteTalk) |
| Last version | rev 1 |
| License | BSD |
| Download | php extension Wiki3D.php Java Applet binary Mini3D.jar |
|
Check usage (experimental) |
|
Contents |
[edit] Syntax
Wiki3D uses <Wiki3D></Wiki3D> tags. The 3D description language is based on simple object primitives: cone, sphere, cylinder, box.
[edit] Sample
A purple oval, vertical radius of 50 units, equatorial radius 2 times larger, translated 300 units on the y axis, rotates 5 degrees on the x axis every timestep.
{trn(0,300,0) sphere r=50 f=2 color(255,0,128) [rot(5,0,0)]}
The 4 base objects in motion
{
{ box w=50 h=100 l=200 trn(-150,0,0) color(255,0,0) [rot(15,0,0)] }
{ cylinder r=50 h=100 trn(-50,0,0) color(0,255,0) [rot(0,5,0)]
{ cone r=20 h=40 trn(0,0,-70) rot(90,0,0) color(255,255,0) }
}
{ cone r=50 h=100 trn(50,0,0) color(0,0,255) }
{ [trn(0,0,5) step 10] [trn(0,0,-5) step 20] [trn(0,0,5) step 20 goto 2]
{ sphere r=100 f=0.5 trn(150,0,0) color(0,128,128) [rot(0,1,0)] }
}
}
[edit] Installation
All the code is open sourced under the BSD licence.
You need to add a Wiki3D folder under extensions with Wiki3D.php and Mini3D.jar inside.
Then place require_once("$IP/extensions/Wiki3D/Wiki3D.php"); inside LocalSettings.php.
[edit] External links
Live examples
Sample pages
Applet only:
Pages extracted from my local wiki:
- Applet test
- solar system
- A mannequin
- misc examples.
Resources
- Sources on GitHub, Mini3D.tgz archive - a Java applet in open source (BSD license)
- Applet binary Mini3D.jar
- php extension Wiki3D.php
