|
@@ -38,6 +38,7 @@ export default class Player {
|
|
|
this.drawing = false;
|
|
|
this.inited = false;
|
|
|
this.renderLines = [];
|
|
|
+ this.renderMarkers = [];
|
|
|
this.activeEdges = [];
|
|
|
this.markers = [];
|
|
|
this.matLine = null;
|
|
@@ -150,9 +151,8 @@ export default class Player {
|
|
|
let pos = new THREE.Vector3(this.pointermove.x, this.pointermove.y, -1);
|
|
|
pos.unproject(this.orthCamera);
|
|
|
pos.y = 5;
|
|
|
- console.log("pos", pos);
|
|
|
+ // console.log("pos", pos);
|
|
|
this.marker.position.copy(pos);
|
|
|
- // console.log(this.pointermove);
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -182,7 +182,16 @@ export default class Player {
|
|
|
this.scene.scene.add(this.marker);
|
|
|
this.drawing = true;
|
|
|
} else {
|
|
|
- this.drawing = false;
|
|
|
+ // this.drawing = false;
|
|
|
+ this.raycaster.setFromCamera(this.pointerdown, this.orthCamera);
|
|
|
+ let intersectArr = this.scene.boxManager.imgList;
|
|
|
+ const intersects = this.raycaster.intersectObjects(intersectArr, false);
|
|
|
+ console.log("intersects", intersects);
|
|
|
+ if (intersects[0]) {
|
|
|
+ this.drawing = false;
|
|
|
+ this.renderMarkers.push()
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
// this.floorplanControls.enabled = false;
|