diff options
-rw-r--r-- | examples/qt3d/multiviewport/QuadViewportFrameGraph.qml | 3 | ||||
-rw-r--r-- | examples/qt3d/multiviewport/doc/src/multiviewport.qdoc | 4 | ||||
-rw-r--r-- | examples/qt3d/simple-qml/doc/src/simple-qml.qdoc | 13 | ||||
-rw-r--r-- | examples/qt3d/simple-qml/main.qml | 11 | ||||
-rw-r--r-- | tests/manual/scene3d/AnimatedEntity.qml | 3 | ||||
-rw-r--r-- | tests/manual/scene3d/doc/src/scene3d.qdoc | 9 | ||||
-rw-r--r-- | tests/manual/scene3d/main.qml | 3 |
7 files changed, 21 insertions, 25 deletions
diff --git a/examples/qt3d/multiviewport/QuadViewportFrameGraph.qml b/examples/qt3d/multiviewport/QuadViewportFrameGraph.qml index 7141415d9..5359faa38 100644 --- a/examples/qt3d/multiviewport/QuadViewportFrameGraph.qml +++ b/examples/qt3d/multiviewport/QuadViewportFrameGraph.qml @@ -15,7 +15,7 @@ RenderSettings { activeFrameGraph: RenderSurfaceSelector { id: surfaceSelector - + //! [0] Viewport { id: mainViewport normalizedRect: Qt.rect(0, 0, 1, 1) @@ -49,5 +49,6 @@ RenderSettings { CameraSelector { id: cameraSelectorBottomRightViewport } } } + //! [0] } } diff --git a/examples/qt3d/multiviewport/doc/src/multiviewport.qdoc b/examples/qt3d/multiviewport/doc/src/multiviewport.qdoc index baa1e7e96..1e1a77403 100644 --- a/examples/qt3d/multiviewport/doc/src/multiviewport.qdoc +++ b/examples/qt3d/multiviewport/doc/src/multiviewport.qdoc @@ -25,9 +25,7 @@ Using the rules defined in \l {Framegraph Rules}, we construct five RenderView objects from the FrameGraph: - \quotefromfile multiviewport/QuadViewportFrameGraph.qml - \skipto Viewport { - \printuntil /^\}/ + \snippet multiviewport/QuadViewportFrameGraph.qml 0 The \e {order is important}. If the ClearBuffers node were to be the last instead of the first, this would result in a black screen for the simple diff --git a/examples/qt3d/simple-qml/doc/src/simple-qml.qdoc b/examples/qt3d/simple-qml/doc/src/simple-qml.qdoc index 670697ee8..44486b8d8 100644 --- a/examples/qt3d/simple-qml/doc/src/simple-qml.qdoc +++ b/examples/qt3d/simple-qml/doc/src/simple-qml.qdoc @@ -20,25 +20,20 @@ To be able to use the types in the Q3D and Q3D Render modules, we must import the modules: - \quotefromfile simple-qml/main.qml - \skipto import Qt3D.Core - \printuntil Render 2.0 + \snippet simple-qml/main.qml 0 The first entities we create are a \l Camera, which represents the camera used for the final rendering, and a camera controller, which allows us to control this camera using the keyboard or the mouse: - \skipto Camera { - \printuntil } - \printuntil } + \snippet simple-qml/main.qml 1 A \l RenderSettings entity specifies a ForwardRenderer as the active framegraph: - \printuntil }, + \snippet simple-qml/main.qml 2 The event source is set by the Qt3DQuickWindow: - \skipto InputSettings - \printuntil } + \snippet simple-qml/main.qml 3 */ diff --git a/examples/qt3d/simple-qml/main.qml b/examples/qt3d/simple-qml/main.qml index 3fe4a7ae3..c86be8d2d 100644 --- a/examples/qt3d/simple-qml/main.qml +++ b/examples/qt3d/simple-qml/main.qml @@ -2,14 +2,16 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick 2.2 as QQ2 +//! [0] import Qt3D.Core 2.0 import Qt3D.Render 2.0 +//! [0] import Qt3D.Input 2.0 import Qt3D.Extras 2.15 Entity { id: sceneRoot - + //! [1] Camera { id: camera projectionType: CameraLens.PerspectiveProjection @@ -21,11 +23,11 @@ Entity { upVector: Qt.vector3d( 0.0, 1.0, 0.0 ) viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 ) } - + //! [1] OrbitCameraController { camera: camera } - + //! [2] components: [ RenderSettings { activeFrameGraph: ForwardRenderer { @@ -35,8 +37,11 @@ Entity { } }, // Event Source will be set by the Qt3DQuickWindow + //! [3] InputSettings { } + //! [3] ] + //! [2] PhongMaterial { id: material diff --git a/tests/manual/scene3d/AnimatedEntity.qml b/tests/manual/scene3d/AnimatedEntity.qml index 65ebd27b1..a23060e4d 100644 --- a/tests/manual/scene3d/AnimatedEntity.qml +++ b/tests/manual/scene3d/AnimatedEntity.qml @@ -16,7 +16,7 @@ Entity { property bool validBounds: sphereMesh.implicitPointsValid property vector3d sphereMinPt: sphereMesh.implicitMinPoint property vector3d sphereMaxPt: sphereMesh.implicitMaxPoint - + //! [0] Camera { id: camera projectionType: CameraLens.PerspectiveProjection @@ -27,6 +27,7 @@ Entity { upVector: Qt.vector3d( 0.0, 1.0, 0.0 ) viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 ) } + //! [0] FirstPersonCameraController { camera: camera } diff --git a/tests/manual/scene3d/doc/src/scene3d.qdoc b/tests/manual/scene3d/doc/src/scene3d.qdoc index 27293551d..bf33b28cb 100644 --- a/tests/manual/scene3d/doc/src/scene3d.qdoc +++ b/tests/manual/scene3d/doc/src/scene3d.qdoc @@ -19,14 +19,9 @@ We set up the 3D scene and specify the entity to animate in \e main.qml: - \quotefromfile scene3d/main.qml - \skipto Scene3D { - \printuntil } - \printuntil } + \snippet scene3d/main.qml 0 We specify the active camera in \e scene3d/AnimatedEntity.qml: - \quotefromfile scene3d/AnimatedEntity.qml - \skipto Camera - \printuntil } + \snippet scene3d/AnimatedEntity.qml 0 */ diff --git a/tests/manual/scene3d/main.qml b/tests/manual/scene3d/main.qml index 998c7a275..9e8531000 100644 --- a/tests/manual/scene3d/main.qml +++ b/tests/manual/scene3d/main.qml @@ -44,7 +44,7 @@ Item { origin.x: scene.width / 2 origin.y: scene.height / 2 } - + //! [0] Scene3D { id: scene3d anchors.fill: parent @@ -57,6 +57,7 @@ Item { id: rootEntity } } + //! [0] } Rectangle { |