Ja)Blackvas (EN /
Blackvas is a declarative UI framework for building Canvas (an HTML5 API).
Styling is implemented with reference to CSS properties, allowing you to call primary colors, Japanese colors, and more without using color code.
Using the included Blackvas CLI, you don't need to know anything specific to Nimble** to start a project.
A Shape is a way to combine shapes, text and other objects into a single form.
shapes: shape MyShape: rect(100, 100, 40, 40)
A shape statement must be used in a shape statement because shapes does the work for shapes defined in the shape**.
MyShape is treated as the name of this shape.
The shape statement is just a statement that defines a shape and can't be reflected in a web page.
View is a way to reflect your shapes on your HTML pages.
After defining the shape statement, you can call it as a procedure to reflect it on the page.
Style is a mechanism for defining a style element.
style: id myId: color = Primary.red
Id is assigned for each shape to be drawn on the view.
view: MyShape: id = "myId"
The id can be given when applying a shape in the view.
Data is a mechanism for defining variables, but it does not currently implement any special features such as scopes, and will be exposed globally.
Methods is a mechanism for defining procedures.
Here, we show that the id is changed by a click event.
methods: proc changeId(): (string, string) = if rand(1) >= 0.5: result = ("id", "id1") else: result = ("id", "id2") view: MyShape: @click = changeId