| | |
| | | let _flowEffectList = new Set();//水流动画列表 |
| | | |
| | | |
| | | |
| | | |
| | | //加载水流动画 |
| | | function loadFlowEffect(item) { |
| | | unloadFlowEffect(); |
| | |
| | | }); |
| | | playFlowEffect(); |
| | | renderFlowEffect(); |
| | | } |
| | | } |
| | | |
| | | //更新水流动画 |
| | | function updateFlowEffect(item) { |
| | | if (_flowEffectList.size > 0) { |
| | | let flowEffectId = getFlowEffectId(item.id); |
| | | _flowEffectList.forEach(x => { |
| | | if (x.getId() == flowEffectId) { |
| | | x.setSpeed([item.speedx, item.speedy]); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | //更新水流动画列表 |
| | | function updateFlowEffectList(data) { |
| | | if (data != null && data.length > 0) { |
| | | data.forEach(x => { |
| | | updateFlowEffect(x); |
| | | }); |
| | | } |
| | | } |
| | | |
| | |
| | | // 构造水流动画配置 |
| | | let flowEffectConfig = new Glodon.Bimface.Plugins.Animation.FlowEffectConfig(); |
| | | flowEffectConfig.material = material; |
| | | flowEffectConfig.speed = [item.speed, 0]; |
| | | flowEffectConfig.speed = [item.speedx, item.speedy]; |
| | | flowEffectConfig.viewer = _viewer; |
| | | flowEffectConfig.id = getFlowEffectId(item.id); |
| | | //构造水流动画 |