Mercurial > games > semicongine
comparison examples/E10_pong.nim @ 163:25d97fa0ad5c
fix: API change for shader attributes
author | Sam <sam@basx.dev> |
---|---|
date | Sat, 29 Apr 2023 18:29:19 +0700 |
parents | 134647ed5b60 |
children | 7a0ca5c01095 |
comparison
equal
deleted
inserted
replaced
162:68947a8ee127 | 163:25d97fa0ad5c |
---|---|
19 when isMainModule: | 19 when isMainModule: |
20 var myengine = initEngine("Pong") | 20 var myengine = initEngine("Pong") |
21 level = newEntity("Level") | 21 level = newEntity("Level") |
22 var playerbarmesh = rect(color=barcolor) | 22 var playerbarmesh = rect(color=barcolor) |
23 var playerbar = newEntity("playerbar", playerbarmesh) | 23 var playerbar = newEntity("playerbar", playerbarmesh) |
24 playerbar.transform = scale3d(barWidth, barSize, 1'f) * translate3d(0.5'f, 0'f, 0'f) | 24 # playerbar.transform = scale3d(barWidth, barSize, 1'f) * translate3d(0.5'f, 0'f, 0'f) |
25 var player = newEntity("player", playerbar) | 25 var player = newEntity("player", playerbar) |
26 player.transform = translate3d(0'f, 0.3'f, 0'f) | 26 player.transform = translate3d(0'f, 0.3'f, 0'f) |
27 level.add player | 27 level.add player |
28 | 28 |
29 var ballmesh = circle(color=ballcolor) | 29 var ballmesh = circle(color=ballcolor) |