Extension:3D

The 3D extension gives the user of a wiki support for uploading and viewing 3D models. See  for usage documentation.

It currently supports the STL file format, which is common in the 3D printing field.

Allow 3D file uploads
Tell MediaWiki that it can handle STL uploads. Add this to your  :

Install 3d2png
3d2png is the thumbnail renderer for 3D files. It will render png thumbnails exactly like this extension will display the objects, using the same JS libraries running in Node.js instead of the browser.

To install, clone and activate the 3d2png repository:

On Linux, you'll also need to install a virtual framebuffer in order for 3d2png to be able to headlessly capture the 3D object.

After having successfully installed 3d2png, we'll need to tell Extension:3D how to call this thumbnail generator service. Add this to your  , and make sure to update the paths to match your configuration:

Install Extension:MultimediaViewer
MultimediaViewer is not a hard dependency of the 3D extension, but you will need to install it if you want to interact (move, pan, zoom) with the 3D models. After 1>Special:MyLanguage/Extension:MultimediaViewer#Installation|installing MultimediaViewer, you will need to associate the STL file type with the correct viewer extension, by adding this to your  </> file:

Special:Upload
To add patent agreement selection options to Special:Upload, edit your wiki's <tvar|1> </> page. Every line on that page will be turned into an &lt;option&gt;, where everything after the last  character is the text, and everything before is the template that will be added to the upload content. Check out <tvar|1>commons:MediaWiki:3d-patents</> for an example.

'''Make sure to create the template(s) that will be added to the content. i.e. <tvar|1> </>'''

Special:UploadWizard
1>Special:MyLanguage/Extension:UploadWizard</>|Special:UploadWizard also supports patent agreement, though slightly less flexible. When uploading a third party STL file, a dialog will be displayed to confirm your upload does not infringe any patents. When uploading one of your own, it'll also ask to confirm the 3d objects depicted are your own work. The template added to the upload content will be <tvar|1></> or <tvar|2></> respectively.

To change the phrasing of these messages, these pages can be altered: <tvar|1> </> & <tvar|2> </>.

To change which file types require patent agreement, which template is added to the upload content or where the urls point to, change <tvar|1> </>. Below are the default settings:

Extension:CommonsMetadata
Lastly, <tvar|1></> provides a way to track 3D uploads without said patent license, though it is not configurable at all. It will just check for uploads with a <tvar|1> </> mime type (currently the only ones supported by Extension:3D) that lack the <tvar|2> </> template. Matching files lacking this template in their content will automatically be added to <tvar|1> </>.

If you use any other template than <tvar|1> </>, this will not be useful for you, as this is not currently configurable.