From e028fe72f3403ddb59bc440356dcde0ca53d6606 Mon Sep 17 00:00:00 2001 From: ChenX Date: Thu, 7 Dec 2017 14:41:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E7=BB=BF=E8=89=B2=E6=9D=90?= =?UTF-8?q?=E8=B4=A8.=20=20=20=E5=AF=B9=E5=9C=86=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E7=B2=BE=E5=BA=A6=E6=8F=90=E9=AB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DatabaseServices/Entity.ts | 5 +++-- src/GraphicsSystem/PreViewer.ts | 14 +++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/DatabaseServices/Entity.ts b/src/DatabaseServices/Entity.ts index cde9c51ef..9433676f3 100644 --- a/src/DatabaseServices/Entity.ts +++ b/src/DatabaseServices/Entity.ts @@ -247,6 +247,7 @@ export class Circle extends Curve this.m_Radius = r; this.m_DrawEntity.forEach(obj => { + (obj).geometry.dispose(); let curve = new THREE.EllipseCurve( this.m_Center.x, this.m_Center.y, // ax, aY this.m_Radius, this.m_Radius, // xRadius, yRadius @@ -254,7 +255,7 @@ export class Circle extends Curve false, // aClockwise 0 // aRotation ); - let geometry = new THREE.Geometry().setFromPoints(curve.getPoints(8)); + let geometry = new THREE.Geometry().setFromPoints(curve.getPoints(60)); (obj).geometry = geometry; }) } @@ -272,7 +273,7 @@ export class Circle extends Curve false, // aClockwise 0 // aRotation ); - let geometry = new THREE.Geometry().setFromPoints(curve.getPoints(8)); + let geometry = new THREE.Geometry().setFromPoints(curve.getPoints(60)); var material = new THREE.LineBasicMaterial({ color: 0xff0000 }); var ellipse = new THREE.Line(geometry, material); this.m_DrawEntity.set(renderType, ellipse); diff --git a/src/GraphicsSystem/PreViewer.ts b/src/GraphicsSystem/PreViewer.ts index 3390e6b8a..a49ae224a 100644 --- a/src/GraphicsSystem/PreViewer.ts +++ b/src/GraphicsSystem/PreViewer.ts @@ -13,11 +13,19 @@ export class PreViewer //线材质 private m_LineMaterial: THREE.LineBasicMaterial = new THREE.LineBasicMaterial({ color: 0xffffff }); private m_SnapMaterial: THREE.LineBasicMaterial = new THREE.LineBasicMaterial({ color: 0x008B00 }); + + //点划线 黄色 m_DashMaterial = new THREE.LineDashedMaterial({ - color: 0x008B00, - dashSize: 30, - gapSize: 15, + color: 0xF0B41E, + dashSize: 20, + gapSize: 8, }); + //点划线 绿色 极轴捕捉 + m_BlueDashMaterial = new THREE.LineDashedMaterial({ + color: 0x008B00, + dashSize: 5, + gapSize: 5 + }) //光标对象 private m_CursorObject: THREE.Group;