Giter Club home page Giter Club logo

angular-photosphere-directive's Introduction

#Photosphere directive for Angular.js

##Getting started :

Import Angular, three.js and photosphere.min.js

<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.6/angular.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/threejs/r69/three.min.js"></script>
<script src="libs/photosphere.min.js"></script>

Add the 'photosphere' module to your app

angular.module('myApp', ['photosphere']);

##Use :

<photosphere src="path/img.jpg"></photosphere>

##Optionnal attributes :

    <photosphere src="path/img.jpg"
                 width="1024"               // Default is 640
                 height="768"               // Default is 480
                 speed="10"                 // Initial rotation speed. Default is 0. Has to be between 0 and 20
                 resolution="40"            // Number of division of the sphere on which is mapped the picture. Default is 30. Has to be between 10 and 80.
                 controls="all">            // Can be 'all', 'wheel', 'pointer' or 'none'. Default is 'all'
    </photosphere>

##Advices

  • You can put multiple photospheres on the same webpage
  • Working on smartphones/tablets
  • Big resolutions values can have effects on the performances.
  • Don't use too heavy pictures (like 10 Mo), people don't like to wait...
  • CORS are enabled, if you need to host your photopsheres on Google Drive you must follow this tutorial : https://support.google.com/drive/answer/2881970?hl=en

##Build

If you want to modify and re-build the project, you will have to convert the ts file (with tsc, atom-typescript, Visual Studio, whatever you want) and then to run :

npm i -g broccoli-cli
npm install
rm -r -f dist && broccoli build dist

##Coming Soon

  • Async load of the pictures
  • Headtracking control (with webcam)
  • LeapMotion control
  • Better reaction to resize
  • Setting the fov of the camera
  • Fisheye view
  • Bower support

##License

MIT License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.