aboutsummaryrefslogtreecommitdiffstats
path: root/tests/baseline/data/submeshes/onetomany.qml
blob: 34fec96f546620a90beb5b4a4528db5b0df11a7f (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
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

import QtQuick
import QtQuick3D

Rectangle {
    width: 400
    height: 400
    color: "lightgray"

    View3D {
        anchors.fill: parent
        camera: camera
        renderMode: View3D.Offscreen

        PerspectiveCamera {
            id: camera
            z: 10
        }

        // The top face of the cube gets its own material, the rest share the same one.
        Model {
            source: "../shared/models/distortedcube.mesh"
            scale: Qt.vector3d(3, 3, 3)
            materials: [ PrincipledMaterial {
                    metalness: 0
                    baseColor: "#FFFF0000"
                    cullMode: Material.NoCulling
                    lighting: PrincipledMaterial.NoLighting
                }, PrincipledMaterial {
                    metalness: 0
                    baseColor: "#FF00FF00"
                    cullMode: Material.NoCulling
                    lighting: PrincipledMaterial.NoLighting
                }  ]
       }
   }
}