jeromeetienne / AR.js

Efficient Augmented Reality for the Web - 60fps on mobile!
MIT License
15.8k stars 2.22k forks source link

model show bug #455

Closed wkl-coder closed 5 years ago

wkl-coder commented 5 years ago

Do you want to request a feature or report a bug? bug

What is the current behavior? The first loading of the material in android chrome is fine, and the second time the material flashes, it will only show up when the cache is cleared and reloaded, and it work well in safari.

Please mention other relevant information such as the browser version, Operating System and Device Name google pixel

you can go to https://webar.dyver.se/103 test

cann1132 commented 5 years ago

same here, i need to clear all data before access again

wkl-coder commented 5 years ago

@cann1132 yes , did you fixed it ?

cann1132 commented 5 years ago

@544531645 no, just the same, cleaning cache and browsing data everytime..

commentatorboy commented 5 years ago

Not me. I reloaded the url 3 times and it still shows the model fine. I am using android 8 + chrome on a moto e5. What do you mean by "flashes" like it shows and then disappears?

Try firefox or on a laptop... see if the problem also happens there.

cSparkle commented 5 years ago

@544531645 The link you shared works perfectly for me on Chrome (v73) using macbook (mojave v10.14.3). Were you able to find a solution?

I'm experiencing a similar issue with my code, but I don't even see the flash. Everything appears fine on a fresh load, but no models show up for any of my markers (custom or preset) on page reload. Clearing the cache does not fix the issue for me. I'm experiencing this on Safari, Firefox, and Chrome on both my macbook and my android from my staging and dev environments.

cann1132 commented 5 years ago

@cSparkle I don't know how your produced the marker, but i was having the same issue while ago. Currently,I can say that "hiro" or custom marker recognition is not stable.

And I think that unfortunately @jeromeetienne left ar.js development.

commentatorboy commented 5 years ago

Yeah I have noticed this problem on a Iphone X. Have @544531645 tried to push the "VR" button? To see if it works in that? Another cause can be the size of the model. Like if it is 10 MB it might take a longer time to load and show, and might not be loaded correctly.

wkl-coder commented 5 years ago

I already fixed it .

wkl-coder commented 5 years ago
 var newCamera = new THREE.PerspectiveCamera();
    newCamera.near = 1;
    newCamera.far = 100;
    sceneEl.camera = newCamera;
  sceneEl.addEventListener('loaded', () => {
    var newCamera = new THREE.PerspectiveCamera();
    newCamera.near = 1;
    newCamera.far = 100;
    sceneEl.camera = newCamera;
  });
wkl-coder commented 5 years ago

I don't know why need twice , but when one time . it not work . now I work it well @cann1132

commentatorboy commented 5 years ago

@544531645 nice! Just wanted to add that the "sceneEl" variable is from: const sceneEl = document.querySelector('a-scene');

I want to test it myself, although, I guess we can close this issue of the time being.