comparison examples/E10_pong.nim @ 624:3f13de7d8ec4

fix: API change for shader attributes
author Sam <sam@basx.dev>
date Sat, 29 Apr 2023 18:29:19 +0700
parents f7e7af33e9ee
children 7a0ca5c01095
comparison
equal deleted inserted replaced
623:fd7e5761457c 624:3f13de7d8ec4
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)