New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

generator-360-photo

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generator-360-photo

Create a web based 360 photo scaffold with aframe, you can host it on github pages or any static web hosting

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

generator-360-photo NPM version Build Status Dependency Status Coverage percentage

Create a web based 360 photo scaffold with aframe, you can host it on github pages or any static web hosting

You don't need upload your 360 photo to Facebook to share with others. All you need is a static web hosting (ex: github page) and generator-360-photo.

Installation

First, install Yeoman and generator-360-photo using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-360-photo

Create a folder with your panorama image. (Currently generator-360-photo only support jpg or png with equirectangular porjection, you can get the image from 360 cameras or apps like google streetview)

Enter the folder then generate your project:

yo 360-photo

generator-360-photo will guide you to generate the scaffold for web hosting this 360 photo.

Example

$ yo 360-photo

     _-----_     ╭──────────────────────────╮
    |       |    │      Welcome to the      │
    |--(o)--|    │    generator-360-photo   │
   `---------´   │        generator!        │
    ( _´U`_ )    ╰──────────────────────────╯
    /___A___\   /
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

? Where's your photo's path? 2016-06-06_21.50.35.jpg
? Enter your photo's title 360 photo
? Enter the file name photo
? Would you embed this photo within a iframe? Yes
? Would you like to create 360 photo scaffold in this folder? Yes
   create photo.html

generator-360-photo also do the image optimize and resizing for you. The sample image size is optimized dramatically from 5.62MB(5660x2830) to 481KB(2048x1024).

What does embedded mean?

Refer to aframe, The generated scaffold will not contain fullscreen style when say yes.

Change default view orientation

You can change default view orientation to better present the view you want visitors to see at first.

Edit the rotation attribute in a-sky tag to specify the orientation of the photo.

<a-sky src="#img" rotation="0 0 0"></a-sky>

The 3 values in rotation are the roll (x), pitch (y), and yaw (z). My suggestion is DO NOT edit the first value (roll), it will change the default horizontal, which makes navigation weired.

Enhancement

The scaffold is fully based on aframe, the web framework for builing VR experience. You can refer aframe to move your 360 photo to the new level.

License

MIT © gasolin

Keywords

FAQs

Package last updated on 18 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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