Mercurial > games > semicongine
comparison examples/E04_input.nim @ 146:253dd797e719
add: improvments and E10 (pong)
author | Sam <sam@basx.dev> |
---|---|
date | Thu, 27 Apr 2023 00:23:23 +0700 |
parents | a4e6e76128e6 |
children | 25d97fa0ad5c |
comparison
equal
deleted
inserted
replaced
145:a4e6e76128e6 | 146:253dd797e719 |
---|---|
133 backgroundColor, | 133 backgroundColor, |
134 ], | 134 ], |
135 indices= @[[0'u16, 1'u16, 2'u16], [2'u16, 3'u16, 0'u16]], | 135 indices= @[[0'u16, 1'u16, 2'u16], [2'u16, 3'u16, 0'u16]], |
136 ) | 136 ) |
137 | 137 |
138 backgroundmesh.setInstanceData("transform", @[Unit4f32]) | |
139 keyboardmesh.setInstanceData("transform", @[Unit4f32]) | |
140 cursormesh.setInstanceData("transform", @[Unit4f32]) | |
141 | |
142 # define mesh objects | 138 # define mesh objects |
143 scene = newEntity("scene") | 139 scene = newEntity("scene") |
144 scene.add newEntity("background", backgroundmesh) | 140 scene.add newEntity("background", backgroundmesh) |
145 let keyboard = newEntity("keyboard", keyboardmesh) | 141 let keyboard = newEntity("keyboard", keyboardmesh) |
146 keyboard.transform = translate3d( | 142 keyboard.transform = translate3d( |