Mercurial > games > semicongine
comparison examples/E03_hello_cube.nim @ 606:f41c1b78cf5b
add: upgrade all simple examples to new engine version
author | Sam <sam@basx.dev> |
---|---|
date | Wed, 26 Apr 2023 02:15:43 +0700 |
parents | 0d8858aa0671 |
children | 3f13de7d8ec4 |
comparison
equal
deleted
inserted
replaced
605:510c651cb27d | 606:f41c1b78cf5b |
---|---|
85 cube.components.add view | 85 cube.components.add view |
86 cube.components.add model | 86 cube.components.add model |
87 myengine.addScene(cube, vertexInput) | 87 myengine.addScene(cube, vertexInput) |
88 | 88 |
89 var t: float32 = cpuTime() | 89 var t: float32 = cpuTime() |
90 while myengine.running and not myengine.keyWasPressed(Escape): | 90 while myengine.updateInputs() == Running and not myengine.keyWasPressed(Escape): |
91 myengine.updateInputs() | |
92 setValue[Mat4](model.value, translate3d(0'f32, 0'f32, 10'f32) * rotate3d(t, Yf32)) | 91 setValue[Mat4](model.value, translate3d(0'f32, 0'f32, 10'f32) * rotate3d(t, Yf32)) |
93 setValue[Mat4]( | 92 setValue[Mat4]( |
94 projection.value, | 93 projection.value, |
95 perspective( | 94 perspective( |
96 float32(PI / 4), | 95 float32(PI / 4), |