2022-06-08 12:47:24 +00:00
|
|
|
// Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
|
2024-02-23 14:41:04 +00:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
|
2015-07-24 13:35:44 +00:00
|
|
|
|
2015-10-15 14:05:37 +00:00
|
|
|
import Qt3D.Core 2.0
|
2015-10-18 08:58:19 +00:00
|
|
|
import Qt3D.Render 2.0
|
2015-07-24 13:35:44 +00:00
|
|
|
import Qt3D.Input 2.0
|
|
|
|
import QtQuick 2.3 as QQ2
|
2016-04-11 12:58:17 +00:00
|
|
|
import Qt3D.Extras 2.0
|
2015-07-24 13:35:44 +00:00
|
|
|
|
|
|
|
Entity {
|
|
|
|
id: root
|
2015-11-07 19:02:14 +00:00
|
|
|
property alias position: transform.translation
|
2015-07-24 13:35:44 +00:00
|
|
|
property alias color: material.diffuse
|
|
|
|
property alias input: input
|
|
|
|
|
|
|
|
PhongMaterial { id: material }
|
|
|
|
|
2020-07-30 11:03:46 +00:00
|
|
|
SphereMesh { id: sphereMesh }
|
2015-07-24 13:35:44 +00:00
|
|
|
|
|
|
|
Transform {
|
|
|
|
id: transform
|
2015-11-07 19:02:14 +00:00
|
|
|
scale: root.input.focus ? 2 : 1
|
2015-07-24 13:35:44 +00:00
|
|
|
|
2015-11-07 19:02:14 +00:00
|
|
|
QQ2.Behavior on scale {
|
|
|
|
QQ2.NumberAnimation {
|
|
|
|
duration: 250
|
2015-07-24 13:35:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-03-04 21:20:37 +00:00
|
|
|
KeyboardHandler { id: input }
|
2015-07-24 13:35:44 +00:00
|
|
|
|
|
|
|
components: [material, sphereMesh, transform, input]
|
|
|
|
}
|