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
|
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick3D
import QtQuick3D.Helpers
Node {
InstanceRepeater {
instancingTable: RandomInstancing {
instanceCount: 61 // '@'..'~'
position: InstanceRange {
from: Qt.vector3d(-50, 75, -50)
to: Qt.vector3d(150, 175, 50)
}
rotation: InstanceRange {
from: Qt.vector3d(0, 0, 0)
to: Qt.vector3d(360, 360, 360)
}
gridSpacing: Qt.vector3d(8, 8, 8)
}
Model {
geometry: ExtrudedTextGeometry {
text: String.fromCharCode(64 + index)
scale: 25
depth: 3
font.pointSize: 72
}
materials: PrincipledMaterial {
baseColor: Qt.hsva(Math.random(), 0.5, 1.0, 1.0)
roughness: 0.2
metalness: 1
}
pickable: true
}
}
Model {
source: "#Sphere"
materials: PrincipledMaterial {
baseColor: "orange"
metalness: 1.0
roughness: 0.1
}
position: Qt.vector3d(0, 125, -75)
scale: "0.1, 0.2, 0.3"
pickable: true
}
Model {
id: floor
source: "#Rectangle"
eulerRotation.x: -90
scale: Qt.vector3d(5,5,5)
materials: [ PrincipledMaterial {
baseColor: "green"
}
]
}
}
|