Javascript code for rotating 3D images and Displaying results _ javascript skills

Source: Internet
Author: User
This article mainly introduces JavaScript code for implementing 3D image rotation and display effects, which can realize 3D Rotation and transformation effects of page elements, and involves related techniques of JavaScript dynamic mathematical operations, for more information about how to implement 3D image rotation by using JS, see the example in this article. Share it with you for your reference. The details are as follows:

This is a piece of JavaScript code, which is used to rotate and display JavaScript images in a 3D model. For convenience of demonstration, the image is replaced with a number and the image location is reserved, which is faster, anyone who knows HTML knows how to do it. The rotation of this image requires manual control. The image is rotated once every click, which is very convenient.

The running effect is as follows:

The Online Demo address is as follows:

Http://demo.jb51.net/js/2015/js-3d-pic-scroll-show-style-codes/

The Code is as follows:

 Rotating ImagesScript var len; var showerObj; var listObj; var showerWidth = 800; var showerHeight = 400; var r; var cR = 0; var cR = 0; var timer = 0; window. onload = function () {showerObj = document. getElementById ("show"); listObj = showerObj. getElementsByTagName ("p"); len = listObj. length; r = Math. PI/180*360/len; for (var I = 0; I
 
  
  
  

1

2

3

4

5

6

7

8

9

0

A

B

1

2

3

I hope this article will help you design JavaScript programs.

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.