diff --git a/doc/qtcreator/src/qtcreator-toc.qdoc b/doc/qtcreator/src/qtcreator-toc.qdoc index bd754ad177d..1daf929e54d 100644 --- a/doc/qtcreator/src/qtcreator-toc.qdoc +++ b/doc/qtcreator/src/qtcreator-toc.qdoc @@ -146,6 +146,7 @@ \li \l{Scene Environment} \li \l{Morph Target} \li \l{Repeater3D} + \li \l{Loader3D} \endlist \li \l {Creating Component Instances} \li \l {Creating Custom Components} diff --git a/doc/qtcreator/src/qtquick/library/qtquick-component-instances.qdoc b/doc/qtcreator/src/qtquick/library/qtquick-component-instances.qdoc index d78ed8c922e..eb2e12f8f99 100644 --- a/doc/qtcreator/src/qtquick/library/qtquick-component-instances.qdoc +++ b/doc/qtcreator/src/qtquick/library/qtquick-component-instances.qdoc @@ -25,7 +25,7 @@ /*! \page quick-component-instances.html - \previouspage studio-3d-repeater-3d.html + \previouspage studio-3d-loader-3d.html \nextpage quick-components-creating.html \title Creating Component Instances diff --git a/doc/qtcreator/src/qtquick/library/qtquick-preset-components.qdoc b/doc/qtcreator/src/qtquick/library/qtquick-preset-components.qdoc index 40ecbe98631..0f110e2fee8 100644 --- a/doc/qtcreator/src/qtquick/library/qtquick-preset-components.qdoc +++ b/doc/qtcreator/src/qtquick/library/qtquick-preset-components.qdoc @@ -84,6 +84,7 @@ \li \l {Scene Environment} \li \l {Morph Target} \li \l {Repeater3D} + \li \l {Loader3D} \endlist When you import 3D scenes from files that you exported from 3D graphics diff --git a/doc/qtdesignstudio/images/studio-3d-loader3d-binding-editor.png b/doc/qtdesignstudio/images/studio-3d-loader3d-binding-editor.png new file mode 100644 index 00000000000..698f62cab3f Binary files /dev/null and b/doc/qtdesignstudio/images/studio-3d-loader3d-binding-editor.png differ diff --git a/doc/qtdesignstudio/images/studio-3d-loader3d-properties.png b/doc/qtdesignstudio/images/studio-3d-loader3d-properties.png new file mode 100644 index 00000000000..f77a4c7855f Binary files /dev/null and b/doc/qtdesignstudio/images/studio-3d-loader3d-properties.png differ diff --git a/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc index 832526005e4..976da0d4ccd 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc @@ -103,6 +103,7 @@ \li \l{Scene Environment} \li \l{Morph Target} \li \l{Repeater3D} + \li \l{Loader3D} \endlist \li \l {Creating Component Instances} \li \l {Creating Custom Components} diff --git a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-loader-3d.qdoc b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-loader-3d.qdoc new file mode 100644 index 00000000000..1ab2bf0c9d5 --- /dev/null +++ b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-loader-3d.qdoc @@ -0,0 +1,110 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Design Studio. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page studio-3d-loader-3d.html + \previouspage studio-3d-repeater-3d.html + \nextpage quick-component-instances.html + + \title Loader3D + + \note The \uicontrol Loader3D component is released as a tech preview + feature in \QDS 2.2, and its functionality will be improved in future + releases. + + \uicontrol Loader3D is a loader component used to dynamically load 3D + components. It can load a QML file using the \uicontrol Source property or a + component using the \uicontrol {Source component} property. \uicontrol Loader3D + is useful for delaying the creation of a component until it is required, for + example, when a component should be created on demand or when a component + should not be created unnecessarily for performance reasons. + + Add a \uicontrol Loader3D component to your scene by drag-and-dropping it + from \uicontrol Library > \uicontrol Components > \uicontrol {Qt Quick 3D} > + \uicontrol {Qt Quick 3D} to \uicontrol Scene in \uicontrol Navigator. + + For more information, see the \l{https://doc.qt.io/qt/qml-qtquick3d-loader3d.html} + {Loader3D QML type} in the \uicontrol {Qt Quick 3D} documentation. + + \section1 Loader3D Properties + + Select the \uicontrol Loader3D component in \uicontrol Navigator to specify + its properties in \uicontrol Properties > \uicontrol Loader3D. + + \image studio-3d-loader3d-properties.png "Loader3D specific properties" + + The \uicontrol Active property is set to \uicontrol true by default, which + makes the \uicontrol Loader3D currently active. Setting \uicontrol Active to + \uicontrol false makes \uicontrol Loader3D inactive. If you change the + \uicontrol Source or \uicontrol {Source component} of an inactive + \uicontrol Loader3D, the component will not be instantiated until + \uicontrol Loader3D is made active. Setting \uicontrol Loader3D inactive + will also cause any item loaded by the loader to be released, but this will + not affect the files or components defined as \uicontrol Source or + \uicontrol {Source component}. + + Use the dropdown menu of the \uicontrol Source property to define the URL of + the 3D component to instantiate. To unload the currently loaded object, set + this property to an empty string or set the \uicontrol {Source component} to + undefined. Setting \uicontrol Source to a new URL will also cause the item + created by the previous URL to be unloaded. + + The \uicontrol {Source component} property defines the component for + \uicontrol Loader3D to instantiate. Currently, the + \uicontrol {Source component} needs to be defined in code using the + \l {Working in Edit Mode}{Edit} mode or \l {Text Editor}. + + Set the \uicontrol Asynchronous property to define whether the component + will be instantiated asynchronously. This property is set to \uicontrol false + by default. When used in conjunction with the source property, loading and + compilation will be performed in a background thread. Loading asynchronously + creates the objects declared by the component across multiple frames and + reduces the likelihood of glitches in animation. Setting the value of + \uicontrol Asynchronous to \uicontrol false while an asynchronous load is in + progress will force immediate synchronous completion. This allows an + asynchronous loading to begin and then forces completion if the + \uicontrol Loader3D content must be accessed before the asynchronous + loading is completed. + + To avoid seeing the components loading progressively, set the \uicontrol + Visibility property for \uicontrol Loader3D appropriately in + \uicontrol {Binding Editor}: + \list 1 + \li In \uicontrol Properties > \uicontrol Loader3D, select the + \uicontrol Asynchronous check box to set the property to + \uicontrol true. + \li In \uicontrol Node > \l {Setting Node Opacity and Visibility}{Visibility}, + select \inlineimage icons/action-icon.png + to open the actions menu, and then select \uicontrol {Set Binding}. + \li Type \c {status === Loader3D.Ready} into \uicontrol {Binding Editor}, + as shown in the image below. + \li Select \uicontrol OK. + \endlist + + \image studio-3d-loader3d-binding-editor.png "Setting Visibility in Binding Editor" + +*/ diff --git a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-repeater-3d.qdoc b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-repeater-3d.qdoc index 0a12a8bec96..4d992d0b409 100644 --- a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-repeater-3d.qdoc +++ b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-repeater-3d.qdoc @@ -28,7 +28,7 @@ /*! \page studio-3d-repeater-3d.html \previouspage studio-3d-morph-target.html - \nextpage quick-component-instances.html + \nextpage studio-3d-loader-3d.html \title Repeater3D @@ -60,7 +60,7 @@ For more information, see \l{https://doc.qt.io/qt/qml-qtquick3d-repeater3d.html} {Repeater3D} in the \uicontrol {Qt Quick 3D} documentation. - \section1 Repeater 3D Properties + \section1 Repeater3D Properties To define a model providing data for the repeater, select it in \l Navigator, and then in \uicontrol Properties > \uicontrol Repeater, specify the