summaryrefslogtreecommitdiffstats
path: root/examples/qt3d
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-12-06 14:21:50 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-12-07 08:04:18 +0000
commite4693d6f661e41d76d615ff48d5b06630ca3413a (patch)
treeaae568c67b5854aaa8bc828349520f242980bfa2 /examples/qt3d
parent99779070942cf6ff34f7c558fbd256696a993e5d (diff)
Add a directional light to the example
Change-Id: Iecf4d0fcb42e41e486d8cd6bf943c09878c7bbb2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples/qt3d')
-rw-r--r--examples/qt3d/lights/main.qml13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/qt3d/lights/main.qml b/examples/qt3d/lights/main.qml
index 7423eeea0..0d9e953a4 100644
--- a/examples/qt3d/lights/main.qml
+++ b/examples/qt3d/lights/main.qml
@@ -64,6 +64,18 @@ Entity
}
Entity {
+ id: sun
+ components: [
+ DirectionalLight {
+ color: Qt.rgba(0.9, 0.9, 0.0, 1.0)
+ direction: Qt.vector3d(-1, -1, 0)
+ intensity: 0.5
+ }
+ ]
+ }
+
+ Entity {
+ id: redLight
components: [
SphereMesh {
radius: 2
@@ -83,6 +95,7 @@ Entity
}
Entity {
+ id: greenLight
components: [
SphereMesh {
radius: 2