-
Notifications
You must be signed in to change notification settings - Fork 584
Added support for rendering 3d NFTs #470
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
Conversation
🦋 Changeset detectedLatest commit: 6693ce0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…nt light as props to ThreeRenderer
This is a fairly basic, initial implementation using Three.js. It allows the user to pass in some simple options like camera position, ambient light, and Frustrum. I'm open to feedback on other options we might want to support. I'm also looking into file formats other than .glb as well. |
@JustinTime42 thanks for this PR, at first glance this looks good though I had hoped we might potentially be able to rely on model viewer for the 3d rendering to avoid unnecessarily bundling three js etc (also supports more file types I believe) Let me know if you want to take a stab at implementing this with model viewer instead, otherwise I can review it as is in the coming days and we can get this in as an immediate improvement. :) |
@jnsdls Totally makes sense - thanks for the feedback! But I figured I'd commit what I have working so I can get feedback. If this looks like I'm generally on the right track I'll get to work fixing the types and getting everything working properly and safely. |
@jnsdls I have not been able to find an effective way of properly typing the element without installing model-viewer as a dependency, so I've left that as an 'any' type where I added model-viewer as a JSX intrinsic element. I'm definitely open to suggestions on this - I'm not a typescript expert yet so I might be missing something here. Meanwhile this latest commit seems to work pretty well and I think it'll make a decent first version of supporting 3D models. Could you take a look and let me know what you think? |
@JustinTime42 looks like you ran npm install instead of yarn install btw - mind deleting the package-lock.json? |
@joaquim-verges Oops - package-lock.json deleted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks this is the right direction for sure!
made a couple of changes, @JustinTime42. Let me know if this all still works in the same ways that you've been testing it! |
@jnsdls The only adjustment needed is that I changed it to |
Hey @JustinTime42 awesome job! Now I can finally see the NFTs on my dashboard, one thing that happens is that I see them on the NFT List, but when I click on the the NFTs, I don't see them rendered on the NFT Drawer. Basically it seems like it doesn't have a width, because adding either a width or min-width fixes it: If we could figure out this last thing out we can ship this! |
e2e test on CRA is failing |
/release-pr |
/release-pr |
shipping it @JustinTime42 🚀 |
This adds support for .glb files to be displayed by NFTMediaRenderer per issue #82.