1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
<html>
<head>
<link rel="stylesheet" type="text/css" href="../../distrib/jsxgraph.css" />
<script src="cpp.js"></script>
<script src="../../distrib/jsxgraphcore.js"></script>
</head>
<body>
<div id="box" class="jxgbox" style="width:700px; height:500px;"></div>
<script>
Module.onRuntimeInitialized = () => {
console.log('runtime initialized, running');
let board = JXG.JSXGraph.initBoard('box', {boundingbox: [-4, 4, 4, -4], axis: true});
let f = board.create('functiongraph', [t => Module.fun(t)]);
}
</script>
</body>
</html>
|