提交 c28e53c1 编写于 作者: N nicolo.carpignoli

fix: clean

上级 ce463fb2
.DS_Store
.atom-live-server.json
node_modules/*
aframe/examples/darimuovere/
......@@ -5770,6 +5770,7 @@ AFRAME.registerComponent('gps-camera', {
longitude: this.currentCoords.longitude,
latitude: this.originCoords.latitude,
};
position.x = this.computeDistanceMeters(this.originCoords, dstCoords);
position.x *= this.currentCoords.longitude > this.originCoords.longitude ? 1 : -1;
......@@ -5778,12 +5779,14 @@ AFRAME.registerComponent('gps-camera', {
longitude: this.originCoords.longitude,
latitude: this.currentCoords.latitude,
}
position.z = this.computeDistanceMeters(this.originCoords, dstCoords);
position.z *= this.currentCoords.latitude > this.originCoords.latitude ? -1 : 1;
// update position
this.el.setAttribute('position', position);
window.dispatchEvent(new CustomEvent('gps-camera-update-position', { detail: { position: this.currentCoords, origin: this.originCoords }}));
},
/**
......@@ -5926,7 +5929,6 @@ AFRAME.registerComponent('gps-entity-place', {
return;
}
// update position.z
var dstCoords = {
longitude: this.data.longitude,
latitude: this.data.latitude,
......
......@@ -13,7 +13,7 @@
</div>
<!-- Define your 3d scene and enabled ar.js -->
<a-scene embedded arjs='trackingMethod: best;'>
<a-scene embedded arjs='trackingMethod: best; sourceWidth:1280; sourceHeight:960; displayWidth: 1280; displayHeight: 960;'>
<!-- Create a anchor to attach your augmented reality -->
<a-anchor hit-testing-enabled='true'>
......
......@@ -6,7 +6,7 @@
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Cartigli AR</title>
<script src='https://aframe.io/releases/0.9.2/aframe.min.js'></script>
<script src="../../../build/aframe-ar.min.js"></script>
<script src="../../../build/aframe-ar.js"></script>
<script src="https://unpkg.com/aframe-look-at-component@0.8.0/dist/aframe-look-at-component.min.js"></script>
<script type="module" src="./index.js"></script>
<link rel="stylesheet" type="text/css" href="./index.css"/>
......
......@@ -36,7 +36,7 @@
<br/>
Contact me any time at <a href='https://twitter.com/jerome_etienne' target='_blank'>@jerome_etienne</a>
</div>
<a-scene embedded arjs='sourceType: webcam; detectionMode: mono_and_matrix; matrixCodeType: 3x3;'>
<a-scene embedded arjs='sourceType: webcam; detectionMode: mono_and_matrix; matrixCodeType: 3x3; sourceWidth:1280; sourceHeight:960; displayWidth: 1280; displayHeight: 960;'>
<!-- handle hiro marker -->
<!-- 'registerevents' will register event listeners for the marker when it is found and lost,
as defined in the inline script above -->
......
......@@ -194,6 +194,7 @@ AFRAME.registerComponent('gps-camera', {
longitude: this.currentCoords.longitude,
latitude: this.originCoords.latitude,
};
position.x = this.computeDistanceMeters(this.originCoords, dstCoords);
position.x *= this.currentCoords.longitude > this.originCoords.longitude ? 1 : -1;
......@@ -202,12 +203,14 @@ AFRAME.registerComponent('gps-camera', {
longitude: this.originCoords.longitude,
latitude: this.currentCoords.latitude,
}
position.z = this.computeDistanceMeters(this.originCoords, dstCoords);
position.z *= this.currentCoords.latitude > this.originCoords.latitude ? -1 : 1;
// update position
this.el.setAttribute('position', position);
window.dispatchEvent(new CustomEvent('gps-camera-update-position', { detail: { position: this.currentCoords, origin: this.originCoords }}));
},
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册