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

Raycaster: Deprecate .linePrecision. #18648

Merged
merged 1 commit into from
Feb 18, 2020
Merged

Raycaster: Deprecate .linePrecision. #18648

merged 1 commit into from
Feb 18, 2020

Conversation

Peque
Copy link
Contributor

@Peque Peque commented Feb 17, 2020

Fixes #18590.

There were no previous tests for Raycaster's precision/threshold, so I added none myself. 😅

First PR in this project and very little experience with JS. Review with care... 😇

@Peque Peque requested a review from Mugen87 February 17, 2020 00:53
@Peque Peque mentioned this pull request Feb 17, 2020
2 tasks
@Peque
Copy link
Contributor Author

Peque commented Feb 17, 2020

I ended-up pushing some tests.

@Mugen87
Copy link
Collaborator

Mugen87 commented Feb 17, 2020

Please add this code to Three.Legacy.js, otherwise user code will break.

Object.defineProperties( Raycaster.prototype, {

	linePrecision: {
		get: function () {

			console.warn( 'THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead.' );
			return this.params.Line.threshold;

		},
		set: function ( value ) {

			console.warn( 'THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead.' );
			this.params.Line.threshold = value;

		}
	}

} );

@Mugen87 Mugen87 changed the title Deprecate Raycaster's .linePrecision (#18590) Raycaster: Deprecate .linePrecision. Feb 17, 2020
@Peque Peque force-pushed the threshold branch 2 times, most recently from 554c866 to b30437b Compare February 17, 2020 11:43
@Peque
Copy link
Contributor Author

Peque commented Feb 17, 2020

@Mugen87 Added the deprecation warning in b30437b. Seems to be working fine:

Screenshot from 2020-02-17 12-44-33

I can squash the fixup commits before merging. Feel free to squash them yourself if you prefer so.

I see you changed the MR description, so maybe you want me to change the commit subject too?

@Peque Peque requested a review from Mugen87 February 17, 2020 11:46
@Mugen87
Copy link
Collaborator

Mugen87 commented Feb 17, 2020

I see you changed the MR description, so maybe you want me to change the commit subject too?

No, not necessary. I've only changed the PR title since it makes my life easier when writing the release notes^^.

@Peque
Copy link
Contributor Author

Peque commented Feb 17, 2020

No, not necessary. I've only changed the PR title since it makes my life easier when writing the release notes^^.

@Mugen87 Understood. 😊 👍

Do you want me to squash the fixup commits and force-push the changes? I think GitHub allows you to see diffs between force-pushed changes (to verify I did not introduce new changes since your last review), but if you want to squash them yourself, I'll leave it to you.

@Mugen87
Copy link
Collaborator

Mugen87 commented Feb 17, 2020

Do you want me to squash the fixup commits and force-push the changes?

That would be great since the merge option Squash and merge is not yet enabled for this repo.

@Peque
Copy link
Contributor Author

Peque commented Feb 17, 2020

@Mugen87 Done. 😊

@mrdoob mrdoob added this to the r114 milestone Feb 18, 2020
@mrdoob mrdoob merged commit a2a16e7 into mrdoob:dev Feb 18, 2020
@mrdoob
Copy link
Owner

mrdoob commented Feb 18, 2020

Thanks!

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

Successfully merging this pull request may close these issues.

Inconsistent raycast precision API
3 participants