浏览代码

Grid hiding

master
Pete Shadbolt 7 年前
父节点
当前提交
479817bf13
共有 2 个文件被更改,包括 12 次插入0 次删除
  1. +9
    -0
      static/scripts/editor.js
  2. +3
    -0
      static/scripts/mouse.js

+ 9
- 0
static/scripts/editor.js 查看文件

@@ -3,6 +3,8 @@ var pi2 = Math.PI / 2;

editor.selection = undefined;
editor.mouseOver = undefined;
editor.gridTimeOut = 0;


editor.orientations = [
new THREE.Euler(pi2, 0, 0),
@@ -10,6 +12,11 @@ editor.orientations = [
new THREE.Euler(pi2, 0, pi2),
];

editor.checkTimeOut = function() {
editor.gridTimeOut += 1;
console.log(editor.gridTimeOut);
editor.grid.visible = editor.gridTimeOut < 10;
}

editor.onFreeMove = function() {
var found = editor.findNodeOnRay(mouse.ray);
@@ -198,3 +205,5 @@ editor.localComplementation = function() {
abj.local_complementation(editor.selection);
gui.serverMessage("Inverted neighbourhood of " + editor.selection + ".");
};

setInterval(editor.checkTimeOut, 500);

+ 3
- 0
static/scripts/mouse.js 查看文件

@@ -70,4 +70,7 @@ mouse.onMove = function(event) {
} else {
mouse.onFreeMove();
}

// Update editor
editor.gridTimeOut = 0;
};

正在加载...
取消
保存