jeromeetienne / tquery

extension system for three.js
http://jeromeetienne.github.io/tquery/
MIT License
651 stars 120 forks source link

Pull request for cameraChange event and DomEvent adjustment #189

Closed leconcepteur closed 12 years ago

leconcepteur commented 12 years ago

Added the event cameraChange, triggered when the camera is changed. Adapted the tQuery domevent to use the cameraChange event. Corrected threex.domevent.js to be compatible with all types of Three.js cameras.

leconcepteur commented 12 years ago

I'm not sure I did it right as it's my first Pull Request. I changed the the file "threex.domevent.js" but I can fork the Threex project if you prefer. Also, I did the request on the master branch, should I do it on the dev branch instead?

jeromeetienne commented 12 years ago

cool! it seems good at first sight :)

yeah dont worry about the tquery-all / tquery-bundle ... i should not put that in the git in itself...

i will look and merge tomorrow night. im out of town tomorrow

jeromeetienne commented 12 years ago

thinking about this... several observations thinking out loud

jeromeetienne commented 12 years ago

possible solution ?

jeromeetienne commented 12 years ago
mesh.on('click', function(){ /* */ }, world);

with world optional. @leconcepteur what do you think ? would that fly ? (in anycase code away, the api wont change in any significative way)

leconcepteur commented 12 years ago

It sounds good to me!

jeromeetienne commented 12 years ago

https://github.com/jeromeetienne/tquery/commit/0d8b1dd2b89c884d50c742d367bdd0e11d57d9a1 i completed the modif you made. there are all your modification but the change of camera event. i didnt like it when i coded this in the train this morning. was changing camera important in your case ?

https://github.com/jeromeetienne/tquery/blob/master/plugins/domevent/tquery.domevent.js here is the new version.

leconcepteur commented 12 years ago

No, you're right. I might do a plugin if I really need to change the camera. I like the way you changed the DomEvent.

Merci