port to egui (WIP)
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!-- Disable zooming: -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
@@ -8,34 +11,25 @@
|
||||
</head>
|
||||
<body>
|
||||
<noscript>Please enable Javascript, this page uses both WebAssembly and Javascript to run.</noscript>
|
||||
<script src="bootstrap.js"></script>
|
||||
<main>
|
||||
<h1>Integral Demonstration</h1>
|
||||
<div id="coord"></div>
|
||||
<canvas id="canvas" width="600" height="400"></canvas>
|
||||
<div id="status">Loading WebAssembly...</div>
|
||||
<div id="control">
|
||||
<label for="math_function">y=</label> <input type="string" id="math_function" value="x^2">
|
||||
<p></p>
|
||||
<label for="minX">MinX: </label> <input type="number" id="minX" value="-10">
|
||||
<p></p>
|
||||
<label for="maxX">MaxX: </label> <input type="number" id="maxX" value="10">
|
||||
<p></p>
|
||||
<label for="minY">MinY: </label> <input type="number" id="minY" value="-10">
|
||||
<p></p>
|
||||
<label for="maxY">MaxY: </label> <input type="number" id="maxY" value="10">
|
||||
<p></p>
|
||||
<label for="num_interval">Interval: </label> <input type="number" id="num_interval" value="100" min="0" step="1">
|
||||
<p></p>
|
||||
<label for="resolution">Number of Points </label> <input type="number" id="resolution" value="10000" min="0" step="1">
|
||||
<p></p>
|
||||
</div>
|
||||
<div id="area-msg">Area:</div>
|
||||
</main>
|
||||
|
||||
<canvas id="canvas"></canvas>
|
||||
|
||||
<script type="module">
|
||||
import init, { start } from '../pkg/integral_site.js';
|
||||
|
||||
async function run() {
|
||||
await init();
|
||||
|
||||
start("canvas");
|
||||
}
|
||||
run();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<h4><a href="https://github.com/Titaniumtown/meval-rs#supported-expressions">Supported Expressions</a></h4>
|
||||
|
||||
<!-- Todo: port this to egui -->
|
||||
<!-- <h4><a href="https://github.com/Titaniumtown/meval-rs#supported-expressions">Supported Expressions</a></h4>
|
||||
|
||||
|
||||
<h3 id="%3Ca%20href=%22https://github.com/Titaniumtown/integral_site%22%3EI&#8217;m%20Open%20Source!%3C/a%3E%20(and%20licensed%20under%20AGPLv3)"><a href="https://github.com/Titaniumtown/integral_site">I’m Open Source!</a> (and licensed under AGPLv3)</h3>
|
||||
<h3 id="%3Ca%20href=%22https://github.com/Titaniumtown/integral_site%22%3EI&#8217;m%20Open%20Source!%3C/a%3E%20(and%20licensed%20under%20AGPLv3)"><a href="https://github.com/Titaniumtown/integral_site">I’m Open Source!</a> (and licensed under AGPLv3)</h3> -->
|
||||
|
||||
Reference in New Issue
Block a user