Extension:3D/pl
3D Status wydania: beta |
|
---|---|
File:Asad Al-Lat.stl | |
Realizacja | Media |
Opis | Zapewnia obsługę formatów plików 3D. |
Autor(zy) | |
Ostatnia wersja | 0.0.1 |
Polityka zgodności | Snapshots releases along with MediaWiki. Master is not backward compatible. |
MediaWiki | >= 1.42 |
Licencja | GNU General Public License 2.0 or later |
Pobieranie | |
Pomoc | Help:Extension:3D/pl |
Expand | |
Expand | |
Quarterly downloads | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Public wikis using | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Rola Vagrant | three_d |
Problemy | Otwarte zadania · Zgłoś błąd |
Rozszerzenie 3D daje użytkownikowi wiki możliwość wgrywania i przeglądania modeli 3D. Zobacz dokumentację Pomoc:Rozszerzenie:3D , aby uzyskać więcej informacji dotyczących użytkowania.
Obecnie obsługuje format pliku STL, który jest powszechnie używany w branży druku 3D.
Instalacja
Umożliwienie przesyłania plików 3D
Powiedz MediaWiki, że może obsługiwać przesyłanie STL. Dodaj poniższe do pliku LocalSettings.php
:
$wgTrustedMediaFormats[] = 'application/sla';
$wgFileExtensions[] = 'stl';
Instalacja Rozszerzenia:3D
- <translate> Download and place the file(s) in a directory called <tvar name=name>
3D/pl
</tvar> in your <tvar name=ext>extensions/
</tvar> folder.</translate> - <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
wfLoadExtension( '3D/pl' );
- File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
Instalacja 3d2png
3d2png to renderer miniatur dla plików 3D. Będzie on renderował miniatury png dokładnie tak, jak to rozszerzenie będzie wyświetlać obiekty, używając tych samych bibliotek JS działających w Node.js zamiast w przeglądarce.
Aby zainstalować, sklonuj i aktywuj repozytorium 3d2png:
git clone https://gerrit.wikimedia.org/r/3d2png
cd 3d2png
npm install
W systemie Linux konieczne będzie również zainstalowanie wirtualnego bufora ramki, aby 3d2png mógł bezgłowo przechwytywać obiekt 3D.
apt-get install xvfb
Po pomyślnym zainstalowaniu 3d2png, będziemy musieli powiedzieć Rozszerzeniu:3D, jak wywołać tę usługę generatora miniatur.
Dodaj to do swojego LocalSettings.php
i upewnij się, że zaktualizowałeś ścieżki, aby pasowały do twojej konfiguracji:
$wg3dProcessor = [
'/usr/bin/xvfb-run',
'-a',
'-s',
'-ac -screen 0 1280x1024x24',
'/path-to-your-repository/3d2png.js'
];
Instalacja rozszerzenia:MultimediaViewer
MultimediaViewer nie jest zależny od rozszerzenia 3D, ale należy go zainstalować, aby móc korzystać z modeli 3D (przesuwać, powiększać).
Po instalacji MultimediaViewer należy powiązać typ pliku STL z odpowiednim rozszerzeniem przeglądarki, dodając je do pliku LocalSettings.php
:
$wgMediaViewerExtensions['stl'] = 'mmv.3d';
Konfiguracja
Umowa patentowa
Special:Upload
To add patent agreement selection options to Special:Upload, edit your wiki's MediaWiki:3d-patents
page.
Every line on that page will be turned into an <option>, 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 commons:MediaWiki:3d-patents for an example.
Make sure to create the template(s) that will be added to the content. i.e. Template:3dpatent
Special: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 {{3dpatent}} or {{3dpatent|ownwork}} respectively.
To change the phrasing of these messages, these pages can be altered: MediaWiki:Mwe-upwiz-patent-dialog-text-warranty
& MediaWiki:Mwe-upwiz-patent-dialog-text-license
.
To change which file types require patent agreement, which template is added to the upload content or where the urls point to, change LocalSettings.php
. Below are the default settings:
$wgUploadWizardConfig['patents'] = [
'extensions' => [ 'stl' ],
'template' => '3dpatent',
'url' => [
'legalcode' => '//wikimediafoundation.org/wiki/Wikimedia_3D_file_patent_license',
'warranty' => '//meta.wikimedia.org/wiki/Wikilegal/3D_files_and_3D_printing',
'license' => '//meta.wikimedia.org/wiki/Wikilegal/3D_files_and_3D_printing',
'weapons' => '//meta.wikimedia.org/wiki/Wikilegal/3D_files_and_3D_printing#Weapons',
],
];
Extension:CommonsMetadata
Lastly, Extension:CommonsMetadata 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 application/sla
MIME type (currently the only ones supported by Extension:3D) that lack the 3dpatent
template.
Matching files lacking this template in their content will automatically be added to Category:Files_with_no_machine-readable_patent
.
If you use any other template than 3dpatent
, this will not be useful for you, as this is not currently configurable.
File:Wikimedia-logo black.svg | <translate> This {{<tvar name=1>#ifeq:Extension|Extension</tvar>|extension|skin}} is being used on one or more [[<tvar name=2>m:Special:MyLanguage/Wikimedia projects</tvar>|Wikimedia projects]].</translate> <translate> This probably means that the {{<tvar name=1>#ifeq:Extension|Extension</tvar>|extension|skin}} is stable and works well enough to be used by such high-traffic websites.</translate> <translate> Look for this {{<tvar name=1>#ifeq:Extension|Extension</tvar>|extension's|skin's}} name in Wikimedia's <tvar name=2>CommonSettings.php</tvar> and <tvar name=3>InitialiseSettings.php</tvar> configuration files to see where it's installed.</translate> <translate> A full list of the {{<tvar name=1>#ifeq:Extension|Extension</tvar>|extensions|skins}} installed on a particular wiki can be seen on the wiki's <tvar name=ver>Special:Version</tvar> page.</translate> |
Asad Al-Lat.stl |
- Pages with script errors
- Pages with broken file links
- Beta status extensions/pl
- Media handling extensions/pl
- GPL licensed extensions/pl
- Extensions in Wikimedia version control/pl
- BeforePageDisplay extensions/pl
- UploadForm:getInitialPageText extensions/pl
- UploadFormInitDescriptor extensions/pl
- All extensions/pl
- Extensions used on Wikimedia/pl
- 3D extensions/pl