Giter Site home page Giter Site logo

jquery-threesixty's Introduction

jquery.threesixty

A jQuery plugin for 360 image rotations. Use a vertical/horizontal spritesheet (recommending Sprite Factory) as a background-image on an element, call the plugin on the element, and magic happens. Much <3 to Aaron Bohenick for cat statue renders~

Options

  • dragAxis takes either a string of x or y indicating the axis in which the mouse drag should trigger a sprite change (default: 'x')
  • spriteDim takes an object with an x and y property of the dimensions of a single sprite
  • spriteSheetDim takes an object with an x and y property of the dimensions of the entire image
  • sensitivity a number of how many pixels a drag has to move to trigger the next frame of the animation (default: 3)

Example

<div class="threesixty" style="height:390px; width:280px; background-image: url(360.jpg);"></div>
<script>
    $('.threesixty').threesixty({
        dragAxis: 'x',
        spriteDim: { x: 280, y: 390 },
        spriteSheetDim: { x: 280, y: 15600 }
        sensitivity: 3
    });
</script>

Contributing

This project uses smoosh for compiling, linting.

jquery-threesixty's People

Contributors

jsantell avatar

Stargazers

 avatar Kevin Arnold Zorem avatar Rochak Chauhan avatar Rami avatar Fabien Franzen avatar Marc avatar Miroslav Vitanov avatar Andrew Mason avatar Arielle Nguyen avatar JT5D avatar João Pescada avatar Brandon Burkeen avatar  avatar

Watchers

Jason Hill avatar Jon Bytof avatar Mark Platt avatar Brian E. McElaney avatar  avatar lactose avatar James Cloos avatar Chris Ell avatar Mike Dalton avatar Curt Howard avatar Lucas Boyd avatar Brian Berg avatar F.M. avatar  avatar Jeff Yucis avatar Dustin Hayes avatar James Van Arsdale III avatar Adam Hoffman avatar Kristen Ward avatar Cassandra King avatar Joe Giambrone avatar Ross Lieberman avatar  avatar Joe Hughes avatar Darielle Davis avatar  avatar Jessica Barnett avatar  avatar  avatar  avatar

jquery-threesixty's Issues

Apply 360 view for multiple image in one page

Is it possible to have multiple thumbnails and have each of them a 360 view of the object?
I've tried tinkering with the demo index.html using id "threesixty-a" instead of class. Duplicated the style and <script> for each id. But it didn't work.
I understand that this feature usually used for a page that has only a single object. But I've seen plugins like this (https://www.magictoolbox.com/magic360/examples/) that's able to display multiple instances of the 360 view.

Second question, can I prepare the image sprite manually in Photoshop? I don't quite understand how to use the Sprite-Factory.

Much appreciated!

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.