comparison tests/test_mesh.nim @ 763:a4c757f5d17f

did: change API for ECS
author Sam <sam@basx.dev>
date Tue, 27 Jun 2023 00:17:40 +0700
parents 88ab3e6dcaa0
children b145a05c2459
comparison
equal deleted inserted replaced
762:4f991bc3613a 763:a4c757f5d17f
1 import semicongine 1 import semicongine
2 2
3 proc main() = 3 proc main() =
4 var ent1 = newEntity("hoho", rect()) 4 var ent1 = newEntity("hoho", {"mesh": Component(rect())})
5 var ent2 = newEntity("hehe", ent1) 5 var ent2 = newEntity("hehe", [], ent1)
6 var myScene = newScene("hi", ent2) 6 var myScene = newScene("hi", ent2)
7 myScene.root.transform = translate3d(0.2'f32, 0'f32, 0'f32) 7 myScene.root.transform = translate3d(0.2'f32, 0'f32, 0'f32)
8 myScene.root.children[0].transform = translate3d(0'f32, 0.2'f32, 0'f32) 8 myScene.root.children[0].transform = translate3d(0'f32, 0.2'f32, 0'f32)
9 var scenes = [ 9 var scenes = [
10 # loadScene("default_cube.glb", "1"), 10 # loadScene("default_cube.glb", "1"),