Skip to content

Loading…

Callback for controls and event.preventdefault configuration from outside #2427

Closed
bbence84 opened this Issue · 1 comment

2 participants

@bbence84

Hi,

I have started to work with three.js in the past couple of days, and must say, very impressive! :)
It's good to see the finally the possibility to create top quality 3D apps directly for the browser is a reality...

I have two requests so far, maybe they don't make much sense, but here they are anyway:

  • ability to have a callback function for the controls: when a position or rotation or lookat changes, we should have a callback function. This is good for stuff that reacts on player position change (e.g. multiplayer sync)
  • I see currently the event.preventdefault is commented out in the controls, which makes sense, but it would still be nice to have a parameter to enable this.

I know I could just as have edited the three.js source myself (actually I did, locally), but having these features by default make it easier to upgrade to a newer version.

Thanks!
Bence

@mrdoob
Owner

There is a change event being dispatched in relevant controls.

@mrdoob mrdoob closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.