Image 3D Rotation JS effects implemented using Aui-core

Source: Internet
Author: User

This js special effect is implemented using a JS framework Aui-core. Aui-core is currently a test version, which adds CSS3 elements, therefore, do not use the IE browser to run the Internet browsing time. To make the Internet users see the final effect, use Google, Firefox, and other browsing methods to open the sport. If you don't talk about it, let's take a look at the effect first.

 

Corrected the following:

1. changed to the object-oriented method.

2. Fixed the flash BUG.

3. 360 degrees of Rotation

4. Scroll the mouse to switch the view

 

The main code is as follows:

OImg. bind ("mousedown", function () {oDoc. mousemove (function (e) {var mouseX = e. clientX, // continue mouseY = e. clientY, val = tmp-mouseX; if (val> 50) {_ IDX + = 1; transform (oCon [0], "rotateY (" + (_ IDX * deg) + "deg)");} else if (val <-50) {_ IDX-= 1; transform (oCon [0], "rotateY (" + (_ IDX * deg) + "deg)") ;}; tmp = mouseX; return false ;}); oDoc. mouseup (function () {tmp = 0; this. onmousemove = null; this. onmouseup = null ;}); return false ;});

The effect is as follows:

 

 

Source: http://www.jq-school.com/Detail.aspx? Id = 130

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.