|
@@ -49,7 +49,7 @@ export default class Player {
|
|
|
);
|
|
|
|
|
|
this.floorplanControls.enablePan = true;
|
|
|
- this.floorplanControls.target.set(0, 1, 0);
|
|
|
+ // this.floorplanControls.target.set(0, 1, 0);
|
|
|
// this.floorplanControls.rotateSpeed = 0.5;
|
|
|
// this.floorplanControls.panSpeed = 0.75
|
|
|
// this.floorplanControls.maxDistance = 100
|
|
@@ -117,28 +117,16 @@ export default class Player {
|
|
|
this.startObj = null;
|
|
|
|
|
|
if (this.drawLine) {
|
|
|
- console.log("last Line", this.drawLine.userData);
|
|
|
- const points = this.drawLine.userData;
|
|
|
+ const points = this.drawLine.userData.points;
|
|
|
+ const dir = this.drawLine.userData.dir;
|
|
|
const finishLine = new LinePoints(points, 0, this.matLine);
|
|
|
this.renderLines.push(points);
|
|
|
this.scene.scene.add(finishLine);
|
|
|
- console.log("this.touchImg", this.touchImg);
|
|
|
+ const imageId = this.touchImg.object.userData;
|
|
|
+ console.log("this.touchImg", dir, imageId, points);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- getPostionsFromDrawLine() {
|
|
|
- if (!this.drawLine) {
|
|
|
- return [];
|
|
|
- }
|
|
|
- let gp = this.drawLine.geometry.attributes.position;
|
|
|
- let wPos = [];
|
|
|
- for (let i = 0; i < gp.count; i++) {
|
|
|
- let p = new THREE.Vector3().fromBufferAttribute(gp, i); // set p from `position`
|
|
|
- this.drawLine.localToWorld(p); // p has wordl coords
|
|
|
- wPos.push(p);
|
|
|
- }
|
|
|
- return wPos;
|
|
|
- }
|
|
|
Listener = {
|
|
|
onPointerDown: this.onPointerDown.bind(this),
|
|
|
onPointerMove: this.onPointerMove.bind(this),
|