0.2.1 • Published 5 years ago
svelte-panolens v0.2.1
svelte-panolens
This is very minimal wrapper for panolens.js
It's currently based on version 0.12.1 of panolens.js (see Caution).
Components
Currently the following components have been wrapped:
- ImagePanorama
- LittlePlanet
- GoogleStreetviewPanorama
Install
npm install svelte-panolens --save-devConfiguration
The configuration if mostly mapped on the existing panolens.js config.
The only exception is src which is used the provide the URL of the image you want to render.
The dimension are determined by the parent element.
Example
<script>
import { LittlePlanet } from 'svelte-panolens';
const config = {
src: '/example.jpg',
controlBar: false,
autoRotate: true
};
</script>
<div class="main">
<LittlePlanet {config} />
</div>
<style>
.main {
width: 700px;
height: 350px;
}
</style>Developing
npm install
npm run devCaution
This module uses a modified version of panolens.js. The modifications are described here.