supermedium / aframe-react

:atom: Build virtual reality experiences with A-Frame and React.
https://ngokevin.github.io/aframe-react-boilerplate/
MIT License
1.42k stars 151 forks source link

Fix event update #90

Closed ip closed 7 years ago

ip commented 7 years ago

Previous code didn't work correctly when event listener is a closure and it is replaced by a similar clojure with different enclosed variables.

May be related to the issue #89.

ngokevin commented 7 years ago

Thanks! Can we get a unit test that reproduces?

ip commented 7 years ago

All right, I'll make it later

ip commented 7 years ago

Sorry, unit test is postponed, have no time at the moment. Any help is appreciated.

By the way, your unit test config is interesting. I want to use parts of it for our project, ones that mock WebGL and allow headless run.

ip commented 7 years ago

Just have a look at this snippet: https://jsbin.com/widupebula/edit?js,console

ngokevin commented 7 years ago

Yeah, it just stubs out any WebGL renderer so you can assert JS stuff.