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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 3D-file-viewer component #1558

Merged
merged 8 commits into from Jul 19, 2018

Conversation

Projects
None yet
4 participants
@btzr-io
Collaborator

btzr-io commented Jun 6, 2018

Changes

A basic ThreeJS 3D viewer based on Autodesk/3DViewerComponent

  • Add 3D file-viewing to LBRY desktop app #1409

Test

lbry://stl#b4f0c103be510a516c8ebb98ceb093dc745e7981

Todo (WIP)

  • Threejs + React.
  • Load blob from claim
  • Show Grid
  • Render 3D-model.
  • Add 3D-file support for getMediaType function lbryio/lbry-redux#41
  • Investigate render bug. mrdoob/three.js#12499 (comment)
  • Ensure that STL files have valid normal data.
  • Show loading message
  • Handle Errors
  • Adaptive Theme (Dark / Light) 馃帹
  • STL loader support.
  • OBJ loader support.

Preview

@btzr-io btzr-io changed the title from add threeViewer component to Add threeViewer component Jun 6, 2018

@btzr-io btzr-io changed the title from Add threeViewer component to Add 3D-file-viewer component Jun 6, 2018

@btzr-io btzr-io referenced this pull request Jun 6, 2018

Closed

Add 3D file-viewer support #1542

12 of 14 tasks complete

@tzarebczan tzarebczan requested a review from seanyesmunt Jun 8, 2018

@lbry-bot lbry-bot assigned seanyesmunt and unassigned seanyesmunt Jun 8, 2018

@seanyesmunt

This comment has been minimized.

Show comment
Hide comment
@seanyesmunt

seanyesmunt Jun 8, 2018

Member

@btzr-io Is this ready for review?

Member

seanyesmunt commented Jun 8, 2018

@btzr-io Is this ready for review?

@btzr-io

This comment has been minimized.

Show comment
Hide comment
@btzr-io

btzr-io Jun 9, 2018

Collaborator

@seanyesmunt Maybe we should use a progress bar instead of the current spinner for the loading screen, What do you think?

Collaborator

btzr-io commented Jun 9, 2018

@seanyesmunt Maybe we should use a progress bar instead of the current spinner for the loading screen, What do you think?

@btzr-io

This comment has been minimized.

Show comment
Hide comment
@btzr-io

btzr-io Jun 9, 2018

Collaborator

@seanyesmunt So I think it's ready for review.

Collaborator

btzr-io commented Jun 9, 2018

@seanyesmunt So I think it's ready for review.

@seanyesmunt

This comment has been minimized.

Show comment
Hide comment
@seanyesmunt

seanyesmunt Jun 12, 2018

Member

Will check this out today!

Member

seanyesmunt commented Jun 12, 2018

Will check this out today!

@btzr-io

This comment has been minimized.

Show comment
Hide comment
@btzr-io

btzr-io Jun 12, 2018

Collaborator

ok, I'll setup a test branch...

Collaborator

btzr-io commented Jun 12, 2018

ok, I'll setup a test branch...

@btzr-io

This comment has been minimized.

Show comment
Hide comment
@btzr-io
Collaborator

btzr-io commented Jun 13, 2018

@seanyesmunt

This comment has been minimized.

Show comment
Hide comment
@seanyesmunt

seanyesmunt Jun 13, 2018

Member

Hey @btzr-io. Probably won't get a chance to look at this until the redesign is live. This will be one of the first things that go in after that though.

Member

seanyesmunt commented Jun 13, 2018

Hey @btzr-io. Probably won't get a chance to look at this until the redesign is live. This will be one of the first things that go in after that though.

@btzr-io btzr-io added the on hold label Jun 16, 2018

@seanyesmunt seanyesmunt removed the on hold label Jun 27, 2018

@seanyesmunt

This comment has been minimized.

Show comment
Hide comment
@seanyesmunt

seanyesmunt Jun 27, 2018

Member

Ok! Ready to get this in. I'm seeing Sorry, looks like we can't play this file. when I go to the file in your description. Not sure if this is from a recent change or your code.

Is this dependent on #1576?

Member

seanyesmunt commented Jun 27, 2018

Ok! Ready to get this in. I'm seeing Sorry, looks like we can't play this file. when I go to the file in your description. Not sure if this is from a recent change or your code.

Is this dependent on #1576?

@seanyesmunt

This comment has been minimized.

Show comment
Hide comment
@seanyesmunt

seanyesmunt Jun 27, 2018

Member

Oh I see that PR references this component, so it's the other way around. Ignore me

Member

seanyesmunt commented Jun 27, 2018

Oh I see that PR references this component, so it's the other way around. Ignore me

@btzr-io

This comment has been minimized.

Show comment
Hide comment
@btzr-io

btzr-io Jun 28, 2018

Collaborator

@seanyesmunt where did you test it? check the test-branch: #1558 (comment)
This is dependent of #1576 so you should probably review that one first 鉁岋笍

Collaborator

btzr-io commented Jun 28, 2018

@seanyesmunt where did you test it? check the test-branch: #1558 (comment)
This is dependent of #1576 so you should probably review that one first 鉁岋笍

@btzr-io btzr-io referenced this pull request Jul 4, 2018

Merged

Fix getMediaType logic #51

@tzarebczan

This comment has been minimized.

Show comment
Hide comment
@tzarebczan

tzarebczan Jul 6, 2018

Member

@btzr-io can you try lbry://stl? Not seeing anything but the grid when it first opens. Went out and back into the claim, then it worked.

Member

