Extension:OpenJsCad

From mediawiki.org
Jump to navigation Jump to search
Other languages:
English • ‎Türkçe • ‎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)
MediaWiki 1.36 Not formally tested
MediaWiki 1.34 Not formally tested
MediaWiki 1.32 Not formally tested
Database changes No
License Apache License 2.0
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.