Mercurial > games > semicongine
diff examples/E01_hello_triangle.nim @ 302:da0bd61abe91
did: change API for ECS
author | Sam <sam@basx.dev> |
---|---|
date | Tue, 27 Jun 2023 00:17:40 +0700 |
parents | b17df28712d6 |
children | b145a05c2459 |
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)