tzarebczan commented Jul 6, 2018

@btzr-io can you try lbry://stl? Not seeing anything but the grid when it first opens. Went out and back into the claim, then it worked.

@btzr-io

This comment has been minimized.

Show comment
Hide comment
@btzr-io

btzr-io Jul 8, 2018

Collaborator

@tzarebczan fixed in 5e1d6c2

Collaborator

btzr-io commented Jul 8, 2018

@tzarebczan fixed in 5e1d6c2

@tzarebczan

This comment has been minimized.

Show comment
Hide comment
@tzarebczan

tzarebczan Jul 12, 2018

Member

@btzr-io tried an stl file yesterday on this branch and got "this file cannot be played".

Member

tzarebczan commented Jul 12, 2018

@btzr-io tried an stl file yesterday on this branch and got "this file cannot be played".

@btzr-io

This comment has been minimized.

Show comment
Hide comment
@btzr-io

btzr-io Jul 13, 2018

Collaborator

@tzarebczan There is no implementation of the component yet 馃檭

Collaborator

btzr-io commented Jul 13, 2018

@tzarebczan There is no implementation of the component yet 馃檭

@seanyesmunt

This comment has been minimized.

Show comment
Hide comment
@seanyesmunt

seanyesmunt Jul 16, 2018

Member

Planning to merge this sometime this soon.

Member

seanyesmunt commented Jul 16, 2018

Planning to merge this sometime this soon.

@seanyesmunt

Very small comments. Also asking @skhameneh for a review. I will continue to test.

@seanyesmunt seanyesmunt requested a review from skhameneh Jul 16, 2018

@lbry-bot lbry-bot assigned skhameneh and unassigned skhameneh Jul 16, 2018

@seanyesmunt

This comment has been minimized.

Show comment
Hide comment
@seanyesmunt

seanyesmunt Jul 16, 2018

Member

We are seeing some issues where the app becomes super un-responsive after viewing 3d files (I've had to restart twice after my computer freezes).

Will continue to test, but it should be simple stuff to help improve performance.

Member

seanyesmunt commented Jul 16, 2018

We are seeing some issues where the app becomes super un-responsive after viewing 3d files (I've had to restart twice after my computer freezes).

Will continue to test, but it should be simple stuff to help improve performance.

@skhameneh

This comment has been minimized.

Show comment
Hide comment
@skhameneh

skhameneh Jul 16, 2018

Member

Hey @btzr-io can you add debug info for geometry count?
@seanyesmunt is having trouble when working with a demo, his machine freezes when leaving the viewer.

I'd also like to note that it might be good to explore simplifying complex geometries before rendering:
https://threejs.org/examples/?q=simplifi#webgl_modifier_simplifier

Member

skhameneh commented Jul 16, 2018

Hey @btzr-io can you add debug info for geometry count?
@seanyesmunt is having trouble when working with a demo, his machine freezes when leaving the viewer.

I'd also like to note that it might be good to explore simplifying complex geometries before rendering:
https://threejs.org/examples/?q=simplifi#webgl_modifier_simplifier

@seanyesmunt

This comment has been minimized.

Show comment
Hide comment
@seanyesmunt

seanyesmunt Jul 16, 2018

Member

Possibly realated to running in dev mode. I shared the binaries internally and didn't hear any issues. I'll try running those.

Member

seanyesmunt commented Jul 16, 2018

Possibly realated to running in dev mode. I shared the binaries internally and didn't hear any issues. I'll try running those.

@seanyesmunt

This comment has been minimized.

Show comment
Hide comment
@seanyesmunt

seanyesmunt Jul 16, 2018

Member

Seems to work fine with a binary. I'm guessing it was just from running in dev mode. Maybe we can simplify the geometry in dev mode? That should help.

Member

seanyesmunt commented Jul 16, 2018

Seems to work fine with a binary. I'm guessing it was just from running in dev mode. Maybe we can simplify the geometry in dev mode? That should help.

@btzr-io

This comment has been minimized.

Show comment
Hide comment
@btzr-io

btzr-io Jul 19, 2018

Collaborator

We are seeing some issues where the app becomes super un-responsive after viewing 3d files (I've had to restart twice after my computer freezes).

Not sure what you mean by after, the only time I'm seeing this issue is while loading the model:

Loading 3D model...

Looks like the loader is blocking the UI until the loading and parsing process of the file is completed
https://stackoverflow.com/questions/48636384/web-workers-for-loading-object-in-three-js

Maybe we can simplify the geometry in dev mode?

I tried to follow the webgl_modifier_simplifier example but the model disappears from the scene.

Collaborator

btzr-io commented Jul 19, 2018

We are seeing some issues where the app becomes super un-responsive after viewing 3d files (I've had to restart twice after my computer freezes).

Not sure what you mean by after, the only time I'm seeing this issue is while loading the model:

Loading 3D model...

Looks like the loader is blocking the UI until the loading and parsing process of the file is completed
https://stackoverflow.com/questions/48636384/web-workers-for-loading-object-in-three-js

Maybe we can simplify the geometry in dev mode?

I tried to follow the webgl_modifier_simplifier example but the model disappears from the scene.

@seanyesmunt seanyesmunt merged commit 2d456f1 into master Jul 19, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@btzr-io btzr-io deleted the three-viewer branch Jul 26, 2018

@btzr-io btzr-io referenced this pull request Jul 27, 2018

Open

Multithreading #1827

@skhameneh skhameneh referenced this pull request Sep 17, 2018

Open

WIP: Add 3D (STL) file support #600

0 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment