|
|
implementing the current prototype/version of the node timer / time graph has introduced a new drawing library, which will let the user compile _shader geometry_ into a `canvas` . It takes care of some of the tedious stuff behind the scene. Essentially it has a a few shapes that can be drawn at given coordinates with given colours.
|
|
|
|
|
|
```
|
|
|
from sverchok.utils.modules.shader_utils import ShaderLib2D
|
|
|
|
|
|
|
|
|
canvas = ShaderLib2D()
|
|
|
canvas.add_rect(x, y, w, h, (1.0, 1.0, 1.0))
|
|
|
...
|
|
|
geom = canvas.compile()
|
|
|
verts = geom.verts
|
|
|
tris = geom.tris
|
|
|
``` |
|
|
\ Нет новой строки в конце файла |