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

Adds EventDispatcher and change event to DeviceOrientationControls and FlyControls #19924

Merged
merged 4 commits into from
Aug 23, 2020
Merged

Adds EventDispatcher and change event to DeviceOrientationControls and FlyControls #19924

merged 4 commits into from
Aug 23, 2020

Conversation

gsimone
Copy link
Contributor

@gsimone gsimone commented Jul 25, 2020

Implementation is lifted from OrbitControls, it checks dot product for quaternion change and dist Squared for position change

Types now extend EventDispatcher

@Mugen87
Copy link
Collaborator

Mugen87 commented Jul 27, 2020

Can you please edit the files in the examples/js directory instead and then generate the modules via:

node utils/modularize.js

@gsimone
Copy link
Contributor Author

gsimone commented Jul 27, 2020

Made the changes to the js versions and built the jsm ones 👍

@Mugen87
Copy link
Collaborator

Mugen87 commented Jul 27, 2020

Looks good now!

Can you please also update the docs for both classes? The idea is to add a new section called Events similar to the other pages e.g. https://threejs.org/docs/index.html#examples/en/controls/OrbitControls

@gsimone
Copy link
Contributor Author

gsimone commented Jul 27, 2020

I only added the Change event to both controls, do you think it's worth adding start and end? ( taking Orbit as an example ) Should be easy enough to do.

@Mugen87
Copy link
Collaborator

Mugen87 commented Jul 27, 2020

It's probably good if the controls fire similar events if possible. Would be great if you can have a look! 👍

@gsimone
Copy link
Contributor Author

gsimone commented Jul 27, 2020

I was adding the events but realized that while OrbitControls have precise start and end times ( ie. when the user clicks ), fly and deviceOrientation don't, it's always being updated and doesn't really start/end

So I just committed the doc changes, if you think the two controls need more events I can look into that but I would open a new issue and PR

@gsimone
Copy link
Contributor Author

gsimone commented Aug 1, 2020

Hi 👋
Is there anything missing to merge this?

@Mugen87
Copy link
Collaborator

Mugen87 commented Aug 17, 2020

Is there anything missing to merge this?

@mrdoob still needs to review the PR 👍

@mrdoob mrdoob added this to the r120 milestone Aug 23, 2020
@mrdoob mrdoob merged commit 1b4d6ce into mrdoob:dev Aug 23, 2020
@mrdoob
Copy link
Owner

mrdoob commented Aug 23, 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.

3 participants