Pannellum: How can I use this in React.js application?

Created on 4 Jul 2018  路  3Comments  路  Source: mpetroff/pannellum

Can I use this in my React.js application?

I see there is node module package of this library, but not sure if I can use in React.

question

Most helpful comment

You can use also my fork
npm install --save github:saidmoya12/pannellum
then import

import pannellum from "pannellum";
...

let viewer = pannellum.viewer('panellum', [config]);

I hope will be useful

All 3 comments

You need to include the minified pannellum.js script in the page and the pannellum.css style sheet. I have no idea how this is normally done in React, since I've never used it.

@mpetroff Thank you for your reply.

I resolved this by importing pannellum scripts and css in the head of public/index.html.
After that, I can access window.pannellum.viewer in any components.

You can use also my fork
npm install --save github:saidmoya12/pannellum
then import

import pannellum from "pannellum";
...

let viewer = pannellum.viewer('panellum', [config]);

I hope will be useful

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shtrudelsupport picture shtrudelsupport  路  3Comments

DietRedThunder picture DietRedThunder  路  6Comments

tomas-nz picture tomas-nz  路  4Comments

DStillingfleet picture DStillingfleet  路  8Comments

arpu picture arpu  路  6Comments