RuntimeLoader QML Type
在运行时导入 3D 资产。更多
Import Statement: | import QtQuick3D.AssetUtils |
Since: | Qt 6.2 |
Inherits: |
属性
- bounds : Bounds
- errorString : string
- instancing : Instancing
- source : url
- status : enumeration
详细说明
RuntimeLoader 类型提供了一种在运行时直接从源代码加载 3D 资产的方法,而无需先将其转换为QtQuick3D 的内部格式。
RuntimeLoader 支持 .obj 和 glTF 2.0 版本的文本(.gltf)和二进制(.glb)格式文件。
属性文档
bounds : Bounds |
该属性描述了导入模型周围的边界体的范围。
注意: 该值在第一次渲染前可能不可用
errorString : string |
该属性是一个可读字符串,表示最新加载操作的状态。
instancing : Instancing |
如果设置了该属性,则不会正常渲染导入的模型。相反,将根据实例表的定义渲染若干实例。
更多信息,请参阅实例渲染概述文档。
status : enumeration |
此属性保存最新加载操作的状态。
常量 | 说明 |
---|---|
RuntimeLoader.Empty | 未指定 URL。 |
RuntimeLoader.Success | 加载操作成功。 |
RuntimeLoader.Error | 加载操作失败。errorString 提供了人可读的错误信息。 |
© 2025 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.