Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display the caption and make each mesh respond to click events for the link #19

Open
robes opened this issue Feb 9, 2018 · 4 comments

Comments

@robes
Copy link
Contributor

robes commented Feb 9, 2018

The caption and link, discussed in #18 , should also be displayed within the model. Ideally, we could display the caption hovering over each region in the model, perhaps only when the user "mouses over" the mesh object. And also ideally, then the user clicks on a mesh object in the model, the event could send the user to the corresponding link location.

@NickolausDS
Copy link
Collaborator

we could display the caption hovering over each region in the model, perhaps only when the user "mouses over" the mesh object.

When you say '"mouses over" the mesh object' did you envision them mousing over items in the "Meshes" dropdown menu or mousing over the actual meshes displayed in 3d space?

I notice there are already links displayed in the meshes dropdown, for example here: https://dev.facebase.org/mesh-viewer/view.html?model=https://dev.facebase.org/data/mesh/19dpf/19model.json

@robes
Copy link
Contributor Author

robes commented Apr 30, 2018

When you say '"mouses over" the mesh object' did you envision them mousing over items in the "Meshes" dropdown menu or mousing over the actual meshes displayed in 3d space?

The latter -> "...mousing over the actual meshes displayed in 3d space"

@NickolausDS NickolausDS self-assigned this May 2, 2018
@NickolausDS
Copy link
Collaborator

NickolausDS commented May 2, 2018

Progress Update:

The general method I know of for finding objects in a 3D projection is through Ray Casting. Ray Casting doesn't appear to be officially supported, but there is a 'prototype' function that defines it here, which takes the bounding box and start/end vectors. This could be attached to a hover event which does have built in support.

Edit: Mixed up Ray Tracing with Casting.
Edit 2: Ray Casting is supported, but is called 'pick' for grabbing a 3d object from a 2d point. The original code for mesh-viewer actually had an implementation for clicking an object and displaying info about it, however it seems to no longer work and was disabled a while ago.

@NickolausDS
Copy link
Collaborator

The underlying code does work for Safari, but not with Chrome due to a bug in XTK with the pick function:

[.Offscreen-For-WebGL-0x7fe17b111a00]GL ERROR :GL_INVALID_OPERATION : glDrawArrays: Source and destination textures of the draw are the same.

An overview of the underlying problem can be found here.

A bug report was filed with XTK in early 2015 here.

@NickolausDS NickolausDS removed their assignment May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants