微信小程序
GLTFModel
xr-frame / Exports / GLTFModel
# Class: GLTFModel
加载完毕的GLTF模型,可以在节点下创建GLTF组件来将其实例化。
# Table of contents
# Constructors
- constructor
# Properties
- jsonRaw
# Methods
- createFromBuffer
# Constructors
# constructor
• new GLTFModel(_scene
, model
)
# Parameters
# Properties
# jsonRaw
• Readonly
jsonRaw: object
如果IGLTFLoaderOptions里开启了preserveRaw,则会将原始json保存下来。
# Methods
# createFromBuffer
▸ Static
createFromBuffer(scene
, buffer
, options
): Promise
<GLTFModel
>
使用GLB文件加载而成的buffer,来生成GLTF模型。
# Parameters
# Returns
Promise
<GLTFModel
>