SpotLight QML Type
Defines a spot light in the scene. More...
|Import Statement:||import QtQuick3D 1.15|
The spot light emits light towards one direction in a cone shape, which is defined by the coneAngle property. The light intensity diminishes when approaching the coneAngle. The angle at which the light intensity starts to diminish is defined by innerConeAngle. Both angles are defined in degrees.
Inside the innerConeAngle, the spot light behaves similarly to the point light. There the light intensity diminishes according to inverse-square-law. However, the fade-off (and range) can be controlled with the constantFade, linearFade, and quadraticFade properties.
coneAngle : real
This property defines the cut-off angle beyond which the light doesn't affect the scene. Defined in degrees between 0 and 180. The default value is 40.
constantFade : real
This property is constant factor of the attenuation term of the light. The default value is 1.0.
innerConeAngle : real
linearFade : real
This property increases the rate at which the lighting effect dims the light in proportion to the distance to the light. The default value is 0.0, which means the light doesn't have linear fade.
quadraticFade : real
This property increases the rate at which the lighting effect dims the light in proportion to the inverse square law. The default value is 1.0, which means the spot light fade exactly follows the inverse square law, i.e. when distance to an object doubles the light intensity decreases to 1/4th.
© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.