Skip to content

Commit

Permalink
Merge pull request #81 from tilak-io/remove-offsets-in-global-position
Browse files Browse the repository at this point in the history
Remove offsets in global position
  • Loading branch information
HmZyy authored Dec 18, 2023
2 parents 6d71be3 + cb898ac commit b858e8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tiplot",
"version": "1.2.1",
"version": "1.2.2",
"private": true,
"homepage": "./",
"proxy": "http://localhost:5000",
Expand Down
11 changes: 4 additions & 7 deletions src/controllers/Entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default class Entity {
const loader = new GLTFLoader();
loader.load(
`http://localhost:${PORT}/model`,
function (gltf) {
function(gltf) {
instance.mesh = gltf.scene;
instance.mesh.children[0].children[0].material.transparent = true;
instance.mesh.children[0].children[0].material.opacity = instance.alpha;
Expand All @@ -137,7 +137,7 @@ export default class Entity {
scene.add(instance.mesh);
},
undefined,
function (error) {
function(error) {
console.log(error);
console.log("failed to load drone, setting up default cube");
const geometry = new THREE.BoxGeometry(2, 0.5, 0.3);
Expand All @@ -161,11 +161,8 @@ export default class Entity {
this.ref_y = e.props[0].y;
this.ref_z = e.props[0].z;
} else {
const [x, y] = getXY(e.props[0].longitude, e.props[0].lattitude);
// const z = -e.props[0].altitude;
this.ref_x = x;
this.ref_y = y;
// this.ref_z = z;
this.ref_x = 0;
this.ref_y = 0;
this.ref_z = 0;
}
}
Expand Down

0 comments on commit b858e8a

Please sign in to comment.