优化:更多的时间切片提高操作流畅性

pull/803/head
ChenX 5 years ago
parent 510d4716a2
commit 2d3053f92d

@ -104,7 +104,7 @@ export class BoardMoveTool
if (obj.visible)
{
i++;
if (i > 50)
if (i > 30)
{
let now = performance.now();
let r = now - start;
@ -140,6 +140,7 @@ export class BoardMoveTool
derv.applyMatrix4(brRot);
p.setZ(br.Thickness * 0.5);
p.applyMatrix4(brOCS);
await Sleep(1);
let intersection = this.RayPoint(p, derv, brsObject);
if (intersection)
@ -173,6 +174,7 @@ export class BoardMoveTool
{
let p = new Vector3(br.Width * 0.5, br.Height * y, br.Thickness).applyMatrix4(brOCS);
centerP = centerP ?? p;
await Sleep(1);
let intersection = this.RayPoint(p, brNormal, brsObject);
if (intersection)
{
@ -202,6 +204,7 @@ export class BoardMoveTool
{
let p = new Vector3(br.Width * 0.5, br.Height * y, 0).applyMatrix4(brOCS);
centerP = centerP ?? p;
await Sleep(1);
let intersection = this.RayPoint(p, brNormal2, brsObject);
if (intersection)
{

@ -437,6 +437,7 @@ export class Viewer
this._Scene.add(l.DrawObject);
this.UpdateRender();
await Sleep(1);
//预构建板件
i = 0;
for (let br of brs)

Loading…
Cancel
Save