修复点击场景添加模型,添加过程中不出现模型预览bug。

This commit is contained in:
tengge1 2020-03-22 12:40:22 +08:00
parent 46c8060fcd
commit d29632d7ff
2 changed files with 3 additions and 0 deletions

View File

@ -18,6 +18,7 @@ Supported Languages: 中文 / [繁體中文](README-tw.md) / [English](README-en
5. `控制器模式选择`由状态栏移动到`选项`菜单中。
6. `添加模式`由绘制工具栏移动到`选项`菜单中,默认改为`添加到场景中心`
7. `选择模式`由状态栏移动到`选项`菜单中。
8. 修复`点击场景添加模型`添加过程中不出现模型预览bug。
## v0.4.4更新【[更新日志](docs-dev/update/UpdateLog.md)】

View File

@ -170,6 +170,7 @@ class ModelPanel extends React.Component {
//
clickSceneToAdd(obj) {
let added = false;
app.editor.gpuPickNum += 1;
app.on(`gpuPick.ModelPanel`, intersect => { //
if (!intersect.point) {
return;
@ -185,6 +186,7 @@ class ModelPanel extends React.Component {
app.on(`raycast.ModelPanel`, null);
obj.position.copy(intersect.point);
this.addToCenter(obj);
app.editor.gpuPickNum -= 1;
});
}