comparison examples/E04_input.nim @ 607:64eb53f81cf6

add: improvments and E10 (pong)
author Sam <sam@basx.dev>
date Thu, 27 Apr 2023 00:23:23 +0700
parents f41c1b78cf5b
children 3f13de7d8ec4
comparison
equal deleted inserted replaced
606:f41c1b78cf5b 607:64eb53f81cf6
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(