diff options
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/test_3d_render.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/tests/test_3d_render.cc b/src/tests/test_3d_render.cc index 4c84c7c..d4d3525 100644 --- a/src/tests/test_3d_render.cc +++ b/src/tests/test_3d_render.cc @@ -239,8 +239,15 @@ int main(int argc, char** argv) { g_camera.aspect_ratio = platform_get_aspect_ratio(&platform_state); for (size_t i = 1; i < g_scene.objects.size(); ++i) { - g_scene.objects[i].rotation = - quat::from_axis(vec3(0, 1, 0), time * 2.0f + i); + // Rotation around a random-ish 3D axis + vec3 axis = + vec3(std::sin((float)i), std::cos((float)i), 0.5f).normalize(); + g_scene.objects[i].rotation = quat::from_axis(axis, time * 2.0f + i); + + // Non-uniform scaling variance + float s = 0.5f + 0.1f * std::sin(time * 0.5f + i); + g_scene.objects[i].scale = vec3(s, s * 1.4f, s * 0.8f); + g_scene.objects[i].position.y = std::sin(time * 3.0f + i) * 1.5f; } |
