@@ -139,13 +139,15 @@ function WebGLRenderer(canvas, compositor, eventDiv) {
139
139
this . bufferRegistry . allocate ( cutout . spec . id , 'indices' , cutout . spec . bufferValues [ 3 ] , 1 ) ;
140
140
141
141
/**
142
- * WebGL Picking by caputing hit testing ('clicks ') using the
142
+ * WebGL Picking by caputing events (e.g. 'click ') using the
143
143
* main famous HTML element for capturing events.
144
144
*/
145
+ var ev ;
145
146
this . listeners = { } ;
146
147
this . meshIds = 0 ;
147
- this . eventsMap = [ 'click' ] ;
148
- var ev ;
148
+ this . eventsMap = [ 'click' , 'dblclick' , 'mousewheel' , 'touchstart' ,
149
+ 'keyup' , 'keydown' , 'mousedown' , 'mouseup' ,
150
+ 'scroll' , 'select' , 'touchend' , 'wheel' ] ;
149
151
150
152
var len = this . eventsMap . length ;
151
153
for ( var i = 0 ; i < len ; i ++ ) {
@@ -213,7 +215,7 @@ WebGLRenderer.prototype.checkEvent = function checkEvent(x, y, type) {
213
215
var picked = this . listeners [ type ] [ meshId ] ;
214
216
215
217
if ( picked ) {
216
- this . compositor . sendEvent ( picked . path , 'click' , { } ) ;
218
+ this . compositor . sendEvent ( picked . path , type , { } ) ;
217
219
}
218
220
219
221
return picked ;
0 commit comments