diff options
8 files changed, 51 insertions, 55 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/editor3d_qt5.qrc b/share/qtcreator/qml/qmlpuppet/editor3d_qt5.qrc index 7e023c127b7..bbe9a910db6 100644 --- a/share/qtcreator/qml/qmlpuppet/editor3d_qt5.qrc +++ b/share/qtcreator/qml/qmlpuppet/editor3d_qt5.qrc @@ -13,7 +13,7 @@ <file>mockfiles/images/directional@2x.png</file> <file>mockfiles/images/point.png</file> <file>mockfiles/images/point@2x.png</file> - <file>mockfiles/images/floor_tex.png</file> + <file>mockfiles/images/static_floor.png</file> <file>mockfiles/images/spot.png</file> <file>mockfiles/images/spot@2x.png</file> <file>mockfiles/qt5/AdjustableArrow.qml</file> diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/static_floor.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/static_floor.png Binary files differnew file mode 100644 index 00000000000..93073719f55 --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/static_floor.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/qt5/MaterialNodeView.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/qt5/MaterialNodeView.qml index c36d8c227c3..9fee06e0ad1 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/qt5/MaterialNodeView.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/qt5/MaterialNodeView.qml @@ -45,10 +45,6 @@ View3D { Node { DirectionalLight { - shadowMapQuality: Light.ShadowMapQualityMedium - shadowFilter: 20 - shadowFactor: 21 - castsShadow: true eulerRotation.x: -26 eulerRotation.y: -57 } @@ -68,25 +64,5 @@ View3D { source: "#Sphere" materials: previewMaterial } - - Model { - id: floorModel - source: "#Rectangle" - scale.y: 8 - scale.x: 8 - eulerRotation.x: -90 - materials: floorMaterial - DefaultMaterial { - id: floorMaterial - diffuseMap: floorTex - - Texture { - id: floorTex - source: "../images/floor_tex.png" - scaleU: floorModel.scale.x - scaleV: floorModel.scale.y - } - } - } } } diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/qt5/ModelNode3DImageView.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/qt5/ModelNode3DImageView.qml index a6d5c6b1db5..70b9dbc4d0e 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/qt5/ModelNode3DImageView.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/qt5/ModelNode3DImageView.qml @@ -123,14 +123,13 @@ Item { anchors.fill: parent } - Rectangle { + // We can use static image in Qt5 as only small previews will be generated + Image { id: backgroundRect anchors.fill: parent z: -1 - gradient: Gradient { - GradientStop { position: 1.0; color: "#222222" } - GradientStop { position: 0.0; color: "#999999" } - } + source: "../images/static_floor.png" + fillMode: Image.Stretch } } } diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/qt5/ModelNodeView.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/qt5/ModelNodeView.qml index b497b0419a1..82688bbef5a 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/qt5/ModelNodeView.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/qt5/ModelNodeView.qml @@ -70,7 +70,7 @@ View3D { materials: [ DefaultMaterial { - diffuseColor: "#4aee45" + diffuseColor: "#999999" } ] } diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/qt6/MaterialNodeView.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/qt6/MaterialNodeView.qml index ed5cfea56f4..94051d5f6e6 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/qt6/MaterialNodeView.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/qt6/MaterialNodeView.qml @@ -45,10 +45,6 @@ View3D { Node { DirectionalLight { - shadowMapQuality: Light.ShadowMapQualityMedium - shadowFilter: 20 - shadowFactor: 21 - castsShadow: true eulerRotation.x: -26 eulerRotation.y: -57 } @@ -70,24 +66,5 @@ View3D { materials: previewMaterial } - Model { - id: floorModel - source: "#Rectangle" - scale.y: 8 - scale.x: 8 - eulerRotation.x: -90 - materials: floorMaterial - DefaultMaterial { - id: floorMaterial - diffuseMap: floorTex - - Texture { - id: floorTex - source: "../images/floor_tex.png" - scaleU: floorModel.scale.x - scaleV: floorModel.scale.y - } - } - } } } diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/qt6/ModelNode3DImageView.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/qt6/ModelNode3DImageView.qml index 5caac0047c4..031d01d65fb 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/qt6/ModelNode3DImageView.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/qt6/ModelNode3DImageView.qml @@ -126,6 +126,50 @@ Item { GradientStop { position: 1.0; color: "#222222" } GradientStop { position: 0.0; color: "#999999" } } + + // Use View3D instead of static image to make background look good on all resolutions + View3D { + anchors.fill: parent + environment: sceneEnv + + SceneEnvironment { + id: sceneEnv + antialiasingMode: SceneEnvironment.MSAA + antialiasingQuality: SceneEnvironment.High + } + + DirectionalLight { + eulerRotation.x: -26 + eulerRotation.y: -57 + } + + PerspectiveCamera { + y: 125 + z: 120 + eulerRotation.x: -31 + clipNear: 1 + clipFar: 1000 + } + + Model { + id: floorModel + source: "#Rectangle" + scale.y: 8 + scale.x: 8 + eulerRotation.x: -90 + materials: floorMaterial + DefaultMaterial { + id: floorMaterial + diffuseMap: floorTex + Texture { + id: floorTex + source: "../images/floor_tex.png" + scaleU: floorModel.scale.x + scaleV: floorModel.scale.y + } + } + } + } } } } diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/qt6/ModelNodeView.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/qt6/ModelNodeView.qml index 4da76ea097f..ea2e23837fd 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/qt6/ModelNodeView.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/qt6/ModelNodeView.qml @@ -70,7 +70,7 @@ View3D { materials: [ DefaultMaterial { - diffuseColor: "#4aee45" + diffuseColor: "#999999" } ] } |