Extension:OpenJsCad/en

From Linux Web Expert

MediaWiki extensions manual
OpenJsCad
Release status: experimental
Implementation Tag
Description Allows embedding of OpenJsCad Designs
Author(s) Wolfgang Fahl (WolfgangFahltalk)
Latest version 0.0.1 (2019-06-11)
MediaWiki
Database changes No
License No license specified
Download
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').
Translate the OpenJsCad extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

Purpose

Allows to embed 3D Designs created with https://www.openjscad.org/ for display in your wikipage.

Usage

{{jscad|title=OpenJSCAD example|code=function main() {
    return CSG.cube({radius:[15,15,15]});
}
}}

Installation

  • <translate> [[<tvar name=2>Special:ExtensionDistributor/OpenJsCad/en</tvar>|Download]] and move the extracted <tvar name=name>OpenJsCad/en</tvar> folder to your <tvar name=ext>extensions/</tvar> directory.</translate>
    <translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate>cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/OpenJsCad%2Fen
  • <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
    wfLoadExtension( 'OpenJsCad/en' );
    
  • OpenJsCad is best used with a template that hides the ‎<jscad> tag

Here is an example:

<includeonly>
= {{{title|}}} =
{{#tag:jscad|{{{code|}}}}}
= Source code =
{{#tag:source|{{{code|}}}|lang=javascript}}
[[Category:OpenJSCAD]]
</includeonly>