xr-frame / Exports / GLTFModel

# Class: GLTFModel

加载完毕的GLTF模型,可以在节点下创建GLTF组件来将其实例化。

# Table of contents

# Constructors

# Properties

# Methods

# Constructors

# constructor

new GLTFModel(_scene, model)

# Parameters

Name Type
_scene Scene
model GLTFRootLoaded

# Properties

# jsonRaw

Readonly jsonRaw: object

如果IGLTFLoaderOptions里开启了preserveRaw,则会将原始json保存下来。

# Methods

# createFromBuffer

Static createFromBuffer(scene, buffer, options): Promise<GLTFModel>

使用GLB文件加载而成的buffer,来生成GLTF模型。

# Parameters

Name Type
scene Scene
buffer ArrayBuffer
options IGLTFLoaderOptions

# Returns

Promise<GLTFModel>