Mercurial > games > semicongine
diff examples/E01_hello_triangle.nim @ 763:a4c757f5d17f
did: change API for ECS
author | Sam <sam@basx.dev> |
---|---|
date | Tue, 27 Jun 2023 00:17:40 +0700 |
parents | 5cd6808150fc |
children | 754835bf175e |
line wrap: on
line diff
--- a/examples/E01_hello_triangle.nim Tue Jun 27 00:01:36 2023 +0700 +++ b/examples/E01_hello_triangle.nim Tue Jun 27 00:17:40 2023 +0700 @@ -27,10 +27,10 @@ var triangle = newScene("scene", newEntity( "triangle", - newMesh( + {"mesh": Component(newMesh( [newVec3f(-0.5, 0.5), newVec3f(0, -0.5), newVec3f(0.5, 0.5)], [newVec4f(1, 0, 0, 1), newVec4f(0, 1, 0, 1), newVec4f(0, 0, 1, 1)], - ) + ))} )) myengine = initEngine("Hello triangle") renderPass = myengine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode)