1. getExternalObjectByNodeInfo

该方法属于便捷方法,内部调用上面三个实现,根据node信息生成THREE.Group类型对象。

1.1. 方法:

getExternalObjectByNodeInfo (node)

1.2. 传参说明:

node: 由外部封装的Object类型对象,包含以下属性:
    type : 可选值为”group”、”model”、”component”、 “components”,分别表示当前node是哪种类型的对象;
    matrix:当前节点的矩阵信息,Array类型,可选;
    nodeId: 当前节点标识;
    modelKey: 模型标识,type 为“model”时不可为空,其他情况忽略该属性;
componentKey: 构件标识, type为 “component”时不可为空,其它情况忽略该属性;
componentsKey: 构件标识数组, type 为“components”时不可为空,其它情况忽略该属性;
    chidren: 当前节点的子节点,数据类型和当前类型一致,可选;

1.3. 返回值:

Promise对象,成功回调参数分两种情况,type为” component”时返回THREE.Mesh类型对象,否则返回THREE.Group类型对象。失败函数回调参数为字符串类型对象,表示失败原因。

1.4. 逻辑说明:

NULL

1.5. 示例:

NULL
版权所有@盈嘉互联(北京)科技有限公司 京ICP备15051988号-9 Copyright © 2021 all right reserved,powered by Gitbook该文件修订时间: 2021-12-20 09:58:36

results matching ""

    No results matching ""