Ver Fonte

Continue to tweak behavior

Change-Id: I1d44e4512137c29b68af85b7e89c0526a1d3f8c5
Donald Carr há 9 anos atrás
pai
commit
018227fda6
1 ficheiros alterados com 5 adições e 4 exclusões
  1. 5 4
      main.qml

+ 5 - 4
main.qml

@@ -20,12 +20,13 @@ Window {
             fillMode: Image.PreserveAspectFit
             height: implicitHeight/implicitWidth*width
             width: parent.width
-            density: 0
+            density: 0.01
+            friction: 1.0
             fixedRotation: true
             world: parent.physicsWorld
             bodyType: Body.Dynamic
             source: "file://" + imageModel.randomPicture()
-            restitution: 0.0
+            //restitution: 0.0
             SequentialAnimation {
                 id: destroyAnimation
                 ScriptAction { script: { picture.destroy(); } }
@@ -45,7 +46,7 @@ Window {
 
             property var pictureArray: []
             property var physicsWorld: World {
-                timeStep: 0.1
+                timeStep: 6.0/60.0
             }
 
             RectangleBoxBody {
@@ -66,7 +67,7 @@ Window {
                 repeat: true
                 interval: 1000*(root.interval > 60 ? 60*(root.interval-60) : root.interval)
                 onTriggered: {
-                    pictureArray.push(pictureComponent.createObject(column, { y: -500 }))
+                    pictureArray.push(pictureComponent.createObject(column, { y: -2000 }))
                     if (pictureArray.length > root.columnCount) {
                         pictureArray.shift().detonate()
                     }