| 1 |
// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). |
| 2 |
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 |
|
| 4 |
import QtQuick 2.1 |
| 5 |
import Qt3D.Core 2.0 |
| 6 |
import Qt3D.Render 2.0 |
| 7 |
|
| 8 |
Material { |
| 9 |
id: root |
| 10 |
property color ambientColor: Qt.rgba(0.1, 0.1, 0.1, 1.0) |
| 11 |
property color diffuseColor: Qt.rgba(0.7, 0.7, 0.9, 1.0) |
| 12 |
property color specularColor: Qt.rgba(0.1, 0.1, 0.1, 1.0) |
| 13 |
property real shininess: 150.0 |
| 14 |
|
| 15 |
parameters: [ |
| 16 |
Parameter { name: "ka"; value: Qt.vector3d(root.ambientColor.r, root.ambientColor.g, root.ambientColor.b) }, |
| 17 |
Parameter { name: "kd"; value: Qt.vector3d(root.diffuseColor.r, root.diffuseColor.g, root.diffuseColor.b) }, |
| 18 |
Parameter { name: "ks"; value: Qt.vector3d(root.specularColor.r, root.specularColor.g, root.specularColor.b) }, |
| 19 |
Parameter { name: "shininess"; value: root.shininess } |
| 20 |
] |
| 21 |
} |