Extension:OpenJsCad

From MediaWiki.org
Jump to navigation Jump to search
Other languages:
English • ‎français • ‎日本語
MediaWiki extensions manual
OOjs UI icon advanced.svg
OpenJsCad
Release status: experimental
Implementation Tag
Description Allows embedding of OpenJsCad Designs
Author(s) Wolfgang Fahl
Latest version 0.0.1 (2019-06-11)
Database changes No
License Apache
Download
Translate the OpenJsCad extension if it is available at translatewiki.net
Check usage and version matrix.
Issues Open tasks · Report a bug

Purpose[edit]

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

Usage[edit]

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

Installation[edit]

  • Download and place the file(s) in a directory called OpenJsCad in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/OpenJsCad/OpenJsCad.php";
    
  • 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>
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.