comparison tests/test_materials.nim @ 302:da0bd61abe91

did: change API for ECS
author Sam <sam@basx.dev>
date Tue, 27 Jun 2023 00:17:40 +0700
parents bfcb41211c5b
children 4921ec86dcb4
comparison
equal deleted inserted replaced
301:bf5982802e2c 302:da0bd61abe91
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,