12345678910111213141516171819202122232425262728293031323334 |
- import QtQuick 2.0
- Item {
- id: root
-
- property real lightPosX: priv.lPosX + lightTranslateX
- property real lightPosY: priv.lPosY + lightTranslateY
-
- property real lightTranslateX: 0
- property real lightTranslateY: 0
-
- property real lightIntensity: 0.4;
-
- function setLightPos(xpos, ypos) {
- priv.lPosX = Math.min(root.width, Math.max(0, xpos));
- priv.lPosY = Math.min(root.height, Math.max(0, ypos));
- }
-
- anchors.fill: parent
- Item {
- id: priv
- property real lPosX: root.width/2;
- property real lPosY: root.height/2;
- }
- }
|