Interactive JessieScript: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
 
Line 30: Line 30:


==The JavaScript code==
==The JavaScript code==
JessieScript is not longer actively delevoped. Instead, the focus is on the programming language
[https://github.com/jsxgraph/JessieCode JessieCode].
As a consequence, JessieScript is not contained in jsxgraphcore.js anymore. If you want to use JessieScript, you have to load the file jessiescript.js from the JSXGraph sources or the file
https://jsxgraph.org/distrib/JessieScript.js after loading jsxgraphcore.js
<source lang="javascript">
<source lang="javascript">
var board, construction = [];
var board, construction = [];

Latest revision as of 13:57, 4 January 2021



Available commands

See our documentation page for a list of commands.

The JavaScript code

JessieScript is not longer actively delevoped. Instead, the focus is on the programming language JessieCode. As a consequence, JessieScript is not contained in jsxgraphcore.js anymore. If you want to use JessieScript, you have to load the file jessiescript.js from the JSXGraph sources or the file https://jsxgraph.org/distrib/JessieScript.js after loading jsxgraphcore.js

var board, construction = [];
board = JXG.JSXGraph.initBoard('box', {grid:true, boundingbox:[-1,6,11,-3], keepaspectratio:true, axis:true});

function construct() {
    var t = document.getElementById('input').value;
    board.suspendUpdate();
    construction.push(board.construct(t));
    board.unsuspendUpdate();
}

function clearAll() {
    JXG.JSXGraph.freeBoard(board);
    board = JXG.JSXGraph.initBoard('box', {grid:true, boundingbox:[-1,6,11,-3], keepaspectratio:true, axis:true});
}