Skip to content
Snippets Groups Projects
Commit 9a9d4d3c authored by Yuya Nishihara's avatar Yuya Nishihara
Browse files

add two more texture examples

parent 6611cc36
No related branches found
No related tags found
No related merge requests found
......@@ -139,6 +139,52 @@ Window {
}
}
Model {
position: Qt.vector3d(0, -120, 0)
source: "#Rectangle"
materials: DefaultMaterial {
lighting: DefaultMaterial.NoLighting
diffuseMap: Texture {
sourceItem: Rectangle {
width: 100
height: 100
color: redButton.checked ? "red" : "lightcyan"
layer.enabled: true
Text {
anchors.centerIn: parent
text: root.tick
}
}
}
}
}
Model {
position: Qt.vector3d(120, -120, 0)
source: "#Rectangle"
materials: DefaultMaterial {
lighting: DefaultMaterial.NoLighting
diffuseMap: Texture {
sourceItem: ShaderEffectSource {
width: 100
height: 100
sourceItem: Rectangle {
width: 100
height: 100
color: redButton.checked ? "red" : "lightblue"
layer.enabled: true
Text {
anchors.centerIn: parent
text: root.tick
}
}
}
}
}
}
Model {
position: Qt.vector3d(0, 0, 10)
scale: Qt.vector3d(0.2, 0.2, 0.2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment