Mercurial > games > semicongine
comparison examples/E10_pong.nim @ 164:7a0ca5c01095
fix: buffer update with staging buffer not correctly working
author | Sam <sam@basx.dev> |
---|---|
date | Sat, 29 Apr 2023 05:40:11 -0700 |
parents | 25d97fa0ad5c |
children | 0644308904da |
comparison
equal
deleted
inserted
replaced
163:25d97fa0ad5c | 164:7a0ca5c01095 |
---|---|
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) |