diff options
Diffstat (limited to 'tests/manual/compute-particles/main.qml')
-rw-r--r-- | tests/manual/compute-particles/main.qml | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/tests/manual/compute-particles/main.qml b/tests/manual/compute-particles/main.qml new file mode 100644 index 000000000..380b54ed3 --- /dev/null +++ b/tests/manual/compute-particles/main.qml @@ -0,0 +1,100 @@ +// Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB). +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +import QtQuick 2.0 +import QtQuick.Scene3D 2.0 +import QtQuick.Controls 2.0 +import QtQuick.Layouts 1.1 + +Item { + + Scene3D { + anchors.fill: parent + aspects: "input" + ParticlesScene { + id: scene + particleStep: stepSlider.value + finalCollisionFactor: collisionSlider.value + } + } + + ColumnLayout { + id: colorLayout + anchors.left: parent.left + anchors.leftMargin: 35 + anchors.right: parent.right + anchors.rightMargin: 35 + anchors.bottom: parent.bottom + anchors.bottomMargin: 35 + spacing: 15 + + RowLayout { + Text { + text: "Particles Step:" + color: "white" + } + Slider { + height: 35 + id: stepSlider + Layout.fillWidth: true + from: 0.0 + to: 2 + value: 0.4 + } + } + RowLayout { + Text { + text: "Particles Collision:" + color: "white" + } + Slider { + height: 35 + id: collisionSlider + Layout.fillWidth: true + from: 0.0 + to: 2 + value: 0.2 + } + } + RowLayout { + Button { + text: "Reset Particles" + onClicked: scene.reset() + } + } + RowLayout { + Text { + text: "Particles Shape:" + color: "white" + } + ButtonGroup { + exclusive: true + id: particlesTypeGroup + } + CheckBox { + text: "Sphere" + checked: true + ButtonGroup.group: particlesTypeGroup + onClicked: scene.particlesShape = scene._SPHERE + } + CheckBox + { text: "Cube" + checked: false + ButtonGroup.group: particlesTypeGroup + onClicked: scene.particlesShape = scene._CUBE + } + CheckBox { + text: "Cylinder" + checked: false + ButtonGroup.group: particlesTypeGroup + onClicked: scene.particlesShape = scene._CYLINDER + } + CheckBox { + text: "Torus" + checked: false + ButtonGroup.group: particlesTypeGroup + onClicked: scene.particlesShape = scene._TORUS + } + } + } +} |