|
@@ -71,8 +71,8 @@ export default {
|
|
this.imgIcon.onload = () => {
|
|
this.imgIcon.onload = () => {
|
|
let rate = this.rate;
|
|
let rate = this.rate;
|
|
// 摄像头从自己左上角的原点开始绘制,需要移到自己的中心点
|
|
// 摄像头从自己左上角的原点开始绘制,需要移到自己的中心点
|
|
- let x = +data.x * rate;
|
|
+ let x = +data.y * rate;
|
|
- let y = +data.y * rate;
|
|
+ let y = +data.x * rate;
|
|
// let h1 = 90 - +data.h / 2;
|
|
// let h1 = 90 - +data.h / 2;
|
|
// let h2 = 90 + +data.h / 2;
|
|
// let h2 = 90 + +data.h / 2;
|
|
|
|
|
|
@@ -81,7 +81,8 @@ export default {
|
|
|
|
|
|
this.ctx.clearRect(-250, -40, 500, 1000);
|
|
this.ctx.clearRect(-250, -40, 500, 1000);
|
|
// this.ctx.drawImage(this.imgIcon, x - 6, y - 6, 20.5, 14.5);
|
|
// this.ctx.drawImage(this.imgIcon, x - 6, y - 6, 20.5, 14.5);
|
|
- this.ctx.drawImage(this.imgIcon, x - 24, y - 20, 40, 40);
|
|
+ // this.ctx.drawImage(this.imgIcon, x - 24, y - 20, 40, 40);
|
|
|
|
+ this.ctx.drawImage(this.imgIcon, x - 20, y - 24, 40, 40);
|
|
this.ctx.beginPath();
|
|
this.ctx.beginPath();
|
|
|
|
|
|
//定义起点
|
|
//定义起点
|