Mercurial > games > semicongine
comparison tests/test_mesh.nim @ 1136:71315636ba82
did: refactor naming in tons of places
author | sam <sam@basx.dev> |
---|---|
date | Tue, 04 Jun 2024 16:51:50 +0700 |
parents | 74957cbf589b |
children | a4aa9f374d44 |
comparison
equal
deleted
inserted
replaced
1135:74957cbf589b | 1136:71315636ba82 |
---|---|
80 | 80 |
81 let ratio = engine.GetWindow().size[0] / engine.GetWindow().size[1] | 81 let ratio = engine.GetWindow().size[0] / engine.GetWindow().size[1] |
82 size *= 1'f32 + MouseWheel() * 0.05 | 82 size *= 1'f32 + MouseWheel() * 0.05 |
83 azimut += MouseMove().x / 180'f32 | 83 azimut += MouseMove().x / 180'f32 |
84 elevation -= MouseMove().y / 180'f32 | 84 elevation -= MouseMove().y / 180'f32 |
85 scenes[currentScene].setShaderGlobal("projection", perspective(PI / 2, ratio, -0.5, 1)) | 85 scenes[currentScene].setShaderGlobal("projection", Perspective(PI / 2, ratio, -0.5, 1)) |
86 scenes[currentScene].setShaderGlobal( | 86 scenes[currentScene].setShaderGlobal( |
87 "view", | 87 "view", |
88 scale(size, size, size) * rotate(elevation, newVec3f(1, 0, 0)) * rotate(azimut, Yf32) | 88 Scale(size, size, size) * Rotate(elevation, NewVec3f(1, 0, 0)) * Rotate(azimut, Yf32) |
89 ) | 89 ) |
90 engine.renderScene(scenes[currentScene]) | 90 engine.renderScene(scenes[currentScene]) |
91 engine.destroy() | 91 engine.destroy() |
92 | 92 |
93 when isMainModule: | 93 when isMainModule: |