Add 3D-file-viewer component #1558
Labels
No labels
accessibility
app-parity
area: creator
area: daemon
area: design
area: devops
area: discovery
area: docs
area: installer
area: internal
area: livestream
area: performance
area: proposal
area: reposts
area: rewards
area: search
area: security
area: subscriptions
area: sync
area: ux
area: viewer
area: wallet
BEAMER
channel
comments
community PR
consider soon
core team
css
dependencies
electron
Epic
feature request
first-timers-only
good first issue
hacktoberfest
help wanted
hub-dependent
icebox
Invalid
level: 0
level: 1
level: 2
level: 3
level: 4
merge when green
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
notifications
odysee
on hold
playlists
priority: blocker
priority: high
priority: low
priority: medium
protocol dependent
recsys
redesign
regression
resilience
sdk dependent
Tom's Wishlist
trending
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbry-desktop#1558
Loading…
Reference in a new issue
No description provided.
Delete branch "three-viewer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Changes
A basic ThreeJS 3D viewer based on Autodesk/3DViewerComponent
Test
Todo (WIP)
Preview
@btzr-io Is this ready for review?
@seanyesmunt Maybe we should use a progress bar instead of the current spinner for the loading screen, What do you think?
@seanyesmunt So I think it's ready for review.
Will check this out today!
ok, I'll setup a test branch...
@seanyesmunt Test branch: https://github.com/lbryio/lbry-app/tree/test-3d
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.
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 https://github.com/lbryio/lbry-app/pull/1576?
Oh I see that PR references this component, so it's the other way around. Ignore me
@seanyesmunt where did you test it? check the
test-branch
: https://github.com/lbryio/lbry-app/pull/1558#issuecomment-396812301This is dependent of #1576 so you should probably review that one first ✌️
@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.
@tzarebczan fixed in
5e1d6c2901
@btzr-io tried an stl file yesterday on this branch and got "this file cannot be played".
@tzarebczan There is no implementation of the component yet 🙃
Planning to merge this sometime this soon.
You shouldn't need to bind
this
in these functions.handleStart
(and the others) uses the samethis
referenceVery small comments. Also asking @skhameneh for a review. I will continue to test.
I think we will hold off on the progress bar for now, we have a progress percentage below the file.
I am going to add analytics for start to stream time, that will give us an idea of average time spent looking at the loading screen. If it's decently high I think we can add it.
I don't think this function is being used? I see it being called below, but that value isn't being used.
I added this so it works, this component should probably live inside of
component/viewers/...
to keep it consistent.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.
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
Possibly realated to running in dev mode. I shared the binaries internally and didn't hear any issues. I'll try running those.
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.
34ba2cf3eb/src/renderer/component/threeViewer/internal/loader.js (L24)
Not sure what you mean by after, the only time I'm seeing this issue is while loading the 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
I tried to follow the
webgl_modifier_simplifier
example but the model disappears from the scene.