Summary
Methods:
addGLTF |
添加一个gltf模型。 |
destroy |
图层对象销毁。 |
getAllModels |
获取所有gltf模型。 |
getLayerType |
图层类型。 |
getModelById |
获取id为参数值的gltf模型。 |
removeAll |
移除该图层所有的gltf模型。 |
removeGLTFById |
移除id为参数值的gltf模型。 |
removeModel |
移除模型文件 |
setIntensity |
光照强度。 |
Constructor
new GLTFInstanceLayer(name, options)
Parameters:
Name | Type | Description |
---|---|---|
name |
String | 图层名称 |
options |
Object | 图层可选项,继承基类 |
Members
-
depthTest
-
获取图层的深度测试属性
return {Boolean} 深度测试属性- Overrides:
Methods
-
addGLTF(gltf)
-
添加一个gltf模型。
Parameters:
Name Type Description gltf
GLTF gltf模型实例。
-
destroy()
-
图层对象销毁。
-
getAllModels()
-
获取所有gltf模型。
-
getLayerType() → {String}
-
图层类型。
Returns:
String -
getModelById(id)
-
获取id为参数值的gltf模型。
Parameters:
Name Type Description id
Stirng 模型id。
-
removeAll()
-
移除该图层所有的gltf模型。
-
removeGLTFById(id)
-
移除id为参数值的gltf模型。
Parameters:
Name Type Description id
Stirng 模型id。
-
removeModel(glTF)
-
移除模型文件
Parameters:
Name Type Description glTF
module:model~GLTF 被移除的模型
-
setIntensity(value)
-
光照强度。
Parameters:
Name Type Description value
Number 强度系数,建议0-10之间的值。