Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #7247
Moved most of the picking functions and their helper functions out of
Scene.js
and into a new file calledPicking.js
, a transfer of about 800 lines of code. SinceScene.js
exposes the public api for picking,Scene.js
is simply a passthrough for all picking functions. Tests, linter, and sandcastle demos are all working. Hopefully nothing slipped through the cracks. No new tests or public facing changes were made.Some thoughts:
Scene.js
documentation lists the kinds of errors each function can trigger, but the actual handling happens inPicking.js
. This could be good if other areas of code besidesScene.js
call picking functions, but it makes theScene.js
documentation a bit confusing.updateMostDetailedRayPick
andgetPickDepth
are the only two functions inPicking.js
that are called fromScene.js
but are not public api functions. Should these kinds of functions stay inPicking.js
? Also, shouldupdateMostDetailedRayPicks
go inScene.js
orPicking.js
?Picking.js
, but decided against it becauseScene.js
split them up to be near the functions they are used. The thing is, some of these scratch variables are used in more than one function so their placement in code may appear random at times.