Izzimach / react-three-legacy

React bindings to create and control a 3D scene using three.js
Other
1.52k stars 128 forks source link

Add Scene prop projectPointerEventRef #67

Closed gilbox closed 8 years ago

gilbox commented 8 years ago

Previously, I was adding ref prop to Scene component ie ref={sceneRef => this.scene = sceneRef}. In order to get direct access to projectPointerEvent function.

... But since you refactored some stuff I can no longer access the projectPointerEvent function. This change allows me to do this:

projectPointerEventRef={projectPointerEvent => this.projectPointerEvent = projectPointerEvent}
Izzimach commented 8 years ago

I'll merge this so that your stuff works, but props may move around eventually to break this.