rohitvarkey / ThreeJS.jl

Julia interface to WebGL using Three-js custom elements and Patchwork.jl
https://rohitvarkey.github.io/ThreeJS.jl
Other
56 stars 15 forks source link

Raycaster in ThreeJS.jl #34

Closed izaid closed 7 years ago

izaid commented 7 years ago

This PR adds a simple raycaster to ThreeJS.jl. It triggers on an arbitrary JavaScript event, and uses machinery from Escher to callback into Julia as a Signal. I think this goes a long way towards adding more complex interactivity. In the future, we can extend this to Jupyter as well.

There will be a follow-on PR which provides a way to add more complex behavior directly into the JavaScript, as well as an example demonstrating that.

codecov-io commented 7 years ago

Current coverage is 90.00% (diff: 0.00%)

Merging #34 into master will decrease coverage by 3.02%

@@             master        #34   diff @@
==========================================
  Files             3          3          
  Lines            86         90     +4   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits             80         81     +1   
- Misses            6          9     +3   
  Partials          0          0          

Powered by Codecov. Last update 2104c34...f4f1776

rohitvarkey commented 7 years ago

@shashi Do you mind having a look over at the Escher JavaScript stuff here? I'm not totally familiar with that.

izaid commented 7 years ago

@rohitvarkey I updated this with Shashi's advice. It should now be ready to go. There is a corresponding PR on the JavaScript at https://github.com/rohitvarkey/three-js/pull/5. I've also added the Julia package Requires as a dependency, to handle the Escher stuff.

I'm pretty happy with this, we should be good to go!

shashi commented 7 years ago

Looks good to me! 👍

izaid commented 7 years ago

@shashi Yeah, it's a Dict with x, y, and z keys as Float64. Maybe we should make it a point, but I don't feel strongly atm. I'd just leave it for now.

rohitvarkey commented 7 years ago

@izaid Awesome stuff! The examples are really cool. 😄

@shashi Can you tag new releases of Escher and Patchwork, so that I can tag a release for ThreeJS?

shashi commented 7 years ago

Done and done!

rohitvarkey commented 7 years ago

ThreeJS v0.3.0 tagged and released too. 😄