2021-07-16 15:34:12 +03:00
|
|
|
//#
|
|
|
|
//# Copyright (C) 2021-2021 QuasarApp.
|
|
|
|
//# Distributed under the GPLv3 software license, see the accompanying
|
|
|
|
//# Everyone is permitted to copy and distribute verbatim copies
|
|
|
|
//# of this license document, but changing it is not allowed.
|
|
|
|
//#
|
|
|
|
|
2021-07-20 15:05:19 +03:00
|
|
|
import QtQuick
|
|
|
|
import QtQuick3D
|
2021-07-16 15:34:12 +03:00
|
|
|
|
|
|
|
Node {
|
|
|
|
id: graphicItem
|
|
|
|
|
|
|
|
property var model: null
|
|
|
|
property int guiId: (model) ? model.guiId : -1;
|
|
|
|
|
2021-07-18 18:28:51 +03:00
|
|
|
PointLight {
|
2021-07-16 15:34:12 +03:00
|
|
|
id : sun
|
|
|
|
|
2021-07-18 19:35:57 +03:00
|
|
|
brightness: (model)? model.lightForce * model.visible: 100
|
2021-07-16 15:34:12 +03:00
|
|
|
color: (model)? model.color: "#ffffff"
|
|
|
|
castsShadow: (model)? model.castsShadow: 0
|
|
|
|
shadowFactor: (model)? model.shadowFactor: 0
|
|
|
|
shadowFilter: (model)? model.shadowFilter: 0
|
|
|
|
shadowMapFar: (model)? model.shadowMapFar: 0
|
|
|
|
shadowBias: (model)? model.shadowBias: 0
|
2021-07-18 18:28:51 +03:00
|
|
|
shadowMapQuality: Light.ShadowMapQualityHigh
|
|
|
|
|
2021-07-18 19:35:57 +03:00
|
|
|
Behavior on brightness {
|
|
|
|
NumberAnimation {
|
|
|
|
duration: 5000
|
2021-07-16 15:34:12 +03:00
|
|
|
|
2021-07-18 19:35:57 +03:00
|
|
|
}
|
|
|
|
}
|
2021-07-16 15:34:12 +03:00
|
|
|
}
|
|
|
|
|
2021-07-30 13:19:19 +03:00
|
|
|
rotation: (model)? model.rotation: Qt.quaternion(0, 0, 0, 0)
|
2021-07-16 15:34:12 +03:00
|
|
|
scale: (model)? model.size: Qt.vector3d(0, 0, 0);
|
2021-07-18 11:50:45 +03:00
|
|
|
position: (model) ? model.position: Qt.vector3d(0,0,0);
|
2021-07-18 19:35:57 +03:00
|
|
|
visible: sun.brightness
|
2021-07-16 15:34:12 +03:00
|
|
|
|
|
|
|
}
|