photo-sphere-viewer-lensflare-plugin
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "photo-sphere-viewer-lensflare-plugin", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Plugin to add lens flares on a 360° pano built with photo-sphere-viewer", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
{ | ||
"name": "photo-sphere-viewer-lensflare-plugin", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Plugin to add lens flares on a 360° pano built with photo-sphere-viewer", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
116
README.md
@@ -69,3 +69,119 @@ # photo-sphere-viewer-lensflare-plugin | ||
## Methods | ||
### `toggleAllLensflares` | ||
Toggle all lens flares. | ||
```js | ||
viewer.toggleAllLensflares(); | ||
``` | ||
### `showAllLensflares` | ||
Show all lens flares. | ||
```js | ||
viewer.showAllLensflares(); | ||
``` | ||
### `hideAllLensflares` | ||
Hide all lens flares. | ||
```js | ||
viewer.hideAllLensflares(); | ||
``` | ||
### `getNbLensflares` | ||
Get the number of lens flares. | ||
```js | ||
const nb = viewer.getNbLensflares(); | ||
``` | ||
### `getLensflares` | ||
Get all the lens flares. | ||
```js | ||
const lensflares: LensflareObject[] = viewer.getLensflares(); | ||
``` | ||
### `getLensflare` | ||
Get a lens flare. | ||
```js | ||
const lensflare: LensflareObject = viewer.getLensflare('sun'); | ||
``` | ||
### `addLensflare` | ||
Add a lens flare. | ||
```js | ||
lensflaresPlugin.addLensflare({ | ||
id: 'sun', | ||
position: { yaw: '145deg', pitch: '2deg' }, | ||
type: 0, | ||
}); | ||
``` | ||
### `updateLensflare` | ||
Update a lens flare. | ||
```js | ||
lensflaresPlugin.updateLensflare({ | ||
id: 'sun', | ||
position: { yaw: '145deg', pitch: '2deg' }, | ||
type: 0, | ||
}); | ||
``` | ||
### `removeLensflare` | ||
Remove a lens flare. | ||
```js | ||
lensflaresPlugin.removeLensflare('sun'); | ||
``` | ||
### `removeLensflares` | ||
Remove multiple lens flares. | ||
```js | ||
lensflaresPlugin.removeLensflares(['sun', 'moon']); | ||
``` | ||
### `setLensflares` | ||
Clear all lens flares and add new ones. | ||
```js | ||
lensflaresPlugin.setLensflares([ | ||
{ | ||
id: 'sun', | ||
position: { yaw: '145deg', pitch: '2deg' }, | ||
type: 0, | ||
}, | ||
{ | ||
id: 'moon', | ||
position: { yaw: '30.6deg', pitch: '41.2deg' }, | ||
type: 0, | ||
} | ||
]); | ||
``` | ||
### `clearLensflares` | ||
Clear all lens flares. | ||
```js | ||
lensflaresPlugin.clearLensflares(); | ||
``` | ||
## Examples | ||
@@ -72,0 +188,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
846263
223