Members
-
Detector
-
-
raycaster
-
-
scratchSphere
-
Methods
-
addMorphTargets(geometry, targets, accessors)
-
Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#morph-targets
Parameters:
Name Type Description geometry
THREE.BufferGeometry targets
Array.<GLTF.Target> accessors
Array.<THREE.BufferAttribute> -
addPrimitiveAttributes(geometry, primitiveDef, accessors)
-
Parameters:
Name Type Description geometry
THREE.BufferGeometry primitiveDef
GLTF.Primitive accessors
Array.<THREE.BufferAttribute> -
assignExtrasToUserData(object, def)
-
Parameters:
Name Type Description object
THREE.Object3D | THREE.Material | THREE.BufferGeometry def
GLTF.definition -
cloneMaterial(source)
-
Clones a GLTFSpecularGlossinessMaterial instance. The ShaderMaterial.copy() method can copy only properties it knows about or inherits, and misses many properties that would normally be defined by MeshStandardMaterial.
This method allows GLTFSpecularGlossinessMaterials to be cloned in the process of loading a glTF model, but cloning later (e.g. by the user) would require these changes AND also updating
.onBeforeRender
on the parent mesh.Parameters:
Name Type Description source
THREE.ShaderMaterial Returns:
- Type
- THREE.ShaderMaterial
-
createDefaultMaterial()
-
Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#default-material
-
DoubleViewerControls()
-
-
DRACOLoader(manager)
-
Parameters:
Name Type Description manager
THREE.LoadingManager -
flyTo(bbmin, bbmax)
-
Parameters:
Name Type Description bbmin
Array | String 包围盒最小点
bbmax
Array | String 包围盒最大点
-
flyTo(bbmin, bbmax)
-
Parameters:
Name Type Description bbmin
Array | String 包围盒最小点
bbmax
Array | String 包围盒最大点
-
frame()
-
帧回调函数
-
getComponentBoundingBox(componentId)
-
Parameters:
Name Type Description componentId
String 部件id
Returns:
返回部件的包围盒对象或者空,{bbmin : 'x,y,z' ,bbmax : 'x,y,z'}
- Type
- Object | undefined
-
getEnablePicking()
-
获取选择状态的开关
-
GLTFDracoMeshCompressionExtension()
-
DRACO Mesh Compression Extension
Specification: https://github.com/KhronosGroup/glTF/pull/874
-
GLTFLightsExtension()
-
Lights Extension
Specification: PENDING
-
GLTFLoader()
-
-
GLTFMaterialsPbrSpecularGlossinessExtension()
-
Specular-Glossiness Extension
Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness
-
GLTFMaterialsUnlitExtension()
-
Unlit Materials Extension (pending)
PR: https://github.com/KhronosGroup/glTF/pull/1163
-
GLTFTextureDDSExtension()
-
DDS Texture Extension
Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_texture_dds
-
highlightComponents(componentsArray, color)
-
Parameters:
Name Type Description componentsArray
Array 需要高亮的部件名称(数组)
color
THREE.Vector3 高亮颜色
-
isMultiPassGeometry(primitives)
-
Checks if we can build a single Mesh with MultiMaterial from multiple primitives. Returns true if all primitives use the same attributes/morphAttributes/mode and also have index. Otherwise returns false.
Parameters:
Name Type Description primitives
Array.<GLTF.Primitive> Returns:
- Type
- Boolean
-
resize()
-
窗口大小改变的回调函数
-
setEnablePicking(enabled)
-
Parameters:
Name Type Description enabled
Boolean 设置选择状态的开关
-
showAllComponents(visible)
-
Parameters:
Name Type Description visible
Boolean 显示或者隐藏所有的部件
-
showComponents(componentsArray, visible)
-
Parameters:
Name Type Description componentsArray
Array 需要改变显隐状态的部件的名称(数组),如果数组长度为0 ,即显示或者隐藏所有的部件
visible
Boolean 显示或者隐藏
-
SingleViewerControls()
-
-
traversalChildTile(x, y, z, callback)
-
遍历子级瓦片
Parameters:
Name Type Description x
number y
number z
number callback
function -
traversalParentTile(x, y, z, callback)
-
遍历父级瓦片
Parameters:
Name Type Description x
number y
number z
number callback
function -
trimCachedGeometry(geoInstances)
-
移除超出最大容量限制的几何建筑模型数据
Parameters:
Name Type Description geoInstances
Array.<Freedo.GeometryInstance> -
unhighlightComponents(components)
-
Parameters:
Name Type Description components
Array 需要取消高亮的部件名称(数组),如果传入是长度为0 的数组,取消所有的高亮
-
updateMorphTargets(mesh, meshDef)
-
Parameters:
Name Type Description mesh
THREE.Mesh meshDef
GLTF.Mesh