tuval-lang

Tuval Markup Language for layer hierarchy and shape construction.

Usage no npm install needed!

<script type="module">
  import tuvalLang from 'https://cdn.skypack.dev/tuval-lang';
</script>

README

Tuval Markup Language

Tuval Markup Language for layer hierarchy and shape construction.

Build it with typescript

import Tuval from "tuval-lang";

Tuval.ReadFile("/main.tvm").then((tuval) => {
  tuval.render();
});

// Or with async await

let tuval = await Tuval.ReadFile("/main.tvm");
tuval.render();

// Or with input string

let tuval = new Tuval(input, "sudo-file-name.tvm");
tuval.render();

Basic Usage

Creates a layer called background and annotates a simple rectangle at coordinates 0 to 0 with the size of 30 pixels and blue color.

Layer Background [
    Rectangle {
        w: 30,
        h: 30,
        x: 10,
        y: 10,
        color: "blue"
    }
]