Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sphere-viewer

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sphere-viewer - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

2

package.json
{
"name": "sphere-viewer",
"version": "1.1.1",
"version": "1.1.2",
"description": "A simple JavaScript library for displaying spherical images on desktop and mobile browsers",

@@ -5,0 +5,0 @@ "main": "dist/sphere-viewer.js",

@@ -7,3 +7,3 @@ # SphereViewer.js

* customizable through config
* image preloading for slower connection
* image preloading for slower connection (only in "sphere" mode)
* displays spinner while loading images

@@ -26,2 +26,8 @@ * can hide the triopod by displaying custom logo at the sphere bottom

Four examples are provided:
* **sphere.html** - rendering a spherical image coming from a Ricoh Theta/Google Street View
* **tiles.html** - rendering a series of rectilinear tiles onto a cube (faster on old devices)
* **atlas.html** - rendering a rectilinear tiles from a single atlas image (faster on old devices)
* **force-cube.html** - a special case where the spherical (equirectangular) image is rendered onto a 3D cube instead of a 3D sphere (default)
## Installation

@@ -50,3 +56,5 @@ ### NPM installation

```javascript
// defining spinner config
var isMobile = window.devicePixelRatio!==1;
// defining options
var config = {

@@ -56,11 +64,11 @@ // providing multiple images for the pre-loader

// (if set) the logo will be displayed at the bottom
// (optional) setting up a logo, which will be displayed at the bottom
// of the sphere, which is usefull for hiding the triopod
logo:'img/logo.png',
// (if set) the usage hint is displayed in the center of the screen
// and is hidden after the user clicks/taps the screen
// (optional) defining hint, which will be displayed in the center
// of the screen and is hidden after the user clicks/taps the screen
hint: isMobile ? 'img/sphere-icon-mobile.png' : 'img/sphere-icon-desktop.png',
// overriding the default control config
// (optional) overriding the default control config
control: {

@@ -70,3 +78,3 @@ autoRotate: true

// overidding the default spinner config
// (optional) overidding the default spinner config
spinner: {

@@ -76,4 +84,5 @@ groupRadius: 20

// Here we can define what the close button should contain
// the HTML specified here will be placed inside a <div>
// (optional) defining what the close button should contain
//
// The HTML specified here will be placed inside a <div>
// we can the style it as we wish via CSS.

@@ -87,3 +96,3 @@ // When user clicks/taps the button, the sphere will close

// Here we could override the default THREE.js UV mapping, by providing a mapper function
// (optional) Here we could override the default THREE.js UV mapping, by providing a mapper function
// uvMapper: (geometry) => { ... doing some custom UV mapping ... }

@@ -90,0 +99,0 @@ };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc