Mercurial > games > semicongine
comparison examples/E04_input.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 |
---|---|
113 "color": Vec4F32, | 113 "color": Vec4F32, |
114 }.toTable) | 114 }.toTable) |
115 cursormesh = newMesh( | 115 cursormesh = newMesh( |
116 positions = positions, | 116 positions = positions, |
117 colors = arrow_colors, | 117 colors = arrow_colors, |
118 material = matDef.initMaterialData(), | 118 material = matDef.InitMaterialData(), |
119 ) | 119 ) |
120 keyboardmesh = newMesh( | 120 keyboardmesh = newMesh( |
121 positions = keyvertexpos, | 121 positions = keyvertexpos, |
122 colors = keyvertexcolor, | 122 colors = keyvertexcolor, |
123 indices = keymeshindices, | 123 indices = keymeshindices, |
124 material = matDef.initMaterialData(), | 124 material = matDef.InitMaterialData(), |
125 ) | 125 ) |
126 backgroundmesh = newMesh( | 126 backgroundmesh = newMesh( |
127 positions = @[ | 127 positions = @[ |
128 NewVec3f(0'f32, 0'f32), | 128 NewVec3f(0'f32, 0'f32), |
129 NewVec3f(1'f32, 0'f32), | 129 NewVec3f(1'f32, 0'f32), |
135 backgroundColor, | 135 backgroundColor, |
136 backgroundColor, | 136 backgroundColor, |
137 backgroundColor, | 137 backgroundColor, |
138 ], | 138 ], |
139 indices = @[[0'u16, 1'u16, 2'u16], [2'u16, 3'u16, 0'u16]], | 139 indices = @[[0'u16, 1'u16, 2'u16], [2'u16, 3'u16, 0'u16]], |
140 material = matDef.initMaterialData(), | 140 material = matDef.InitMaterialData(), |
141 ) | 141 ) |
142 | 142 |
143 # define mesh objects | 143 # define mesh objects |
144 var keyboard_center = translate( | 144 var keyboard_center = translate( |
145 -float32(rowWidth) / 2'f32, | 145 -float32(rowWidth) / 2'f32, |