cesium icon indicating copy to clipboard operation
cesium copied to clipboard

Remove `SceneTransforms.wgs84To*` functions in 1.121

Open ggetz opened this issue 1 year ago • 3 comments

The following functions were deprecated in https://github.com/CesiumGS/cesium/pull/12000, and should be entirely removed for the 1.121 release:

  • SceneTransforms.wgs84ToDrawingBufferCoordinates has been deprecated. It will be removed in 1.121. Use SceneTransforms.worldToDrawingBufferCoordinates instead.
  • SceneTransforms.wgs84ToWindowCoordinates has been deprecated. It will be removed in 1.21. Use SceneTransforms.worldToWindowCoordinates instead.

ggetz avatar Jul 01 '24 14:07 ggetz

Hi gabby, can i take on this issue for a first time from jtc?

jvrjsanchez avatar Aug 20 '24 22:08 jvrjsanchez

@jvrjsanchez Go for it!

ggetz avatar Aug 21 '24 12:08 ggetz

This update ensures that our codebase aligns with the latest changes and improves future maintainability.

  • Updated method calls in the codebase from wgs84ToDrawingBufferCoordinates to worldToDrawingBufferCoordinates.
  • Updated method calls in the codebase from wgs84ToWindowCoordinates to worldToWindowCoordinates.
  • Ran tests using the original gulpfile.js to execute them.
  • Verified that all tests for SceneTransforms pass successfully in different viewing modes (3D, ColumbusView, 2D) and frustum configurations.
  • Ensured that test output is correctly reported and errors are handled gracefully.

jvrjsanchez avatar Aug 27 '24 03:08 jvrjsanchez

I would like to ask, why not modify the original method instead of abandoning it and using the new method? It is difficult to achieve backward compatibility with cesium

xiyuvi avatar Feb 07 '25 06:02 xiyuvi

@xiyuvi The name of the function, wgs84, was no longer accurate since it uses the current ellipsoid value. It defaults to, but is not restricted to, the WGS84 ellipsoid.

The deprecation warnings, along with notes in CHANGES.md, should be reviewed to track any breaking changes in the future. See this guide for details.

ggetz avatar Feb 10 '25 19:02 ggetz

@ggetz Thank you for your hard work. I think it would be better to keep the original wgs84ToDrawingBufferCoordinates function and internally call the new worldToDrawingBufferCoordinates function. This can ensure that projects running old cesium versions can be fully compatible after upgrading to the new cesium. What I said may not be correct, for your reference only. Thank you again

xiyuvi avatar Feb 27 '25 01:02 xiyuvi