- test_data[i].colour[0] = 90;
- test_data[i].colour[1] = 90;
- test_data[i].colour[2] = 90;
- test_data[i].colour[3] = 255;
+static
+void pointcloud_render( world_instance *world, camera *cam, m4x3f model ){
+ if( pointcloud.anim < k_pointcloud_anim_idle_any ){
+ f32 const k_transition = 0.6f;
+ f32 t = (vg.time - pointcloud.anim_start) / k_transition;
+
+ if( pointcloud.anim == k_pointcloud_anim_hiding ){
+ if( t > 1.0f ){
+ pointcloud.visibility = 0.0f;
+ pointcloud.anim = k_pointcloud_anim_idle_closed;
+ }
+ else pointcloud.visibility = 1.0f-t;
+ }
+ else if( pointcloud.anim == k_pointcloud_anim_opening ){
+ if( t > 1.0f ){
+ pointcloud.visibility = 1.0f;
+ pointcloud.anim = k_pointcloud_anim_idle_open;
+ }
+ else pointcloud.visibility = t;
+ }