Quellcode durchsuchen

Make restitution an option

Change-Id: If4c56d20a56e33a7e0af631fc4f361d4311eb662
Donald Carr vor 9 Jahren
Ursprung
Commit
22d0633974
2 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen
  1. 1 1
      qml/ArtDelegate.qml
  2. 2 0
      qml/main.qml

+ 1 - 1
qml/ArtDelegate.qml

@@ -13,7 +13,7 @@ ImageBoxBody {
 
     density: 1.0
     friction: 0
-    restitution: 0.1
+    restitution: settings.restitution
 
     fixedRotation: parent.fixedRotation
     bodyType: Body.Dynamic

+ 2 - 0
qml/main.qml

@@ -18,6 +18,8 @@ Window {
         property double pace: 1.0
         property bool viewItemCount: false
         property bool globalWorld: false
+        // Very computationally heavy: 40% vs 20% for 0.1 vs 0
+        property double restitution: 0.1
     }
 
     Rectangle {