Skip to content
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

Move picking code into its own file #7247

Closed
lilleyse opened this issue Nov 7, 2018 · 1 comment · Fixed by #8170
Closed

Move picking code into its own file #7247

lilleyse opened this issue Nov 7, 2018 · 1 comment · Fixed by #8170

Comments

@lilleyse
Copy link
Contributor

lilleyse commented Nov 7, 2018

A majority of the code in Scene.js is now just for handling picking, made worse by #6934 and #7115. Picking code should be in its own file but still tightly integrated with Scene like View or SceneTransforms.

@lilleyse
Copy link
Contributor Author

@IanLilleyT

This is the list of function that will move to the helper file. To avoid breaking changes Scene will still have the function signatures and documentation but the implementations will go in a separate file called Picking.js that is marked as @private like View.js.

  • pick
  • pickPositionWorldCoordinates
  • pickPosition
  • drillPick
  • pickFromRay
  • drillPickFromRay
  • pickFromRayMostDetailed
  • drillPickFromRayMostDetailed
  • sampleHeight
  • clampToHeight
  • sampleHeightMostDetailed
  • clampToHeightMostDetailed

Also make sure to move any local functions that these function call. There may be cases where these functions call local functions that are used by other areas of Scene. In that case convert the local functions to private member functions of Scene. Look at Scene.prototype.isVisible for an example of that (used by View.js).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants