Mercurial > games > semicongine
comparison tests/test_materials.nim @ 763:a4c757f5d17f
did: change API for ECS
author | Sam <sam@basx.dev> |
---|---|
date | Tue, 27 Jun 2023 00:17:40 +0700 |
parents | 07c755e65a4a |
children | 4921ec86dcb4 |
comparison
equal
deleted
inserted
replaced
762:4f991bc3613a | 763:a4c757f5d17f |
---|---|
2 import std/tables | 2 import std/tables |
3 | 3 |
4 import semicongine | 4 import semicongine |
5 | 5 |
6 proc main() = | 6 proc main() = |
7 var scene = newScene("main", root=newEntity("rect", rect())) | 7 var scene = newScene("main", root=newEntity("rect", {"mesh": Component(rect())})) |
8 let (RT, WT, PT) = (hexToColorAlpha("A51931").asPixel, hexToColorAlpha("F4F5F8").asPixel, hexToColorAlpha("2D2A4A").asPixel) | 8 let (RT, WT, PT) = (hexToColorAlpha("A51931").asPixel, hexToColorAlpha("F4F5F8").asPixel, hexToColorAlpha("2D2A4A").asPixel) |
9 let | 9 let |
10 # image from memory | 10 # image from memory |
11 t1 = Image(width: 7, height: 5, imagedata: @[ | 11 t1 = Image(width: 7, height: 5, imagedata: @[ |
12 RT, RT, RT, RT, RT, RT, RT, | 12 RT, RT, RT, RT, RT, RT, RT, |