Kuesa Lights QML Example¶
Demonstrates the use of the Kuesa API to maniplulate light sources from a glTF2 file.
Loading a glTF2 File and Select the Camera¶
Kuesa provides the [GLTF2Importer ] element, for loading glTF2 files. This element exists within the [View3D ] element and can be used by setting the [source ] property. The same element also provides the [camera ] property to specify by name what camera to use from the glTF file.
1 2 |
|
Filename: lights-qt3d/main.qml
Manipulate the Lights¶
Each light is referenced by using an Asset element, with added properties that one wants to adjust. Depending on the light source type, some properties might not exist, hence adjusting them will have no effect.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Filename: lights-qt3d/main.qml
Then each of the properties can be referenced and manipulated by GUI elements, for example with a Slider:
1 2 3 4 5 6 7 8 |
|
Filename: lights-qt3d/main.qml
Updated on 2023-07-03 at 11:02:17 +0000