Skip to content

Commit 8293147

Browse files
committed
added map plugin and lensflare plugin
1 parent f0579e7 commit 8293147

File tree

6 files changed

+292
-232
lines changed

6 files changed

+292
-232
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ npm install react-photo-sphere-viewer
99
```
1010

1111
## Library Version
12-
Original Wrapped Library: [PhotoSphereViewer](https://github.com/mistic100/Photo-Sphere-Viewer) Version: 5.0.2 [<font color="green">**NEW**</font>]
13-
Now the component version is composed by the semantic version of the wrapper and the version of the original library. For example, the current version is 3.2.0-psv5.0.2. This means that the wrapper is in version 3.2.0 and the original library [psv](https://github.com/mistic100/Photo-Sphere-Viewer) is in version 5.0.2.
12+
Original Wrapped Library: [PhotoSphereViewer](https://github.com/mistic100/Photo-Sphere-Viewer) Version: 5.1.0 [<font color="green">**NEW**</font>]
13+
Now the component version is composed by the semantic version of the wrapper and the version of the original library. For example, the current version is 3.3.0-psv5.1.0. This means that the wrapper is in version 3.3.0 and the original library [psv](https://github.com/mistic100/Photo-Sphere-Viewer) is in version 5.1.0.
1414

1515
## Description
1616

@@ -188,6 +188,7 @@ type ViewerConfig = {
188188
download: string;
189189
fullscreen: string;
190190
menu: string;
191+
close: string;
191192
twoFingers: string;
192193
ctrlZoom: string;
193194
loadError: string;
@@ -201,6 +202,8 @@ type ViewerConfig = {
201202
### Plugins
202203
To use the standard plugins provided by the original library, you need to pass the `plugins` prop to the component. The prop is an array of plugins. Each plugin can be a constructor or an array of constructor and options. To include them in the component, you need to import them directly from the "react-photo-sphere-viewer" package.
203204

205+
> The only "third-party" plugin that is supported is the "Lensflare" plugin. To use it, you need to import it from the "react-photo-sphere-viewer" package.
206+
204207
```jsx
205208
import { ReactPhotoSphereViewer, CompassPlugin, MarkersPlugin } from 'react-photo-sphere-viewer';
206209

example/package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/src/App.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import './App.css';
2-
import { ReactPhotoSphereViewer, MarkersPlugin } from 'react-photo-sphere-viewer';
2+
import { ReactPhotoSphereViewer, MarkersPlugin, LensflarePlugin } from 'react-photo-sphere-viewer';
33
import React from 'react';
44

55
function App() {
@@ -56,6 +56,19 @@ function App() {
5656
}
5757
]
5858
}
59+
],
60+
[
61+
LensflarePlugin,
62+
{
63+
// list of lensflares
64+
lensflares: [
65+
{
66+
id: 'sun',
67+
position: { yaw: '145deg', pitch: '2deg' },
68+
type: 0,
69+
}
70+
]
71+
}
5972
]
6073
];
6174

0 commit comments

Comments
 (0)