Doc: Describe the Loader3D component

Task-number: QDS-4888
Change-Id: Ia05b374f79030613ce68bfa70950e503cd83d454
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
Johanna Vanhatapio
2021-09-14 17:54:11 +03:00
parent b9add29ae0
commit eea23a83f6
8 changed files with 116 additions and 3 deletions

View File

@@ -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}

View File

@@ -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

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -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}

View File

@@ -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"
*/

View File

@@ -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