Skip to content

Commit

Permalink
Fixed readme mistake and increased version number
Browse files Browse the repository at this point in the history
  • Loading branch information
Elius94 committed Feb 20, 2023
1 parent 3d41b54 commit 16404b3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,52 +68,60 @@ const viewer = new PhotoSphereViewer.Viewer({

## Methods

To call methods you need to get the plugin instance.

```js
const lensflaresPlugin = viewer.getPlugin(LensflarePlugin);
```

and then you can call the methods.

### `toggleAllLensflares`

Toggle all lens flares.

```js
viewer.toggleAllLensflares();
lensflaresPlugin.toggleAllLensflares();
```

### `showAllLensflares`

Show all lens flares.

```js
viewer.showAllLensflares();
lensflaresPlugin.showAllLensflares();
```

### `hideAllLensflares`

Hide all lens flares.

```js
viewer.hideAllLensflares();
lensflaresPlugin.hideAllLensflares();
```

### `getNbLensflares`

Get the number of lens flares.

```js
const nb = viewer.getNbLensflares();
const nb = lensflaresPlugin.getNbLensflares();
```

### `getLensflares`

Get all the lens flares.

```js
const lensflares: LensflareObject[] = viewer.getLensflares();
const lensflares: LensflareObject[] = lensflaresPlugin.getLensflares();
```

### `getLensflare`

Get a lens flare.

```js
const lensflare: LensflareObject = viewer.getLensflare('sun');
const lensflare: LensflareObject = lensflaresPlugin.getLensflare('sun');
```

### `addLensflare`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "photo-sphere-viewer-lensflare-plugin",
"version": "1.0.4",
"version": "1.0.5",
"description": "Plugin to add lens flares on a 360° pano built with photo-sphere-viewer",
"main": "dist/index.js",
"module": "dist/index.module.js",
Expand Down

0 comments on commit 16404b3

Please sign in to comment.