Mercurial > games > semicongine
diff examples/E03_hello_cube.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/E03_hello_cube.nim Tue Jun 27 00:01:36 2023 +0700 +++ b/examples/E03_hello_cube.nim Tue Jun 27 00:17:40 2023 +0700 @@ -78,7 +78,7 @@ main="color = outcolor;" ) myengine.setRenderer(myengine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode)) - var cube = newScene("scene", newEntity("cube", newMesh(positions=cube_pos, indices=tris, colors=cube_color))) + var cube = newScene("scene", newEntity("cube", {"mesh": Component(newMesh(positions=cube_pos, indices=tris, colors=cube_color))})) cube.addShaderGlobal("projection", Unit4f32) cube.addShaderGlobal("view", Unit4f32) cube.addShaderGlobal("model", Unit4f32)