forked from qt-creator/qt-creator
QmlDesigner: Add extended View3D component
The source template for this component uses ExtendedSceneEnvironment instead of regular SceneEnvironment. Task-number: QDS-11811 Change-Id: Id310f74b619d502e29d580b08c38e7bda70a4361 Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -45,6 +45,7 @@
|
|||||||
<file>source/textinputv2.qml</file>
|
<file>source/textinputv2.qml</file>
|
||||||
<file>source/component.qml</file>
|
<file>source/component.qml</file>
|
||||||
<file>source/component3d.qml</file>
|
<file>source/component3d.qml</file>
|
||||||
|
<file>source/extendedview3D_template.qml</file>
|
||||||
<file>images/column-positioner-icon.png</file>
|
<file>images/column-positioner-icon.png</file>
|
||||||
<file>images/column-positioner-icon-16px.png</file>
|
<file>images/column-positioner-icon-16px.png</file>
|
||||||
<file>images/default-icon.png</file>
|
<file>images/default-icon.png</file>
|
||||||
|
@@ -850,4 +850,19 @@ MetaInfo {
|
|||||||
Property { name: "loadPrefix"; type: "string"; value: "lightmaps"; }
|
Property { name: "loadPrefix"; type: "string"; value: "lightmaps"; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Type {
|
||||||
|
name: "QtQuick3D.View3D"
|
||||||
|
icon: ":/qtquickplugin/images/default3d16.png"
|
||||||
|
|
||||||
|
ItemLibraryEntry {
|
||||||
|
name: "Extended View3D"
|
||||||
|
category: "Items"
|
||||||
|
libraryIcon: ":/qtquickplugin/images/default3d.png"
|
||||||
|
version: "6.5"
|
||||||
|
requiredImport: "QtQuick3D"
|
||||||
|
QmlSource { source: ":/qtquickplugin/source/extendedview3D_template.qml" }
|
||||||
|
toolTip: qsTr("A 2D surface where a 3D scene can be rendered. Includes ExtendedSceneEnvironment.")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,39 @@
|
|||||||
|
// Copyright (C) 2024 The Qt Company Ltd.
|
||||||
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick3D
|
||||||
|
import QtQuick3D.Helpers
|
||||||
|
|
||||||
|
View3D {
|
||||||
|
width: 400
|
||||||
|
height: 400
|
||||||
|
environment: sceneEnvironment
|
||||||
|
|
||||||
|
ExtendedSceneEnvironment {
|
||||||
|
id: sceneEnvironment
|
||||||
|
antialiasingMode: SceneEnvironment.MSAA
|
||||||
|
antialiasingQuality: SceneEnvironment.High
|
||||||
|
}
|
||||||
|
|
||||||
|
Node {
|
||||||
|
id: scene
|
||||||
|
|
||||||
|
DirectionalLight {
|
||||||
|
id: directionalLight
|
||||||
|
}
|
||||||
|
|
||||||
|
PerspectiveCamera {
|
||||||
|
id: sceneCamera
|
||||||
|
z: 350
|
||||||
|
}
|
||||||
|
|
||||||
|
Model {
|
||||||
|
id: cubeModel
|
||||||
|
eulerRotation.x: 30
|
||||||
|
eulerRotation.y: 45
|
||||||
|
|
||||||
|
source: "#Cube"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user