Extension:StlHandler
Jump to navigation
Jump to search
See also: Extension:3D
This Extension gives user the ability to view and manipulate with 3D objects in STL file format.
StlHandler Release status: experimental |
|
---|---|
![]() |
|
Description | Enables the user to view 3D objects in the STL file format on MediaWiki file pages. |
Author(s) | Harri Alasi |
Latest version | 1.0 |
MediaWiki | 1.25+ |
License | GNU General Public License 3.0 |
Download | README |
Translate the StlHandler extension if it is available at translatewiki.net | |
Issues | Open tasks · Report a bug |
Installation[edit]
- Download and place the file(s) in a directory called
StlHandler
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php:
wfLoadExtension( 'StlHandler' ); $wgFileExtensions[] = 'stl'; $wgTrustedMediaFormats[] = "application/sla"; $wgTrustedMediaFormats[] = "application/octet-stream";
- Add the following lines
application/sla stl
text/plain stl
application/octet-stream stl
to the beginning of the file mime.types located in the includes/ folder (if there is no mime.types in that folder, try includes/libs/mime folder)
- (Optional) Configure canvas attributes
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Configuration[edit]
You can set some variables in the "LocalSettings.php" file to configure the canvas that your model will be displayed onto:
$wgStlCanvasHeight
(default = "480")- Assign height value to your canvas
$wgStlCanvasWidth
(default = "600")- Assign width value to your canvas
$wgStlBackgroundImage
(default = "")- full URL of canvas background image
$wgStlBackgroundColor
(default = "lightgrey")- background color of your canvas. Color name, color HEX code and rgb(r,g,b) will all work
- (See [1] for correct colour-names)
Known issues[edit]
Done
Object rotation not working in Firefox- File page shows object size 0px X 0px
- File page reports the file type as possibly harmful
Done
Only works with binary STL files. If you seeFile extension ".stl" does not match the detected MIME type of the file (text/plain)
, save the STL as binary version.
Ideas about further development[edit]
- Short user guide to display next to object canvas on file page (scroll to zoom etc)
- Make viewer touch-enabled