facebookarchive / react-360

Create amazing 360 and VR content using React
https://facebook.github.io/react-360
Other
8.73k stars 1.23k forks source link

ASKING QUESTION #392

Open sanBastia opened 6 years ago

sanBastia commented 6 years ago

hi everybody, i have a simple question, do you have any intruction or tutorial for viewing PDF file in reactVR ? thank you so much

andrewimm commented 6 years ago

If you can render a PDF to a canvas, you can render that canvas to a texture in React VR: https://github.com/facebook/react-vr/tree/master/Examples/CustomTexture

I don't have any suggestions for ways to render PDF to canvas, though. You'll need to figure that out yourself.

sanBastia commented 6 years ago

Thank you so much @andrewimm !

sanBastia commented 6 years ago

hi @andrewimm , do you have any example for custom texture ? cause i dont get it on that link, i just figured out how to render pdf into canvas, thank you

beelarr commented 6 years ago

@sanBastia I am working on the same thing. Either rendering pdf or epub files. I'll let you know when/if I come up with a solution.

LiuC520 commented 6 years ago

@sanBastia @beelarr you can see this example, I did this successful , show_pdf_in_react360 https://github.com/LiuC520/ReactVR/tree/master/examples/show_pdf_in_react360

LiuC520 commented 6 years ago

use canvas and texture in Plane/Box/module... , use pdf.js in client.js and index.html, it can draw pdf on canvas https://github.com/LiuC520/react_vr_pdf