blob: 96f223973ccc21443b756460f070f1e18b84cfd5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
import QtQuick3D.Helpers
Node {
id: root
property SceneEnvironment qmlxr_environment: SceneEnvironment {
backgroundMode: SceneEnvironment.SkyBoxCubeMap
clearColor: "pink" // Just to verify that the skybox covers everything
lightProbe: skyTexture
skyBoxCubeMap: skyboxTexture
}
CubeMapTexture {
id: skyboxTexture
source: "maps/skybox/right.jpg;maps/skybox/left.jpg;maps/skybox/top.jpg;maps/skybox/bottom.jpg;maps/skybox/front.jpg;maps/skybox/back.jpg"
}
Texture {
id: skyTexture
textureData: ProceduralSkyTextureData {
id: proceduralSkyTextureData
groundBottomColor: "#775533"
groundHorizonColor: "green"
groundCurve: 0.11
skyTopColor: "#ddeeff"
skyHorizonColor: "#aaaaff"
skyCurve: 0.15
}
}
DirectionalLight {
}
Model {
source: "#Rectangle"
scale: "5, 5, 5"
materials: PrincipledMaterial { baseColor: "darkgray" }
eulerRotation.x: -90
y: -150
}
Repeater3D {
model: 4
Node {
eulerRotation.y: 45 + 90 * index
Model {
source: "#Cube"
materials: PrincipledMaterial {
baseColor: "#ffcc77"
metalness: 1
roughness: 0.3
}
z: 250
scale: Qt.vector3d(0.5, 0.5, 0.5)
NumberAnimation on eulerRotation.y {
duration: 10000
from: 0
to: 360
running: true
loops: -1
}
}
}
}
Node {
z: -200
Text {
text: "Qt 6 in VR"
font.pointSize: 12
color: "white"
x: - width / 2 // align center
}
}
}
|