/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $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$
**
****************************************************************************/

/*!
    \example morphing
    \ingroup quick3d-examples
    \title Qt Quick 3D - Morphing Example
    \brief Demonstrates how to control morphing animations in Qt Quick 3D.
    \image morphing.png

    This example shows how to control morphing animation on a model that has been imported from an external tool.

    \section1 Creating a mesh

    The mesh for the model was created using the Blender 3D modeling tool. In addition to the base
    shape, the mesh contains three morph targets (called \e {shape keys} in Blender).

    \image blender.jpg

    It was exported from Blender as a glTF file, and imported using \l{Balsam Asset Import Tool}{balsam}.

    \section1 Controlling the morph targets

    Normally, morphing is controlled by a \l {Qt Quick Timeline Overview}{timeline animation} or a
    property animation. In this example, we use sliders instead, to make it possible to experiment
    freely with combining different weights:

    \snippet morphing/main.qml sliders

    (\c RealSlider is a simple slider that provides a floating point value. It is borrowed from the effects example.)

    We define a \l{MorphTarget} for each of the the targets in the mesh. Morph targets are the objects we bind to to control the morphing. Typically, they will be animated, but in this example we bind to the slider values:

    \snippet morphing/main.qml morphtargets

    Finally we create a model and bind the morph targets to the targets in the mesh:

    \snippet morphing/main.qml model
    Note that the targets are matched by their position in the list: the names are not significant.

*/
