Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

about the mouse thing #33

Closed
irisred opened this issue Jul 3, 2015 · 6 comments
Closed

about the mouse thing #33

irisred opened this issue Jul 3, 2015 · 6 comments

Comments

@irisred
Copy link

irisred commented Jul 3, 2015

I saw there was a circle at where the mouse moved or click, I use other controller to do the mouse thing, but could you tell me how to add the circle to my controller? there are the X-position and Y-position on the page of my controller, which part of the code add the circle at the position? thanks

@stephomi
Copy link
Owner

stephomi commented Jul 3, 2015

It's here : https://github.com/stephomi/sculptgl/blob/master/src/mesh/Selection.js

It only displays the circle while we are picking the mesh. And if we sculpt, I only show the small dot.

@irisred
Copy link
Author

irisred commented Jul 4, 2015

I saw that, what about the sketchfab? where is the circle of it defined? https://github.com/sketchfab/sculptgl

@stephomi
Copy link
Owner

stephomi commented Jul 4, 2015

Ah... it was different back then.
It was in the shader :
https://github.com/sketchfab/sculptgl/blob/master/shaders/reflection.frag#L17-L20

@irisred
Copy link
Author

irisred commented Jul 5, 2015

is the js function called "picking", or just loadshaders function load the .frag file?
like here:https://github.com/sketchfab/sculptgl/blob/master/sculptgl.js#L186-L209
if I use another controller just like touch pen or Leap Motion, can the circle also be displayed?

@stephomi
Copy link
Owner

stephomi commented Jul 5, 2015

It's the shader that draw the circle...
It uses the center of the circle here
And its radius here

The picking is the stuffs that check what is under your cursor by casting a ray.
It's done here in the mousemove event.

Keep in mind that the sculptfab version is almost 2 years old and that I don't maintain it.
You should probably use the latest verson :).

@irisred
Copy link
Author

irisred commented Jul 6, 2015

okay, thanks for your reply and patience, I will try the latest version,
anyway, thank you

@irisred irisred closed this as completed Jul 25, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants