react-pannellum icon indicating copy to clipboard operation
react-pannellum copied to clipboard

How to useMemo when click on Hotspot and clear WebGL cache

Open Deco90 opened this issue 3 years ago • 0 comments

Hello, I'm actually trying to replace the React-pannellum package and see if your package will solve a particular problem for me. I have a problem with WebGL not cleaning and after a few clicks on the hotspot I get an error. That's why i want to use UseMemo and maybe its. On click hotspot i will want to navigate another picture. I want to use react hook and functional component.

my code below:

import React from "react"; import ReactPannellum from "react-pannellum";

function App() {

return (

<ReactPannellum id="pannellum" sceneId="circle" imageSource="https://pannellum.org/images/from-tree.jpg" config={{ hotSpots: [ { pitch: -0.9, id: 12, yaw: 0, type: "info", text: "North Charles Street", //onClick hotspot naviagte to imageSource: "https://pannellum.org/images/bma-0.jpg", }, ], }} style={{ width: "100%", height: "90vh", }} />
); }

export default App;

Deco90 avatar Jun 16 '21 17:06 Deco90