jasonChen1982 / three.interaction.js

three.js interaction toolkit, help you built an interaction event-system for three.js, binding interaction event like browser-dom
411 stars 73 forks source link

Can you add double - click and right - click events #12

Closed blksky closed 5 years ago

blksky commented 5 years ago

Your library is very useful to me, but there are still some problems: 1, Hope to be able to increase double-click events and right-click events;

  1. When adding an event to the Scene, the event should be triggered even if the object is not hit, which is helpful for some logical processing of the program;
jasonChen1982 commented 5 years ago

I can't understand point 2, can you give more information about it

blksky commented 5 years ago

point 2 is not a problem,i bind event like this, and the problem solved: this.interaction = new Interaction(this.renderer, this.scene, this.camera); this.interaction.addEventListener(EventTypes.mousedown, this.handleMousedown.bind(this));