Giter VIP home page Giter VIP logo

Comments (12)

marcusx2 avatar marcusx2 commented on May 27, 2024 1

Maps service has this feature too.

from ar.js.

nickw1 avatar nickw1 commented on May 27, 2024 1

@marcusx2 it's actually quite easy but I haven't had the time this week. I will do it as soon as I can.

from ar.js.

marcusx2 avatar marcusx2 commented on May 27, 2024 1

Hopefully a movefloatingorigin method can also make it to a next release together with world-origin-as-original-GPS-position. In this case the camera could also have a distance property which is the distance from the world origin. The method doesn't have to be called automatically and you could let the user make the decision of calling it or not. So for example, every time the gps position event fires, I check the distance of the camera from the origin, and if I regard it as far enough I call the movefloatingorigin method myself.

from ar.js.

nickw1 avatar nickw1 commented on May 27, 2024 1

OK what I think I'll do is implement #498, #499 and #502 for the next release (bugfix release 3.4.4), keeping this as an optional for the moment (but will probably make it the default in 3.5). Your other issues are a little more complex, and perhaps less critical, so will leave these to a later release.

from ar.js.

nickw1 avatar nickw1 commented on May 27, 2024 1

Sorry, no I also meant the floating origin as well. I will however leave #501 for now. (Actually #500 should be easy to fix too, so add that in as well).

from ar.js.

nickw1 avatar nickw1 commented on May 27, 2024 1

#508 allows the initial GPS position to be used as the world origin.

The floating origin however will require a rewrite of part of the code so I'm proposing postponing it for the 3.5 release, and at that point, introducing a breaking change of making the initial GPS position the world origin by default.

from ar.js.

nickw1 avatar nickw1 commented on May 27, 2024

@marcusx2 I see what you mean. As it happens the older location-based components (not new-location-based) to set the world origin to be the original GPS position, but this was removed for simplicity.

However, in the light of what you have said, I can add it back to new-location-based, so that the world origin is the initial position and the objects have coordinates relative to the initial GPS position.

I am slightly concerned about updating the world coordinates of the objects, though, as this may impact performance particularly if you have large numbers of objects. Perhaps that can be added in as an optional feature?

So, for the next release I will optionally restore the original behaviour, i.e. world origin is the initial GPS position. To avoid breaking existing code, however, it will not be the default, it will require a flag to be passed in.

from ar.js.

marcusx2 avatar marcusx2 commented on May 27, 2024

Hello @nickw1 , thank you for your reply.

So, for the next release I will optionally restore the original behaviour, i.e. world origin is the initial GPS position. To avoid breaking existing code, however, it will not be the default, it will require a flag to be passed in.

This would certainly help a lot and fix most cases. It would only break if the user started using ARJS too distant from the entities anyways. On this case the world position of the camera would end up on gigantic values as the user finally arrives at the locations and the problem would happen again.

I am slightly concerned about updating the world coordinates of the objects, though, as this may impact performance particularly if you have large numbers of objects. Perhaps that can be added in as an optional feature?

As an optional feature it would be great, I don't mind. Like I said, having an optional threshold to reset the camera to world origin and the other entities to correct relative world position would be great! (e.g. threshold is 5000, which means world position is 5000 on either axis). Of course if an entity relative to the camera is on a distance bigger than the threshold, it wouldn't even show up! Will you implement floating origin as well?

from ar.js.

marcusx2 avatar marcusx2 commented on May 27, 2024

So, for the next release I will optionally restore the original behaviour, i.e. world origin is the initial GPS position. To avoid breaking existing code, however, it will not be the default, it will require a flag to be passed in.

@nickw1 is this change hard to do, can you guide me through it? If you can send me the modified version with just this change I'd greatly appreciate it. If it's not something trivial then never mind, I can wait until next release. Thanks!

from ar.js.

marcusx2 avatar marcusx2 commented on May 27, 2024

OK what I think I'll do is implement #498, #499 and #502 for the next release (bugfix release 3.4.4), keeping this as an optional for the moment (but will probably make it the default in 3.5). Your other issues are a little more complex, and perhaps less critical, so will leave these to a later release.

I think you mean you will implement initial gps position at world origin for the next release, but not the floating origin(movefloatingorigin method) which is this issue. It's because implementing initial gps position at world origin is the first step.

I'd say #498 is the most critical, then comes the rest.

Ok I understand. Thank you very much, looking forward to the next bugfix release!

from ar.js.

marcusx2 avatar marcusx2 commented on May 27, 2024

bump

from ar.js.

marcusx2 avatar marcusx2 commented on May 27, 2024

bump

from ar.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.