0.9.43 • Published 5 months ago

@geometryzen/eigenmathts v0.9.43

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

eigenmathts

Eigenmath in TypeScript with EcmaScript modules

version

npm downloads

GitHub license

PRs Welcome

eigenmathts is a Javascript program for evaluating Eigenmath scripts in a browser.

Scripts are read from document.getElementById("stdin").value

Results are written to document.getElementById("stdout").innerHTML

For a STEMCstudio example (click here to try)

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <base href="/">
    <title></title>
    <!-- link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/modern-css-reset/dist/reset.min.css" /-->
    <link rel="stylesheet" href="style.css">
</head>

<body>

    <textarea id="stdin" rows="24" cols="80" style="font-family:courier;font-size:1em" spellcheck="false"></textarea>

    <button id="btn-run">Run</button><br>

    <div id="stdout"></div>
</body>

</html>
import { run } from '@geometryzen/eigenmathts'

const stdin = document.getElementById("stdin") as HTMLTextAreaElement

stdin.value = [
    `f=sin(x)/x`,
    `f`,
    `yrange=(-1,1)`,
    `draw(f,x)`
].join('\n').trim()

const btnRun = document.getElementById("btn-run") as HTMLElement

btnRun.onclick = run

window.onunload = function() {
    // Write your application cleanup code here.
}

// Used to ensure that this file is treated as a module.
export { }
0.9.43

5 months ago

0.9.34

5 months ago

0.9.35

5 months ago

0.9.36

5 months ago

0.9.37

5 months ago

0.9.30

5 months ago

0.9.31

5 months ago

0.9.32

5 months ago

0.9.33

5 months ago

0.9.38

5 months ago

0.9.39

5 months ago

0.9.41

5 months ago

0.9.42

5 months ago

0.9.40

5 months ago

0.9.14

5 months ago

0.9.15

5 months ago

0.9.16

5 months ago

0.9.17

5 months ago

0.9.18

5 months ago

0.9.19

5 months ago

0.9.23

5 months ago

0.9.24

5 months ago

0.9.25

5 months ago

0.9.26

5 months ago

0.9.20

5 months ago

0.9.21

5 months ago

0.9.22

5 months ago

0.9.27

5 months ago

0.9.28

5 months ago

0.9.29

5 months ago

0.9.12

5 months ago

0.9.13

5 months ago

0.9.10

5 months ago

0.9.11

5 months ago

0.9.9

5 months ago

0.9.8

5 months ago

0.9.7

5 months ago

0.9.6

5 months ago