-
Notifications
You must be signed in to change notification settings - Fork 937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade three.js and aframe #615
base: dev
Are you sure you want to change the base?
Conversation
- three.js/examples/basic.html with the three.js lib loaded thanks to importmap
- default, default-thinner-border and dev examples
I should have upgraded most of the three and aframe location-based examples, The only issue that i found is related to Aframe i got this warning: |
- fix husky issue 'install command is DEPRECATED'
@kalwalt great! Will test the location-based examples and let you know if there's any problem but other than that, all should be good! |
Thank you @nickw1! I have the same idea, probably there shouldn't be any issue. Just a quick question; do you have an idea because exists this file: https://github.com/AR-js-org/AR.js/blob/master/aframe/dist/main.js ? |
@kalwalt I don't think that |
@kalwalt have just tested the location-based examples. Some comments:
|
Update on the above: I can get
Not sure if this is related to an internal change in A-Frame? |
Yes, It could be an internal change in A-frame. I will test your suggested fix when i can. Post edit: briefly think... If the old |
For the A-frame examples I haven't developed a |
(Sorry this is @nickw1, I logged in on a different account) Some of the I will do so in this branch if it's OK, as then we don't get master diverging. Might be worth developing a |
The problem in For now I think I'll rewrite the With the |
@kalwalt a few updates:
Related to the However I am unlikely to have much time to look into this soon, so maybe it's best raised as a separate issue. I'm more likely to be focusing on locar.js in any case. For the "old" location-based examples these seem to work fine: avoid-shaking The others appear to be using old coding standards. What I propose in that case is to change the It looks like there is nothing in this PR which stops the examples working, though. |
Those examples are not necessary, so much the better. Proceed as you suggested. As you finish I will implement the module feature for aframe as discussed. |
Hadn't the time to answer you, yes of course, work on this branch! |
343d386
to
767d2a5
Compare
OK - done. |
thank you @nickw1 if i have time i will work on this sunday evening, we are close to finish this task. |
I'm testing an example in this gist but it's not loading properly, i will investigate it. |
I'm not sure that the module aframe versions dist libs will be helpful. Let me explain, the AFRAME |
Maybe we should just stick with the "multiple three.js instances" warning now and try and re-design the code base as you say. |
@nickw1 yeah maybe, i am a bit sad because i would release an updated AR.js, the redesign process will be a bit awkard, but maybe i'am wrong. I am convinced that for I think i can start with these, probably it's needed to add some more, but it's enough to start with. Source = function (parameters) {
// the constructor
}
// the init prototype method
Source.prototype.init = function (onReady, onError) {
// init code...
} a more modern approach: class Source {
constructor() {
}
init() {
}
//private method setParameters
#setParameters()
} I will start soon to create a new repository, and to work with the basis. We will think how to proceed with this PR. |
@kalwalt your design sounds good. I think it makes sense to release AR.js with updated versions of A-Frame and three as soon as possible, then work on the redesign. So presumably aframe-ar (NFT/marker based) just uses three.js for mathematical operations? I agree that it should not be necessary for this, as three.js is intended to be a rendering library rather than a general mathematical library. |
yes, the re-design process will take some time for sure. I think i will merge this PR in the next days.
The answer is not easy and fast but briefly i summarize what happens under the hood: For the pattern/barcode and NFT markers we have the artoolkit5-js code that when detect one of them it dispatch an event with the matrixGL_RH (Right Hand OpenGL matrix). From artoolkit5-js we get also the camera Projection matrix. Inside AR.js we need them to pass the matrixGL_RH to the object3D (the root of the scene) and camera projection Matrix to the three.js PerspectiveCamera. But, for example, inside Ar.js we I just started to develop a Ar.js-core testing library, as soon as i provide a reliable code i will push on it. I'm thinking to drastically cut and simplify the aframe-ar.js code, it will help me in the code development to focus on the strictly necessary. |
@kalwalt thanks for the detail. I agree that it's a good idea to simplify the library: that was basically why I created locar.js, to focus on a small and tightly-focused location-based library which would be easier to work on and debug. |
@nickw1 I will merge this PR tomorrow in the late afternoon, after making some final tests. i will wait few days for the release so if we find some bugs maybe we can fix them. |
What kind of change does this PR introduce?
THis PR will upgrade Three.js and Aframe dependencies.
Can it be referenced to an Issue? If so what is the issue # ?
See issue #611 #504 #563 #535
How can we test it?
Test all the examples
Summary
Newer Three.js lib need to imported as a module so probably we need to create
.module.js
version for each build libs. Doing this probably we solve also issue #504Does this PR introduce a breaking change?
I hope no but this is a draft PR.
Please TEST your PR before proposing it. Specify here what device you have used for tests, version of OS and version of Browser
Other information