Difference between revisions of "Template:Jscad"

From BITPlan Wiki
Jump to navigation Jump to search
(Undo revision 9244 by Wf (talk))
Line 59: Line 59:
 
<h1>{{{title|}}}</h1>
 
<h1>{{{title|}}}</h1>
 
<div id="jscadviewer"></div>
 
<div id="jscadviewer"></div>
<h2>Playground</h2>
+
<textarea id='jscadcode'style="display:none;">{{{code|}}}</textarea>
You can try out modifications of the source code right here.
 
<textarea id='jscadcode' style="height: 500px">{{{code|}}}</textarea>
 
<input type="submit" value="Update" onclick="updateSolid(); return false;">
 
 
<script>
 
<script>
 
   // call javascript in middle of page
 
   // call javascript in middle of page

Revision as of 16:31, 16 June 2019

Usage

{{jscad|title=OpenJSCAD example|code=function main() {
    return CSG.cube();
}
}}

Example

OpenJSCAD example

Source code

function main() {
    return CSG.cube();
}