Comments (12)
Maps service has this feature too.
from ar.js.
@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.
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.
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.
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.
#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.
@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.
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.
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.
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.
bump
from ar.js.
bump
from ar.js.
Related Issues (20)
- Image tracking AR.js with React stuck on loading screen , please help! HOT 2
- Help please! image tracking work but 3d model and video not showing
- change "Twitter" to "𝕏 (Twitter)" in README.md HOT 3
- The camera cannot be controlled by external parameters, especially on phones with multiple cameras,help me please!
- Why the camera fails to be used now?
- Seems like the version is Updated but not the docs and example
- Document is so misleading HOT 2
- Module Import fails in Nuxt3 --- ar-threex-location-only.js --- Cannot read properties of undefined (reading 'THREE') HOT 2
- 将ar.js引入three.js 请求一个功能
- Location based compass orientation is incorrect. It always says North is direction when starting up. HOT 3
- Location Base - Entity is following HOT 3
- Event fired when user "see" an object (location based) HOT 1
- "click" events are not emitted on Android when scene is loaded dynamically HOT 1
- Replacing a building?
- Need help implementing AR.js
- New-location-based entity position problem HOT 1
- Location Based AR.JS project mixed with AFRAME Hit Test
- Place to list device models / OS versions which cause the "content sticking to camera" problem (#278)
- Raycaster intersects invisible marker roots. Is there any landmark to distinguish between displayed and hidden elements? (marker-based)
- node_modules animation-mixer not working HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ar.js.