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

Remove previous polylines when updating point positions. #26

Merged
merged 3 commits into from
Mar 9, 2020

Conversation

annxingyuan
Copy link
Contributor

@annxingyuan annxingyuan commented Mar 7, 2020

Note It's very possible that this PR is unnecessary and I'm missing a way to do this through the existing API! :)

This PR makes it so that when the point positions of the polylines are updated, the previous polylines are removed. Otherwise if you try to setSequences and animate the points, the polyline geometries will accumulate with every update of the point positions.

Note this feature is being used in the handpose demo: https://storage.googleapis.com/tfjs-models/demos/handpose/index.html

@annxingyuan annxingyuan changed the title Update polylines Remove previous polylines when updating point positions. Mar 7, 2020
@cannoneyed
Copy link
Member

Nice! Thanks for this, seems like a necessary fix (I never really did anything with the polylines)

@cannoneyed cannoneyed merged commit 28db00d into PAIR-code:master Mar 9, 2020
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.

None yet

2 participants