#include "akamaru.h"
-const double elasticity = 0.5;
+const double elasticity = 0.7;
const double friction = 4;
const double gravity = 50;
model_accumulate_forces (model);
model_integrate (model, delta_t);
- for (i = 0; i < 2; i++)
+ for (i = 0; i < 20; i++)
model_constrain (model);
model->theta += delta_t;
for (i = 0; i < closure->num_icons; i++) {
gdk_window_move (closure->windows[i],
- closure->model.objects[i + 1].position.x + 0.5,
- closure->model.objects[i + 1].position.y + 0.5);
+ closure->model.objects[i + 1].position.x,
+ closure->model.objects[i + 1].position.y);
}
model_step (&closure->model, 0.1);
attributes.y = y;
attributes.width = width;
attributes.height = height;
- attributes.event_mask |=
+ attributes.event_mask =
GDK_EXPOSURE_MASK |
GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK |
GDK_ENTER_NOTIFY_MASK |
GDK_LEAVE_NOTIFY_MASK |
+ GDK_POINTER_MOTION_MASK |
GDK_POINTER_MOTION_HINT_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
spacer = model->spacers;
for (i = 1; i < num_objects; i++, object++) {
- object_init (&model->objects[i], 200 + i * spacing / 2, 300, 1);
+ object_init (&model->objects[i], 200 + i * spacing / 2, 300, 3);
spring_init (spring++, &model->objects[0], object, spacing);
for (j = 1; j < num_objects - i; j++) {
spacer_init (spacer++, object, object + j, spacing);