comparison examples/E10_pong.nim @ 1139:114f395b9144

did: finish refactoring and updated all tests accordingly
author sam <sam@basx.dev>
date Sat, 08 Jun 2024 14:58:25 +0700
parents 71315636ba82
children 5934c5615f13
comparison
equal deleted inserted replaced
1138:02e1d2658ff5 1139:114f395b9144
21 21
22 when isMainModule: 22 when isMainModule:
23 var myengine = initEngine("Pong") 23 var myengine = initEngine("Pong")
24 24
25 var player = rect(color = barcolor, width = barWidth, height = barSize) 25 var player = rect(color = barcolor, width = barWidth, height = barSize)
26 player.material = matDef.initMaterialData(name = "player material") 26 player.material = matDef.InitMaterialData(name = "player material")
27 var ball = circle(color = ballcolor) 27 var ball = circle(color = ballcolor)
28 ball.material = matDef.initMaterialData(name = "player material") 28 ball.material = matDef.InitMaterialData(name = "player material")
29 level = Scene(name: "scene", meshes: @[ball, player]) 29 level = Scene(name: "scene", meshes: @[ball, player])
30 30
31 const 31 const
32 shaderConfiguration = createShaderConfiguration( 32 shaderConfiguration = createShaderConfiguration(
33 name = "default shader", 33 name = "default shader",