blob: 8ca2ea8dfb9f16d8aa2bfa8258ab6b245597ba85 (
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
|
// 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
import Example 1.0
Node {
property alias text: textItem.text
property alias position: geometry.position
property alias normal: geometry.normal
property alias texcoord0: geometry.texcoord0
property alias texcoord1: geometry.texcoord1
property alias tangent: geometry.tangent
property alias binormal: geometry.binormal
property alias color: geometry.color
PrincipledMaterial {
id: material
baseColor: "white"
emissiveFactor: Qt.vector3d(1.0, 0.0, 0.0)
baseColorMap: Texture {
source: "maps/basemetal_small.png"
}
normalMap: Texture {
source: "maps/normalrough_small.png"
}
metalnessMap: Texture {
source: "maps/basemetal_small.png"
}
metalnessChannel: Material.A
roughnessMap: Texture {
source: "maps/normalrough_small.png"
}
roughnessChannel: Material.A
specularAmount: 0.5
roughness: 0.1
metalness: 0.1
}
Node {
y: 100
x: -100
z: -300
Model {
scale: Qt.vector3d(2, 2, 2)
eulerRotation.x: 90
geometry: TestGeometry {
id: geometry
}
materials: [
material
]
}
Text {
id: textItem
x: 50
y: -50
text: "Position Only"
}
}
}
|