Elius94 / react-photo-sphere-viewer

Photosphere Viewer for React.JS
MIT License
65 stars 21 forks source link

[Bug]: 3D Arrow Lighting is Dark, which does not reflect a bug fix in the main library #37

Closed AndyBaird closed 10 months ago

AndyBaird commented 11 months ago

What happened?

Three.js changes how lighting worked which caused the 3d arrows to darken. This bug was addressed in the 5.3 release. See the change log here: https://github.com/mistic100/Photo-Sphere-Viewer/releases/tag/5.3.0

However when utilizing react-photo-sphere-viewer on version 3.4.0-psv5.4.0 the lighting of the arrows is still dark.

What should have happened?

I expected the update to 3.4.0-psv5.4.0 to address the issue, but the code changes do not appear to be effective when using react-photo-sphere-viewer.

Code

Link to original bug report that was merged into 5.3: https://github.com/mistic100/Photo-Sphere-Viewer/issues/1048

Sandbox Link

No response

Library Version

3.4.0-psv5.4.0

What operating system are you using?

macOS

What browser are you using?

Chrome

Logs

No response

Interest to fix the bug

Elius94 commented 11 months ago

Hi! I'm gonna check this asap :)

Elius94 commented 11 months ago

Can you please check with the new release?

Elius94 commented 10 months ago

I don't know why this is still happen also if the main library is up to date...

AndyBaird commented 10 months ago

I updated to 4.0.1-psv5.4.4 and there's no change. The 3d arrows are still dark from lighting changes in three.js.

I dug a little deeper and the three.js changed the lighting code in r149 and I noticed that the three.js version in node_modules/react-photo-sphere-viewer/dist/node_modules/three is r148. I believe the bug fixes from the main library aren't effective unless the version of three.js is r149 or higher.

Elius94 commented 10 months ago

Ok, it's strange because I've upgraded the main library to the latest and the lib should come with the right three version...

Elius94 commented 10 months ago

I think that's because I need to upgrade the threejs version also in my photo-sphere-viewer plugin called "lensflares plugin". This plugin is included inside the react wrapper. Tomorrow I'll try

Elius94 commented 10 months ago

image

I've updated three in the lensflares plugin and now I see the arrows like that.

Elius94 commented 10 months ago

Is it right for you? They are not black at all but also not white, I don't remember if it's wrong or not. but for sure it's better than previous

AndyBaird commented 10 months ago

I can confirm 4.0.2-psv5.4.4 fixes the lighting bug from Three.js, thanks!

mkubdev commented 10 months ago

Is it right for you? They are not black at all but also not white, I don't remember if it's wrong or not. but for sure it's better than previous

Yes it's due to three.js release r155 that contain a change in context of lighting: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733.

The grey arrow color is normal!